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 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1196 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1198 <b→> doesn't work! </b→>
1200 <bä> doesn't work! </bä>
1202 <boo> works fine </boo>
1204 <s.foo>s.foo</s.foo>
1208 <p><b→> doesn't work! </b→>
1209 </p><p><bä> doesn't work! </bä>
1210 </p><p><boo> works fine </boo>
1211 </p><p><s.foo>s.foo</s.foo>
1212 </p><p><sub-ID#1>
1217 Isolated close tags should be treated as literal text (bug 52760)
1224 </p><p><s.foo>s</s>
1229 ### Special characters
1233 Bare pipe character (bug 52363)
1242 Bare pipe character from a template (bug 52363)
1251 ### <nowiki> test cases
1255 <nowiki> unordered list
1257 <nowiki>* This is not an unordered list item.</nowiki>
1259 <p>* This is not an unordered list item.
1266 <nowiki>Lorem ipsum dolor
1274 <p>Lorem ipsum dolor
1287 :There is not nowiki.
1288 :There is <nowiki>nowiki</nowiki>.
1290 #There is not nowiki.
1291 #There is <nowiki>nowiki</nowiki>.
1293 *There is not nowiki.
1294 *There is <nowiki>nowiki</nowiki>.
1296 <dl><dd>There is not nowiki.</dd>
1297 <dd>There is nowiki.</dd></dl>
1298 <ol><li>There is not nowiki.</li>
1299 <li>There is nowiki.</li></ol>
1300 <ul><li>There is not nowiki.</li>
1301 <li>There is nowiki.</li></ul>
1306 Entities inside <nowiki>
1308 <nowiki><</nowiki>
1315 Entities inside template parameters
1321 <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>
1325 Properly escape nowiki when combined with other wiki markup
1329 <p>* </nowiki> tag</p>
1331 <nowiki>* </nowiki></nowiki> tag
1338 Comments and Indent-Pre
1340 <!-- comment 1 --> asdf
1342 <!-- comment 1 --> asdf
1345 <!-- comment 1 --> asdf
1346 <!-- comment 2 -->xyz
1348 <!-- comment 1 --> asdf
1349 <!-- comment 2 --> xyz
1405 asdf<!-- comment 1 -->jkl
1415 <!-- foo --> b <!-- bar -->
1429 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1435 Comment semantics and delimiters
1437 <!-- --><!----><!-----><!------>
1443 Comment semantics and delimiters, redux
1445 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1446 -- foo -- funky huh? ... -->
1452 Comment semantics and delimiters: directors cut
1454 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1455 everything starting with < followed by !-- until the first -- and > we see,
1456 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1464 Comment semantics: nesting
1466 <!--<!-- no, we're not going to do anything fancy here -->-->
1473 Comment semantics: unclosed comment at end
1475 <!--This comment will run out to the end of the document
1480 # Bug 58184: document parsoid's behaviour
1482 Suppress comment closing tag in lenient browsers
1484 parsoid=wt2html,html2html
1486 <!-- Browsers--!> think this is closed -->
1490 <!-- Browsers--¡> think this is closed -->
1494 Comment in template title
1503 Comment on its own line post-expand
1515 Comment on its own line post-expand with non-significant whitespace
1527 Multiple comments should still parse as SOL-transparent
1529 parsoid=wt2html,wt2wt
1532 <!--c2--><!--c3--><!--c4-->*b
1543 ### paragraph wrapping tests
1558 Block tag on one line (<div>)
1574 Block tag on one line (<blockquote>)
1576 a <blockquote>foo</blockquote>
1580 a <blockquote>foo</blockquote>
1592 Block tag on both lines (<div>)
1609 Block tag on both lines (<blockquote>)
1611 a <blockquote>foo</blockquote>
1613 b <blockquote>foo</blockquote>
1615 a <blockquote>foo</blockquote>
1616 b <blockquote>foo</blockquote>
1630 Multiple lines without block tags
1654 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1655 # So, we have a separate section for Parsoid. We don't want
1656 # to mimic this stripping behavior in Parsoid. It affects
1657 # editing experience and also requires us to maintain additional
1660 Empty lines between lines with block tags
1698 <div data-parsoid='{"stx":"html"}'></div>
1701 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1704 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1706 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1709 <div data-parsoid='{"stx":"html"}'>e</div>
1712 ## PHP parser emits output which is broken
1713 ## XXX The parsoid output doesn't match the tidy output.
1715 Unclosed HTML p-tags should be handled properly
1723 <p>foo</div></p>
1727 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1732 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1733 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1736 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
1740 a [[Category:A1]] [[Category:A2]]
1745 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1749 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
1755 <link href="Category:A1"/><p>a</p>
1759 ### Preformatted text
1768 And a [[Main Page|link]]
1774 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1779 Tabs don't trigger preformatted text
1783 This is preformatted text.
1789 <pre>This is preformatted text.
1795 Ident preformatting with inline content
1806 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1823 Regression with preformatted in <center>
1837 Bug 52763: Preformatted in <blockquote>
1843 indented cell (no pre-wrapping!)
1853 <p> indented cell (no pre-wrapping!)
1861 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1878 Bug 15491: <ins>/<del> in blockquote
1881 Foo <del>bar</del> <ins>baz</ins> quux
1885 <p>Foo <del>bar</del> <ins>baz</ins> quux
1891 # Note that the p-wrapping is newline sensitive, which could be
1892 # considered a bug: tidy will wrap only the 'Foo' in the example
1893 # below in a <p> tag. (see comment 23-25 of bug #6200)
1895 Bug 15491: <ins>/<del> in blockquote (2)
1897 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1900 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1906 <del>bar</del> <ins>baz</ins> quux</blockquote>
1910 <pre> with attributes (bug 3202)
1912 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1914 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1919 <pre> with width attribute (bug 3202)
1921 <pre width="8">Narrow screen goodies</pre>
1923 <pre width="8">Narrow screen goodies</pre>
1928 <pre> with forbidden attribute (bug 3202)
1930 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1932 <pre width="8">Narrow screen goodies</pre>
1937 Entities inside <pre>
1946 <pre> with forbidden attribute values (bug 3202)
1948 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1950 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1955 <nowiki> inside <pre> (bug 13238)
1963 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1971 <pre><nowiki>Foo</nowiki></pre>
1976 <nowiki> and <pre> preference (first one wins)
2007 </pre> inside nowiki
2009 <nowiki></pre></nowiki>
2015 # Parsoid doesn't strip empty tags, like Tidy does.
2017 Empty pre; pre inside other HTML tags (bug 54946)
2019 parsoid=wt2html,wt2wt
2050 HTML pre followed by indent-pre
2065 <p><pre>foo</pre></p>
2067 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2071 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2079 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2089 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2101 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2122 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2126 {{echo| foo}}{{echo| bar}}
2131 {{echo|<!--cmt--> foo}}
2133 <!--cmt-->{{echo| foo}}
2135 {{echo|{{echo| }}bar}}
2153 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2190 Things that look like <pre> tags aren't treated as such
2192 Barack Obama <President> of the United States
2193 <President></President>
2195 <p>Barack Obama <President> of the United States
2196 <President></President>
2200 ## PHP parser discards the "<pre " string
2202 Handle broken pre-like tags (bug 64025)
2206 {{echo|<pre <pre>x</pre>}}
2208 <table><pre </table>
2211 <table><pre></pre></table>
2214 <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>
2223 Parsoid: handle pre with space after attribute
2227 <pre style="width:50%;" >{{echo|foo}}</pre>
2229 <pre style="width:50%;">{{echo|foo}}</pre>
2232 # TODO / maybe: fix wt2wt for this
2234 Parsoid: Don't paragraph-wrap fosterable content
2260 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2288 #--------------------------------------------------------------------
2289 # Transclusion parameter whitespace stripping tests
2290 # Behavior is different for positional and named parameters
2291 #--------------------------------------------------------------------
2293 Templates: Strip leading and trailing whitespace from named-param values
2297 {{echo|1= {{echo|b}} }}
2310 <ul><li> d</li></ul>
2315 Templates: Don't strip whitespace from positional-param values
2319 {{echo|{{echo|b}} }}
2351 <ul><li> f</li></ul>
2359 Templates: Handle empty comment-and-ws-only lines correctly
2362 <!--should be ignored-->
2363 <!--should be ignored as well-->
2372 Templates: Handle comments in the target
2375 <!-- should be ignored -->
2378 {{echo<!-- should be ignored -->
2381 {{echo<!-- should be ignored -->|foo}}
2383 {{<!-- should be ignored -->echo|foo}}
2385 <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>
2387 <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>
2389 <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>
2391 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2395 Templates: Handle comments in parameter names (bug 67657)
2398 <!-- should be ignored -->
2402 <!-- should be ignored -->
2405 {{echo|1<!-- should be ignored --> = foo}}
2407 {{echo|<!-- should be ignored -->1 = foo}}
2409 <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>
2411 <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>
2413 <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>
2415 <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>
2419 Templates: Other wikitext in parameter names (bug 67657)
2423 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2429 #--------------------------------------------------------------------
2430 # Transclusion parameter escaping tests
2431 #--------------------------------------------------------------------
2433 Templates: Parsoid parameter escaping test 1
2437 {{echo|[foo]|{{echo|[bar]}}}}
2439 <p about="#mwt1" typeof="mw:Transclusion"
2440 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2444 Parsoid: Pipes in external links in template parameter
2448 {{echo|[{{echo|http://example.com}} link]}}
2450 <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>
2454 Parsoid: pipe in transclusion parameter
2458 {{echo|http://foo.com/a|b}}
2460 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2461 typeof="mw:Transclusion"
2462 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>
2466 Parsoid: Pipe in external link target and content in template parameter
2468 parsoid=html2wt,wt2wt
2470 {{echo|[http://foo.com/a|b a|b]}}
2472 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2473 typeof="mw:Transclusion"
2474 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2475 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2479 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2483 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2485 <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>
2489 Templates: Don't escape already nowiki-escaped text in template parameters
2491 parsoid=html2wt,wt2wt
2493 {{echo|foo<nowiki>|</nowiki>bar}}
2494 {{echo|<nowiki><div></nowiki>}}
2495 {{echo|<nowiki></nowiki>}}
2497 <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>
2498 <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>
2499 <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>
2505 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2507 parsoid=html2wt,wt2wt
2509 {{echo|{{echo|1=bar}}}}
2511 <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>
2516 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2522 <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>
2527 Templates: Preserve blank parameter names
2534 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2538 ### Parsoid-centric tests for testing RT edge cases for pre
2542 1a. Indent-Pre and Comments
2555 1b. Indent-Pre and Comments
2568 1c. Indent-Pre and Comments
2581 1d. Indent-Pre and Comments
2582 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2595 2a. Indent-Pre and tables
2616 2b. Indent-Pre and tables
2632 2c. Indent-Pre and tables (bug 42252)
2649 2d. Indent-Pre and tables
2666 <tbody><tr><td> b</td></tr>
2671 2e. Indent-Pre and table-line syntax
2684 2f. Indent-pre started by table-line syntax
2703 3a. Indent-Pre and block tags (single-line html)
2707 c <blockquote> foo </blockquote>
2712 c <blockquote> foo </blockquote>
2713 <pre><span> foo </span>
2716 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2717 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2718 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2719 <pre><span> foo </span>
2736 3b. Indent-Pre and block tags (multi-line html)
2741 <pre>a <span>foo</span>
2746 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2747 b <div data-parsoid='{"stx":"html"}'> foo </div>
2757 3c. Indent-Pre and block tags (pre-content on separate line)
2821 4. Indent-Pre and extension tags
2827 a <ul class="gallery mw-gallery-traditional">
2828 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2829 <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>
2830 <div class="gallerytext">
2837 <ul class="gallery mw-gallery-traditional">
2838 <li class="gallerybox" style="width: 155px">
2839 <div style="width: 155px">
2840 <div class="thumb" style="width: 150px;">
2841 <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>
2843 <div class="gallerytext"></div>
2850 Table wikitext syntax outside wiki-tables
2853 ! not a table heading
2856 | class="foo bar" | baz
2863 ! not a table heading
2866 | class="foo bar" | baz
2875 Render paragraphs when indent-pre is suppressed in blocklevels
2892 4. Multiple spaces at start-of-line
2910 ## NOTE: the leading white-space chars on empty line are significant
2912 5a. White-space in indent-pre
2924 ## NOTE: the leading white-space chars on empty line are significant
2926 5b. White-space in indent-pre
2945 5c. White-space in indent-pre
2958 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2981 7a. Indent-pre and category links
2983 parsoid=wt2html,wt2wt
2985 [[Category:foo]] <!-- No pre-wrapping -->
2986 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2988 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2989 <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 -->
2993 7b. Indent-pre and category links
2995 parsoid=wt2html,wt2wt
2998 [[Category:foo]] {{echo|b}}
3001 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
3002 <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>
3006 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3010 HTML-pre: 1. embedded newlines
3044 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3046 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3050 <pre data-parsoid='{"stx":"html"}'>
3055 <pre data-parsoid='{"stx":"html"}'>
3063 HTML-pre: big spaces
3100 <pre data-parsoid='{"stx":"html"}'>
3119 HTML-pre: 2: indented text
3132 HTML-pre: 3: other wikitext
3153 ### Definition lists
3160 <dl><dt> name </dt>
3161 <dd> Definition</dd></dl>
3166 Definition list for indentation only
3170 <dl><dd> Indented text</dd></dl>
3175 Definition list with no space
3180 <dd>Definition</dd></dl>
3185 Definition list with URL link
3187 ; http://example.com/ : definition
3189 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3190 <dd> definition</dd></dl>
3195 Definition list with bracketed URL link
3197 ;[http://www.example.com/ Example]:Something about it
3199 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3200 <dd>Something about it</dd></dl>
3205 Definition list with wikilink containing colon
3207 ; [[Help:FAQ]]: The least-read page on Wikipedia
3209 <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>
3210 <dd> The least-read page on Wikipedia</dd></dl>
3214 # At Brion's and JeLuF's insistence... :)
3216 Definition list with news link containing colon
3218 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3220 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3221 <dd> This isn't even a real newsgroup!</dd></dl>
3224 <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>
3228 Malformed definition list with colon
3230 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3232 <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>
3237 Definition lists: colon in external link text
3239 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3241 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3242 <dd> OK, I made that up</dd></dl>
3247 Definition lists: colon in HTML attribute
3249 ;<b style="display: inline">bold</b>
3251 <dl><dt><b style="display: inline">bold</b></dt></dl>
3256 Definition lists: self-closed tag
3258 ;one<br/>two : two-line fun
3260 <dl><dt>one<br />two </dt>
3261 <dd> two-line fun</dd></dl>
3266 Bug 11748: Literal closing tags
3270 <dd>test test test test test</dd>
3272 <dd>test test test test test</dd>
3277 <dd>test test test test test</dd>
3279 <dd>test test test test test</dd>
3285 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3288 ; term : description
3293 <dl><dt> term </dt>
3294 <dd> description</dd></dl>
3295 <ul><li> unordered</li></ul>
3302 Definition list with empty definition and following paragraph
3314 Nested definition lists using html syntax
3323 Definition Lists: No nesting: Multiple dd's
3336 Definition Lists: Indentation: Regular
3344 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3349 Definition Lists: Indentation: Missing 1st level
3355 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3360 Definition Lists: Indentation: Multi-level indent
3364 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3369 Definition Lists: Hacky use to indent tables
3376 should be left alone
3378 <dl><dd><dl><dd><table>
3383 </td></tr></table></dd></dl></dd></dl>
3385 should be left alone
3390 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3398 should be left alone
3401 <dl><dd><dl><dd><table><tr>
3404 </tr></table><!-- bar --></dd></dl></dd></dl>
3406 should be left alone</p>
3410 Definition Lists: Hacky use to indent tables, with comment before table
3416 <dl><dd><dl><dd><!-- foo --><table><tr>
3418 </tr></table></dd></dl></dd></dl>
3423 Definition Lists: Hacky use to indent tables (WS-insensitive)
3432 <dd> <table><tr><td>a</td></tr></table> </dd>
3435 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3436 ## as an empty dt item. It also ignores all but the last ";" when followed
3437 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3438 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3441 ## Ex: ";;t2 ::d2" is transformed into:
3453 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3454 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3465 ## All Parsoid only definition list tests have this difference.
3467 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3468 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3471 Table / list interaction: indented table with lists in table contents
3486 <ul><li> b</li></ul>
3490 <ul><li> d</li></ul>
3491 </td></tr></table></dd></dl>
3496 Table / list interaction: lists nested in tables nested in indented lists
3519 </td></tr></table></dd></dl>
3526 Definition Lists: Nesting: Multi-level (Parsoid only)
3556 Definition Lists: Nesting: Test 2 (Parsoid only)
3576 Definition Lists: Nesting: Test 3 (Parsoid only)
3604 Definition Lists: Nesting: Test 4
3609 <dl><dd><dl><dd><dl><dt>t3</dt>
3610 <dd>d3</dd></dl></dd></dl></dd></dl>
3615 ## The Parsoid team believes the following three test exposes a
3616 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3617 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3618 ## It also exposes a "misfeature" in tidy, which doesn't like
3619 ## <dl> tags with a single <dt> child; it converts the <dt> into
3620 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3622 Definition Lists: Mixed Lists: Test 1
3628 <dl><dd><dl><dt><ul><li> foo</li>
3629 <li> bar</li></ul></dt></dl>
3630 <dl><dt> baz</dt></dl></dd></dl>
3665 Definition Lists: Mixed Lists: Test 2
3670 <ul><li><dl><dd> d1</dd>
3671 <dd> d2</dd></dl></li></ul>
3677 Definition Lists: Mixed Lists: Test 3
3682 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3683 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3689 Definition Lists: Mixed Lists: Test 4
3694 <ul><li><dl><dt>d1 </dt>
3697 <dd>d4</dd></dl></li></ul>
3703 Definition Lists: Mixed Lists: Test 5
3709 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3715 Definition Lists: Mixed Lists: Test 6
3720 <ol><li><ul><li><dl><dd>d1
3721 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3727 Definition Lists: Mixed Lists: Test 7
3732 <dl><dd><ul><li> d1</li>
3733 <li> d2</li></ul></dd></dl>
3739 Definition Lists: Mixed Lists: Test 8
3744 <dl><dd><ul><li> d1</li></ul>
3745 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3751 Definition Lists: Mixed Lists: Test 9
3755 <ul><li><dl><dt>foo </dt>
3756 <dd>bar</dd></dl></li></ul>
3762 Definition Lists: Mixed Lists: Test 10
3766 <ul><li><ol><li><dl><dt>foo </dt>
3767 <dd>bar</dd></dl></li></ol></li></ul>
3771 # The Parsoid team disagrees with the PHP parser's seemingly-random
3772 # rules regarding dd/dt on the next two tests. Parsoid is more
3773 # consistent, and recognizes the shared nesting and keeps the
3774 # still-open tags around until the nesting is complete.
3775 # (And tidy again converts <dt> to <dd> before 'bar'.)
3778 Definition Lists: Mixed Lists: Test 11
3783 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3784 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3785 <dl><dt>boo </dt>
3786 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3841 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3842 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3846 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3847 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3856 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
3858 Definition Lists: Weird Ones: Test 1
3860 *#;*::;; foo : bar (who uses this?)
3862 <ul><li><ol><li><dl><dt> foo </dt>
3863 <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>
3882 <dt>bar (who uses this?)</dt>
3914 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3915 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3927 Definition Lists: colons occurring in tags
3941 <dt><span>a:b</span></dt>
3942 <dt><div>a:b</div></dt>
3945 <dt><i>a:b</i></dt></dl>
3950 Definition Lists: colons and tables 1
3962 </td></tr></table></dd></dl>
3966 </td></tr></table></dd></dl>
3970 # Parsoid's output (as documented below) differs from php's in this case.
3971 # This is probably a bug. If we fixup parsoid to match php's output, the
3972 # above test should pass and the below test case can be removed. It is
3973 # unclear which output is more desirable.
3976 Definition Lists: colons and tables 2
3988 </td></tr></table></dd>
3992 </td></tr></table></dd></dl>
4000 External links: non-bracketed
4002 Non-bracketed: http://example.com
4004 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4008 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4010 External links: numbered
4012 Numbered: [http://example.com]
4013 Numbered: [http://example.net]
4014 Numbered: [http://example.com]
4016 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4017 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4018 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4021 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4022 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4023 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4027 External links: specified text
4029 Specified text: [http://example.com link]
4031 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4036 External links: trail
4038 Linktrails should not work for external links: [http://example.com link]s
4040 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4045 External links: dollar sign in URL
4047 http://example.com/1$2345
4049 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4053 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4055 External links: dollar sign in URL (autonumber)
4057 [http://example.com/1$2345]
4059 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4062 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4066 External links: open square bracket forbidden in URL (bug 4377)
4068 parsoid=wt2html,wt2wt,html2html
4070 http://example.com/1[2345
4072 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4075 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4079 External links: open square bracket forbidden in URL (named) (bug 4377)
4081 parsoid=wt2html,html2html
4083 [http://example.com/1[2345]
4085 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4088 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4091 # parsoid adds a space before the link name
4093 External links: open square bracket forbidden in URL (named) (bug 4377)
4096 [http://example.com/1 [2345]
4098 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4103 External links: nowiki in URL link text (bug 6230)
4105 [http://example.com/ <nowiki>''example site''</nowiki>]
4107 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4112 External links: newline forbidden in text (bug 6230 regression check)
4114 [http://example.com/ first
4117 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4123 External links: Pipe char between url and text
4125 [http://example.com | link]
4127 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4132 External links: protocol-relative URL in brackets
4134 [//example.com/ Test]
4136 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4140 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4142 External links: protocol-relative URL in brackets without text
4146 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4149 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4153 External links: protocol-relative URL in free text is left alone
4157 <p>//example.com/Foo
4162 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4164 foo//example.com/Foo
4166 <p>foo//example.com/Foo
4171 External links: with no contents
4173 [http://en.wikipedia.org/wiki/Foo]
4175 [[wikipedia:Foo|Bar]]
4177 [[wikipedia:Foo|<span>Bar</span>]]
4179 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4180 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4181 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4184 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4185 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4186 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4190 External links: Free with trailing punctuation
4200 http://example.com/url_with_(brackets)
4201 (http://example.com/url_without_brackets)
4202 http://example.com/url_with_entity
4203 http://example.com/url_with_entity 
4204 http://example.com/url_with_entity 
4205 http://example.com/url_with_entity<
4206 http://example.com/url_with_entity<
4207 http://example.com/url_with_entity<
4209 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4210 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4211 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4212 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4213 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4214 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4215 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4216 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4217 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4218 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4219 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4220 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4221 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4222 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4223 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4224 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4227 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4228 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4229 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4230 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4231 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4232 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4233 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4234 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4235 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4236 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4237 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4238 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4239 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4240 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4241 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4242 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4246 External links: No preceding word characters allowed (bug 65278)
4248 NOPEhttp://example.com
4249 N0http://example.com
4250 ok:http://example.com
4251 ok-http://example.com
4253 <p>NOPEhttp://example.com
4254 N0http://example.com
4255 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4256 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4263 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4265 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4270 External image from https
4272 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4274 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4279 External image (when not allowed)
4281 wgAllowExternalImages=0
4283 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4285 <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>
4290 Link to non-http image, no img tag
4292 Link to non-http image, no img tag: ftp://example.com/test.jpg
4294 <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>
4299 External links: terminating separator
4301 Terminating separator: http://example.com/thing,
4303 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4308 External links: intervening separator
4310 Intervening separator: http://example.com/1,2,3
4312 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4317 External links: old bug with URL in query
4319 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4321 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4326 External links: old URL-in-URL bug, mixed protocols
4328 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4330 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4335 External links: URL in text
4337 URL in text: [http://example.com http://example.com]
4339 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4344 External links: Clickable images
4346 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4348 <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>
4351 <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>
4355 External links: raw ampersand
4357 Old & use: http://x&y
4359 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4364 External links: encoded ampersand
4366 Old & use: http://x&y
4368 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4371 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4375 External links: encoded equals (bug 6102)
4377 http://example.com/?foo=bar
4379 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4382 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4386 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4387 ## does it number them. As discussed in bug 53505, we can identify
4388 ## autonumbered links via CSS.
4392 External links: [raw ampersand]
4394 Old & use: [http://x&y]
4396 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4399 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4402 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4403 # mode will return the [raw ampersand] wikitext
4405 External links: [encoded ampersand]
4407 parsoid=wt2html,wt2wt,html2html
4409 Old & use: [http://x&y]
4411 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4414 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4418 External links: [raw equals]
4420 [http://example.com/?foo=bar]
4422 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4425 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4428 # note that parsoid html is identical to [raw equals] case; so html2wt
4429 # mode will return the [raw equals] wikitext
4431 External links: [encoded equals] (bug 6102)
4433 parsoid=wt2html,wt2wt,html2html
4435 [http://example.com/?foo=bar]
4437 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4440 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4443 # xxx parsoid strips the IDN character, so the round-trip tests will
4444 # obviously fail and are disabled. --cscott
4446 External links: [IDN ignored character reference in hostname; strip it right off]
4448 parsoid=wt2html,wt2wt,html2html
4450 [http://e‌xample.com/]
4452 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4455 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4458 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4459 # Where an external link could easily circumvent the sanitization of the text of
4460 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4461 # test demands a higher standard. That's a bit strange.
4465 # http://example.com -> [http://example.com|http://example.com]
4466 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4468 # The first example is sanitized, but the second is not. Any security benefits
4469 # from this production are trivial to circumvent. Either remove this test and
4470 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4471 # the test accordingly.
4475 # xxx parsoid strips the IDN character, so the round-trip tests will
4476 # obviously fail and are disabled. --cscott
4478 External links: IDN ignored character reference in hostname; strip it right off
4480 parsoid=wt2html,html2html
4482 http://e‌xample.com/
4484 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4487 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4491 External links: www.jpeg.org (bug 554)
4495 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4499 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4501 External links: URL within URL (original bug 2)
4503 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4505 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4508 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4512 BUG 361: URL inside bracketed URL
4514 [http://www.example.com/foo http://www.example.com/bar]
4516 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4521 BUG 361: URL within URL, not bracketed
4523 http://www.example.com/foo?=http://www.example.com/bar
4525 <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>
4530 BUG 289: ">"-token in URL-tail
4532 http://www.example.com/<hello>
4534 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4539 BUG 289: literal ">"-token in URL-tail
4541 http://www.example.com/<b>html</b>
4543 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4546 <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>
4550 BUG 289: ">"-token in bracketed URL
4552 [http://www.example.com/<hello> stuff]
4554 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4559 BUG 289: literal ">"-token in bracketed URL
4561 [http://www.example.com/<b>html</b> stuff]
4563 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4568 BUG 289: literal double quote at end of URL
4570 http://www.example.com/"hello"
4572 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4577 BUG 289: literal double quote in bracketed URL
4579 [http://www.example.com/"hello" stuff]
4581 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4586 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4588 [http://www.example.com test]
4590 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4595 External links: link text with spaces
4597 [http://www.example.com a b c]
4598 [http://www.example.com ''a'' ''b'']
4600 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4601 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4606 External links: wiki links within external link (Bug 3695)
4608 [http://example.com [[wikilink]] embedded in ext link]
4610 <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>
4613 <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>
4617 BUG 787: Links with one slash after the url protocol are invalid
4621 [http:/example.com title]
4623 <p>http:/example.com
4624 </p><p>[http:/example.com title]
4629 Bracketed external links with template-generated invalid target
4631 [{{echo|http:/example.com}} title]
4633 <p>[http:/example.com title]
4638 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4640 ''[http://example.com text'']
4641 [http://example.com '''text]'''
4642 ''Something [http://example.com in italic'']
4643 ''Something [http://example.com mixed''''', even bold]'''
4644 '''''Now [http://example.com both''''']
4646 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4647 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4648 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4649 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4650 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4656 Bug 4781: %26 in URL
4658 http://www.example.com/?title=AT%26T
4660 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4663 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4666 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4667 # % is actually legal in HTML5. Any change in output would need testing though.
4669 Bug 4781, 5267: %25 in URL
4671 http://www.example.com/?title=100%25_Bran
4673 <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>
4676 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4680 Bug 4781, 5267: %28, %29 in URL
4682 http://www.example.com/?title=Ben-Hur_%281959_film%29
4684 <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>
4687 <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>
4692 Bug 4781: %26 in autonumber URL
4694 [http://www.example.com/?title=AT%26T]
4696 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4699 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4703 Bug 4781, 5267: %26 in autonumber URL
4705 [http://www.example.com/?title=100%25_Bran]
4707 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4710 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4714 Bug 4781, 5267: %28, %29 in autonumber URL
4716 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4718 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4721 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4726 Bug 4781: %26 in bracketed URL
4728 [http://www.example.com/?title=AT%26T link]
4730 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4733 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4737 Bug 4781, 5267: %25 in bracketed URL
4739 [http://www.example.com/?title=100%25_Bran link]
4741 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4746 Bug 4781, 5267: %28, %29 in bracketed URL
4748 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4750 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4753 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4757 External link containing a period in the anchor. (bug 63947)
4759 [//foo.org/bar#baz. bang]
4761 [//foo.org/bar. bang]
4763 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4764 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4767 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4768 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4772 External link containing a single quote. (bug 63947)
4776 [//foo.org/bar'baz bang]
4778 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4779 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4782 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4783 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4788 External link containing a period in the anchor. (bug 63947)
4790 [//foo.org/bar#baz. bang]
4792 [//foo.org/bar. bang]
4794 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4795 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4798 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4799 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4803 External link containing a single quote. (bug 63947)
4807 [//foo.org/bar'baz bang]
4809 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4810 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4813 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4814 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4819 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4821 Some [http://example.com/ pretty ''italics'' and stuff]!
4823 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4828 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4830 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4832 <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>
4837 External link containing double-single-quotes with no space separating the url from text in italics
4839 [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]].]
4841 <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>
4844 <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>
4846 <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>
4850 External link with comments in link text
4852 [http://www.google.com Google <!-- comment -->]
4854 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4859 URL-encoding in URL functions (single parameter)
4861 {{localurl:Some page|amp=&}}
4863 <p>/index.php?title=Some_page&amp=&
4868 URL-encoding in URL functions (multiple parameters)
4870 {{localurl:Some page|q=?&=&}}
4872 <p>/index.php?title=Some_page&q=?&amp=&
4879 http://example.com/index.php?foozoid%5B%5D=bar
4881 http://example.com/index.php?foozoid[]=bar
4883 <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>
4884 </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>
4887 <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>
4889 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4893 IPv6 urls (bug 21261)
4897 http://[2404:130:0:1000::187:2]/index.php
4899 <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>
4904 Non-extlinks in brackets
4913 [{{echo|foo}} ''bar'']
4914 [{{echo|foo}}l's] errand
4915 [{{echo|foo}}l's errand]
4917 [url=http://example.com]
4930 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4935 Percent encoding in external links
4937 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4939 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4942 <p><a rel="mw:ExtLink"
4943 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4947 Use url link syntax for links where the content is equal the link target
4951 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4954 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4958 Parenthesis in external links, especially URL links
4962 http://example.com/test)
4964 http://example.com/(test)
4966 http://example.com/((test)
4968 (http://example.com/(test))
4970 (http://example.com/(test)))))
4972 http://example.com/a)b
4974 [http://example.com) foo]
4976 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4977 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4978 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4979 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4980 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4981 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4982 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4983 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4986 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4987 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4988 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4989 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4990 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4991 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4992 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4993 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4997 Parenthesis in external links, w/ transclusion or comment
4999 (http://example.com/{{echo|hi}})
5001 (http://example.com<!-- hi -->)
5003 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5004 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5007 <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>
5009 <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>
5013 Replace invalid link targets when serializing
5017 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
5019 [[MediaWiki:Badtitletext|Manual]]
5029 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5031 Normal text. '''''Bold italic text.''''' Normal text.
5033 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5034 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5039 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5040 # parser strips. The wikitext contains just the first half of the bold
5043 Unclosed and unmatched quotes
5045 '''''Bold italic text '''with bold deactivated''' in between.'''''
5047 '''''Bold italic text ''with italic deactivated'' in between.'''''
5051 ..spanning two paragraphs (should not work).'''
5053 '''Bold tag left open
5055 ''Italic tag left open
5059 <!-- Unmatching number of opening, closing tags: -->
5060 '''This year''''s election ''should'' beat '''last year''''s.
5062 ''Tom'''s car is bigger than ''Susan'''s.
5064 Plain ''italic'''s plain
5066 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5067 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5068 </p><p><b>Bold text..</b>
5069 </p><p>..spanning two paragraphs (should not work).
5070 </p><p><b>Bold tag left open</b>
5071 </p><p><i>Italic tag left open</i>
5073 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5074 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5075 </p><p>Plain <i>italic'</i>s plain
5078 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5079 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5080 </p><p><b>Bold text..</b>
5081 </p><p>..spanning two paragraphs (should not work).<b></b>
5082 </p><p><b>Bold tag left open</b>
5083 </p><p><i>Italic tag left open</i>
5085 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5086 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5087 </p><p>Plain <i>italic'</i>s plain
5094 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5097 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5098 # is the bare minimum required by the spec, see:
5099 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5100 # Parsoid team replies: empty table tags are legal in HTML5
5102 A table with no data.
5115 A table with stray table end tags on start tag line (wt2html)
5119 {|style="color: red;"|}
5121 {|style="color: red;" |}
5125 {|style="color: red;"|} id="foo"
5129 {|style="color: red;" |} id="foo"
5133 <table style="color: red;"></table>
5135 <table style="color: red;">
5141 <table style="color: red;" id="foo">
5147 <table style="color: red;" id="foo">
5156 A table with no data (take 2)
5164 # A table with nothing but a caption is invalid XHTML, we might want to render
5165 # this as <p>caption</p>
5166 # Parsoid team replies: table with only a caption is legal in HTML5
5168 A table with nothing but a caption
5176 </caption><tr><td></td></tr></table>
5179 <table><caption> caption</caption></table>
5183 A table with caption with default-spaced attributes and a table row
5186 |+ style="color: red;" | caption1
5192 <caption style="color: red;"> caption1
5201 A table with captions with non-default spaced attributes and a table row
5204 |+style="color: red;"|caption2
5205 |+ style="color: red;"| caption3
5211 <caption style="color: red;">caption2
5213 <caption style="color: red;"> caption3
5222 Table td-cell syntax variations
5226 | foo bar foo || baz
5227 | style='color:red;' | baz
5228 | style='color:red;' || baz
5235 <td> foo bar foo </td>
5238 <td style="color:red;"> baz
5240 <td> style='color:red;' </td>
5268 Simple table but with multiple dashes for row wikitext
5286 Multiplication table
5288 {| border="1" cellpadding="2"
5289 |+Multiplication table
5291 ! × !! 1 !! 2 !! 3
5309 <table border="1" cellpadding="2">
5310 <caption>Multiplication table
5357 Accept "||" in table headings
5372 Accept "!!" in table data
5386 <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>
5391 Accept "||" in indented table headings
5401 </th></tr></table></dd></dl>
5406 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5423 Accept "| !" at start of line in tables (ignore !-attribute)
5427 | !style="color:red" | bar
5439 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 +/-
5443 |style='color:red;'|+1
5444 |style='color:blue;'|-1
5456 <td style="color:red;">+1
5458 <td style="color:blue;">-1
5482 |rowspan=2| Cell 2, row 1 (and 2)
5493 <td rowspan="2"> Cell 2, row 1 (and 2)
5511 {| bgcolor=#ABCDEF border=2
5516 |the original table again
5524 <table bgcolor="#ABCDEF" border="2">
5532 <td>the original table again
5538 Invalid attributes in table cell (bug 1830)
5552 # The "|}" to close the table is missing from the input, so parsoid's
5553 # *2wt modes will fail.
5555 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5557 parsoid=wt2html,html2html
5560 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5564 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5565 <td>]" onmouseover="alert(document.cookie)">test
5573 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5578 Indented table markup mixed with indented pre content (proposed in bug 6200)
5583 Text that should be rendered preformatted
5591 <pre>Text that should be rendered preformatted
5600 Template-generated table cell attributes and cell content
5605 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
5606 |align=center {{table_attribs}}
5607 | <!--foo--> align=center <!--bar--> {{table_attribs}}
5612 <td style="color: red"> Foo
5614 <td style="color: red"> Foo
5616 <td style="color: red"> Foo
5618 <td align="center" style="color: red"> Foo
5620 <td align="center" style="color: red"> Foo
5626 Template-generated table cell attributes and cell content (2)
5629 |align=center {{table_cells}}
5634 <td align="center" style="color: red"> Foo </td>
5642 Table with row followed by newlines and table heading
5660 Table with empty line following the start tag
5677 # FIXME: Preserve the attribute properly (with an empty string as value) in
5678 # the PHP parser. Parsoid implements the behavior below.
5680 Table attributes with empty value
5690 </td></tr></tbody></table>
5695 Wikitext table with a lot of comments
5718 Wikitext table with double-line table cell
5735 Table cell with a single comment
5752 Table-cell after a comment-only-empty-line
5769 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5771 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5777 Build table with {{!}}
5779 {{{!}} class="wikitable"
5782 {{!}}- style="color:red;"
5783 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5786 <table class="wikitable">
5792 <tr style="color:red;">
5794 <td style="color:red;"> second data
5800 Build table with pipe as data
5802 {| class="wikitable"
5805 |- style="color:red;"
5806 | data || style="color:red;" | second data
5808 | style="color:red;" | data with | || style="color:red;" | second data with |
5810 || data with | ||| second data with |
5813 <table class="wikitable">
5819 <tr style="color:red;">
5821 <td style="color:red;"> second data
5824 <td style="color:red;"> data with | </td>
5825 <td style="color:red;"> second data with |
5828 <td> data with | </td>
5829 <td> second data with |
5835 Build table with wikilink
5837 {| class="wikitable"
5838 ! header || second header
5839 |- style="color:red;"
5840 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
5842 | data || second data [[Main Page|link|text with pipe]]
5845 <table class="wikitable">
5850 <tr style="color:red;">
5851 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
5852 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
5856 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
5861 # The expected HTML structure in this test is debatable. The PHP parser does
5862 # not parse this kind of table at all. The main focus for Parsoid is on
5863 # round-tripping, so this output is ok for now. TODO: revisit!
5865 Wikitext table with html-syntax row
5875 <td>foo</td></tr></tbody></table>
5878 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5879 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5880 ## PHP parser, which tidy then compounds by fostering the content
5881 ## entirely out of the table. Parsoid recognizes the table context
5882 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5883 ## depends on PHP's treatment of broken table markup!
5885 Implicit <td> after a |-
5887 parsoid=wt2html,html2html
5907 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5909 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5911 parsoid=wt2html,html2html
5944 <tr><td><pre>a</pre></td></tr>
5945 <tr><td> b</td></tr>
5950 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5951 # Parsoid generates the missing <td>, so wt2wt won't succeed.
5953 Lists should be recognized in an implicit <td> context
5955 parsoid=wt2html,html2html
5982 Parsoid: Round-trip tables directly followed by content (bug 51219)
5984 parsoid=wt2html,wt2wt
6009 Parsoid: Default to a newline after tables in new content (bug 51219)
6014 <tr><td>foo</td></tr></tbody></table> bar
6016 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6021 <nowiki> </nowiki>bar
6029 Parsoid: newline inducing block nodes don't suppress <nowiki>
6041 Parsoid: Row-syntax table headings followed by comment & table cells
6043 parsoid=wt2html,wt2wt
6047 <!-- foo --> || baz || quux
6061 <tbody><tr><th> foo </th><th> bar
6062 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6067 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6070 Parsoid: Recover better from broken table attributes
6090 <p>foo</p></td></tr>
6095 Strip unsupported table tags
6146 Plain link, capitalized
6150 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6155 Plain link, uncapitalized
6159 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6166 [[Main Page|The Main Page]]
6168 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6173 Piped link with comment in link text
6175 [[Main Page|The Main<!--front--> Page]]
6177 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6182 Piped link with multiple pipe characters in link text
6184 [[Main Page||The|Main|Page|]]
6186 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6189 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6197 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6202 Broken link with fragment
6204 [[Zigzagzogzagzig#zug]]
6206 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6211 Special page link with fragment
6213 [[Special:Version#anchor]]
6215 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6220 Nonexistent special page link with fragment
6222 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6224 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6231 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6233 <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>
6240 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6242 <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>!!!
6253 Bug 43661: Piped links with identical prefixes
6255 [[prefixed article|prefixed articles with spaces]]
6257 [[prefixed article|prefixed articlesaoeu]]
6259 [[Main Page|Main Page test]]
6261 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6262 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6263 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6269 Link with HTML entity in suffix / tail
6271 [[Main Page]]", [[Main Page]]a
6273 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6276 <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>
6280 Link with 3 brackets
6289 Link with 4 brackets
6293 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6298 Piped link with 3 brackets
6300 [[[main page|the main page]]]
6302 <p>[[[main page|the main page]]]
6307 Piped link with extlink-like text
6310 [[Main Page|This is a [bar]]]
6312 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6313 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6316 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6317 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6321 Link with multiple pipes
6323 [[Main Page|The|Main|Page]]
6325 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6329 # Note that parsoid does not munge anchor text; all non-space
6330 # characters are valid in HTML5 ids.
6332 Anchor containing a #. (bug 63430)
6334 [[Main Page#And#Link]]
6336 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6339 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6345 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6347 <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>
6352 Link with space in namespace
6354 [[User talk:Foo bar]]
6356 <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>
6361 MemoryAlpha:AlphaTest
6363 This is an article in the MemoryAlpha namespace
6364 (which shadows the memoryalpha interwiki link).
6368 Namespace takes precedence over interwiki link (bug 51680)
6370 [[MemoryAlpha:AlphaTest]]
6372 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6376 # The previous test doesn't work correctly in html2*, due to not recognizing the
6377 # link as an internal one. This one checks for the correct behavior.
6379 Link to namespace preferred over interwiki with correct rel attribute
6381 parsoid=html2wt,html2html
6383 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
6385 [[MemoryAlpha:AlphaTest]]
6389 Piped link to namespace
6391 [[Meta:Disclaimers|The disclaimers]]
6393 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6400 [[Usually caused by a typo (oops}]]
6402 <p>[[Usually caused by a typo (oops}]]
6409 Just a test of an article title containing a percent.
6413 Link containing % (not as a hex sequence)
6417 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6420 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6423 # note that the parsoid HTML is identical to the previous test output,
6424 # so the previous test ensures that the html2wt mode will generate the
6425 # "not as a hex sequence" wikitext.
6427 Link containing % as a single hex sequence interpreted to char
6429 parsoid=wt2wt,wt2html,html2html
6433 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6436 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6440 Link containing % as a double hex sequence interpreted to hex sequence
6444 <p>[[7%2525 Solution]]
6448 # note that parsoid does not munge anchor text; all non-space
6449 # characters are valid in HTML5 anchors.
6451 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6452 Example for such a section: == < ==
6454 [[%23%3c]][[%23%3e]]
6456 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6459 <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>
6463 Link containing "<#" and ">#" as a hex sequences
6465 [[%3c%23]][[%3e%23]]
6467 <p>[[%3c%23]][[%3e%23]]
6472 Link containing an equals sign
6474 [[Special:BookSources/isbn=4-00-026157-6]]
6476 <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>
6479 <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>
6485 Just a test of an article title containing a tilde.
6488 # note that links containing signatures, like [[Foo~~~~]], are
6489 # massaged by the pre-save transform (PST) and so the tildes are never
6490 # seen by the parser.
6492 Link containing a tilde
6496 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6499 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6503 Link containing double-single-quotes '' (bug 4598)
6505 [[Lista d''e paise d''o munno]]
6507 <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>
6510 <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>
6514 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6516 Some [[Link|pretty ''italics'' and stuff]]!
6518 <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>!
6521 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6525 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6527 ''Some [[Link|pretty ''italics'' and stuff]]!''
6529 <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>
6534 Link with double quotes in title part (literal) and alternate part (interpreted)
6536 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
6540 [[''Pentecoste''|Pentecoste]]
6542 [[''Pentecoste''|''Pentecoste'']]
6544 <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>
6545 </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>
6546 </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>
6547 </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>
6550 <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>
6551 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6552 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6553 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6557 Broken image links with HTML captions (bug 39700)
6559 [[File:Nonexistent|<script></script>]]
6560 [[File:Nonexistent|100x100px|<script></script>]]
6561 [[File:Nonexistent|<]]
6562 [[File:Nonexistent|a<i>b</i>c]]
6564 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6565 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6566 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6567 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6570 <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>
6571 <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>
6572 <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>
6573 <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>
6579 [[http://www.example.com]]
6581 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6584 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6588 Plain link to URL with link text
6590 [[http://www.example.com Link text]]
6592 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6597 Plain link to protocol-relative URL
6599 [[//www.example.com]]
6601 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6604 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6608 Plain link to protocol-relative URL with link text
6610 [[//www.example.com Link text]]
6612 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6617 Plain link to page with question mark in title
6623 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6624 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6629 # I'm fairly sure the expected result here is wrong.
6630 # We want these to be URL links, not pseudo-pages with URLs for titles....
6631 # However the current output is also pretty screwy.
6634 # I'm changing it to match the current output--it arguably makes more
6635 # sense in the light of the test above. Old expected result was:
6636 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6638 # But I think this test is bordering on "garbage in, garbage out" anyway.
6643 Piped link to URL: [[http://www.example.com|an example URL]]
6645 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6648 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6652 BUG 2: [[page|http://url/]] should link to page, not http://url/
6654 [[Main Page|http://url/]]
6656 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6659 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6662 # Parsoid does not mark self-links, by design.
6664 BUG 337: Escaped self-links should be bold
6668 [[Bug462]] [[Bug462]]
6670 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6673 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6675 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6679 Self-link to section should not be bold
6683 [[Main Page#section]]
6685 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6696 Self-link to numeric title
6702 <p><strong class="selflink">0</strong>
6707 Link to numeric-equivalent title
6713 <p><a href="/wiki/00" title="00">00</a>
6718 <nowiki> inside a link
6720 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6722 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6727 Non-breaking spaces in title
6729 [[ Main Page ]]
6731 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6736 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6742 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6747 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6753 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6758 Internal link with en linktrail: no apostrophes (bug 27473)
6764 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6769 Internal link with ca linktrail with apostrophes (bug 27473)
6775 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6780 Internal link with kaa linktrail with apostrophes (bug 27473)
6786 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6791 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6793 [[User:Foo/Test/63636:Bar|Test]]
6795 <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>
6798 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6802 Purely hash wikilink
6804 title=[[User:test/123]]
6808 <p><a href="#a">b</a>
6811 <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>
6815 1. Interaction of linktrail and template encapsulation
6821 <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>
6825 2. Interaction of linktrail and template encapsulation
6829 {{echo|Some [[Fool]]}}s
6831 <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>
6835 3. Interaction of linktrail and template encapsulation
6839 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6841 <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>
6851 Internal link with is link prefix
6855 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6857 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6868 Internal link with is link trail and link prefix
6872 [[mótmælendatrú|xxx]]ar
6874 mótmælenda[[söfnuður]]
6875 mótmælenda[[söfnuður|söfnuðir]]
6876 mótmælenda[[söfnuður|söfnuðir]]xxx
6878 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6879 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6880 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6881 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6882 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6887 Parsoid link trail escaping
6889 parsoid=html2wt,html2html
6891 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6897 Parsoid link prefix escaping
6900 parsoid=html2wt,html2html
6902 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6904 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6908 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6916 [http://wp.org ''foo'']
6918 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6919 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6920 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6921 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6926 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6930 [[Foo|{{echo|a}} b {{echo|c}}]]
6932 <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>
6936 Link with angle bracket after anchor
6940 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6943 <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>
6947 ### Interwiki links (see maintenance/interwiki.sql)
6951 Inline interwiki link
6953 parsoid=wt2html,wt2wt,html2html
6955 [[MeatBall:SoftSecurity]]
6957 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6960 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
6964 Inline interwiki link with empty title (bug 2372)
6966 parsoid=wt2html,wt2wt,html2html
6970 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6973 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
6977 Interwiki link encoding conversion (bug 1636)
6979 *[[Wikipedia:ro:Olteniţa]]
6980 *[[Wikipedia:ro:Olteniţa]]
6982 <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>
6983 <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>
6987 <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>
6988 <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>
6993 Interwiki link with fragment (bug 2130)
6995 [[MeatBall:SoftSecurity#foo]]
6997 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7001 # Ideally the wikipedia: prefix here should be proto-relative too
7002 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7003 # define the 'en' prefix, and originally the test used 'wikipedia',
7004 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7007 Different interwiki prefixes mapping to the same URL
7015 [[:wikipedia:Foo|Foo]]
7017 [[wikipedia:en:Foo]]
7019 [[:wikipedia:en:Foo]]
7023 <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>
7025 <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>
7027 <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>
7029 <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>
7031 <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>
7033 <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>
7035 <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>
7039 Interwiki links that cannot be represented in wiki syntax
7042 [[meatball:ok#foo|ok with fragment]]
7043 [[meatball:ok_as_well?|ok ending with ? mark]]
7044 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7045 [http://de.wikipedia.org/wiki/#foo is just fragment]
7048 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7049 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7050 <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>
7051 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7052 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7055 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7056 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7057 <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>
7058 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7059 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7063 Interwiki links: trail
7065 [[wikipedia:Foo|Ba]]r
7067 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7070 <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>
7074 Local interwiki link
7076 parsoid=wt2html,wt2wt,html2html
7078 [[local:Template:Foo]]
7080 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7083 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7086 # Parsoid does not mark self-links, by design.
7088 Local interwiki link: self-link to current page
7091 parsoid=wt2html,wt2wt,html2html
7095 <p><strong class="selflink">local:Main Page</strong>
7098 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7102 Local interwiki link: prefix only (bug 64167)
7104 parsoid=wt2html,wt2wt,html2html
7108 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7111 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7115 Local interwiki link: with additional interwiki prefix (bug 61357)
7117 parsoid=wt2html,wt2wt,html2html
7119 [[local:meatball:Hello]]
7121 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7124 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7128 Multiple local interwiki link prefixes
7130 [[local:local:local:local:mi:local:Foo]]
7132 parsoid=wt2html,wt2wt,html2html
7134 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7137 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7141 ### Interlanguage links
7142 ### Language links (so that searching for '### language' matches..)
7148 parsoid=wt2html,wt2wt,html2html
7156 <p>Blah blah blah</p>
7157 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7161 Interlanguage link with spacing
7163 parsoid=wt2html,wt2wt,html2html
7171 <p>Blah blah blah</p>
7172 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7176 Double interlanguage link
7178 parsoid=wt2html,wt2wt,html2html
7187 <p>Blah blah blah</p>
7188 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7189 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7193 Interlanguage link variations
7195 parsoid=wt2html,wt2wt,html2html
7206 <p>Blah blah blah</p>
7207 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7208 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7209 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7210 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7214 Interlanguage link, with prefix links
7224 <p>Blah blah blah</p>
7225 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7229 Double interlanguage link, with prefix links (bug 8897)
7240 <p>Blah blah blah</p>
7241 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7242 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7246 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7254 <p>Blah blah blah</p>
7255 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7259 Parsoid-specific test: Wikilinks with should RT properly
7265 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7270 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7274 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7275 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7277 He&nbsp;llo [[Foo|He&nbsp;llo]]
7279 He&nbsp;llo [[He&nbsp;llo]]
7283 Parsoid: handle constructor well
7289 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7290 </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>
7293 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7295 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7304 # Note that `ko` isn't a known interlanguage prefix
7306 Parsoid: recognize interlanguage links without a target page
7316 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7318 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7321 # Note that `ko` isn't a known interwiki prefix
7323 Parsoid: recognize interwiki links without a target page
7325 parsoid=wt2html,wt2wt,html2html
7331 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7332 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7335 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7336 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7340 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7344 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7347 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7351 Interlanguage link with preceding local interwiki link (bug 68085)
7353 parsoid=wt2html,wt2wt,html2html
7356 [[local:es:Spanish]]
7359 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7363 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7367 Looks like an interlanguage link, but is actually a local interwiki
7369 parsoid=wt2html,wt2wt,html2html
7375 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7379 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7383 ### Redirects, Parsoid-only
7386 1. Simple redirect to page
7390 #REDIRECT [[Main Page]]
7392 <link rel="mw:PageProp/redirect" href="./Main_Page">
7395 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7397 2. Other redirect variants
7399 parsoid=wt2html,wt2wt
7401 #REDIRECT [[Main_Page]]
7402 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7404 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7410 parsoid=wt2html,wt2wt
7415 <li>REDIRECT [[]]</li></ol>
7419 Optional colon in #REDIRECT
7421 # the colon is archaic syntax. we support it for wt2html, but we
7422 # don't care that it roundtrips back to the modern syntax.
7423 parsoid=wt2html,html2html
7425 #REDIRECT:[[Main Page]]
7427 <link rel="mw:PageProp/redirect" href="./Main_Page">
7431 Whitespace in #REDIRECT with optional colon
7433 # the colon and gratuitous whitespace is archaic syntax. we support
7434 # it for wt2html, but we don't care that it roundtrips back to the
7435 # modern syntax (without extra whitespace)
7436 parsoid=wt2html,html2html
7443 <link rel="mw:PageProp/redirect" href="./Main_Page">
7447 Piped link in #REDIRECT
7449 # content after piped link is ignored. we support this syntax,
7450 # but don't care that the piped link is lost when we roundtrip this.
7453 #REDIRECT [[Main Page|bar]]
7455 <link rel="mw:PageProp/redirect" href="./Main_Page">
7459 Redirect to category
7463 #REDIRECT [[Category:Foo]]
7465 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7469 Redirect to category with URL encoding
7473 #REDIRECT [[Category%3AFoo]]
7475 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7479 Redirect to category page
7481 parsoid=wt2html,html2html
7483 #REDIRECT [[:Category:Foo]]
7485 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7489 Redirect to image page (1)
7493 #REDIRECT [[File:Wiki.png]]
7495 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7499 Redirect to image page (2)
7503 #REDIRECT [[Image:Wiki.png]]
7505 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7509 Redirect to language
7513 #REDIRECT [[en:File:Wiki.png]]
7515 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7519 Redirect to interwiki
7523 #REDIRECT [[meatball:File:Wiki.png]]
7525 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7529 Non-English #REDIRECT
7534 #TILVÍSUN [[Main Page]]
7536 <link rel="mw:PageProp/redirect" href="./Main_Page">
7544 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7564 Broken br tag sanitization
7572 # TODO: Fix html2html mode (bug 51055)!
7573 # This </br> handling was added as part of bug 50831; but it
7574 # differs from how PHP+tidy handles this. We should investigate
7577 Parsoid: Broken br tag recognition
7593 Incorrecly removing closing slashes from correctly formed XHTML
7595 <br style="clear:both;" />
7597 <p><br style="clear:both;" />
7602 Failing to transform badly formed HTML into correct XHTML
7604 <br style="clear: left;">
7605 <br style="clear: right;">
7606 <br style="clear: both;">
7608 <p><br style="clear: left;" />
7609 <br style="clear: right;" />
7610 <br style="clear: both;" />
7614 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
7615 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
7617 Handling html with a div self-closing tag
7626 <p><div title />
7630 <p><div title=bar />
7631 <div title=bar/>
7633 <div title="bar/"></div>
7637 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7638 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7639 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
7640 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7641 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7642 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
7646 Handling html with a br self-closing tag
7655 <p><br title="title" />
7656 <br title="title" />
7673 Horizontal ruler (should it add that extra space?)
7688 Horizontal ruler -- 4+ dashes render hr
7697 Horizontal ruler -- eats additional dashes on the same line
7706 Horizontal ruler -- does not collapse dashes on consecutive lines
7717 Horizontal ruler -- <4 dashes render as plain text
7726 Horizontal ruler -- Supports content following dashes on same line
7738 ### Block-level elements
7747 <ul><li>Common list</li>
7749 <li>item 3</li></ul>
7760 <ol><li>Numbered list</li>
7762 <li> item 3</li></ol>
7776 ***#Number on level 4
7778 **#Number on level 3
7779 **#Number on level 3
7783 #** Level 3, but ordered
7786 <ol><li> with numbers</li></ol>
7787 <ul><li> and bullets</li></ul>
7788 <ol><li> and numbers</li></ol></li>
7790 <ul><li>bullet level 2
7791 <ul><li>bullet level 3
7792 <ol><li>Number on level 4</li></ol></li></ul></li>
7794 <ol><li>Number on level 3</li>
7795 <li>Number on level 3</li></ol></li></ul>
7796 <ol><li>number level 2</li></ol></li>
7798 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7799 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7810 <ul><li>bar</li></ul></li></ul>
7820 <ul><li><ul><li>foo</li></ul></li>
7826 Nested lists 3 (first element empty)
7832 <ul><li>bar</li></ul></li></ul>
7837 Nested lists 4 (first element empty)
7842 <ul><li><ul><li></li></ul></li>
7848 Nested lists 5 (both elements empty)
7853 <ul><li><ul><li></li></ul></li>
7859 Nested lists 6 (both elements empty)
7865 <ul><li></li></ul></li></ul>
7870 Nested lists 7 (skip initial nesting levels)
7874 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7879 Nested lists 8 (multiple nesting transitions)
7887 <ul><li><ul><li> bar</li></ul></li>
7888 <li> baz</li></ul></li>
7894 1. Lists with start-of-line-transparent tokens before bullets: Comments
7907 2. Lists with start-of-line-transparent tokens before bullets: Template close
7912 <ul><li>foo bar</li>
7918 List items are not parsed correctly following a <pre> block (bug 785)
7924 <ul><li> <pre>foo</pre></li>
7925 <li> <pre>bar</pre></li>
7931 List items from template
7942 * notSOL{{inner list}}
7945 <ul><li> item 1</li>
7946 <li> item 2</li></ul>
7947 <ul><li> item 0</li>
7949 <li> item 2</li></ul>
7950 <ul><li> item 0</li>
7953 <li> item 2</li></ul>
7958 List interrupted by empty line or heading
7966 <ul><li> foo</li></ul>
7967 <ul><li><ul><li> bar</li></ul></li></ul>
7968 <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>
7969 <ul><li> Another list item</li></ul>
7974 Multiple list tags generated by templates
7995 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7998 <!--This line will NOT split the list-->
8000 <!--This line will NOT split the list either-->
8002 <!--foo--> <!----> <!--This line NOT split the list either-->
8013 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8016 <!--This line will NOT split the list-->
8018 <!--This line will NOT split the list either-->
8020 <!--foo--> <!----> <!--This line NOT split the list
8033 (The PHP parser relies on Tidy for the hack)
8035 parsoid=wt2html,wt2wt
8039 * {{echo|<li>templated li-hack}}
8040 * <!--foo--> <li> unsupported li-hack with preceding comments
8043 <li><li>not a li-hack
8050 <li>templated li-hack</li>
8051 <li>unsupported li-hack with preceding comments</li>
8054 <li>not a li-hack</li>
8059 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8086 Parsoid: Test of whitespace serialization with Templated bullets
8093 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8097 # ------------------------------------------------------------------------
8098 # The next set of tests are about Parsoid's ability to handle badly nested
8099 # tags (parse, minimize scope of fixup, and roundtrip back)
8100 # ------------------------------------------------------------------------
8103 Unbalanced closing block tags break a list
8104 (php parser relies on Tidy to fix up)
8122 # Parsoid fails this test, but it might be tricky to support properly.
8125 Unbalanced closing non-block tags don't break a list
8126 (php parser relies on Tidy to fix up)
8133 <li><span>a</span></li>
8134 <li><span>b</span></li>
8148 Unclosed formatting tags that straddle lists are closed and reopened
8149 (php parser relies on Tidy to fix up)
8151 parsoid=wt2html,wt2wt,html2html
8161 <ol><li> <s> a</s></li>
8162 <li><s> b </s></li></ol>
8165 # Parsoid fails this test, but it might be tricky to support properly.
8168 List embedded in a non-block tag
8169 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
8176 <li><small>foo</small></li>
8186 # This is a bug in the PHP parser + tidy combination.
8187 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8188 # and then fostered out of the table by tidy.)
8189 # We believe the Parsoid output to be correct.
8191 Table with missing opening <tr> tag
8193 parsoid=wt2html,wt2wt
8218 # Note that the current date is hard-coded as
8219 # 1970-01-01T00:02:03Z (a Thursday)
8220 # when running parser tests. The timezone is also fixed to GMT, so
8221 # local date will be identical to current date.
8224 Magic Word: {{CURRENTDAY}}
8233 Magic Word: {{CURRENTDAY2}}
8242 Magic Word: {{CURRENTDAYNAME}}
8251 Magic Word: {{CURRENTDOW}}
8260 Magic Word: {{CURRENTMONTH}}
8269 Magic Word: {{CURRENTMONTH1}}
8278 Magic Word: {{CURRENTMONTHABBREV}}
8280 {{CURRENTMONTHABBREV}}
8287 Magic Word: {{CURRENTMONTHNAME}}
8289 {{CURRENTMONTHNAME}}
8296 Magic Word: {{CURRENTMONTHNAMEGEN}}
8298 {{CURRENTMONTHNAMEGEN}}
8305 Magic Word: {{CURRENTTIME}}
8314 Magic Word: {{CURRENTHOUR}}
8323 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8332 Magic Word: {{CURRENTYEAR}}
8341 Magic Word: {{CURRENTTIMESTAMP}}
8343 {{CURRENTTIMESTAMP}}
8350 Magic Words LOCAL (UTC)
8354 * {{LOCALMONTHNAME}}
8355 * {{LOCALMONTHNAMEGEN}}
8356 * {{LOCALMONTHABBREV}}
8365 * {{LOCALTIMESTAMP}}
8380 <li> 19700101000203</li></ul>
8385 Magic Word: {{FULLPAGENAME}}
8387 title=[[User:Ævar Arnfjörð Bjarmason]]
8391 <p>User:Ævar Arnfjörð Bjarmason
8396 Magic Word: {{FULLPAGENAMEE}}
8398 title=[[User:Ævar Arnfjörð Bjarmason]]
8402 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8407 Magic Word: {{TALKSPACE}}
8409 title=[[User:Ævar Arnfjörð Bjarmason]]
8418 Magic Word: {{TALKSPACE}}, same namespace
8420 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8429 Magic Word: {{TALKSPACE}}, main namespace
8431 title=[[Parser Test]]
8440 Magic Word: {{TALKSPACEE}}
8442 title=[[User:Ævar Arnfjörð Bjarmason]]
8451 Magic Word: {{SUBJECTSPACE}}
8453 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8462 Magic Word: {{SUBJECTSPACE}}, same namespace
8464 title=[[User:Ævar Arnfjörð Bjarmason]]
8473 Magic Word: {{SUBJECTSPACE}}, main namespace
8475 title=[[Parser Test]]
8483 Magic Word: {{SUBJECTSPACEE}}
8485 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8494 Magic Word: {{NAMESPACE}}
8496 title=[[User:Ævar Arnfjörð Bjarmason]]
8505 Magic Word: {{NAMESPACEE}}
8507 title=[[User:Ævar Arnfjörð Bjarmason]]
8516 Magic Word: {{NAMESPACENUMBER}}
8518 title=[[User:Ævar Arnfjörð Bjarmason]]
8527 Magic Word: {{SUBPAGENAME}}
8529 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8538 Magic Word: {{SUBPAGENAMEE}}
8540 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8549 Magic Word: {{ROOTPAGENAME}}
8551 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8555 <p>Ævar Arnfjörð Bjarmason
8560 Magic Word: {{ROOTPAGENAMEE}}
8562 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8566 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8571 Magic Word: {{BASEPAGENAME}}
8573 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8577 <p>Ævar Arnfjörð Bjarmason
8582 Magic Word: {{BASEPAGENAMEE}}
8584 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8588 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8593 Magic Word: {{TALKPAGENAME}}
8595 title=[[User:Ævar Arnfjörð Bjarmason]]
8599 <p>User talk:Ævar Arnfjörð Bjarmason
8604 Magic Word: {{TALKPAGENAMEE}}
8606 title=[[User:Ævar Arnfjörð Bjarmason]]
8610 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8615 Magic Word: {{SUBJECTPAGENAME}}
8617 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8621 <p>User:Ævar Arnfjörð Bjarmason
8626 Magic Word: {{SUBJECTPAGENAMEE}}
8628 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8630 {{SUBJECTPAGENAMEE}}
8632 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8637 Magic Word: {{NUMBEROFFILES}}
8646 Magic Word: {{PAGENAME}}
8648 title=[[User:Ævar Arnfjörð Bjarmason]]
8652 <p>Ævar Arnfjörð Bjarmason
8657 Magic Word: {{PAGENAME}} with metacharacters
8659 title=[['foo & bar = baz']]
8663 <p><i>'foo & bar = baz'</i>
8666 <p><i>'foo & bar = baz'</i></p>
8670 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8672 title=[[*RFC 1234 http://example.com/]]
8676 <p>*RFC 1234 http://example.com/
8679 <p>*RFC 1234 http://example.com/</p>
8683 Magic Word: {{PAGENAMEE}}
8685 title=[[User:Ævar Arnfjörð Bjarmason]]
8689 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8694 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8696 title=[[*RFC 1234 http://example.com/]]
8700 <p>*RFC_1234_http://example.com/
8703 <p>*RFC_1234_http://example.com/</p>
8707 Magic Word: {{REVISIONID}}
8716 Magic Word: {{SCRIPTPATH}}
8725 Magic Word: {{STYLEPATH}}
8734 Magic Word: {{SERVER}}
8738 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8743 Magic Word: {{SERVERNAME}}
8752 Magic Word: {{SITENAME}}
8761 Case-sensitive magic words, when cased differently, should just be template transclusions
8768 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8769 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8770 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8771 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8776 Case-insensitive magic words should still work with weird casing.
8786 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8791 Namespace 1 {{ns:1}}
8800 Namespace 1 {{ns:01}}
8809 Namespace 0 {{ns:0}} (bug 4783)
8817 Namespace 0 {{ns:00}} (bug 4783)
8825 Namespace -1 {{ns:-1}}
8834 Namespace User {{ns:User}}
8843 Namespace User talk {{ns:User_talk}}
8852 Namespace User talk {{ns:uSeR tAlK}}
8861 Namespace File {{ns:File}}
8870 Namespace File {{ns:Image}}
8879 Namespace (lang=de) Benutzer {{ns:User}}
8890 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8896 <p>Benutzer Diskussion
8904 {{urlencode:hi world?!}}
8905 {{urlencode:hi world?!|WIKI}}
8906 {{urlencode:hi world?!|PATH}}
8907 {{urlencode:hi world?!|QUERY}}
8917 Magic Word: prioritize type info over data-parsoid
8921 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8927 Magic Word: serialize on separate line (parsoid)
8929 parsoid=wt2wt,html2wt
8935 foo<meta property="mw:PageProp/notoc"/>bar
8939 Magic Word: rt non-english wikis
8946 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8953 Magic links: internal link to RFC (bug 479)
8957 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8962 Magic links: RFC (bug 479)
8966 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8971 Magic links: RFC (bug 65278)
8973 This is RFC 822 but thisRFC 822 is not RFC 822linked.
8975 <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.
8980 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
8982 RFC      822
8986 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8993 Magic links: ISBN (bug 1937)
8997 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9002 Magic links: ISBN (bug 65278)
9004 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9006 <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.
9009 <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>
9013 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9015 ISBN      978 0 316 09811 3
9021 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9030 Magic links: PMID incorrectly converts space to underscore
9034 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9039 Magic links: PMID (bug 65278)
9041 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9043 <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.
9048 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9050 PMID      1234
9054 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9065 Nonexistent template
9067 {{thistemplatedoesnotexist}}
9069 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9074 Template with invalid target containing tags
9076 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9078 <p>{{a<b>b</b>|foo|a=b|a = b}}
9083 Template with invalid target containing unclosed tag
9085 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9087 <p>{{a<b>|foo|a=b|a = b}}</b>
9092 Template with invalid target containing wikilink
9096 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9099 <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>
9103 Template with just whitespace in it, bug #68421
9107 <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>
9113 This is a test template
9121 <p>This is a test template
9126 Template with explicit namespace
9130 <p>This is a test template
9138 This is a test template with parameter {{{param}}}
9144 {{paramtest|param=foo}}
9146 <p>This is a test template with parameter foo
9151 Template:paramtestnum
9157 Template unnamed parameter
9159 {{paramtestnum|Main Page|the main page}}
9161 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9166 Template:templatesimple
9172 Template:templateredirect
9174 #redirect [[Template:templatesimple]]
9178 Template:templateasargtestnum
9184 Template:templateasargtest
9186 {{template{{{templ}}}}}
9190 Template:templateasargtest2
9196 Template with template name as unnamed argument
9198 {{templateasargtestnum|templatesimple}}
9205 Template with template name as argument
9207 {{templateasargtest|templ=simple}}
9214 Template with template name as argument (2)
9216 {{templateasargtest2|templ=templatesimple}}
9223 Template:templateasargtestdefault
9225 {{{{{templ|templatesimple}}}}}
9235 Template with default value
9237 {{templateasargtestdefault}}
9244 Template with default value (value set)
9246 {{templateasargtestdefault|templ=templa}}
9255 {{templateredirect}}
9262 Template with argument in separate line
9264 {{ templateasargtest |
9272 Template with complex template as argument
9275 param ={{ templateasargtest |
9278 <p>This is a test template with parameter (test)
9283 Template with thumb image (with link in description)
9285 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9287 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>
9290 <p>This is a test template with parameter</p>
9291 <div class="thumb tright">
9292 <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>
9293 <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>
9297 <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>
9301 Template:complextemplate
9303 {{{1}}} {{paramtest|
9304 param ={{{param}}}}}
9308 Template with complex arguments
9311 param ={{ templateasargtest |
9312 templ = simple }}|[[Template:complextemplate|link]]}}
9314 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9319 BUG 553: link with two variables in a piped link
9322 |[[{{{1}}}|{{{2}}}]]
9327 <td>[[{{{1}}}|{{{2}}}]]
9333 Magic variable as template parameter
9335 {{paramtest|param={{SITENAME}}}}
9337 <p>This is a test template with parameter MediaWiki
9344 [[{{{param}}}|link]]
9348 Template parameter as link source
9350 {{linktest|param=Main Page}}
9352 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9359 including another template, {{paramtest|param={{{arg}}}}}
9363 Template passing argument to another template
9365 {{paramtest2|arg='hmm'}}
9367 <p>including another template, This is a test template with parameter 'hmm'
9378 Template as link source
9382 [[{{linktest2}}|Main Page]]
9384 [[{{linktest2}}]]Page
9386 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9387 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9388 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9406 Template infinite loop
9410 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9415 Template from main namespace
9434 BUG 529: Template with table, not included at beginning of line
9453 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9473 BUG 41: Template parameters shown as broken links
9482 Template with targets containing wikilinks
9486 {{[[{{echo|foo}}]]}}
9488 {{{{echo|[[foo}}]]}}
9490 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9491 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9499 ''None'' of '''this''' should be
9501 but rather passed unmodified
9508 # hmm, fix this or just deprecate msgnw and document its behavior?
9512 {{msgnw:MSGNW test}}
9514 <p>''None'' of '''this''' should be
9516  but rather passed unmodified
9517 {{test}}
9527 {{int:youhavenewmessages|lots of money|not!}}
9529 <p>You have lots of money (not!).
9536 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9540 <includeonly> and <noinclude> being included
9551 <onlyinclude>Foo</onlyinclude>bar
9555 <onlyinclude> being included
9567 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9571 <onlyinclude> and <includeonly> being included
9580 <includeonly> and <noinclude> on a page
9582 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9589 Un-closed <noinclude>
9596 <onlyinclude> on a page
9598 <onlyinclude>Foo</onlyinclude>bar
9605 Un-closed <onlyinclude>
9612 Self-closed noinclude, includeonly, onlyinclude tags
9623 Unbalanced includeonly and noinclude tags
9627 |b</noinclude></noinclude>
9628 |c</noinclude></includeonly>
9629 |d</includeonly></includeonly>
9638 <td>c</includeonly>
9640 <td>d</includeonly></includeonly>
9646 Template:Includeonly section
9649 ==Includeonly section==
9655 Bug 6563: Edit link generation for section shown by <includeonly>
9657 {{includeonly section}}
9659 <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>
9660 <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>
9664 # Uses same input as the contents of [[Template:Includeonly section]]
9666 Bug 6563: Section extraction for section shown by <includeonly>
9671 ==Includeonly section==
9679 Bug 6563: Edit link generation for section suppressed by <includeonly>
9682 ==Includeonly section==
9686 <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>
9691 Bug 6563: Section extraction for section suppressed by <includeonly>
9696 ==Includeonly section==
9704 Un-closed <includeonly>
9711 Includes and comments at SOL
9713 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9720 <includeonly>can have stuff</includeonly>=== here ===
9723 <h2><span class="mw-headline" id="hu">hu</span></h2>
9728 <h3><span class="mw-headline" id="here">here</span></h3>
9731 <!-- 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>
9733 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9735 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9738 <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>
9742 # TODO: test with DOM fragment reuse!
9744 Parsoid: DOM fragment reuse
9746 parsoid=wt2wt,wt2html
9748 a{{echo|b<table></table>c}}d
9760 <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>
9762 <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">
9763 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9764 </span><p about="#mwt2">cd</p>
9766 <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">
9768 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9770 </span><p about="#mwt3">b</p>
9774 Parsoid: Merge double tds (bug 50603)
9783 <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>
9788 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9798 <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}}]}'>
9800 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9806 ### <includeonly> and <noinclude> in attributes
9809 0. includeonly around the entire attribute
9811 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9813 <p><span id="v2">bar</span>
9818 1. includeonly in html attr key
9820 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9822 <p><span id="foo">bar</span>
9827 2. includeonly in html attr value
9829 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9830 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9832 <p><span id="v1">bar</span>
9833 <span id="v1">bar</span>
9838 3. includeonly in part of an attr value
9840 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9842 <p><span style="color:red;">bar</span>
9847 4. includeonly in table attributes
9871 ### Token Stream Patcher tests
9873 ### These tests won't always pass wt2wt and other modes because
9874 ### on serialization, the table will be output on a new line.
9875 ### For now, we are blacklisting them, and using this to test selser.
9879 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9881 parsoid=wt2html,wt2wt
9883 {{echo|}}{| width = '100%'
9887 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
9888 <tbody><tr><td>foo</td></tr>
9893 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9895 parsoid=wt2html,wt2wt
9897 <includeonly>a</includeonly>{| {{{b}}}
9901 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><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}}}":""}}'>
9902 <tbody><tr><td>c</td></tr>
9908 ### Testing parsing of templates where a template arg
9909 ### has the same name as the template itself.
9919 Templates: Template Name/Arg clash: 1. Use of positional param
9928 Templates: Template Name/Arg clash: 2. Use of named param
9937 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9946 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
9950 Templates: 1. Simple use
9959 Templates: 2. Inside a block tag
9961 <div>{{echo|Foo}}</div>
9962 <blockquote>{{echo|Foo}}</blockquote>
9965 <blockquote>Foo</blockquote>
9975 Templates: P-wrapping: 1a. Templates on consecutive lines
9986 Templates: P-wrapping: 1b. Templates on consecutive lines
10000 Templates: P-wrapping: 1c. Templates on consecutive lines
10003 {{echo|bar}} <div>baz</div>
10016 Templates: P-wrapping: 1d. Template preceded by comment-only line
10025 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10029 Templates: Inline Text: 1. Multiple template uses
10031 {{echo|Foo}}bar{{echo|baz}}
10038 Templates: Inline Text: 2. Back-to-back template uses
10040 {{echo|Foo}}{{echo|bar}}
10047 Templates: Block Tags: 1. Multiple template uses
10049 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10051 <div>Foo</div><div>bar</div><div>baz</div>
10056 Templates: Block Tags: 2. Back-to-back template uses
10058 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10060 <div>Foo</div><div>bar</div>
10064 # This is an edge case relating to paragraph wrapping.
10066 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10071 <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
10076 Templates: Links: 1. Simple example
10078 {{echo|[[Foo|bar]]}}
10080 <p><a href="/wiki/Foo" title="Foo">bar</a>
10085 Templates: Links: 2. Generation of link href
10087 [[{{echo|Foo}}|bar]]
10089 <p><a href="/wiki/Foo" title="Foo">bar</a>
10094 Templates: Links: 3. Generation of part of a link href
10096 [[Fo{{echo|o}}|bar]]
10098 [[Foo{{echo|bar}}]]
10100 [[Foo{{echo|bar}}baz]]
10102 [[Foo{{echo|bar}}|bar]]
10104 [[:Foo{{echo|bar}}]]
10106 [[:Foo{{echo|bar}}|bar]]
10108 <p><a href="/wiki/Foo" title="Foo">bar</a>
10109 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10110 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10111 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10112 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10113 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10118 Templates: Links: 4. Multiple templates generating link href
10120 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10122 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10127 Templates: Links: 5. Generation of link text
10129 [[Foo|{{echo|bar}}]]
10131 <p><a href="/wiki/Foo" title="Foo">bar</a>
10136 Templates: Links: 5. Nested templates (only outermost template should be marked)
10138 {{echo|[[{{echo|Foo}}|bar]]}}
10140 <p><a href="/wiki/Foo" title="Foo">bar</a>
10145 Templates: HTML Tag: 1. Generation of HTML attr. key
10147 <div {{echo|style}}="color:red;">foo</div>
10149 <div style="color:red;">foo</div>
10154 Templates: HTML Tag: 2. Generation of HTML attr. value
10156 <div style={{echo|'color:red;'}}>foo</div>
10158 <div style="color:red;">foo</div>
10163 Templates: HTML Tag: 3. Generation of HTML attr key and value
10165 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10167 <div style="color:red;">foo</div>
10172 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10174 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10176 <div title="This is a long title with just one piece templated">foo</div>
10181 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10183 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10185 <div title="This is a long title with just one piece templated">foo</div>
10190 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10192 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10194 <div title="This is a long title with just one piece templated">foo</div>
10198 # SSS FIXME: While it is great we added support for all this,
10199 # do we want to make this part of the spec? Maybe we want to
10200 # deprecate this kind of usage in the future?
10202 Templates: HTML Tag: 7. Generation of partial attribute key string
10204 <div st{{echo|yle}}="color:red;">foo</div>
10206 <div style="color:red;">foo</div>
10211 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10213 <div {{echo|1=id="v1"}}>bar</div>
10215 <div id="v1">bar</div>
10220 Templates: HTML Tag: 9. Multiple template-generated attributes
10222 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10224 <div id="v1" title="foo">bar</div>
10229 Templates: Support for templates generating attributes and content
10231 {| {{mixed_attr_content_template}}
10236 <table style="color:red;" title="T48811">
10246 <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|}"]}'>
10255 Templates: HTML Tables: 1. Generating start of a HTML table
10257 {{echo|<table><tr><td>foo</td>}}</tr></table>
10259 <table><tr><td>foo</td></tr></table>
10264 Templates: HTML Tables: 2a. Generating middle of a HTML table
10266 <table><tr>{{echo|<td>foo</td>}}</tr></table>
10268 <table><tr><td>foo</td></tr></table>
10273 Templates: HTML Tables: 2b. Generating middle of a HTML table
10275 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10277 <table><tr><td>foo</td></tr></table>
10282 Templates: HTML Tables: 3. Generating end of a HTML table
10284 <table><tr>{{echo|<td>foo</td></tr></table>}}
10286 <table><tr><td>foo</td></tr></table>
10291 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10293 {{echo|<table>}}<tr><td>foo</td></tr></table>
10295 <table><tr><td>foo</td></tr></table>
10300 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10302 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10304 <table><tr><td>foo</td></tr></table>
10309 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10311 <table><tr>{{echo|<td>}}foo</td></tr></table>
10313 <table><tr><td>foo</td></tr></table>
10318 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10320 <table><tr><td>foo{{echo|</td>}}</tr></table>
10322 <table><tr><td>foo</td></tr></table>
10327 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10329 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10331 <table><tr><td>foo</td></tr></table>
10336 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10338 <table><tr><td>foo</td></tr>{{echo|</table>}}
10340 <table><tr><td>foo</td></tr></table>
10345 Templates: HTML Tables: 5. Proper fostering of categories from inside
10347 parsoid=wt2html,wt2wt
10349 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10350 <!--Two categories (Bug 50330)-->
10351 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10353 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10354 <!--Two categories (Bug 50330)-->
10355 <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>
10359 Templates: Wiki Tables: 1a. Fostering of entire template content
10367 <tr><td></td></tr></table>
10379 Templates: Wiki Tables: 1b. Fostering of entire template content
10392 <tr><td></td></tr></table>
10406 Templates: Wiki Tables: 2. Fostering of partial template content
10416 <tr><td></td></tr></table>
10429 Templates: Wiki Tables: 3. td-content via multiple templates
10432 {{echo|{{pipe}}a}}{{echo|b}}
10443 Templates: Wiki Tables: 4. Templated tags, no content
10449 <tr><td></td></tr></table>
10454 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10468 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10482 Templates: Lists: Multi-line list-items via templates
10484 *{{echo|a {{nonexistent|
10486 *{{echo|b {{nonexistent|
10489 <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>
10490 <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>
10495 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10497 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10499 <p><i>ab</i>c<i>d</i>e
10504 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10505 (PHP parser generates misnested html)
10507 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10509 <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>
10513 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10514 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10516 parsoid=wt2html,wt2wt
10518 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10520 <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>
10521 <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>
10522 <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>
10526 Templates: Ugly nesting: 4. Divs opened/closed across templates
10528 a<div>b{{echo|c</div>d}}e
10539 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10545 |{{echo|foo</table>}}
10549 <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|}"]}'>
10553 <td>foo</td></tr></tbody></table><span about="#mwt1">
10554 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10559 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10569 <td>1. {{echo|foo </table>}}</td>
10571 <td>2. {{echo|baz </table>}}</td>
10584 <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>"]}'>
10589 <td>1. foo </td></tr></tbody></table></td>
10591 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10592 </span><span about="#mwt2">
10593 </span><span about="#mwt2">
10594 </span><span about="#mwt2">abc</span><span about="#mwt2">
10595 </span><span about="#mwt2">
10596 </span><span about="#mwt2">
10597 </span><span about="#mwt2">
10598 </span><span about="#mwt2">
10599 </span><span about="#mwt2">
10600 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10601 </span><span about="#mwt2">
10606 Templates: Ugly templates: 3. newline-only template parameter
10615 # This looks like a bug: a single newline triggers p/br for some reason.
10617 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10626 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10627 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10629 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10635 <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
10636 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10640 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10641 # that are "identical" and generate nesting cycles in the algorithm
10643 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10645 {{echo|<table><tr><td><table>}}
10649 <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"}'>
10650 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10651 </table></td></tr></tbody></table>
10655 Parser Functions: 1. Simple example
10664 Parser Functions: 2. Nested use (only outermost should be marked up)
10673 ### Pre-save transform tests
10676 pre-save transform: subst:
10682 This is a test template
10686 pre-save transform: normal template
10696 pre-save transform: nonexistent template
10700 {{thistemplatedoesnotexist}}
10702 {{thistemplatedoesnotexist}}
10707 pre-save transform: subst magic variables
10716 # This is bug 89, which I fixed. -- wtm
10718 pre-save transform: subst: templates with parameters
10722 {{subst:paramtest|param="something else"}}
10724 This is a test template with parameter "something else"
10728 Template:nowikitest
10730 <nowiki>'''not wiki'''</nowiki>
10734 pre-save transform: nowiki in subst (bug 1188)
10738 {{subst:nowikitest}}
10740 <nowiki>'''not wiki'''</nowiki>
10745 Template:commenttest
10747 This template has <!-- a comment --> in it.
10751 pre-save transform: comment in subst (bug 1936)
10755 {{subst:commenttest}}
10757 This template has <!-- a comment --> in it.
10761 pre-save transform: unclosed tag
10765 <nowiki>'''not wiki'''
10767 <nowiki>'''not wiki'''
10771 pre-save transform: mixed tag case
10775 <NOwiki>'''not wiki'''</noWIKI>
10777 <NOwiki>'''not wiki'''</noWIKI>
10781 pre-save transform: unclosed comment in <nowiki>
10785 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10787 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10790 # Leading @ in this template definition works around a limitation
10791 # in parsoid's parserTests which otherwise strips the <span> from the
10792 # result (confusing it for a template wrapper)
10796 @<span onmouseover="alert('crap')">Oh no</span>
10800 (confirming safety of fix for subst bug 1936)
10802 {{Template:dangerous}}
10804 <p>@<span>Oh no</span>
10809 pre-save transform: comment containing gallery (bug 5024)
10813 <!-- <gallery>data</gallery> -->
10815 <!-- <gallery>data</gallery> -->
10819 pre-save transform: comment containing extension
10823 <!-- <tag>data</tag> -->
10825 <!-- <tag>data</tag> -->
10829 pre-save transform: comment containing nowiki
10833 <!-- <nowiki>data</nowiki> -->
10835 <!-- <nowiki>data</nowiki> -->
10839 pre-save transform: <noinclude> in subst (bug 3298)
10849 pre-save transform: <onlyinclude> in subst (bug 3298)
10853 {{subst:Includes2}}
10861 {{<includeonly>subst:</includeonly>Includes}}
10865 Template:SafeSubstTest
10867 {{<includeonly>safesubst:</includeonly>Includes}}
10871 bug 22297: safesubst: works during PST
10875 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10881 bug 22297: safesubst: works during normal parse
10890 subst: does not work during normal parse
10894 <p>{{subst:Includes}}
10899 pre-save transform: context links ("pipe trick")
10903 [[Article (context)|]]
10906 [[Bar:Article (context)|]]
10907 [[:Bar:Article (context)|]]
10909 [[|Article (context)]]
10913 [[Article (context)|Article]]
10914 [[Bar:Article|Article]]
10915 [[:Bar:Article|Article]]
10916 [[Bar:Article (context)|Article]]
10917 [[:Bar:Article (context)|Article]]
10919 [[Article (context)]]
10920 [[Bar:X (Y) Z|X (Y) Z]]
10921 [[:Bar:X (Y) Z|X (Y) Z]]
10925 pre-save transform: context links ("pipe trick") with interwiki prefix
10929 [[interwiki:Article|]]
10930 [[:interwiki:Article|]]
10931 [[interwiki:Bar:Article|]]
10932 [[:interwiki:Bar:Article|]]
10934 [[interwiki:Article|Article]]
10935 [[:interwiki:Article|Article]]
10936 [[interwiki:Bar:Article|Bar:Article]]
10937 [[:interwiki:Bar:Article|Bar:Article]]
10941 pre-save transform: context links ("pipe trick") with parens in title
10943 pst title=[[Somearticle (context)]]
10947 [[Article (context)|Article]]
10951 pre-save transform: context links ("pipe trick") with comma in title
10953 pst title=[[Someplace, Somewhere]]
10956 [[Otherplace, Elsewhere|]]
10957 [[Otherplace, Elsewhere, Anywhere|]]
10959 [[Otherplace, Somewhere|Otherplace]]
10960 [[Otherplace, Elsewhere|Otherplace]]
10961 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
10965 pre-save transform: context links ("pipe trick") with parens and comma
10967 pst title=[[Someplace (IGNORED), Somewhere]]
10970 [[Otherplace (place), Elsewhere|]]
10972 [[Otherplace, Somewhere|Otherplace]]
10973 [[Otherplace (place), Elsewhere|Otherplace]]
10977 pre-save transform: context links ("pipe trick") with comma and parens
10979 pst title=[[Who, me? (context)]]
10982 [[Me, Myself, and I (1937 song)|]]
10984 [[Yes, you. (context)|Yes, you.]]
10985 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
10989 pre-save transform: context links ("pipe trick") with namespace
10991 pst title=[[Ns:Somearticle]]
10995 [[Ns:Article|Article]]
10999 pre-save transform: context links ("pipe trick") with namespace and parens
11001 pst title=[[Ns:Somearticle (context)]]
11005 [[Ns:Article (context)|Article]]
11009 pre-save transform: context links ("pipe trick") with namespace and comma
11011 pst title=[[Ns:Somearticle, Context, Whatever]]
11015 [[Ns:Article, Context, Whatever|Article]]
11019 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11021 pst title=[[Ns:Somearticle, Context (context)]]
11025 [[Ns:Article (context)|Article]]
11029 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11031 pst title=[[Ns:Somearticle (IGNORED), Context]]
11035 [[Ns:Article, Context|Article]]
11039 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11043 [[Article(context)|]]
11044 [[Bar:Article(context)|]]
11045 [[:Bar:Article(context)|]]
11046 [[|Article(context)]]
11050 [[Article(context)|Article]]
11051 [[Bar:Article(context)|Article]]
11052 [[:Bar:Article(context)|Article]]
11053 [[Article(context)]]
11054 [[Bar:X(Y)Z|X(Y)Z]]
11055 [[:Bar:X(Y)Z|X(Y)Z]]
11059 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11063 [[Article (context)|]]
11064 [[Bar:Article (context)|]]
11065 [[:Bar:Article (context)|]]
11066 [[|Article (context)]]
11070 [[Article (context)|Article]]
11071 [[Bar:Article (context)|Article]]
11072 [[:Bar:Article (context)|Article]]
11073 [[Article (context)]]
11074 [[Bar:X (Y) Z|X (Y) Z]]
11075 [[:Bar:X (Y) Z|X (Y) Z]]
11079 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11083 [[Article(context)|]]
11084 [[Bar:Article(context)|]]
11085 [[:Bar:Article(context)|]]
11086 [[|Article(context)]]
11090 [[Article(context)|Article]]
11091 [[Bar:Article(context)|Article]]
11092 [[:Bar:Article(context)|Article]]
11093 [[Article(context)]]
11094 [[Bar:X(Y)Z|X(Y)Z]]
11095 [[:Bar:X(Y)Z|X(Y)Z]]
11099 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11103 [[Article (context), context|]]
11104 [[Article (context),context|]]
11105 [[Bar:Article (context), context|]]
11106 [[Bar:Article (context),context|]]
11107 [[:Bar:Article (context), context|]]
11108 [[:Bar:Article (context),context|]]
11110 [[Article (context), context|Article]]
11111 [[Article (context),context|Article]]
11112 [[Bar:Article (context), context|Article]]
11113 [[Bar:Article (context),context|Article]]
11114 [[:Bar:Article (context), context|Article]]
11115 [[:Bar:Article (context),context|Article]]
11119 pre-save transform: trim trailing empty lines
11123 Empty lines are trimmed
11129 Empty lines are trimmed
11133 pre-save transform: Signature expansion
11138 * <noinclude>~~~</noinclude>
11139 * <includeonly>~~~</includeonly>
11140 * <onlyinclude>~~~</onlyinclude>
11142 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11143 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11144 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11145 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11150 pre-save transform: Signature expansion in nowiki tags (bug 93)
11156 <nowiki>~~~~</nowiki>
11158 <includeonly><nowiki>~~~~</nowiki></includeonly>
11160 <noinclude><nowiki>~~~~</nowiki></noinclude>
11162 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11164 {{subst:Foo}} shall be converted to FOO
11166 As well as inside noinclude/onlyinclude
11167 <noinclude>{{subst:Foo}}</noinclude>
11168 <onlyinclude>{{subst:Foo}}</onlyinclude>
11170 But not inside includeonly
11171 <includeonly>{{subst:Foo}}</includeonly>
11175 <nowiki>~~~~</nowiki>
11177 <includeonly><nowiki>~~~~</nowiki></includeonly>
11179 <noinclude><nowiki>~~~~</nowiki></noinclude>
11181 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11183 FOO shall be converted to FOO
11185 As well as inside noinclude/onlyinclude
11186 <noinclude>FOO</noinclude>
11187 <onlyinclude>FOO</onlyinclude>
11189 But not inside includeonly
11190 <includeonly>{{subst:Foo}}</includeonly>
11194 Parsoid: Recognize nowiki with trailing space in tags
11198 <nowiki ><div>[[foo]]</nowiki >
11206 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11213 Parsoid: Recognize nowiki with odd capitalization
11217 <noWikI ><div>[[foo]]</Nowiki >
11219 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11224 Parsoid: Escape nowiki with trailing space in tags
11228 <p><nowiki > foo </nowiki ></p>
11229 <p>a<nowiki />b</p>
11230 <p>c<nowiki/ >d</p>
11232 <nowiki > foo </nowiki >
11240 Parsoid: Escape weird noWikI capitalizations
11244 <p><noWikI > foo </NoWikI ></p>
11246 <noWikI > foo </NoWikI >
11250 ### Message transform tests
11253 message transform: magic variables
11263 message transform: should not transform wiki markup
11273 message transform: <noinclude> in transcluded template (bug 4926)
11283 message transform: <onlyinclude> in transcluded template (bug 4926)
11293 {{#special:}} page name, known
11297 {{#special:Recentchanges}}
11299 Special:RecentChanges
11303 {{#special:}} page name with subpage, known
11307 {{#special:Recentchanges/param}}
11309 Special:RecentChanges/param
11313 {{#special:}} page name, unknown
11317 {{#special:foobar nonexistent}}
11319 Special:Foobar nonexistent
11323 {{#speciale:}} page name, known
11327 {{#speciale:Recentchanges}}
11329 Special:RecentChanges
11333 {{#speciale:}} page name with subpage, known
11337 {{#speciale:Recentchanges/param}}
11339 Special:RecentChanges/param
11343 {{#speciale:}} page name, unknown
11347 {{#speciale:foobar nonexistent}}
11349 Special:Foobar_nonexistent
11355 ### For Parsoid-specific tests, see
11356 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11361 parsoid=wt2html,wt2wt,html2html
11363 [[Image:foobar.jpg]]
11365 <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>
11368 <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>
11372 Simple image (using File: namespace, now canonical)
11374 [[File:Foobar.jpg]]
11376 <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>
11379 <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>
11383 Right-aligned image
11385 [[File:Foobar.jpg|right]]
11387 <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>
11390 <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>
11396 [[File:Foobar.jpg|right|Caption text]]
11398 <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>
11401 <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>
11405 Image with caption, bug 53312 #1
11407 [[File:Foobar.jpg|right|Caption page stuff]]
11409 <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>
11412 <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>
11416 Image with caption, bug 53312 #2
11418 [[File:Foobar.jpg|right|Caption page=]]
11420 <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>
11423 <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>
11427 Image with caption, bug 53312 #3
11429 [[File:Foobar.jpg|right|Caption page=stuff]]
11431 <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>
11434 <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>
11438 Allow empty links in image captions (Bug 60753)
11442 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11447 <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>
11450 <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>
11452 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11453 </figcaption></figure>
11457 Titles in unlinked images (T23454)
11459 [[File:Foobar.jpg|link=|stuff]]
11461 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
11466 Link with empty target
11475 Image with link trail
11477 Linktrails should not work for images: [[File:Foobar.jpg]]s
11479 <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
11482 <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>
11486 Image with empty attribute
11488 parsoid=wt2html,wt2wt,html2html
11490 [[File:Foobar.jpg|right||Caption text]]
11492 <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>
11495 <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>
11499 1. Block image with individual attributes from templates
11501 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11503 <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>
11506 <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>
11510 2. Block Image with individual attributes from templates
11512 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11514 <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>
11517 <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>
11521 3. Inline image with individual attributes from templates
11523 [[File:Foobar.jpg|{{echo|50px}}]]
11525 <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>
11528 <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>
11531 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11532 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11534 Image with multiple attributes from the same template
11536 [[File:Foobar.jpg|{{image_attribs}}]]
11538 <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>
11541 <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>
11545 Image with link tails
11549 123[[File:Foobar.jpg]]456
11550 123[[File:Foobar.jpg|right]]456
11551 123[[File:Foobar.jpg|thumb]]456
11553 <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
11555 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
11556 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
11559 <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>
11561 <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>
11563 <div class="thumb tright">
11564 <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>
11565 <div class="thumbcaption">
11566 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11572 <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>
11573 <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>
11574 <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>
11578 Image with multiple captions -- only last one is accepted
11580 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11582 <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>
11585 <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>
11589 Image with multiple widths -- use last
11591 [[File:Foobar.jpg|200px|300px|caption]]
11593 <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>
11596 <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>
11600 Image with multiple alignments -- use first (bug 48664)
11604 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11606 [[File:Foobar.jpg|middle|text-top|caption]]
11608 <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>
11609 <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>
11612 <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>
11613 <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>
11617 Image with width attribute at different positions
11619 [[File:Foobar.jpg|200px|right|Caption]]
11620 [[File:Foobar.jpg|right|200px|Caption]]
11621 [[File:Foobar.jpg|right|Caption|200px]]
11623 <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>
11624 <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>
11625 <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>
11628 <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>
11629 <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>
11630 <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>
11633 # a sad bit of backward-compatibility
11635 Image with size specified with pxpx (bug 13500, 51628)
11637 parsoid=wt2html,wt2wt,html2html
11639 [[File:Foobar.jpg|20pxpx]]
11640 [[File:Foobar.jpg|200x20pxpx]]
11642 <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>
11643 <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>
11646 <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>
11650 Image with link parameter, wiki target
11652 [[File:Foobar.jpg|link=Main Page]]
11654 <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>
11657 <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>
11660 # parsoid bug 49293 (part 1)
11662 Image with link parameter, URL target
11664 [[File:Foobar.jpg|link=http://example.com/]]
11666 <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>
11669 <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>
11672 # parsoid bug 49293 (part 2)
11674 Image with link parameter, protocol-less URL target
11676 [[File:Foobar.jpg|link=//example.com/]]
11678 <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>
11681 <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>
11685 Image with link parameter, wgExternalLinkTarget
11687 [[Image:foobar.jpg|link=http://example.com/]]
11689 wgExternalLinkTarget='foobar'
11691 <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>
11696 Image with link parameter, wgNoFollowLinks set to false
11698 [[Image:foobar.jpg|link=http://example.com/]]
11700 wgNoFollowLinks=false
11702 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11707 Image with link parameter, wgNoFollowDomainExceptions
11709 [[Image:foobar.jpg|link=http://example.com/]]
11711 wgNoFollowDomainExceptions='example.com'
11713 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11718 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11720 [[Image:foobar.jpg|link=http://example.com/|Title]]
11722 wgExternalLinkTarget='foobar'
11724 <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>
11729 Image with empty link parameter
11731 [[File:Foobar.jpg|link=]]
11733 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11736 <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>
11740 Image with link parameter (wiki target) and unnamed parameter
11742 [[File:Foobar.jpg|link=Main_Page|Title]]
11744 <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>
11747 <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>
11751 Image with link parameter (URL target) and unnamed parameter
11753 [[File:Foobar.jpg|link=http://example.com/|Title]]
11755 <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>
11758 <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>
11762 Thumbnail image with link parameter
11765 parsoid=wt2html,wt2wt,html2html
11767 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11769 <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>
11772 <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>
11776 Manually-specified thumbnail image
11780 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11782 <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>
11785 <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>
11789 Manually-specified thumbnail image with explicit link to wiki page
11792 parsoid=wt2html,wt2wt,html2html
11794 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11796 <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>
11799 <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>
11803 Manually-specified thumbnail image with explicit link to url
11806 parsoid=wt2html,wt2wt,html2html
11808 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11810 <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>
11813 <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>
11817 Manually-specified thumbnail image with explicit no link
11820 parsoid=wt2html,wt2wt,html2html
11822 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11824 <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>
11827 <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>
11831 Manually-specified thumbnail image with explicit link and alt text
11834 parsoid=wt2html,wt2wt,html2html
11836 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11838 <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>
11841 <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>
11845 Image with frame and link
11847 parsoid=wt2html,wt2wt,html2html
11849 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11851 <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>
11854 <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>
11858 Image with frame and link and explicit alt
11860 parsoid=wt2html,wt2wt,html2html
11862 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11864 <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>
11867 <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>
11871 Image with wiki markup in implicit alt
11873 parsoid=wt2html,wt2wt,html2html
11875 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11877 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11879 <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>
11880 </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>
11883 <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>
11884 <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>
11887 ###################
11888 # Conflicting image format options.
11889 # First option specified should 'win'.
11890 # All three cases in each test should be identical.
11893 Image with 'frameless' first.
11895 parsoid=wt2html,wt2wt,html2html
11897 [[File:Foobar.jpg|frameless|caption]]
11899 [[File:Foobar.jpg|frameless|frame|caption]]
11901 [[File:Foobar.jpg|frameless|thumb|caption]]
11903 <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>
11904 </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>
11905 </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>
11908 <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>
11909 <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>
11910 <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>
11914 Image with 'frame' first.
11916 parsoid=wt2html,wt2wt,html2html
11918 [[File:Foobar.jpg|frame|caption]]
11919 [[File:Foobar.jpg|frame|frameless|caption]]
11920 [[File:Foobar.jpg|frame|thumb|caption]]
11922 <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>
11923 <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>
11924 <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>
11927 <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>
11928 <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>
11929 <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>
11933 Image with 'thumb' first.
11935 parsoid=wt2html,wt2wt,html2html
11937 [[File:Foobar.jpg|thumb|caption]]
11938 [[File:Foobar.jpg|thumb|frameless|caption]]
11939 [[File:Foobar.jpg|thumb|frame|caption]]
11941 <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>
11942 <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>
11943 <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>
11946 <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>
11947 <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>
11948 <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>
11951 ###################
11953 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
11954 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
11955 # Foobar has actual size of 1941x220
11956 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
11957 # a scalable format.
11958 # 2. Framed images always ignore size options; always render at default size.
11959 # 3. "Unspecified format" and border are the only types which can be
11963 Image: "unspecified format" and border enlarge
11965 parsoid=wt2html,wt2wt,html2html
11967 [[File:Foobar.jpg|2000px]]
11969 [[File:Foobar.jpg|border|2000px]]
11971 <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>
11972 </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>
11975 <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>
11976 <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>
11980 Image: "unspecified format" and border reduce
11982 parsoid=wt2html,wt2wt,html2html
11984 [[File:Foobar.jpg|1000px]]
11986 [[File:Foobar.jpg|border|1000px]]
11988 <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>
11989 </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>
11992 <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>
11993 <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>
11997 Image: thumbs reduce
11999 parsoid=wt2html,wt2wt,html2html
12001 [[File:Foobar.jpg|thumb|50px]]
12003 <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>
12006 <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>
12010 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12012 parsoid=wt2html,wt2wt,html2html
12014 [[File:Foobar.jpg|thumb|2000px]]
12016 [[File:Foobar.svg|thumb|2000px]]
12018 <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>
12019 <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>
12022 <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>
12023 <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>
12027 Image: frameless can reduce in size
12029 parsoid=wt2html,wt2wt,html2html
12031 [[File:Foobar.jpg|frameless|50px]]
12033 <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>
12036 <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>
12040 Image: bitmap frameless can't be enlarged past original size, but vector can
12042 parsoid=wt2html,wt2wt,html2html
12044 [[File:Foobar.jpg|frameless|2000px]]
12046 [[File:Foobar.svg|frameless|2000px]]
12048 <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>
12049 </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>
12052 <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>
12053 <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>
12057 Image: framed images are always unscaled.
12059 parsoid=wt2html,wt2wt,html2html
12061 [[File:Foobar.jpg|frame]]
12063 [[File:Foobar.jpg|frame|50px]]
12065 [[File:Foobar.jpg|frame|50x50px]]
12067 [[File:Foobar.jpg|frame|2000px]]
12069 <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>
12070 <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>
12071 <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>
12072 <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>
12075 <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>
12076 <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>
12077 <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>
12078 <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>
12081 ###################
12084 Link to image page- image page normally doesn't exists, hence edit link
12085 Add test with existing image page
12086 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12090 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12095 bug 18784 Link to non-existent image page with caption should use caption as link text
12097 [[:Image:test|caption]]
12099 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12104 Frameless image caption with a free URL
12106 [[File:Foobar.jpg|http://example.com]]
12108 <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>
12111 <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>
12115 Thumbnail image caption with a free URL
12119 [[File:Foobar.jpg|thumb|http://example.com]]
12121 <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>
12124 <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>
12128 Thumbnail image caption with a free URL and explicit alt
12131 parsoid=wt2html,wt2wt,html2html
12133 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12135 <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>
12138 <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>
12142 SVG thumbnails with no language set
12145 [[File:Foobar.svg|thumb|caption]]
12147 <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>
12150 <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>
12154 SVG thumbnails with language de
12156 parsoid=wt2html,wt2wt,html2html
12158 [[File:Foobar.svg|thumb|caption|lang=de]]
12160 <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>
12163 <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>
12167 SVG thumbnails with invalid language code
12169 parsoid=wt2html,wt2wt,html2html
12171 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12173 <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>
12176 <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>
12180 BUG 1887: A ISBN with a thumbnail
12182 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12184 <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>
12187 <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>
12191 BUG 1887: A RFC with a thumbnail
12193 [[File:Foobar.jpg|thumb|This is RFC 12354]]
12195 <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>
12198 <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>
12202 BUG 1887: A mailto link with a thumbnail
12204 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
12206 <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>
12209 <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>
12212 # Pending resolution to bug 368
12214 BUG 648: Frameless image caption with a link
12216 [[File:Foobar.jpg|text with a [[link]] in it]]
12218 <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>
12221 <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>
12225 BUG 648: Frameless image caption with a link (suffix)
12227 [[File:Foobar.jpg|text with a [[link]]foo in it]]
12229 <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>
12232 <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>
12236 BUG 648: Frameless image caption with an interwiki link
12238 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
12240 <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>
12243 <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>
12247 BUG 648: Frameless image caption with a piped interwiki link
12249 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
12251 <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>
12254 <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>
12258 Escape HTML special chars in image alt text
12260 [[File:Foobar.jpg|& < > "]]
12262 <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>
12265 <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>
12269 BUG 499: Alt text should have Ӓ, not &1234;
12271 [[File:Foobar.jpg|♀]]
12273 <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>
12276 <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>
12280 Broken image caption with link
12282 parsoid=wt2html,wt2wt,html2html
12284 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
12286 <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.
12289 <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>
12293 Image caption containing another image
12295 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12297 <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>
12300 <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>
12304 Image: caption containing a newline
12306 [[File:Foobar.jpg|This
12309 <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>
12312 <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>
12316 Image: caption containing leading space
12317 (The leading space should not trigger nowiki escaping in wt2wt mode)
12319 [[File:Foobar.jpg|thumb| bar]]
12321 <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>
12324 <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>
12328 Image: caption containing a table
12330 parsoid=wt2html,wt2wt,html2html
12332 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12338 and some more text.]]
12340 <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>
12343 <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
12346 <tr><th>Foo </th><th>Bar</th></tr>
12349 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12353 Bug 3090: External links other than http: in image captions
12355 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12357 <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>
12360 <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>
12366 parsoid=wt2html,wt2wt,html2html
12368 [[Image:foobar.jpg|a|class=b]]
12370 <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>
12373 <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>
12377 Localized image handling (1).
12379 parsoid=wt2html,wt2wt,html2html
12382 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12384 <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>
12387 <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>
12391 Localized image handling (2).
12394 parsoid=wt2html,wt2wt,html2html
12397 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12399 <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>
12402 <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>
12406 "border", "frameless" and "class" attributes on an image.
12409 parsoid=wt2html,wt2wt,html2html
12411 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12413 <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>
12416 <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>
12419 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12421 Invalid image attributes (bug 62500)
12424 parsoid=wt2html,wt2wt,html2html
12426 [[File:Foobar.jpg|thumb|float|left|caption]]
12428 [[File:Foobar.jpg|thumb|righ|caption]]
12430 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12432 <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>
12433 <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>
12434 <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>
12437 <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>
12438 <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>
12439 <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>
12445 #REDIRECT [[File:Barfoo.jpg]]
12448 # FIXME: Parsoid should run this test -- but we'd need to teach the
12449 # mockAPI about the redirected Barfoo.jpg image.
12453 [[Image:Barfoo.jpg]]
12455 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12460 Missing image with uploads disabled
12464 [[File:Foobaz.jpg]]
12466 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12469 <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>
12472 # Parsoid-specific testing for images
12473 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12474 # Currently imperfect due to a flaw in the Parsoid testrunner
12476 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12480 Parsoid-specific image handling - simple image with size and middle alignment
12482 [[File:Foobar.jpg|middle|50px]]
12484 <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>
12488 Parsoid-specific image handling - simple image with size, middle alignment,
12489 non-standard namespace alias
12491 parsoid=wt2wt,wt2html,html2html
12493 [[Image:Foobar.jpg|middle|50px]]
12495 <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>
12499 Parsoid-specific image handling - simple image with size and middle alignment
12502 [[File:Foobar.jpg|50px|middle]]
12504 <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>
12508 Parsoid-specific image handling - simple image with size and middle alignment
12509 and non-standard namespace name
12511 parsoid=wt2html,wt2wt,html2html
12513 [[Image:Foobar.jpg|50px|middle]]
12515 <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>
12519 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12521 [[File:Foobar.jpg|500x10px|baseline|caption]]
12523 <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>
12527 Parsoid-specific image handling - simple image with border and size spec
12529 [[File:Foobar.jpg|50px|border|caption]]
12531 <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>
12535 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12537 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12539 <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>
12543 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12546 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12548 <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>
12552 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12554 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12556 <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>
12560 Parsoid-specific image handling - thumbnail with specific size, halign,
12561 valign, and caption (existing content)
12563 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12565 <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>
12569 Parsoid-specific image handling - framed image with specific size and caption
12572 parsoid=wt2html,wt2wt,html2html
12574 [[File:Foobar.jpg|frame|500x50px|caption]]
12576 <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>
12580 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12583 parsoid=wt2html,wt2wt,html2html
12585 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12587 <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>
12591 Parsoid-specific image handling - frameless image with specific size, border, and caption
12593 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12595 <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>
12599 Parsoid-specific image handling - simple image with a formatted caption
12601 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12603 <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>
12607 Parsoid-specific image handling - caption with a template in it
12609 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12611 <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>
12615 Parsoid-specific image handling - caption with unbalanced tags in it
12617 parsoid=wt2html,wt2wt,html2html
12620 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12624 <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>
12629 Parsoid-specific image handling - empty caption (1)
12631 parsoid=wt2html,wt2wt
12633 [[File:Foobar.jpg|thumb|]]
12635 <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>
12638 # empty captions don't get serialized unless we're in the "round trip" case
12640 Parsoid-specific image handling - empty caption (2)
12644 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12645 <a href="File:Foobar.jpg">
12646 <img resource="./File:Foobar.jpg"
12647 src="//example.com/images/3/3a/Foobar.jpg"
12648 height="25" width="220"/>
12650 <figcaption></figcaption>
12653 [[File:Foobar.jpg|thumb]]
12657 Parsoid-specific image handling - whitespace caption
12659 [[File:Foobar.jpg|thumb| ]]
12661 <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>
12665 Parsoid-specific image handling - lang option
12668 [[File:Foobar.svg|lang=de|caption]]
12672 <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>
12681 Subpage test/subpage
12689 subpage title=[[Subpage test]]
12693 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12698 Subpage noslash link
12700 subpage title=[[Subpage test]]
12704 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12709 Subpage test/1/2/subpage
12715 Relative subpage noslash link
12717 parsoid=wt2wt,wt2html,html2html
12718 subpage title=[[Subpage test/1/2/3/4]]
12724 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
12725 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
12728 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
12729 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12733 Parsoid: dot-slash prefixed wikilinks
12743 </p><p>[[././baz/]]
12748 </p><p>[[././baz/]]
12753 Render invalid page names as plain text (bug 51090)
12766 [[{{echo|./../foo}}|bar]]
12767 [[{{echo|foo/.}}|bar]]
12768 [[{{echo|foo/..}}|bar]]
12769 [[{{echo|foo~~~~bar}}]]
12770 [[{{echo|foo>bar}}]]
12771 [[{{echo|foo././bar}}]]
12772 [[{{echo|foo{bar}}]]
12773 [[{{echo|foo}bar}}]]
12774 [[{{echo|foo[bar}}]]
12775 [[{{echo|foo]bar}}]]
12776 [[{{echo|foo<bar}}]]
12778 <p>[[./../foo|bar]]
12788 </p><p>[[./../foo|bar]]
12801 <p>[[./../foo|bar]]
12812 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12813 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12814 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12815 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12816 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12817 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12818 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12819 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12820 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12821 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12822 [[<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>
12830 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12835 BUG 561: {{/Subpage}}
12837 subpage title=[[Page]]
12841 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12849 Category:MediaWiki User's Guide
12857 [[:Category:MediaWiki User's Guide]]
12859 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12868 [[Category:MediaWiki User's Guide]]
12870 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12874 PAGESINCATEGORY invalid title fatal (r33546 fix)
12876 {{PAGESINCATEGORY:<bogus>}}
12883 Category with different sort key
12887 [[Category:MediaWiki User's Guide|Foo]]
12889 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12893 Category with identical sort key
12897 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12899 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12903 Category with empty sort key
12908 [[Category:MediaWiki User's Guide|]]
12910 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12914 Category with empty sort key and parentheses
12919 [[Category:Foo (bar)|]]
12921 [[Category:Foo (bar)|Foo]]
12925 Category with link tail
12930 123[[Category:Foo]]456
12932 123[[Category:Foo]]456
12936 Category with template
12941 [[Category:{{echo|Foo}}]]
12943 [[Category:{{echo|Foo}}]]
12947 Category with template in sort key
12952 [[Category:Foo|{{echo|Bar}}]]
12954 [[Category:Foo|{{echo|Bar}}]]
12958 Category with template in sort key and title
12963 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12965 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12969 Category / paragraph interactions
12971 Foo [[Category:Baz]] Bar
12973 Foo [[Category:Baz]]
12981 [[Category:Baz]] Bar
12994 {{echo|[[Category:Baz]]}}
13009 Parsoid: Serialize link to category page with colon escape
13015 [[:Category:Foo|Bar]]
13018 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13019 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13024 Parsoid: Link prefix/suffixes aren't applied to category links
13026 parsoid=wt2html,wt2wt,html2html
13031 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
13035 Parsoid: Serialize link to file page with colon escape
13041 [[:File:Foo.png|Bar]]
13044 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
13045 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
13050 Parsoid: Serialize a genuine category link without colon escape
13055 [[Category:Foo|Bar]]
13057 <link rel="mw:PageProp/Category" href="Category:Foo">
13058 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
13062 Normalize hrefs properly before testing for invalid link targets (bug 70894)
13066 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
13068 [[Category:Toxine bactérienne]]
13072 Parsoid: Defaultsort
13076 {{DEFAULTSORT:Foo}}
13078 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
13082 ### Inter-language links
13085 Interlanguage links
13093 es:Alimento fr:Nourriture zh:食品
13095 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
13096 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
13097 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
13101 Duplicate interlanguage links (bug 24502)
13112 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
13113 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
13114 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
13115 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
13122 Basic section headings
13129 ===Smaller headline===
13132 <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>
13135 <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>
13138 <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>
13144 Section headings with TOC
13147 === Subheadline 1 ===
13148 ===== Skipping a level =====
13149 ====== Skipping a level ======
13153 ===Another headline===
13155 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13157 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
13159 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
13161 <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>
13163 <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>
13170 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
13172 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
13178 <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>
13179 <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>
13180 <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>
13181 <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>
13182 <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>
13185 <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>
13189 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
13191 Handling of sections up to level 6 and beyond
13194 == Level 2 Heading==
13195 === Level 3 Heading===
13196 ==== Level 4 Heading====
13197 ===== Level 5 Heading=====
13198 ====== Level 6 Heading======
13199 ======= Level 7 Heading=======
13200 ======== Level 8 Heading========
13201 ========= Level 9 Heading=========
13202 ========== Level 10 Heading==========
13204 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13206 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
13208 <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>
13210 <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>
13212 <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>
13214 <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>
13216 <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>
13217 <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>
13218 <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>
13219 <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>
13220 <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>
13234 <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>
13235 <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>
13236 <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>
13237 <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>
13238 <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>
13239 <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>
13240 <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>
13241 <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>
13242 <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>
13243 <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>
13248 TOC regression (bug 9764)
13252 ==== title 1.1.1 ====
13257 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13259 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13261 <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>
13263 <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>
13266 <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>
13269 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13271 <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>
13277 <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>
13278 <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>
13279 <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>
13280 <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>
13281 <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>
13282 <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>
13287 TOC with wgMaxTocLevel=3 (bug 6204)
13293 ==== title 1.1.1 ====
13298 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13300 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13302 <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>
13303 <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>
13306 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13308 <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>
13314 <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>
13315 <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>
13316 <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>
13317 <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>
13318 <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>
13319 <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>
13324 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13330 ====Section 1.1.1====
13331 ====Section 1.1.1.1====
13334 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13336 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13338 <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>
13341 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13345 <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>
13346 <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>
13347 <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>
13348 <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>
13349 <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>
13355 Resolving duplicate section names
13360 <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>
13361 <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>
13366 Resolving duplicate section names with differing case (bug 10721)
13371 <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>
13372 <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>
13384 Template with sections, __NOTOC__
13391 <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>
13392 <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>
13393 <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>
13394 <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>
13399 __NOEDITSECTION__ keyword
13405 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13406 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13411 Link inside a section heading
13413 ==Section with a [[Main Page|link]] in it==
13415 <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>
13420 TOC regression (bug 12077)
13427 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13429 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13431 <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>
13434 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13438 <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>
13439 <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>
13440 <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>
13445 BUG 1219 URL next to image (good)
13447 http://example.com [[File:Foobar.jpg]]
13449 <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>
13452 <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>
13456 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13459 The line above must have a trailing space!
13462 But just in case it doesn't...
13464 <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>
13465 <p>The line above must have a trailing space!
13467 <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>
13468 <p>But just in case it doesn't...
13473 Header with special characters (bug 25462)
13475 The tooltips shall not show entities to the user (ie. be double escaped)
13492 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13494 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13496 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13497 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13498 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13499 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13500 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13504 <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>
13507 <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>
13510 <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>
13513 <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>
13516 <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>
13522 Header with space, plus and underscore as entity
13524 Id should not contain + for spaces
13526 == Space between Text ==
13529 == Space-Entity between Text ==
13532 == Plus+between+Text ==
13535 == Plus-Entity+between+Text ==
13538 == Underscore_between_Text ==
13541 == Underscore-Entity_between_Text ==
13544 [[#Space between Text]]
13545 [[#Space-Entity between Text]]
13546 [[#Plus+between+Text]]
13547 [[#Plus-Entity+between+Text]]
13548 [[#Underscore_between_Text]]
13549 [[#Underscore-Entity_between_Text]]
13551 <p>Id should not contain + for spaces
13553 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13555 <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>
13556 <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>
13557 <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>
13558 <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>
13559 <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>
13560 <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>
13564 <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>
13567 <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>
13570 <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>
13573 <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>
13576 <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>
13579 <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>
13581 </p><p><a href="#Space_between_Text">#Space between Text</a>
13582 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13583 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13584 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13585 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13586 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13591 Headers with excess '=' characters
13592 (Are similar tests necessary beyond the 1st level?)
13596 =''italic'' heading==
13597 ==''italic'' heading=
13599 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13601 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13602 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13603 <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>
13604 <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>
13608 <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>
13609 <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>
13610 <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>
13611 <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>
13616 HTML headers vs TOC (bug 23393)
13617 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13629 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13631 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13633 <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>
13634 <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>
13637 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13639 <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>
13640 <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>
13646 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13647 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13648 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13649 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13650 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13651 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13656 Single-line or multiline-comments can follow headings
13658 parsoid=wt2html,wt2wt
13666 <h2><span class="mw-headline" id="foo">foo</span></h2>
13667 <h2><span class="mw-headline" id="bar">bar</span></h2>
13668 <h2><span class="mw-headline" id="baz">baz</span></h2>
13673 BUG 1219 URL next to image (broken)
13675 http://example.com[[File:Foobar.jpg]]
13677 <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>
13680 <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>
13684 Bug 1186 news: in the middle of text
13686 http://en.wikinews.org/wiki/Wikinews:Workplace
13688 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13694 Namespaced link must have a title
13703 Namespaced link must have a title (bad fragment version)
13705 [[Project:#fragment]]
13707 <p>[[Project:#fragment]]
13713 ### HTML tags and HTML attributes
13717 div with no attributes
13719 <div>HTML rocks</div>
13721 <div>HTML rocks</div>
13726 div with double-quoted attribute
13728 <div id="rock">HTML rocks</div>
13730 <div id="rock">HTML rocks</div>
13735 div with single-quoted attribute
13737 <div id='rock'>HTML rocks</div>
13739 <div id="rock">HTML rocks</div>
13744 div with unquoted attribute
13746 <div id=rock>HTML rocks</div>
13748 <div id="rock">HTML rocks</div>
13753 div with illegal double attributes
13755 <div id="a" id="b">HTML rocks</div>
13757 <div id="b">HTML rocks</div>
13761 # FIXME: produce empty string instead of "class" in the PHP parser, following
13764 div with empty attribute value, space before equals
13768 <div class =>HTML rocks</div>
13770 <div class="">HTML rocks</div>
13775 div with multiple empty attribute values
13779 <div id= title=>HTML rocks</div>
13781 <div id="" title="">HTML rocks</div>
13786 table with multiple empty attribute values
13794 <table title="" id="">
13795 <tbody><tr><td> hi</td></tr>
13800 div with braces in attribute value
13802 <div title="{}">Foo</div>
13804 <div title="{}">Foo</div>
13807 <div title="{}">Foo</div>
13810 # This it very inconsistent in the PHP parser: it returns
13811 # class="class" if there is a space between the name and the equal sign (see
13812 # 'div with empty attribute value, space before equals'), but strips the
13813 # attribute completely if the space is missing. We hope that not much content
13814 # depends on this, so are implementing the behavior below in Parsoid for
13815 # consistencies' sake.
13816 # FIXME: fix this behavior in the PHP parser?
13818 div with empty attribute value, no space before equals
13820 parsoid=wt2html,html2html
13822 <div class=>HTML rocks</div>
13824 <div>HTML rocks</div>
13827 <div class="">HTML rocks</div>
13831 HTML multiple attributes correction
13833 <p class="error" class="awesome">Awesome!</p>
13835 <p class="awesome">Awesome!</p>
13840 Table multiple attributes correction
13843 !+ class="error" class="awesome"| status
13848 <th class="awesome"> status
13856 <DIV ID="x">HTML ROCKS</DIV>
13858 <div id="x">HTML ROCKS</div>
13863 Non-ASCII pseudo-tags are rendered as text
13872 Pseudo-tag with URL 'name' renders as url link
13874 <http://example.com/>
13876 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13881 text with amp in the middle of nowhere
13885 <p>Remember AT&T?
13890 text with character entity: eacute
13892 I always thought é was a cute letter.
13894 <p>I always thought é was a cute letter.
13897 <p>I always thought é was a cute letter.</p>
13901 text with entity-escaped character entity-like string: eacute
13903 I always thought &eacute; was a cute letter.
13905 <p>I always thought &eacute; was a cute letter.
13910 text with undefined character entity: xacute
13912 I always thought &xacute; was a cute letter.
13914 <p>I always thought &xacute; was a cute letter.
13918 # TODO: generalize to PHP parser?
13924 <data value="5">five</data>
13925 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13926 <mark>This highlighted text</mark>
13928 <p><data value="5">five</data>
13929 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13930 <mark>This highlighted text</mark></p>
13934 HTML tag with leading space is parsed as text
13938 <p>< div>foo< /div>
13943 ### Nesting tests (see bug 41545, 50604, 51081)
13946 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13947 # Note that html2wt is considerably more difficult if we use <b> in
13948 # the test case, instead of <big>
13950 Ensure that HTML adoption agency algorithm is properly implemented.
13952 <big>X<big>Y</big>Z</big>
13954 <p><big>X<big>Y</big>Z</big>
13958 # This was bug 41545 in the PHP parser.
13959 # Note that tidy doesn't handle this correctly.
13963 <kbd>X<kbd>Y</kbd>Z</kbd>
13965 <p><kbd>X<kbd>Y</kbd>Z</kbd>
13969 # The following cases were bug 51081 in the PHP parser.
13970 # Note that there are some other nestable tags (b, i, etc) which are
13971 # not covered; see bug 51081 for discussion.
13973 # Note that tidy doesn't handle this correctly.
13977 <em>X<em>Y</em>Z</em>
13979 <p><em>X<em>Y</em>Z</em>
13983 # Note that tidy doesn't handle this correctly.
13985 Nesting of <strong>
13987 <strong>X<strong>Y</strong>Z</strong>
13989 <p><strong>X<strong>Y</strong>Z</strong>
13998 <p><q>X<q>Y</q>Z</q></p>
14001 # Note that tidy doesn't handle this correctly.
14005 <ruby>X<ruby>Y</ruby>Z</ruby>
14007 <p><ruby>X<ruby>Y</ruby>Z</ruby>
14011 # Note that tidy doesn't handle this correctly.
14015 <bdo>X<bdo>Y</bdo>Z</bdo>
14017 <p><bdo>X<bdo>Y</bdo>Z</bdo>
14029 [[Media:Foobar.jpg]]
14031 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
14036 Media link with text
14038 [[Media:Foobar.jpg|A neat file to look at]]
14040 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
14044 # FIXME: this is still bad HTML tag nesting
14046 Media link with nasty text
14047 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
14049 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
14051 <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>
14054 <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>
14058 Media link to nonexistent file (bug 1702)
14060 [[Media:No such.jpg]]
14062 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
14067 Image link to nonexistent file (bug 1850 - good)
14069 [[File:No_such.jpg]]
14071 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
14074 <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>
14078 :Image link to nonexistent file (bug 1850 - bad)
14080 [[:Image:No such.jpg]]
14082 <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>
14085 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
14091 Character reference normalization in link text (bug 1938)
14093 [[Main Page|this&that]]
14095 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
14102 Test for unicode normalization
14104 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
14108 (bug 19451) Links should refer to the normalized form.
14116 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14117 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14118 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14119 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14120 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14125 Empty attribute crash test (bug 2067)
14127 <font color="">foo</font>
14129 <p><font color="">foo</font>
14134 Empty attribute crash test single-quotes (bug 2067)
14136 <font color=''>foo</font>
14138 <p><font color="">foo</font>
14143 Attribute test: equals, then nothing
14145 <font color=>foo</font>
14147 <p><font>foo</font>
14152 Attribute test: unquoted value
14154 <font color=x>foo</font>
14156 <p><font color="x">foo</font>
14161 Attribute test: unquoted but illegal value (hash)
14163 <font color=#x>foo</font>
14165 <p><font color="#x">foo</font>
14170 Attribute test: no value
14172 <font color>foo</font>
14174 <p><font color="color">foo</font>
14179 Bug 2095: link with three closing brackets
14183 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
14186 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
14190 Bug 2095: link with pipe and three closing brackets
14192 [[Main Page|link]]]
14194 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
14197 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
14201 Bug 2095: link with pipe and three closing brackets, version 2
14203 [[Main Page|[http://example.com/]]]
14205 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
14208 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
14217 Template:Dangerous attribute
14219 " onmouseover="alert(document.cookie)
14223 Template:Dangerous style attribute
14225 border-size: expression(alert(document.cookie))
14231 <div style="float: right; {{{1}}}">Magic div</div>
14235 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
14237 <div title="{{test}}"></div>
14239 <div title="This is a test template"></div>
14243 # Parsoid has enough context to handle this case
14245 Bug 2304: HTML attribute safety (dangerous template; 2309)
14247 <div title="{{dangerous attribute}}"></div>
14249 <div title=""></div>
14252 <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>
14256 Bug 2304: HTML attribute safety (dangerous style template; 2309)
14258 <div style="{{dangerous style attribute}}"></div>
14260 <div style="/* insecure input */"></div>
14265 Bug 2304: HTML attribute safety (safe parameter; 2309)
14267 {{div style|width: 200px}}
14269 <div style="float: right; width: 200px">Magic div</div>
14274 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
14276 {{div style|width: expression(alert(document.cookie))}}
14278 <div style="/* insecure input */">Magic div</div>
14283 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14285 {{div style|"><script>alert(document.cookie)</script>}}
14287 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14292 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14294 {{div style|" ><script>alert(document.cookie)</script>}}
14296 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14301 Bug 2304: HTML attribute safety (link)
14303 <div title="[[Main Page]]"></div>
14305 <div title="[[Main Page]]"></div>
14310 Bug 2304: HTML attribute safety (italics)
14312 <div title="''foobar''"></div>
14314 <div title="''foobar''"></div>
14319 Bug 2304: HTML attribute safety (bold)
14321 <div title="'''foobar'''"></div>
14323 <div title="'''foobar'''"></div>
14329 Bug 2304: HTML attribute safety (ISBN)
14331 <div title="ISBN 1234567890"></div>
14333 <div title="ISBN 1234567890"></div>
14338 Bug 2304: HTML attribute safety (RFC)
14340 <div title="RFC 1234"></div>
14342 <div title="RFC 1234"></div>
14347 Bug 2304: HTML attribute safety (PMID)
14349 <div title="PMID 1234567890"></div>
14351 <div title="PMID 1234567890"></div>
14356 Bug 2304: HTML attribute safety (web link)
14358 <div title="http://example.com/"></div>
14360 <div title="http://example.com/"></div>
14365 Bug 2304: HTML attribute safety (named web link)
14367 <div title="[http://example.com/ link]"></div>
14369 <div title="[http://example.com/ link]"></div>
14374 Bug 3244: HTML attribute safety (extension; safe)
14376 <div style="<nowiki>background:blue</nowiki>"></div>
14378 <div style="background:blue"></div>
14383 Bug 3244: HTML attribute safety (extension; unsafe)
14385 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14387 <div style="/* insecure input */"></div>
14391 # More MSIE fun discovered by Tom Gilder
14394 MSIE CSS safety test: spurious slash
14396 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14398 <div style="/* insecure input */">evil</div>
14403 MSIE CSS safety test: hex code
14405 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14407 <div style="/* insecure input */">evil</div>
14412 MSIE CSS safety test: comment in url
14414 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14416 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14421 MSIE CSS safety test: comment in expression
14423 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14425 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14430 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14432 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14434 <p style="/* invalid control char */">A</p>
14439 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14441 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14442 <div style="top:EXPRESSION(alert())">B</div>
14444 <p style="/* insecure input */">A</p>
14445 <div style="/* insecure input */">B</div>
14450 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14452 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14453 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14455 <div style="/* insecure input */">A</div>
14456 <p style="/* insecure input */">B</p>
14461 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14463 <div style="background-image:url⁽javascript:alert())">A</div>
14464 <div style="background-image:url₍javascript:alert())">B</div>
14465 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14467 <div style="/* insecure input */">A</div>
14468 <div style="/* insecure input */">B</div>
14469 <p style="/* insecure input */">C</p>
14477 title="data:text/html,<img src=1 onerror=alert(1)>"
14478 style="-o-link:attr(title);-o-link-source:current">X</div>
14480 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14485 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14487 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14488 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14489 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14490 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14491 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14492 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14493 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14495 <p style="/* insecure input */">A</p>
14496 <p style="/* insecure input */">B</p>
14497 <p style="/* insecure input */">C</p>
14498 <p style="/* insecure input */">D</p>
14499 <p style="/* insecure input */">E</p>
14500 <p style="/* insecure input */">F</p>
14501 <p style="/* insecure input */">G</p>
14506 Table attribute legitimate extension
14509 !+ style="<nowiki>color:blue</nowiki>"| status
14514 <th style="color:blue"> status
14520 Table attribute safety
14523 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14528 <th style="/* insecure input */"> status
14534 CSS line continuation 1
14536 <div style="background-image: u\ rl(test.jpg);"></div>
14538 <div style="/* insecure input */"></div>
14543 CSS line continuation 2
14545 <div style="background-image: u\ rl(test.jpg); "></div>
14547 <div style="/* insecure input */"></div>
14558 Expansion of multi-line templates in attribute values (bug 6255)
14560 <div style="background: {{identity|#00FF00}}">-</div>
14562 <div style="background: #00FF00">-</div>
14568 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14570 <div style="background:
14573 <div style="background: #00FF00">-</div>
14576 <div style="background:
14581 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14583 <div style="background: #00FF00">-</div>
14585 <div style="background: #00FF00">-</div>
14590 evil <math>-wiki-tags without Extension:Math enabled
14592 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14594 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14598 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14601 Parser hook: empty input
14614 Parser hook: empty input using terminated empty elements
14627 Parser hook: empty input using terminated empty elements (space before)
14640 Parser hook: basic input
14654 Parser hook: case insensitive
14668 Parser hook: case insensitive, redux
14681 Parser hook: nested tags
14685 <tag><tag></tag></tag>
14696 Parser hook: basic arguments
14698 <tag width=200 height = "100" depth = '50' square></tag>
14706 'square' => 'square',
14713 Parser hook: argument containing a forward slash (bug 5344)
14715 <tag filename='/tmp/bla'></tag>
14720 'filename' => '/tmp/bla',
14727 Parser hook: empty input using terminated empty elements (bug 2374)
14740 # </tag> should be output literally since there is no matching tag that begins it
14742 Parser hook: basic arguments using terminated empty elements (bug 2374)
14744 <tag width=200 height = "100" depth = '50' square/>
14754 'square' => 'square',
14763 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14767 Parser hook: static parser hook not inside a comment
14769 <statictag>hello, world</statictag>
14770 <statictag action=flush/>
14778 Parser hook: static parser hook inside a comment
14780 <!-- <statictag>hello, world</statictag> -->
14781 <statictag action=flush/>
14787 # Nested template calls; this case was broken by Parser.php rev 1.506,
14791 Template:One-parameter
14793 (My parameter is: {{{1}}})
14797 Template:Map-one-parameter
14799 {{{{{1}}}|{{{2}}}}}
14803 Nested template calls
14805 {{Map-one-parameter|One-parameter|param}}
14807 <p>(My parameter is: param)
14816 # HTML+Tidy effectively strips out the empty tags completely
14817 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14818 # which Tidy would have done for the PHP parser had there been content inside it.
14820 Sanitizer: Closing of open tags
14822 <s></s><table></table>
14824 <s></s><table></table>
14827 <p><s></s></p><table></table>
14831 Sanitizer: Closing of open but not closed tags
14840 Sanitizer: Closing of closed but not open tags
14849 Sanitizer: Closing of closed but not open table tags
14851 Table not started</td></tr></table>
14853 <p>Table not started</td></tr></table>
14858 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14860 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14862 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14866 # In HTML5, the restrictions are that id must contain at least one character,
14867 # and must not contain any space characters.
14869 Sanitizer: Validating the contents of the id attribute (bug 4515)
14873 <br id="" /><br id="a space" />
14878 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
14880 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14884 <br id="foo" /><br id="foo" />
14886 Something need to be done. foo-2 ?
14890 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14893 <meta itemprop="hello" content="world">
14894 <meta http-equiv="refresh" content="5">
14895 <meta itemprop="hello" http-equiv="refresh" content="5">
14896 <link itemprop="hello" href="{{SERVER}}">
14897 <link rel="stylesheet" href="{{SERVER}}">
14898 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14901 <div itemscope="itemscope">
14902 <p> <meta itemprop="hello" content="world" />
14903 <meta http-equiv="refresh" content="5">
14904 <meta itemprop="hello" content="5" />
14906 <link itemprop="hello" href="http://example.org" />
14907 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14908 <link itemprop="hello" href="http://example.org" />
14914 Language converter: output gets cut off unexpectedly (bug 5757)
14918 this bit is safe: }-
14920 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14922 then we get cut off here: }-
14924 all additional text is vanished
14926 <p>this bit is safe: }-
14927 </p><p>but if we add a conversion instance: xxx
14928 </p><p>then we get cut off here: }-
14929 </p><p>all additional text is vanished
14934 Self closed html pairs (bug 5487)
14937 <center><font id="bug" />Centered text</center>
14938 <div><font id="bug2" />In div text</div>
14940 <center><font id="bug" />Centered text</center>
14941 <div><font id="bug2" />In div text</div>
14950 Punctuation: nbsp before exclamation
14954 <p>C'est grave !
14959 Punctuation: CSS !important (bug 11874)
14961 <div style="width:50% !important">important</div>
14963 <div style="width:50% !important">important</div>
14968 Punctuation: CSS ! important (bug 11874; with space after)
14970 <div style="width:50% ! important">important</div>
14972 <div style="width:50% ! important">important</div>
14978 HTML bullet list, closed tags (bug 5497)
14991 <ul data-parsoid='{"stx":"html"}'>
14992 <li data-parsoid='{"stx":"html"}'>One</li>
14993 <li data-parsoid='{"stx":"html"}'>Two</li>
14999 HTML bullet list, unclosed tags (bug 5497)
15011 <ul data-parsoid='{"stx":"html"}'>
15012 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15013 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15019 HTML ordered list, closed tags (bug 5497)
15032 <ol data-parsoid='{"stx":"html"}'>
15033 <li data-parsoid='{"stx":"html"}'>One</li>
15034 <li data-parsoid='{"stx":"html"}'>Two</li>
15040 HTML ordered list, unclosed tags (bug 5497)
15053 <ol data-parsoid='{"stx":"html"}'>
15054 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15055 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15061 HTML nested bullet list, closed tags (bug 5497)
15086 HTML nested bullet list, open tags (bug 5497)
15123 HTML nested ordered list, closed tags (bug 5497)
15148 HTML nested ordered list, open tags (bug 5497)
15185 HTML ordered list item with parameters oddity
15187 <ol><li id="fragment">One</li>
15190 <ol><li id="fragment">One</li>
15195 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
15197 bug 5918: autonumbering
15199 [http://first/] [http://second] [ftp://ftp]
15203 [mailto:enclosed@mail.tld With target]
15205 [mailto:enclosed@mail.tld]
15207 mailto:inline@mail.tld
15209 <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>
15210 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
15211 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
15212 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
15213 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
15216 <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>
15217 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
15218 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
15219 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
15220 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
15225 # Security and HTML correctness
15226 # From Nick Jenkins' fuzz testing
15230 Fuzz testing: Parser13
15245 Fuzz testing: Parser14
15250 <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>
15251 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15253 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15259 <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>
15261 <div id="toc" class="toc">
15262 <div id="toctitle">
15266 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15272 Fuzz testing: Parser14-table
15277 <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>
15278 <table style="__TOC__">
15283 <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>
15284 <table style="__TOC__">
15291 # Known to produce bogus xml (extra </td>)
15293 Fuzz testing: Parser16
15322 Fuzz testing: Parser21
15325 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15330 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15340 Fuzz testing: Parser22
15342 http://===r:::https://b
15346 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15354 # Known to produce bad XML for now
15356 Fuzz testing: Parser24
15363 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15364 <br style="onmouseover='alert(document.cookie);' " />
15366 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15371 <u class="|">}}}} >
15372 <br style="onmouseover='alert(document.cookie);'" />
15374 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15383 # Note: the current result listed for this is not what the original one was,
15384 # but the original bug was JavaScript injection, which is fixed in any case.
15385 # It's not clear that the original result listed was any more correct than the
15386 # current one. Original result:
15389 # <li class="||">
15390 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15392 Fuzz testing: Parser25 (bug 6055)
15398 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15400 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15405 Fuzz testing: URL adjacent extension (with space, clean)
15407 http://example.com <nowiki>junk</nowiki>
15409 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15412 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
15416 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15418 http://example.com<nowiki>junk</nowiki>
15420 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15423 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
15427 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15429 http://example.com<pre>junk</pre>
15431 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15434 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15439 <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>
15443 Fuzz testing: image with bogus manual thumbnail
15445 [[Image:foobar.jpg|thumbnail= ]]
15447 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15450 <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>
15454 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15456 <pre dir=" "></pre>
15458 <pre dir=" "></pre>
15463 Parsing optional HTML elements (Bug 6171)
15468 <td> Some tabular data</td>
15469 <td> More tabular data ...
15470 <td> And yet som tabular data</td>
15476 <td> Some tabular data</td>
15477 <td> More tabular data ...
15478 </td><td> And yet som tabular data</td>
15485 Correct handling of <td>, <tr> (Bug 6171)
15490 <td> Some tabular data</td>
15491 <td> More tabular data ...</td>
15492 <td> And yet som tabular data</td>
15498 <td> Some tabular data</td>
15499 <td> More tabular data ...</td>
15500 <td> And yet som tabular data</td>
15508 Parsing crashing regression (fr:JavaScript)
15512 <p></body></x>
15517 Inline wiki vs wiki block nesting
15523 <p><b>Bold paragraph</b>
15524 </p><p>New wiki paragraph
15528 # FIXME: The current php output is documented
15529 # and desired output is the parsoid target.
15531 Inline HTML vs wiki block nesting
15537 <p><b>Bold paragraph
15538 </p><p>New wiki paragraph</b>
15541 <p><b>Bold paragraph</b>
15542 </p><p>New wiki paragraph
15546 # Original result was this:
15547 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15549 # While that might be marginally more intuitive, maybe, the six-apostrophe
15550 # construct is clearly pathological and the result stated here (which is what
15551 # the parser actually does) is about as reasonable as anything.
15553 Mixing markup for italics and bold
15556 '''bold''''''bold''bolditalics'''''
15558 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15566 Article for special page transclusion test
15570 Special page transclusion
15573 {{Special:Prefixindex/Xyzzyx}}
15575 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15580 Special page transclusion twice (bug 5021)
15583 {{Special:Prefixindex/Xyzzyx}}
15584 {{Special:Prefixindex/Xyzzyx}}
15586 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15587 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15592 Transclusion of default MediaWiki message
15594 {{MediaWiki:Mainpage}}
15601 Transclusion of nonexistent MediaWiki message
15603 {{MediaWiki:Mainpagexxx}}
15605 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15610 Transclusion of MediaWiki message with underscore
15612 {{MediaWiki:history_short}}
15619 Transclusion of MediaWiki message with space
15621 {{MediaWiki:history short}}
15628 Invalid header with following text
15638 Section extraction test (section 0)
15658 Section extraction test (section 1)
15680 Section extraction test (section 2)
15701 Section extraction test (section 3)
15721 Section extraction test (section 4)
15745 Section extraction test (section 5)
15765 Section extraction test (section 6)
15786 Section extraction test (section 7)
15806 Section extraction test (section 8)
15826 Section extraction test (section 9)
15847 Section extraction test (section 10)
15867 Section extraction test (nonexistent section 11)
15886 Section extraction test with bogus heading (section 1)
15891 ==bogus== not a legal section
15895 ==bogus== not a legal section
15899 Section extraction test with bogus heading (section 2)
15904 ==bogus== not a legal section
15911 Section extraction test with comment after heading (section 1)
15923 Section extraction test with comment after heading (section 2)
15935 Section extraction test with bogus <nowiki> heading (section 1)
15940 ==bogus== <nowiki>not a legal section</nowiki>
15944 ==bogus== <nowiki>not a legal section</nowiki>
15948 Section extraction test with bogus <nowiki> heading (section 2)
15953 ==bogus== <nowiki>not a legal section</nowiki>
15960 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
15961 # instead of respecting commented sections
15963 Section extraction prefixed by comment (section 1)
15974 Section extraction prefixed by comment (section 2)
15985 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
15986 # instead of respecting HTML-style headings
15988 Section extraction, mixed wiki and html (section 1)
16004 Section extraction, mixed wiki and html (section 2)
16020 # Formerly testing for bug 3342
16022 Section extraction, heading surrounded by <noinclude>
16026 <noinclude>==unmarked==</noinclude>
16032 # Test behavior of bug 19910
16034 Sectiion with all-equals
16039 The line above must have a trailing space
16042 But just in case it doesn't...
16046 But just in case it doesn't...
16050 Section replacement test (section 0)
16081 Section replacement test (section 1)
16110 Section replacement test (section 2)
16140 Section replacement test (section 3)
16171 Section replacement test (section 4)
16198 Section replacement test (section 5)
16229 Section replacement test (section 6)
16259 Section replacement test (section 7)
16290 Section replacement test (section 8)
16321 Section replacement test (section 9)
16350 Section replacement test (section 10)
16380 Section replacement test with initial whitespace (bug 13728)
16384 Preformatted initial line
16388 Preformatted initial line
16395 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16407 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16420 Section extraction, <pre> around bogus header (bug 10309)
16437 Section replacement, <pre> around bogus header (bug 10309)
16439 noxml replace=2,"xxx"
16460 Handling of 
 in URLs
16464 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16467 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16469 a</a></li></ul></li></ul>
16473 Handling of %0A in URLs
16477 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16480 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16484 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16486 5 quotes, code coverage +1 line
16493 <p><b><i></i></b></p>
16496 # same html as previous, but wikitext adjusted to match parsoid html2wt
16497 # note that wt2html and html2html will put the <i> before the <b>
16499 5 quotes, code coverage +1 line w/ nowiki (1)
16501 parsoid=wt2wt,html2wt
16503 '''''<nowiki/>'''''
16508 <p><b><i></i></b></p>
16511 # same as previous, just swapping the <i> and <b>
16513 5 quotes, code coverage +1 line w/ nowiki (2)
16515 '''''<nowiki/>'''''
16520 <p><i><b></b></i></p>
16524 Special:Search page linking.
16528 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16533 {{!}} is a magic word
16535 {{!}} is a magic word there and {{!}} is still a magic word here
16537 <p>| is a magic word there and | is still a magic word here
16540 <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>
16546 title=[[Parser test]]
16551 * {{FULLPAGENAMEE}}
16553 * {{BASEPAGENAMEE}}
16557 * {{ROOTPAGENAMEE}}
16559 * {{TALKPAGENAMEE}}
16560 * {{SUBJECTPAGENAME}}
16561 * {{SUBJECTPAGENAMEE}}
16564 * {{NAMESPACENUMBER}}
16568 * {{SUBJECTSPACEE}}
16569 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16571 <ul><li> Parser test</li>
16572 <li> Parser_test</li>
16573 <li> Parser test</li>
16574 <li> Parser_test</li>
16575 <li> Parser test</li>
16576 <li> Parser_test</li>
16577 <li> Parser test</li>
16578 <li> Parser_test</li>
16579 <li> Parser test</li>
16580 <li> Parser_test</li>
16581 <li> Talk:Parser test</li>
16582 <li> Talk:Parser_test</li>
16583 <li> Parser test</li>
16584 <li> Parser_test</li>
16592 <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>
16595 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16605 image4 |300px| centre
16606 image5.svg| http://///////
16611 <ul class="gallery mw-gallery-traditional">
16612 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16613 <div class="thumb" style="height: 150px;">Image1.png</div>
16614 <div class="gallerytext">
16617 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16618 <div class="thumb" style="height: 150px;">Image2.gif</div>
16619 <div class="gallerytext">
16624 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16625 <div class="thumb" style="height: 150px;">Image3</div>
16626 <div class="gallerytext">
16629 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16630 <div class="thumb" style="height: 150px;">Image4</div>
16631 <div class="gallerytext">
16636 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16637 <div class="thumb" style="height: 150px;">Image5.svg</div>
16638 <div class="gallerytext">
16639 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16643 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16644 <div class="thumb" style="height: 150px;">* image6</div>
16645 <div class="gallerytext">
16653 Gallery (with options)
16655 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16656 File:Nonexistent.jpg|caption
16657 File:Nonexistent.jpg
16658 image:foobar.jpg|some '''caption''' [[Main Page]]
16660 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16663 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16664 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16665 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16666 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16667 <div class="gallerytext">
16672 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16673 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16674 <div class="gallerytext">
16677 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16678 <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>
16679 <div class="gallerytext">
16680 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16684 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16685 <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>
16686 <div class="gallerytext">
16689 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16690 <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>
16691 <div class="gallerytext">
16701 Gallery with link that has fragment
16704 image:foobar.jpg|link=Main_Page
16705 image:foobar.jpg|link=Main_Page#section
16706 image:foobar.jpg|link=Main Page#section|caption
16709 <ul class="gallery mw-gallery-traditional">
16710 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16711 <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>
16712 <div class="gallerytext">
16715 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16716 <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>
16717 <div class="gallerytext">
16720 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16721 <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>
16722 <div class="gallerytext">
16732 Gallery with wikitext inside caption
16735 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16736 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16739 <ul class="gallery mw-gallery-traditional">
16740 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16741 <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>
16742 <div class="gallerytext">
16743 <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>
16747 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16748 <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>
16749 <div class="gallerytext">
16750 <p>This is a test template
16759 gallery (with showfilename option)
16761 <gallery showfilename>
16762 File:Nonexistent.jpg|caption
16763 File:Nonexistent.jpg
16764 image:foobar.jpg|some '''caption''' [[Main Page]]
16768 <ul class="gallery mw-gallery-traditional">
16769 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16770 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16771 <div class="gallerytext">
16772 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16777 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16778 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16779 <div class="gallerytext">
16780 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16784 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16785 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
16786 <div class="gallerytext">
16787 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16788 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16792 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16793 <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>
16794 <div class="gallerytext">
16795 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16804 Gallery (with namespace-less filenames)
16807 File:Nonexistent.jpg
16813 <ul class="gallery mw-gallery-traditional">
16814 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16815 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16816 <div class="gallerytext">
16819 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16820 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16821 <div class="gallerytext">
16824 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16825 <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>
16826 <div class="gallerytext">
16829 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16830 <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>
16831 <div class="gallerytext">
16839 HTML Hex character encoding (spells the word "JavaScript")
16841 parsoid=wt2html,wt2wt,html2html
16843 JavaScript
16845 <p>JavaScript
16850 <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>
16854 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16858 <p>&#xsee;&#XSEE;
16861 <p>&#xsee;&#XSEE;</p>
16865 HTML Hex character encoding mixed case
16867 parsoid=wt2html,wt2wt,html2html
16876 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16880 __FORCETOC__ override
16892 ISBN 978-0-1234-56 789
16894 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16897 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16899 <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>
16903 ISBN followed by 5 spaces
16914 ISBN ISBN 1234567890
16916 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16919 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
16929 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16930 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
16931 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
16934 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
16935 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
16936 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
16940 ISBN with empty prefix (parsoid test)
16944 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16947 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
16951 Bug 22905: <abbr> followed by ISBN followed by </a>
16953 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
16955 <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>
16958 <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>
16966 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
16971 Double RFC with a wiki link
16975 <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>
16984 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
16987 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
16991 Centre-aligned image
16993 [[Image:foobar.jpg|centre]]
16995 <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>
17002 [[Image:foobar.jpg|none]]
17004 <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>
17009 Width + Height sized image (using px) (height is ignored)
17011 [[Image:foobar.jpg|640x480px]]
17013 <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>
17018 Width-sized image (using px, no following whitespace)
17020 [[Image:foobar.jpg|640px]]
17022 <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>
17027 Width-sized image (using px, with following whitespace - test regression from r39467)
17029 [[Image:foobar.jpg|640px ]]
17031 <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>
17036 Width-sized image (using px, with preceding whitespace - test regression from r39467)
17038 [[Image:foobar.jpg| 640px]]
17040 <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>
17045 Image with page parameter
17049 [[File:LoremIpsum.djvu|page=2]]
17051 <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>
17054 <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>
17058 Another italics / bold test
17066 # FIXME: The php output seems broken. It's interleaving some open/close tags.
17072 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
17075 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
17080 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
17082 Images with the "|" character in the comment
17084 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
17086 <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>
17089 <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>
17093 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
17095 <html><script>alert(1);</script></html>
17097 <p><html><script>alert(1);</script></html>
17102 HTML with raw HTML ($wgRawHtml==true)
17106 <html><script>alert(1);</script></html>
17108 <p><script>alert(1);</script>
17113 Parents of subpages, one level up
17115 subpage title=[[Subpage test/L1/L2/L3]]
17119 <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>
17125 Parents of subpages, one level up, not named
17127 subpage title=[[Subpage test/L1/L2/L3]]
17131 <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>
17138 Parents of subpages, two levels up
17140 subpage title=[[Subpage test/L1/L2/L3]]
17146 <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
17147 </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>
17152 Parents of subpages, two levels up, without trailing slash or name.
17154 subpage title=[[Subpage test/L1/L2/L3]]
17163 Parents of subpages, two levels up, with lots of extra trailing slashes.
17165 subpage title=[[Subpage test/L1/L2/L3]]
17169 <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>
17174 Subpage test/L1/L2/L3Sibling
17180 Transclusion of a sibling page (one level up)
17182 subpage title=[[Subpage test/L1/L2/L3]]
17191 Transclusion of a child page
17193 subpage title=[[Subpage test/L1/L2]]
17202 Non-transclusion because of too many up levels
17204 subpage title=[[Subpage test/L1/L2/L3]]
17206 {{../../../../More than parent}}
17208 <p>{{../../../../More than parent}}
17213 Definition list code coverage
17219 <dl><dt> title  </dt>
17221 <dt> title </dt>
17227 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17228 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17229 <dt>title</dt><dd> def</dd></dl>
17233 Don't fall for the self-closing div
17235 <div>hello world</div/>
17237 <div>hello world</div>
17246 <p>[[:Template:Msg]]
17255 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
17259 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
17261 Always escape literal '>' in output, not just after '<'
17275 <p>This is a test template
17276 This is a test template
17288 Inclusion of !userCanEdit() content
17292 <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>
17298 Out-of-order TOC heading levels
17307 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17309 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17311 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17312 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17315 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17317 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17318 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17324 <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>
17325 <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>
17326 <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>
17327 <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>
17328 <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>
17329 <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>
17335 ISBN with a dummy number
17345 ISBN with space-delimited number
17349 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17355 ISBN with multiple spaces, no number
17374 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17375 </p><p>ISBN 12345678901
17381 ISBN with trailing year (bug 8110)
17383 ISBN 1-234-56789-0 - 2006
17385 ISBN 1 234 56789 0 - 2006
17387 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17388 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17396 {{anchorencode:foo bar©#%n}}
17398 <p>foo_bar.C2.A9.23.25n
17403 anchorencode trims spaces
17405 {{anchorencode: __pretty__please__}}
17412 anchorencode deals with links
17414 {{anchorencode: [[hello|world]] [[hi]]}}
17421 anchorencode deals with templates
17423 {{anchorencode: {{Foo}} }}
17430 anchorencode encodes like the TOC generator: (bug 18431)
17432 === _ +:.3A%3A&&]] ===
17433 {{anchorencode: _ +:.3A%3A&&]] }}
17436 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17437 <p>.2B:.3A.253A.26.26.5D.5D
17442 Bug 6200: blockquotes and paragraph formatting
17463 Bug 8293: Use of center tag ruins paragraph formatting
17484 Parsing of overlapping (improperly nested) inline html tags
17486 <span><s>x</span></s>
17488 <p><span><s>x</span></s></span>
17491 <p><span><s>x</s></span>
17496 ### Language variants related tests
17499 Self-link in language variants
17501 title=[[Dunav]] language=sr
17503 Both [[Dunav]] and [[Дунав]] are names for this river.
17505 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17516 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17518 title=[[Duna]] language=sr
17520 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17522 <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.
17527 Link to a section of a variant of this title shouldn't be parsed as self-link
17529 title=[[Duna]] language=sr
17531 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17533 <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.
17538 Link to pages in language variants
17542 Main Page can be written as [[Маин Паге]]
17544 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17550 Multiple links to pages in language variants
17554 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17556 <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>.
17562 Simple template in language variants
17568 <p>This is a test template
17574 Template with explicit namespace in language variants
17580 <p>This is a test template
17586 Basic test for template parameter in language variants
17590 {{парамтест|param=foo}}
17592 <p>This is a test template with parameter foo
17598 Simple category in language variants
17602 [[Category:МедиаWики Усер'с Гуиде]]
17604 <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>
17621 Don't convert blue categorylinks to another variant (bug 33210)
17625 [[A]][[Category:分类]]
17627 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17632 Stripping -{}- tags (language variants)
17636 Latin proverb: -{Ne nuntium necare}-
17638 <p>Latin proverb: Ne nuntium necare
17644 Prevent conversion with -{}- tags (language variants)
17646 language=sr variant=sr-ec
17648 Latinski: -{Ne nuntium necare}-
17650 <p>Латински: Ne nuntium necare
17656 Prevent conversion of text with -{}- tags (language variants)
17658 language=sr variant=sr-ec
17660 Latinski: -{Ne nuntium necare}-
17662 <p>Латински: Ne nuntium necare
17668 Prevent conversion of links with -{}- tags (language variants)
17670 language=sr variant=sr-ec
17674 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17680 -{}- tags within headlines (within html for parserConvert())
17682 language=sr variant=sr-ec
17686 <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>
17692 Explicit definition of language variant alternatives
17694 language=zh variant=zh-tw
17696 -{zh:China;zh-tw:Taiwan}-, not China
17698 <p>Taiwan, not China
17704 Conversion around HTML tags
17706 language=sr variant=sr-ec
17708 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17709 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17712 <span title="ЛаCтин">ски</span>
17718 Explicit session-wise language variant mapping (A flag and - flag)
17720 language=zh variant=zh-tw
17722 Taiwan is not China.
17723 But -{A|zh:China;zh-tw:Taiwan}- is China,
17724 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17725 and -{China}- is China.
17727 <p>Taiwan is not China.
17728 But Taiwan is Taiwan,
17729 (This should be stripped!)
17730 and China is China.
17735 Explicit session-wise language variant mapping (H flag for hide)
17737 language=zh variant=zh-tw
17739 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17742 <p>(This should be stripped!)
17748 Adding explicit conversion rule for title (T flag)
17750 language=zh variant=zh-tw showtitle
17752 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17755 <p>Should be stripped!
17760 Testing that changing the language variant here in the tests actually works
17762 language=zh variant=zh showtitle
17764 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17767 <p>Should be stripped!
17772 Recursive conversion of alt and title attrs shouldn't clear converter state
17774 language=zh variant=zh-cn showtitle
17776 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17777 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17781 Should be stripped<span title="Exclamation">!</span>
17786 Bug 24072: more test on conversion rule for title
17788 language=zh variant=zh-tw showtitle
17790 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17791 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17794 <p>This should be stripped!
17795 This won't take interferes with the title rule.
17800 Partly disable title conversion if variant == main language code
17802 language=zh variant=zh title=[[ZH]] showtitle
17804 -{T|zh-cn:CN;zh-tw:TW}-
17812 Partly disable title conversion if variant == main language code, more
17814 language=zh variant=zh title=[[ZH]] showtitle
17824 Raw output of variant escape tags (R flag)
17826 language=zh variant=zh-tw
17828 Raw: -{R|zh:China;zh-tw:Taiwan}-
17830 <p>Raw: zh:China;zh-tw:Taiwan
17835 Nested using of manual convert syntax
17837 language=zh variant=zh-hk
17839 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17841 <p>Nested: Hello Hong Kong!
17846 Proper conversion of text in external links
17848 language=sr variant=sr-ec
17850 http://www.google.com
17851 gopher://www.google.com
17852 [http://www.google.com http://www.google.com]
17853 [gopher://www.google.com gopher://www.google.com]
17854 [https://www.google.com irc://www.google.com]
17855 [ftp://www.google.com www.google.com/ftp://dir]
17856 [//www.google.com www.google.com]
17858 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17859 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17860 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17861 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17862 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17863 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17864 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17869 Do not convert roman numbers to language variants
17871 language=sr variant=sr-ec
17875 <p>Фридрих IV је цар.
17880 Unclosed language converter markup "-{"
17891 Don't convert raw rule "-{R|=>}-" to "=>"
17902 Don't break link parsing if language converter markup is in the caption.
17904 language=sr variant=sr-ec
17906 [[Main Page|-{R|main page}-]]
17908 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17912 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17914 Don't break image parsing if language converter markup is in the caption.
17918 [[File:Foobar.jpg|-{R|caption}-]]
17920 <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>
17924 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17926 Don't break list handling if language converter markup is in the item.
17928 language=zh variant=zh-cn
17930 ;-{zh-cn:AAA;zh-tw:BBB}-
17932 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
17939 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17941 Don't break table handling if language converter markup is in the cell.
17943 language=sr variant=sr-ec
17966 Bug 529: Uncovered bullet
17975 # Plain MediaWiki does not remove empty lists, but tidy actually does.
17976 # Templates in Wikipedia rely on this behavior, as tidy has always been
17977 # enabled there. These tests are normally run *without* tidy, so specify the
17978 # full output here.
17979 # To test realistic parsing behavior, apply a tidy-like transformation to both
17980 # the expected output and your parser's output.
17982 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
17984 ******* Foo {{bullet}}
17986 <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>
17992 Bug 529: Uncovered table already at line-start
18015 Bug 529: Uncovered bullet in parser function result
18017 * Foo {{lc:{{bullet}} }}
18025 Bug 5678: Double-parsed template argument
18027 {{lc:{{{1}}}|hello}}
18034 Bug 5678: Double-parsed template invocation
18036 {{lc:{{paramtest {{!}} param = hello }} }}
18038 <p>{{paramtest | param = hello }}
18043 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
18046 title=[[Main Page]]
18048 {{PRVNÍVELKÉ:ěščř}}
18049 {{prvnívelké:ěščř}}
18069 Morwen/13: Unclosed link followed by heading
18076 <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>
18081 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
18088 <h1><span class="mw-headline" id="heading">heading</span></h1>
18093 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
18100 <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>
18115 Paragraphs inside divs (no extra line breaks)
18127 Paragraphs inside divs (extra line break on open)
18142 Paragraphs inside divs (extra line break on close)
18157 Paragraphs inside divs (extra line break on open and close)
18174 Nesting tags, paragraphs on lines which begin with <div>
18176 <div></div><strong>A
18179 <p><strong>A</strong></p>
18180 <p><strong>B</strong></p>
18188 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
18190 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
18192 <blockquote>Line one
18194 Line two</blockquote>
18196 <blockquote>Line one
18197 Line two</blockquote>
18201 <p>Line one Line two</p>
18206 Bug 6200: paragraphs inside blockquotes (extra line break on open)
18211 Line two</blockquote>
18216 Line two</blockquote>
18221 Line two</blockquote>
18225 Bug 6200: paragraphs inside blockquotes (extra line break on close)
18227 <blockquote>Line one
18232 <blockquote>Line one
18245 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
18267 Paragraphs inside blockquotes/divs (no extra line breaks)
18269 <blockquote><div>Line one
18271 Line two</div></blockquote>
18273 <blockquote><div>Line one
18274 Line two</div></blockquote>
18279 Paragraphs inside blockquotes/divs (extra line break on open)
18284 Line two</div></blockquote>
18289 Line two</div></blockquote>
18294 Paragraphs inside blockquotes/divs (extra line break on close)
18296 <blockquote><div>Line one
18299 </div></blockquote>
18301 <blockquote><div>Line one
18304 </div></blockquote>
18309 Paragraphs inside blockquotes/divs (extra line break on open and close)
18315 </div></blockquote>
18321 </div></blockquote>
18326 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18328 wgLinkHolderBatchSize=0
18334 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18335 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18336 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18341 Free external link invading image caption
18343 [[Image:Foobar.jpg|thumb|http://x|hello]]
18345 <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>
18350 Bug 15196: localised external link numbers
18354 [http://en.wikipedia.org/]
18356 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18359 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18363 Multibyte character in padleft
18365 {{padleft:-Hello|7|Æ}}
18372 Multibyte character in padright
18374 {{padright:Hello-|7|Æ}}
18381 formatdate parser function
18383 {{#formatdate:2009-03-24}}
18385 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18390 formatdate parser function, with default format
18392 {{#formatdate:2009-03-24|mdy}}
18394 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18399 Spacing of numbers in formatted dates
18401 {{#formatdate:January 15}}
18403 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18408 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
18410 language=nl title=[[MediaWiki:Common.css]]
18412 {{#formatdate:2009-03-24|dmy}}
18414 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18427 Edit comment with link
18431 I like the [[Main Page]] a lot
18433 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18437 Edit comment with link and link text
18441 I like the [[Main Page|best pages]] a lot
18443 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18447 Edit comment with link and link text with suffix
18451 I like the [[Main Page|best page]]s a lot
18453 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18457 Edit comment with section link (non-local, eg in history list)
18459 comment title=[[Main Page]]
18461 /* External links */ removed bogus entries
18463 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18467 Edit comment with section link and text before it (non-local, eg in history list)
18469 comment title=[[Main Page]]
18471 pre-comment text /* External links */ removed bogus entries
18473 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>
18477 Edit comment with section link (local, eg in diff view)
18479 comment local title=[[Main Page]]
18481 /* External links */ removed bogus entries
18483 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18487 Edit comment with subpage link (bug 14080)
18491 title=[[Subpage test]]
18493 Poked at a [[/subpage]] here...
18495 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18499 Edit comment with subpage link and link text (bug 14080)
18503 title=[[Subpage test]]
18505 Poked at a [[/subpage|neat little page]] here...
18507 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18511 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18514 title=[[Subpage test]]
18516 Poked at a [[/subpage]] here...
18518 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18522 Edit comment with bare anchor link (local, as on diff)
18526 title=[[Main Page]]
18530 <a href="#section">#section</a>
18534 Edit comment with bare anchor link (non-local, as on history)
18537 title=[[Main Page]]
18541 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18545 Anchor starting with underscore
18549 <p><a href="#_ref">One</a>
18554 Id starting with underscore
18556 <div id="_ref"></div>
18558 <div id="_ref"></div>
18563 Space normalisation on autocomment (bug 22784)
18566 title=[[Main Page]]
18568 /* __hello__world__ */
18570 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18574 percent-encoding and + signs in comments (Bug 26410)
18578 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18580 <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>
18583 # Parsoid doesn't support this yet: see bug 73581
18584 # but it *should* omit the 'src' attribute if the image is bad.
18585 # PHP side of tests was disabled in
18586 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
18587 # because of issues in the PHP parserTests infrastructure
18588 # (but the output below is indeed what the PHP side emits)
18590 Bad images - basic functionality
18593 !! DISABLED/html/php
18595 <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>
18599 Bad images - bug 16039: text after bad image disappears
18604 !! DISABLED/html/php
18610 <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>
18615 Verify that displaytitle works (bug #22501) no displaytitle
18619 wgAllowDisplayTitle=true
18620 wgRestrictDisplayTitle=false
18622 this is not the the title
18625 <p>this is not the the title
18630 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18635 wgAllowDisplayTitle=true
18636 wgRestrictDisplayTitle=false
18638 this is not the the title
18639 {{DISPLAYTITLE:whatever}}
18642 <p>this is not the the title
18647 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18652 wgAllowDisplayTitle=true
18653 wgRestrictDisplayTitle=true
18655 this is not the the title
18656 {{DISPLAYTITLE:whatever}}
18659 <p>this is not the the title
18664 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18669 wgAllowDisplayTitle=true
18670 wgRestrictDisplayTitle=true
18672 this is not the the title
18673 {{DISPLAYTITLE:screen}}
18676 <p>this is not the the title
18681 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18686 wgAllowDisplayTitle=false
18688 this is not the the title
18689 {{DISPLAYTITLE:screen}}
18692 <p>this is not the the title
18693 <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>
18698 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18703 wgAllowDisplayTitle=false
18705 this is not the the title
18708 <p>this is not the the title
18713 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18718 wgAllowDisplayTitle=true
18719 wgRestrictDisplayTitle=true
18721 this is not the the title
18722 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18724 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18725 <p>this is not the the title
18730 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18735 wgAllowDisplayTitle=true
18736 wgRestrictDisplayTitle=true
18738 this is not the the title
18739 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18741 <span style="color: red;">s</span>creen
18742 <p>this is not the the title
18747 preload: check <noinclude> and <includeonly>
18751 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18757 preload: check <onlyinclude>
18761 Goodbye <onlyinclude>Hello world</onlyinclude>
18767 preload: can pass tags through if we want to
18771 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18773 <includeonly>Hello world</includeonly>
18777 preload: check that it doesn't try to do tricks
18781 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18783 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18787 Play a bit with r67090 and bug 3158
18789 <div style="width:50% !important"> </div>
18790 <div style="width:50% !important"> </div>
18791 <div style="width:50% !important"> </div>
18792 <div style="border : solid;"> </div>
18794 <div style="width:50% !important"> </div>
18795 <div style="width:50% !important"> </div>
18796 <div style="width:50% !important"> </div>
18797 <div style="border : solid;"> </div>
18800 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18801 <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='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18802 <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='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18803 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18808 HTML5 data attributes
18810 <span data-foo="bar">Baz</span>
18811 <p data-abc-def_hij="">Quuz</p>
18813 <p><span data-foo="bar">Baz</span>
18815 <p data-abc-def_hij="">Quuz</p>
18820 percent-encoding and + signs in internal links (Bug 26410)
18822 [[User:+%]] [[Page+title%]]
18823 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18824 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
18825 [[%33%45]] [[%33%45+]]
18827 <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>
18828 <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>
18829 <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>
18830 <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>
18833 <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>
18837 Special characters in embedded file links (bug 27679)
18839 [[File:Contains & ampersand.jpg]]
18840 [[File:Does not exist.jpg|Title with & ampersand]]
18842 <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>
18843 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18846 <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>
18847 <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>
18851 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18853 Text's been normalized?
18855 <p>Text's been normalized?
18860 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18862 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18864 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18869 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18871 [http://www.example.org/ ideograms]
18873 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18878 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18880 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18882 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18906 Bug 31098 Template which includes system messages which includes the template
18910 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18911 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18916 Bug31490 Turkish: ucfirst 'blah'
18927 Bug31490 Turkish: ucfirst 'ix'
18938 Bug31490 Turkish: lcfirst 'BLAH'
18949 Bug31490 Turkish: ucfırst (with a dotless i)
18955 <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>
18960 Bug31490 ucfırst (with a dotless i) with English language
18966 <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>
18971 Bug 26375: TOC with italics
18973 title=[[Main Page]]
18976 == ''Lost'' episodes ==
18978 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18980 <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>
18984 <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>
18989 Bug 26375: TOC with bold
18991 title=[[Main Page]]
18994 == '''should be bold''' then normal text ==
18996 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18998 <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>
19002 <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>
19007 Bug 33845: Headings become cursive in TOC when they contain an image
19009 title=[[Main Page]]
19012 == Image [[Image:foobar.jpg]] ==
19014 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19016 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
19020 <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>
19025 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
19027 title=[[Main Page]]
19030 == <blockquote>Quote</blockquote> ==
19032 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19034 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19038 <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>
19041 <div id="toc" class="toc">
19042 <div id="toctitle">
19046 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19049 <h2><span class="mw-headline" id="Quote"></span></h2>
19051 <p><span class="mw-headline" id="Quote">Quote</span></p>
19053 <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>
19057 Unclosed tags in TOC
19059 title=[[Main Page]]
19063 <small>Hanc marginis exiguitas non caperet.</small>
19066 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19068 <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>
19072 <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>
19073 <p><small>Hanc marginis exiguitas non caperet.</small>
19079 Multiple tags in TOC
19082 == <i>Foo</i> <b>Bar</b> ==
19084 == <i>Foo</i> <blockquote>Bar</blockquote> ==
19086 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19088 <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>
19089 <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>
19093 <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>
19094 <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>
19097 <div id="toc" class="toc">
19098 <div id="toctitle">
19102 <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>
19103 <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>
19106 <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>
19107 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
19109 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
19111 <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>
19115 Tags with parameters in TOC
19118 == <sup class="in-h2">Hello</sup> ==
19120 == <sup class="a > b">Evilbye</sup> ==
19122 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19124 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
19125 <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>
19129 <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>
19130 <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>
19135 span tags with directionality in TOC
19138 == <span dir="ltr">C++</span> ==
19140 == <span dir="rtl">זבנג!</span> ==
19142 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
19144 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
19146 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
19148 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19150 <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>
19151 <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>
19152 <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>
19153 <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>
19154 <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>
19158 <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>
19159 <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>
19160 <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>
19161 <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>
19162 <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>
19167 Bug 72884: bdi element in ToC
19170 == <bdi>test</bdi> ==
19172 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19174 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
19178 <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>
19185 == {{int:headline_sample}} ==
19189 Bug 32057: Title needed when expanding <h> nodes.
19191 title=[[Main Page]]
19195 <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>
19200 Strip marker in urlencode
19202 {{urlencode:x<nowiki/>y}}
19203 {{urlencode:x<nowiki/>y|wiki}}
19204 {{urlencode:x<nowiki/>y|path}}
19231 Strip marker in formatNum
19233 {{formatnum:1<nowiki/>2}}
19234 {{formatnum:1<nowiki/>2|R}}
19242 Check noCommafy in formatNum
19246 {{formatnum:123456.78}}
19247 {{formatnum:123456.78|NOSEP}}
19255 Wrong option for formatNum (bug 56199)
19257 {{formatnum:1,234.56|Random}}
19258 {{formatnum:1,234.56|EVERYTHING}}
19259 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
19268 Strip marker in grammar
19272 {{grammar:elative|foo<nowiki/>bar}}
19279 Strip marker in padleft
19281 {{padleft:|2|x<nowiki/>y}}
19288 Strip marker in padright
19290 {{padright:|2|x<nowiki/>y}}
19297 Strip marker in anchorencode
19299 {{anchorencode:x<nowiki/>y}}
19306 nowiki inside link inside heading (bug 18295)
19308 ==[[foo|x<nowiki>y</nowiki>z]]==
19310 <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>
19315 new support for bdi element (bug 31817)
19317 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19319 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19324 Ignore pipe between table row attributes
19328 |- id=foo | style='color: red'
19336 <tr id="foo" style="color: red">
19343 Gallery override link with WikiLink (bug 34852)
19346 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19349 <ul class="gallery mw-gallery-traditional">
19350 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19351 <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>
19352 <div class="gallerytext">
19362 Gallery override link with absolute external link (bug 34852)
19365 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19368 <ul class="gallery mw-gallery-traditional">
19369 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19370 <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>
19371 <div class="gallerytext">
19381 Gallery override link with malicious javascript (bug 34852)
19384 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19387 <ul class="gallery mw-gallery-traditional">
19388 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19389 <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>
19390 <div class="gallerytext">
19400 Gallery with invalid title as link (bug 43964)
19403 File:foobar.jpg|link=<
19406 <ul class="gallery mw-gallery-traditional">
19407 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19408 <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>
19409 <div class="gallerytext">
19417 Language parser function
19426 Padleft and padright as substr
19428 {{padleft:|3|abcde}}
19429 {{padright:|3|abcde}}
19437 Special parser function
19439 {{#special:RandomPage}}
19440 {{#special:BaDtItLe}}
19441 {{#special:Foobar}}
19450 Bug 34939 - Case insensitive link parsing ([HttP://])
19452 [HttP://MediaWiki.Org/]
19454 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19457 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19461 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19463 [HttP://MediaWiki.Org/ MediaWiki]
19465 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19470 Bug 34939 - Case insensitive link parsing (HttP://)
19472 HttP://MediaWiki.Org/
19474 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19477 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19495 <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>
19496 <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>
19497 <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>
19498 <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>
19499 <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>
19505 ### Parsoid-specific tests
19506 ### Parsoid-PHP parser incompatibilities
19509 1. SOL-sensitive wikitext tokens as template-args
19511 parsoid=wt2html,wt2wt
19517 <span about="#mwt1" typeof="mw:Transclusion">
19518 </span><ul about="#mwt1"><li>a</li>
19520 <span about="#mwt2" typeof="mw:Transclusion">
19521 </span><ol about="#mwt2"><li>a</li>
19523 <span about="#mwt3" typeof="mw:Transclusion">
19524 </span><dl about="#mwt3"><dd>a</dd>
19528 #### -----------------------------------------------------------------
19529 #### Parsoid-specific functionality tests
19530 #### -----------------------------------------------------------------
19532 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19533 # We know wt2wt will fail, but we expect selser to pass.
19534 # Due to the nature of our testing, wt2wt and selser tests will enter the
19535 # blacklist and we'll catch selser regressions based on changes to the
19536 # blacklist entries for selser tests.
19538 1. Bad treebuilder fixup of formatting elt is cleaned up
19540 parsoid=wt2html,wt2wt
19545 [[Image:Foobar.jpg|right|Test]]
19552 <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>
19559 2. Bad treebuilder fixup of formatting elt is cleaned up
19561 parsoid=wt2html,wt2wt
19563 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19565 <small>[[Image:Foobar.jpg|right|300px]]</small>
19568 <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>
19570 <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>
19573 #### ----------------------------------------------------------------
19574 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19575 #### tags. Parsoid's output for these tags differs from that of the
19577 #### ----------------------------------------------------------------
19580 Ref: 1. ref-location should be replaced with an index span
19585 B <ref name="x">foo</ref>
19588 <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>
19589 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>
19590 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>
19594 Ref: 2. ref-tags with identical names should all get the same index
19598 A <ref name="x">foo</ref>
19601 <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>
19602 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>
19606 Ref: 3. spaces in ref-names should be ignored
19610 A <ref name="x">foo</ref>
19611 B <ref name=" x " />
19614 <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>
19615 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>
19616 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>
19619 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19621 Ref: 4. 'constructor' should be accepted as a valid ref-name
19625 A <ref name="constructor">foo</ref>
19627 <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>
19631 Ref: 5. body should accept generic wikitext
19636 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19641 <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>
19643 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19644 <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>
19650 Ref: 6. indent-pres should not be output in ref-body
19662 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo\n bar\n baz\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19664 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19665 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19673 Ref: 7. No p-wrapping in ref-body
19692 <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>
19694 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19695 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19710 Ref: 8. transclusion wikitext has lower precedence
19714 A <ref> foo {{echo|</ref> B C}}
19718 <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>
19719 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19720 <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>
19725 Ref: 9. unclosed comments should not leak out of ref-body
19729 A <ref> foo <!--</ref> B C
19732 <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>
19733 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19734 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <!----></li>
19739 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19743 A <ref> <b> foo </ref> B C
19747 <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>
19750 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19751 <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>
19756 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19763 <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
19764 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>
19768 Ref: 12. ref-tags act as trailing newline migration barrier
19772 <!--the newline at the end of this line moves out of the p-tag-->a
19774 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19779 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19782 <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>
19783 <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>
19789 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19797 <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
19798 <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>
19802 Ref: 14. A nested ref-tag should be emitted as plain text
19806 <ref>foo <ref>bar</ref> baz</ref>
19810 <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>
19812 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19813 <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>
19818 Ref: 15. ref-tags with identical names should get identical indexes
19822 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19823 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19827 <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>
19828 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>
19830 <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>
19834 ## We don't bother wt2wt-ing non-standard whitespace
19836 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19844 <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>
19846 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19847 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
19851 Ref: 17. Generate valid HTML5 id/about attributes
19855 <ref name="a b">foo</ref>
19859 <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>
19862 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19863 <li id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b_1-0">↑</a></span> foo</li>
19867 Ref: 18. T58916: Extension attributes should be parsed as plain text
19871 <ref name="{{echo|a}}">foo</ref>
19875 <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>
19878 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19879 <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>
19883 Ref: 19. ref-tags with identical name encodings should get identical indexes
19887 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
19891 <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>
19893 <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>
19898 References: 1. references tag without any refs should be handled properly
19904 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19908 References: 2. references tag with group only outputs references from that group
19912 A <ref group="a">foo</ref>
19913 B <ref group="b">bar</ref>
19915 <references group="a" />
19917 <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>
19918 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>
19920 <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>
19925 References: 3. ref list should be cleared after processing references
19937 <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>
19939 <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>
19942 <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>
19944 <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>
19949 References: 4. only referenced group should be cleared after processing references
19953 A <ref group="a">afoo</ref>
19956 <references group="a" />
19962 <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>
19963 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>
19965 <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>
19968 <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>
19970 <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>
19975 References: 5. ref tags in references should be processed while ignoring all other content
19980 B <ref name="b">bar</ref>
19983 <ref name="a">foo</ref>
19984 This should just get lost.
19987 <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>
19988 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>
19991 <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>
19996 References: 6. <references /> from a transclusion
20000 <ref>Foo</ref> {{echo|<references />}}
20002 <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>
20006 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
20010 A <ref>foo bar for a</ref>
20011 B <ref group="X" name="b" />
20015 <references group="X">
20016 <ref name="b">foo</ref>
20019 <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>
20020 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>
20022 <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>
20024 <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>
20028 Entities in ref name
20032 <ref name="test & me">hi</ref>
20034 <p><span about="#mwt2" class="reference" id="cite_ref-test_.26_me_1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref name=\"test &amp; me\">hi</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>
20037 # This test is wt2html only because we're permitting the serializer to produce
20038 # dirty diffs, normalizing the unclosed references to the self-closed version.
20040 Generate references for unclosed references tag
20048 <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>
20051 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20052 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
20056 New reference serializes on its own line
20058 parsoid=wt2wt,html2wt
20063 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
20066 #--------- Test stripping of empty nodes in template content ----------
20068 Empty LI and TR nodes should be stripped from template content
20073 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
20077 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
20090 Empty LI and TR nodes should not be stripped from top-level content
20117 Empty TR nodes should not be stripped if they have any attributes set
20119 {{EmptyTRWithHTMLAttrTest}}
20121 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
20122 <tr align="center"></tr>
20123 <tr><td>foo</td></tr>
20124 <tr align="center"></tr>
20125 <tr><td>bar</td></tr>
20129 #### ----------------------------------------------------------------
20130 #### The following section of tests are primarily to test
20131 #### wikitext escaping capabilities of Parsoid. Given that
20132 #### escaping can be done any number of ways, the wikitext (input)
20133 #### is always adjusted to reflect how Parsoid adds nowiki
20136 #### We are marking several tests as parsoid-only since the
20137 #### HTML in the result section is different from what the
20138 #### PHP parser generates for it.
20139 #### ----------------------------------------------------------------
20142 #### --------------- Headings ---------------
20144 #### 1. Nested inside html <h1>=foo=</h1>
20145 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
20146 #### 3. Nested inside html with wikitext split by html tags
20147 #### 4. No escape needed
20148 #### 5. Empty headings <h1></h1>
20149 #### 6. Heading chars in SOL context
20150 #### ----------------------------------------
20152 Headings: 0. Unnested
20156 <nowiki>=foo=</nowiki>
20158 <nowiki> =foo= </nowiki>
20160 <nowiki>=foo=</nowiki>
20162 =foo''a''<nowiki>=</nowiki>
20164 <p><span typeof="mw:Nowiki">=foo=</span></p>
20166 <p><span typeof="mw:Nowiki"> =foo= </span>
20168 <span typeof="mw:Nowiki">=foo=</span></p>
20170 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
20173 # New headings and existing headings are handled differently
20175 Headings: 1. Nested inside html
20183 <h1 data-parsoid=''>=foo=</h1>
20184 <h2 data-parsoid=''>=foo=</h2>
20185 <h3 data-parsoid=''>=foo=</h3>
20186 <h4 data-parsoid=''>=foo=</h4>
20187 <h5 data-parsoid=''>=foo=</h5>
20188 <h6 data-parsoid=''>=foo=</h6>
20196 =<nowiki>=foo=</nowiki>=
20197 ==<nowiki>=foo=</nowiki>==
20198 ===<nowiki>=foo=</nowiki>===
20199 ====<nowiki>=foo=</nowiki>====
20200 =====<nowiki>=foo=</nowiki>=====
20201 ======<nowiki>=foo=</nowiki>======
20206 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
20215 <nowiki>*</nowiki>bar
20221 <nowiki>=bar=</nowiki>
20225 Headings: 3. Nested inside html with wikitext split by html tags
20227 parsoid=html2wt,wt2wt
20229 = ='''bold'''<nowiki>foo=</nowiki> =
20231 <h1>=<b>bold</b>foo=</h1>
20235 Headings: 4a. No escaping needed (testing just h1 and h2)
20260 <h1><i>=</i>foo=</h1>
20264 Headings: 4b. No escaping needed (inside p-tags)
20279 Headings: 5. Empty headings
20291 =====<nowiki/>=====
20293 ======<nowiki/>======
20304 Headings: 6a. Heading chars in SOL context (with trailing spaces)
20308 <nowiki>=a=</nowiki>
20310 <nowiki>=a=</nowiki>
20312 <nowiki>=a=</nowiki>
20314 <nowiki>=a=</nowiki>
20323 Headings: 6b. Heading chars in SOL context (with trailing newlines)
20351 Headings: 6c. Heading chars in SOL context (leading newline break)
20356 <nowiki>=b=</nowiki>
20363 Headings: 6d. Heading chars in SOL context (with interspersed comments)
20367 <!--c0--><nowiki>=a=</nowiki>
20369 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
20371 <p><!--c0-->=a=</p>
20372 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
20376 Headings: 6d. Heading chars in SOL context (No escaping needed)
20386 Headings: 7. Insert a newline between new content and headings
20392 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
20393 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
20403 #### --------------- Lists ---------------
20404 #### 0. Outside nests (*foo, etc.)
20405 #### 1. Nested inside html <ul><li>*foo</li></ul>
20406 #### 2. Inside definition lists
20407 #### 3. Only bullets at start should be escaped
20408 #### 4. No escapes needed
20409 #### 5. No unnecessary escapes
20410 #### 6. Escape bullets in SOL position
20411 #### 7. Escape bullets in a multi-line context
20412 #### ----------------------------------------
20415 Lists: 0. Outside nests
20417 <nowiki>*</nowiki>foo
20419 <nowiki>#</nowiki>foo
20421 <nowiki>;Foo:</nowiki>bar
20430 Lists: 1. Nested inside html
20432 *<nowiki>*foo</nowiki>
20434 *<nowiki>#foo</nowiki>
20436 *<nowiki>:foo</nowiki>
20438 *<nowiki>;foo</nowiki>
20440 #<nowiki>*foo</nowiki>
20442 #<nowiki>#foo</nowiki>
20444 #<nowiki>:foo</nowiki>
20446 #<nowiki>;foo</nowiki>
20448 <ul><li>*foo</li></ul>
20449 <ul><li>#foo</li></ul>
20450 <ul><li>:foo</li></ul>
20451 <ul><li>;foo</li></ul>
20452 <ol><li>*foo</li></ol>
20453 <ol><li>#foo</li></ol>
20454 <ol><li>:foo</li></ol>
20455 <ol><li>;foo</li></ol>
20460 Lists: 2. Inside definition lists
20462 ;<nowiki>;foo</nowiki>
20464 ;<nowiki>:foo</nowiki>
20466 ;<nowiki>:foo</nowiki>
20469 :<nowiki>:foo</nowiki>
20471 <dl><dt>;foo</dt></dl>
20472 <dl><dt>:foo</dt></dl>
20475 <dl><dd>:foo</dd></dl>
20480 Lists: 3. Only bullets at start of text should be escaped
20482 *<nowiki>*foo*bar</nowiki>
20484 *<nowiki>*foo</nowiki>''it''*bar
20486 <ul><li>*foo*bar</li></ul>
20487 <ul><li>*foo<i>it</i>*bar</li></ul>
20492 Lists: 4. No escapes needed
20513 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20517 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20523 Lists: 5. No unnecessary escapes
20525 * bar <span><nowiki>[[foo]]</nowiki></span>
20527 * =bar <span><nowiki>[[foo]]</nowiki></span>
20529 * [[bar <span><nowiki>[[foo]]</nowiki></span>
20531 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
20533 * =bar <span>foo]]</span>=
20539 <ul><li> bar <span>[[foo]]</span></li></ul>
20540 <ul><li> =bar <span>[[foo]]</span></li></ul>
20541 <ul><li> [[bar <span>[[foo]]</span></li></ul>
20542 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
20543 <ul><li> =bar <span>foo]]</span>=</li></ul>
20544 <ul><li> <s></s>: a</li></ul>
20545 <ul><li> <i>* foo</i></li></ul>
20550 Lists: 6. Escape bullets in SOL position
20554 <p><!--cmt-->*foo</p>
20556 <!--cmt--><nowiki>*</nowiki>foo
20560 Lists: 7. Escape bullets in a multi-line context
20563 <nowiki>*</nowiki>b
20571 Lists: 8. Escape colons only if not present in tags
20575 <dl><dt>a:b<i>c:d</i></dt></dl>
20577 ; <nowiki>a:b</nowiki>''c:d''
20580 #### --------------- HRs ---------------
20581 #### 1. Single line
20582 #### -----------------------------------
20585 HRs: 1. Single line
20587 ----<nowiki>----</nowiki>
20599 #### --------------- Tables ---------------
20600 #### 1a. Simple example
20601 #### 1b. No escaping needed (!foo)
20602 #### 1c. No escaping needed (|foo)
20603 #### 1d. No escaping needed (|}foo)
20605 #### 2a. Nested in td (<td>foo|bar</td>)
20606 #### 2b. Nested in td (<td>foo||bar</td>)
20607 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20609 #### 3a. Nested in th (<th>foo!bar</th>)
20610 #### 3b. Nested in th (<th>foo!!bar</th>)
20611 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20615 #### 4c. No escaping needed
20616 #### --------------------------------------
20619 Tables: 1a. Simple example
20630 Tables: 1b. No escaping needed
20639 Tables: 1c. No escaping needed
20648 Tables: 1d. No escaping needed
20657 Tables: 2a. Nested in td
20662 <td>foo|bar</td></tr>
20663 <tr><td>x<div>a|b</div></td>
20667 |<nowiki>foo|bar</nowiki>
20669 |x<div><nowiki>a|b</nowiki></div>
20685 Tables: 2b. Nested in td
20691 <td>a<i>b||c</i></td>
20692 <td>a<i><div>b||c</div></i></td>
20693 </tr></tbody></table>
20696 |<nowiki>foo||bar</nowiki>
20697 |a''<nowiki>b||c</nowiki>''
20698 |a''<div><nowiki>b||c</nowiki></div>''
20707 <td>a<i><div>b||c</div></i>
20713 Tables: 2c. Nested in td -- no escaping needed
20729 Tables: 3a. Nested in th
20745 Tables: 3b. Nested in th
20750 <tr><th>foo!!bar</th>
20751 <th><i>foo|bar</i></th>
20752 <th><i>foo!!bar</i></th>
20753 <th><i><span>foo!!bar</span></i></th>
20754 </tr></tbody></table>
20757 !<nowiki>foo!!bar</nowiki>
20758 !''<nowiki>foo|bar</nowiki>''
20759 !''<nowiki>foo!!bar</nowiki>''
20760 !''<span><nowiki>foo!!bar</nowiki></span>''
20769 <th><i>foo!!bar</i>
20771 <th><i><span>foo!!bar</span></i>
20777 Tables: 3c. Nested in th
20782 <tr><th>foo||bar</th>
20783 <th><span typeof="mw:Nowiki">foo||bar</span></th>
20784 </tr></tbody></table>
20787 !<nowiki>foo||bar</nowiki>
20788 !<nowiki>foo||bar</nowiki>
20801 Tables: 4a. Escape -
20820 |<nowiki>-bar</nowiki>
20825 Tables: 4b. Escape +
20844 |<nowiki>+bar</nowiki>
20849 Tables: 4c. No escaping needed
20892 <tr><td>foo-bar</td><td>foo+bar</td></tr>
20893 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
20899 <div>a|b</div></td>
20904 Tables: 4d. No escaping needed
20914 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
20923 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
20924 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20925 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
20930 Tables: Digest broken attributes on table and tr tag
20946 #### --------------- Links ----------------
20947 #### 1. Quote marks in link text
20948 #### 2. Wikilinks: Escapes needed
20949 #### 3. Wikilinks: No escapes needed
20950 #### 4. Extlinks: Escapes needed
20951 #### 5. Extlinks: No escapes needed
20952 #### --------------------------------------
20954 Links 1. WikiLinks: No escapes needed
20958 [[Foo|x [Foobar] x]]
20960 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
20961 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
20962 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
20965 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
20966 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
20967 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
20971 Links 2. WikiLinks: Escapes needed
20975 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
20976 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
20977 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
20978 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
20979 <a href="Foo" rel="mw:WikiLink">|Bar</a>
20980 <a href="Foo" rel="mw:WikiLink">]]bar</a>
20981 <a href="Foo" rel="mw:WikiLink">[[bar</a>
20982 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
20983 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
20984 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
20986 [[Foo|<nowiki>Foobar]</nowiki>]]
20987 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
20988 [[Foo|<nowiki>[[Bar]]</nowiki>]]
20989 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
20990 [[Foo|<nowiki>|Bar</nowiki>]]
20991 [[Foo|<nowiki>]]bar</nowiki>]]
20992 [[Foo|<nowiki>[[bar</nowiki>]]
20993 [[Foo|<nowiki>x [[ y</nowiki>]]
20994 [[Foo|<nowiki>x ]] y</nowiki>]]
20995 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
20997 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
20998 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
20999 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
21000 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
21001 <a href="/wiki/Foo" title="Foo">|Bar</a>
21002 <a href="/wiki/Foo" title="Foo">]]bar</a>
21003 <a href="/wiki/Foo" title="Foo">[[bar</a>
21004 <a href="/wiki/Foo" title="Foo">x [[ y</a>
21005 <a href="/wiki/Foo" title="Foo">x ]] y</a>
21006 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
21011 Links 3. WikiLinks: No escapes needed
21016 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
21017 <a href="/wiki/Foo" title="Foo">foo|bar</a>
21020 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
21021 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
21025 Links 4. ExtLinks: Escapes needed
21029 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
21030 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
21031 <p>[http://google.com]</p>
21032 <p>[http://google.com google]</p>
21034 [http://google.com <nowiki>[google]</nowiki>]
21035 [http://google.com <nowiki>google]</nowiki>]
21037 <nowiki>[http://google.com]</nowiki>
21039 <nowiki>[http://google.com google]</nowiki>
21042 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
21043 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
21044 </p><p>[http://google.com]
21045 </p><p>[http://google.com google]
21050 Links 5. ExtLinks: No escapes needed
21052 [http://google.com [google]
21054 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
21057 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
21061 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
21063 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
21064 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
21065 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
21066 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
21067 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
21068 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
21069 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21070 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
21071 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21072 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
21073 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
21074 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
21075 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
21078 x<nowiki/>http://example.com<nowiki/>y
21079 http://example.com<nowiki/>?x
21080 http://example.com<nowiki/>&x
21081 http://example.com<nowiki/>'x
21082 http://example.com<nowiki/>,x
21083 http://example.com<nowiki/>.x
21084 http://example.com<nowiki/>;x
21085 http://example.com<nowiki/>:x
21086 http://example.com<nowiki/>;x
21087 http://example.com<nowiki/>!x
21088 http://example.com<nowiki/>=x
21089 http://example.com<nowiki/>(x)
21090 http://example.com(x<nowiki/>)
21094 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21097 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
21099 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
21100 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
21101 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
21102 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
21103 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
21109 "http://example.com"
21110 (http://example.com)
21111 (http://example.com) foo
21112 http://example.com,
21113 http://example.com, foo
21116 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
21118 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
21119 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
21120 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
21121 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
21122 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
21127 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21129 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
21130 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
21132 http://example.com.,;:!?\
21133 -http://example.com:
21135 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
21136 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
21141 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
21143 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
21144 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
21145 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
21149 X<nowiki/>RFC 123<nowiki/>y
21153 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
21155 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
21156 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
21157 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
21164 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
21165 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
21166 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
21171 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
21173 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
21174 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21175 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21179 X<nowiki/>PMID 123<nowiki/>y
21183 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
21185 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
21186 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
21187 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
21194 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
21195 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
21196 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
21201 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
21203 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
21204 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
21205 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
21208 ISBN 1234567890<nowiki/>1
21209 ISBN 1234567890<nowiki/>x
21210 a<nowiki/>ISBN 1234567890<nowiki/>b
21214 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
21216 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
21220 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
21225 Links 14. Protect link-like plain text. (Parsoid bug T78425)
21229 <p>this is not a link: http://example.com
21232 this is not a link: <nowiki>http://example.com</nowiki>
21236 Links 15. Link trails can't become link prefixes.
21240 [[Söfnuður]]-[[00]]
21242 <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>
21245 <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>
21248 #### --------------- Quotes ---------------
21249 #### 1. Quotes inside <b> and <i>
21250 #### 2. Link fragments separated by <i> and <b> tags
21251 #### 3. Link fragments inside <i> and <b>
21252 #### 4. No escaping needed
21253 #### --------------------------------------
21255 1a. Quotes inside <b> and <i>
21257 parsoid=html2wt,wt2wt
21260 ''<nowiki>''foo''</nowiki>''
21261 ''<nowiki>'''foo'''</nowiki>''
21263 '''<nowiki/>'foo''''
21264 '''<nowiki>''foo''</nowiki>'''
21265 '''<nowiki>'''foo'''</nowiki>'''
21266 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
21267 '''foo'''<nowiki/>'s
21273 '''foo'''<nowiki/>'
21274 ''''foo'''<nowiki/>'
21275 ''fools'<span> errand</span>''
21276 ''<span>fool</span>'s errand''
21277 '<nowiki/>''foo'' bar '''baz''
21278 a|!*#-:;+-~[]{}b'''x''
21287 <b>foo'<i>bar'</i>baz</b>
21296 <i>fools'<span> errand</span></i>
21297 <i><span>fool</span>'s errand</i>
21298 '<i>foo</i> bar '<i>baz</i>
21299 a|!*#-:;+-~[]{}b'<i>x</i>
21304 1b. Quotes inside <b> and <i> with other tags on same line
21306 parsoid=html2wt,wt2wt
21308 '''a'' foo ''[[bar]]''
21309 ''a''' foo ''[[bar]]''
21310 ''a''' foo '''{{echo|[[bar]]}}'''
21311 [[foo]] x'''[[bar]]''
21312 '''foo'' <ref>test</ref>
21313 '''foo'' <div title="name">test</div>
21314 '''foo'' and <br> bar
21316 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21317 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21318 <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>
21319 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
21320 '<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>
21321 '<i>foo</i> <div title="name">test</div>
21322 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
21326 2. Link fragments separated by <i> and <b> tags
21328 [[''foo''<nowiki>hello]]</nowiki>
21330 [['''foo'''<nowiki>hello]]</nowiki>
21332 <p>[[<i>foo</i>hello]]
21333 </p><p>[[<b>foo</b>hello]]
21337 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
21338 # this is one of the shortcomings of this format
21340 3. Link fragments inside <i> and <b>
21342 ''[[foo''<nowiki>]]</nowiki>
21344 '''[[foo'''<nowiki>]]</nowiki>
21347 </p><p><b>[[foo</b>]]
21352 4. No escaping needed
21354 '<span>''bar''</span>'
21355 '<span>'''bar'''</span>'
21358 <p>'<span><i>bar</i></span>'
21359 '<span><b>bar</b></span>'
21364 #### ----------- Paragraphs ---------------
21365 #### 1. No unnecessary escapes
21366 #### --------------------------------------
21369 1. No unnecessary escapes
21371 bar <span><nowiki>[[foo]]</nowiki></span>
21373 =bar <span><nowiki>[[foo]]</nowiki></span>
21375 [[bar <span><nowiki>[[foo]]</nowiki></span>
21377 ]]bar <span><nowiki>[[foo]]</nowiki></span>
21379 =bar <span>foo]]</span><nowiki>=</nowiki>
21381 <p>bar <span>[[foo]]</span>
21382 </p><p>=bar <span>[[foo]]</span>
21383 </p><p>[[bar <span>[[foo]]</span>
21384 </p><p>]]bar <span>[[foo]]</span>
21385 </p><p>=bar <span>foo]]</span>=
21389 #### ----------------------- PRE --------------------------
21390 #### 1. Leading whitespace in SOL context should be escaped
21391 #### ------------------------------------------------------
21393 1. Leading whitespace in SOL context should be escaped
21397 <nowiki> </nowiki>a
21399 <nowiki> </nowiki> a
21401 <nowiki> </nowiki>a(tab)
21403 <nowiki> </nowiki> a
21405 <nowiki> </nowiki> a
21408 <nowiki> </nowiki>b
21411 <nowiki> </nowiki>b
21414 <nowiki> </nowiki> b
21420 <p><!--cmt--> a</p>
21430 2. Leading whitespace in non-indent-pre contexts should not be escaped
21437 <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>
21441 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
21460 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
21464 [[File:Foobar.jpg|thumb|caption]]
21467 <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>
21471 5. Nowiki escaping should account for indent-pres
21480 #### --------------- Behavior Switches --------------------
21482 1. Valid behavior switches should be escaped
21489 <nowiki>__TOC__</nowiki>
21490 ''<nowiki>__TOC__</nowiki>''
21494 2. Invalid behavior switches should not be escaped
21505 #### --------------- HTML tags ---------------
21508 #### 3. multi-line html tag
21509 #### 4. extension tags
21510 #### -----------------------------------------
21516 <a href="http://google.com">google</a>
21518 <a href="http://google.com">google</a>
21524 <nowiki><div>foo</div>
21525 <div style="color:red">foo</div></nowiki>
21527 <p><div>foo</div>
21528 <div style="color:red">foo</div>
21533 3. multi-line html tag
21548 <nowiki><ref>foo</ref></nowiki>
21550 <nowiki><ref>bar</nowiki>
21552 baz<nowiki></ref></nowiki>
21554 <p><ref>foo</ref>
21555 </p><p><ref>bar
21556 </p><p>baz</ref>
21560 #### --------------- Others ---------------
21564 <nowiki>foo</nowiki>
21566 <p><nowiki>foo</nowiki>
21570 ## The quote-char in the input is necessary for triggering the bug
21572 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
21574 parsoid=wt2wt,html2wt
21583 Tag-like HTML structures are passed through as text
21605 </p><p>1<d e>f
21610 # This was a bug in the PHP parser (see bug 17663 and its dups,
21611 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
21613 Tag names followed by punctuation should not be recognized as tags
21617 <p><s.ome> text
21622 HTML tag with necessary entities in attributes
21624 <span title="&amp;">foo</span>
21626 <p><span title="&amp;">foo</span>
21631 HTML tag with 'unnecessary' entity encoding in attributes
21633 <span title="&">foo</span>
21635 <p><span title="&">foo</span>
21640 HTML tag with broken attribute value quoting
21642 <span title="Hello world>Foo</span>
21644 <p><span>Foo</span>
21647 <p><span title="Hello world">Foo</span>
21652 Parsoid-only: HTML tag with broken attribute value quoting
21656 <span title="Hello world>Foo</span>
21658 <p><span title="Hello world">Foo</span>
21663 Table with broken attribute value quoting
21666 | title="Hello world|Foo
21677 <td title="Hello world">Foo
21683 Table with broken attribute value quoting on consecutive lines
21686 | title="Hello world|Foo
21687 | style="color:red|Bar
21700 <td title="Hello world">Foo
21701 </td><td style="color: red">Bar
21702 </td></tr></tbody></table>
21707 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21717 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21727 Accept empty td cell attribute
21730 | align="center" | foo || |
21735 <td align="center"> foo </td>
21742 Non-empty attributes in th-cells
21745 ! Foo !! style="color: red" | Bar
21751 <th style="color: red"> Bar
21757 Accept empty attributes in th-cells
21772 Empty table rows go away
21793 ### Parsoid-centric tests for testing RTing of inter-element separators
21794 ### Edge cases not tested by existing parser tests and specific to
21795 ### Parsoid-specific serialization strategies.
21799 RT-ed inter-element separators should be valid separators
21811 # Parsoid-only since PHP parser relies on Tidy for correct output
21813 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
21827 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
21828 <p>bar</p></small></td></tr>
21832 <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>
21837 Empty TD followed by TD with tpl-generated attribute
21842 |{{echo|style='color:red'}}|foo
21856 Indented table with an empty td
21874 ## We have some newline diffs RT-ing this edge case
21875 ## and it is not important enough -- we seem to be emitting
21876 ## at most 2 newlines after a </tr> and this is unrelated to
21877 ## the issue from T85627 that this is testing.
21879 Indented table with blank lines in between (T85627)
21898 Indented block & table
21912 <div data-parsoid='{"stx":"html"}'>foo</div>
21914 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
21919 Indent and comment before table row
21934 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
21935 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
21939 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
21941 Empty TR followed by a template-generated TR
21947 {{echo|<tr><td>foo</td></tr>}}
21953 <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}}]}'>
21958 ## PHP and parsoid output differ for this, and since this is primarily
21959 ## for testing Parsoid's serializer, marking this Parsoid only
21961 Empty TR followed by mixed-ws-comment line should RT correctly
21977 <!--c--> </tr><!--d-->
21983 Multi-line image caption generated by templates with/without trailing newlines
21985 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
21986 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
21988 <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>
21989 <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>
21993 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
21997 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
21999 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
22001 <includeonly>foo</includeonly>
22009 ## PHP emits broken html for this, and since this is primarily
22010 ## a Parsoid serializer test, marking this Parsoid only
22012 Improperly nested inline or quotes tags with whitespace in between
22016 <span> <s>x</span> </s>
22019 <p><span> <s>x</s></span><s> </s>
22020 <b> <i>x</i></b><i> </i>
22025 Encapsulate protected attributes from wt
22029 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
22031 <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>
22035 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
22036 ## Having nested or stray pre tags results in the attempt to add duplicates,
22037 ## causing an assertion fail. This test tries to prevent that situation.
22039 Ensure ParagraphWrapper can deal with stray closing pre tags
22049 1. Ensure fostered text content is wrapped in element nodes
22053 <table>hi</table><table>ho</table>
22062 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
22064 parsoid=wt2html,wt2wt
22073 <tbody><tr><td> a</td></tr>
22078 Encapsulation properly handles null DSR information from foster box
22080 parsoid=wt2html,wt2wt
22082 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
22084 <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>
22088 1. Encapsulate foster-parented transclusion content
22090 parsoid=wt2wt,wt2html
22092 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
22094 <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>
22104 2. Encapsulate foster-parented transclusion content
22106 parsoid=wt2wt,wt2html
22108 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
22110 <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>
22121 3. Encapsulate foster-parented transclusion content
22123 parsoid=wt2wt,wt2html
22125 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22127 <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>"]}">
22140 4. Encapsulate foster-parented transclusion content
22142 parsoid=wt2wt,wt2html
22144 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22146 <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>"]}">
22159 5. Encapsulate foster-parented transclusion content
22161 parsoid=wt2wt,wt2html
22163 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
22165 <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>
22180 6. Encapsulate foster-parented transclusion content
22182 parsoid=wt2wt,wt2html
22184 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
22186 <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>
22202 7. Encapsulate foster-parented transclusion content
22204 parsoid=wt2wt,wt2html
22206 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
22208 <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>
22219 8. Encapsulate foster-parented transclusion content
22221 parsoid=wt2wt,wt2html
22224 }}{|{{echo|style='color:red'}}
22229 <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>
22239 9. Encapsulate foster-parented transclusion content
22241 parsoid=wt2wt,wt2html
22243 <table>{{echo|hi</table>hello}}
22245 <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>
22249 Table in fosterable position
22251 parsoid=wt2html,wt2wt
22260 <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">
22262 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
22268 # Parsoid only for bug 64747
22270 Properly encapsulate empty-content transclusions in fosterable positions
22278 <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":["","","",""]}]],"src":"<table>\n{{#if:|\n<td>foo</td>\n}}\n</table>"}'>
22284 Support <object> element with .data attribute
22288 <object data="test.swf"></object>
22290 <object data="test.swf"></object>
22294 Don't block XML namespace declaration
22296 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
22298 <p><span>MediaWiki</span>
22301 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
22304 # -----------------------------------------------------------------
22305 # The following section of tests are primarily to spec requirements
22306 # around serialization of new/edited content.
22308 # All these tests are marked Parsoid html2wt and html2html only
22309 # ----------------------------------------------------------------
22311 # 'mi' is a localinterwiki prefix as well as a language
22313 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
22317 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
22323 New wiki links (href variations)
22327 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22328 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
22329 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
22330 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
22335 [[Toxine bactérienne]]
22339 New wiki links (content string variations)
22343 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22344 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
22345 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
22349 [[Foo_bar|./Foo_bar]]
22353 New category links (href variations)
22357 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
22358 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
22359 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
22361 [[Category:Toxine bactérienne]]
22362 [[Category:Toxine bactérienne]]
22363 [[Category:Toxine bactérienne]]
22367 New interlanguage links (href variations)
22371 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
22372 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
22373 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
22375 [[es:Toxine bactérienne]]
22376 [[es:Toxine_bactérienne]]
22377 [[es:Toxine_bactérienne]]
22381 Image: Modifying size of an image (1)
22384 "modes": ["wt2wt"],
22386 ["img[height]", "attr", "height", "22"],
22387 ["img[width]", "attr", "width", "200"]
22391 [[Image:Foobar.jpg|230x230px]]
22393 [[Image:Foobar.jpg|200x200px]]
22397 Image: Modifying size of an image (2)
22400 "modes": ["wt2wt"],
22402 ["img[height]", "attr", "height", "100"],
22403 ["img[width]", "attr", "width", "500"]
22407 [[Image:Foobar.jpg|230x230px]]
22409 [[Image:Foobar.jpg|500x500px]]
22412 # Change in size is ignored so long as class='mw-default-size'
22414 Image: Modifying size of an image (3)
22417 "modes": ["wt2wt"],
22419 ["figure[class]", "removeClass", "mw-default-size"],
22420 ["figure img", "attr", "height", "19"],
22421 ["figure img", "attr", "width", "170"]
22425 [[Image:Foobar.jpg|thumb]]
22427 [[Image:Foobar.jpg|thumb|170x170px]]
22431 Image: Modifying alignment of an image (bug 48665)
22434 "modes": ["wt2wt"],
22436 ["figure[class]", "removeClass", "mw-halign-right"],
22437 ["figure[class]", "addClass", "mw-halign-left"]
22441 [[Image:Foobar.jpg|thumb|caption|right]]
22443 [[Image:Foobar.jpg|thumb|caption|left]]
22447 Image: Modifying mw-default-size of an frameless image (bug 62805)
22450 "modes": ["wt2wt"],
22452 ["figure.mw-default-size", "removeClass", "mw-default-size"]
22456 [[Image:Foobar.jpg|frameless|right]]
22458 [[Image:Foobar.jpg|frameless|right|220x220px]]
22462 Image: Modifying valign of an image (bug 49221)
22465 "modes": ["wt2wt"],
22467 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
22468 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
22472 [[File:Foobar.jpg|20px|middle]]
22474 [[File:Foobar.jpg|20px|text-top]]
22478 Image: Modifying alt attribute of an image (bug 56400)
22481 "modes": ["wt2wt"],
22483 ["img[alt]", "attr", "alt", "some alternate edited text"]
22487 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
22489 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
22493 Image: Modifying caption of an image
22496 "modes": ["wt2wt"],
22498 ["figcaption", "text", "new caption"]
22502 [[Image:Foobar.jpg|thumb|original caption]]
22504 [[Image:Foobar.jpg|thumb|new caption]]
22508 Image: empty alt attribute (bug 48924)
22512 [[File:Foobar.jpg|thumb|alt=|bar]]
22514 <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>
22518 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
22523 #<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>
22525 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
22529 Image: Block level image should have \n before and after
22532 [[File:Foobar.jpg|right|thumb|150x150px]]
22536 <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>
22541 Image: New block level image should have \n before and after (existing content)
22544 [[File:Foobar.jpg|right|thumb|150x150px]]
22548 <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>
22553 Image: upright option (parsoid)
22557 [[File:Foobar.jpg|thumb|upright|caption]]
22558 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
22559 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
22561 <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>
22562 <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>
22563 <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>
22567 Image: upright option is ignored on inline and frame images (parsoid)
22571 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
22573 <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>
22577 Image: from basic HTML (1)
22581 <span typeof="mw:Image">
22582 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22585 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22589 Image: from basic HTML (2)
22593 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22595 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22599 Image: from basic HTML (3)
22603 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
22605 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
22609 Image: from basic HTML (4)
22613 <img src="File:Foobar.jpg">
22615 [[File:Foobar.jpg|link=]]
22619 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
22624 <li><p>foo</p></li>
22631 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
22635 <ul> <li>foo</li></ul>
22641 Don't strip leading whitespace when handling indent-pre suppressing tags
22646 <tr><td> indented row</td></tr>
22649 <b>This is very bold of you!</b>
22652 indented cell (no pre-wrapping!)
22662 '''This is very bold of you!'''
22666 indented cell (no pre-wrapping!)
22674 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
22679 <nowiki> </nowiki><span>bar</span>
22682 <nowiki> </nowiki></span>bar2
22685 <nowiki> </nowiki><span>bar</span>
22688 <nowiki> </nowiki><span>foo</span>
22706 Lists: Add space after bullets
22713 <li><span> baz</span></li>
22718 * <span> baz</span>
22722 Lists: Dont insert newlines in a serialized list item.
22726 <ul><li>a<br>b</li><li>c</li></ul>
22733 Headings: Add space before/after == (Bug 51744)
22740 <h2><span> baz</span></h2>
22748 == <span> baz</span> ==
22752 Parsoid: Serialize positional parameters with = in them as named parameter
22756 <p about="#mwt1" typeof="mw:Transclusion"
22757 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
22759 <p about="#mwt1" typeof="mw:Transclusion"
22760 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
22762 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22763 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22764 <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>
22768 {{echo|1 = f=oo|2 = bar}}
22770 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22771 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22772 {{echo|<nowiki>f=oo</nowiki>|bar}}
22776 Parsoid: Serialize positional parameters with = in extlink as named parameter
22780 <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>
22782 {{echo|1 = http://stuff?is=ok}}
22786 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
22790 <div>a<p>b</p></div>
22811 Substrings resembling wikitext in hrefs should not get nowiki escapes
22815 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
22820 #-----------------------------
22821 # I/B quote minimization tests
22822 #-----------------------------
22825 1. I/B quote minimization: wikitext-only tags should be combined
22829 <p><i>A</i><i>B</i></p>
22830 <p><b>A</b><b>B</b></p>
22831 <p><i>A</i><b><i>B</i></b></p>
22832 <p><b>A</b><i><b>B</b></i></p>
22833 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
22834 <p><i><b>A</b></i><i><b>B</b></i></p>
22835 <p><i><b>A</b></i><b><i>B</i></b></p>
22836 <p><b><i>A</i></b><i><b>B</b></i></p>
22856 2. I/B quote minimization: wikitext and html tags should not be combined
22860 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
22861 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
22865 ''A''<nowiki/>'''<i>B</i>'''
22869 3. I/B quote minimization: templated content stops minimization
22873 <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>
22874 <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>
22876 ''A''{{echo|''B''}}
22878 ''A''{{echo|'''''B'''''}}
22882 4. I/B quote minimization: new content should be mimimized with adjacent old content
22886 <p><i>A</i><i>B</i></p>
22887 <p><b>A</b><b>B</b></p>
22888 <p><i>A</i><b><i>B</i></b></p>
22898 5a. Merge adjacent quote nodes if they've been edited
22901 "modes": ["wt2wt"],
22903 ["p", "contents", "remove", ":contains('b')"]
22913 5b. Merge adjacent quote nodes if they've been edited
22916 "modes": ["wt2wt"],
22922 ''a''<span id="x">b</span>''c''
22927 #------------------------------------
22928 # End of I/B quote minimization tests
22929 #------------------------------------
22932 Bug 54262: New entities
22938 <span typeof="mw:Entity"> </span>
22941 ## Note that there is no wikitext output for 'unknownproperty' ##
22942 ## Unknown magic words are silently dropped ##
22949 <meta property='mw:PageProp/toc' />
22950 <meta property='mw:PageProp/notoc' />
22951 <meta property='mw:PageProp/forcetoc' />
22952 <meta property='mw:PageProp/index' />
22953 <meta property='mw:PageProp/noindex' />
22954 <meta property='mw:PageProp/nogallery' />
22955 <meta property='mw:PageProp/noeditsection' />
22956 <meta property='mw:PageProp/notitleconvert' />
22957 <meta property='mw:PageProp/nocontentconvert' />
22958 <meta property='mw:PageProp/unknownproperty' />
22968 __NOCONTENTCONVERT__
22972 Consecutive <pre>s should not get merged
22974 parsoid=html2wt,html2html
22976 <pre>a</pre><pre>b</pre>
23004 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
23008 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
23010 [[Special:BookSources/1234567890|ISBN 1234567895]]
23014 Edited RFC links not serializable as RFC links should serialize as extlinks
23018 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
23020 [//tools.ietf.org/html/rfc123 New RFC]
23024 Edited PMID links not serializable as PMID links should serialize as extlinks
23028 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
23030 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
23034 WTS of autolinks with trailing/surrounding context
23038 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
23039 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
23040 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
23041 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
23042 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
23043 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
23045 http://cscott.net<nowiki/>'''foo'''
23047 http://cscott.net<b>foo</b>
23049 '''http://cscott.net<nowiki/>'''
23051 '''http://cscott.net '''
23053 '''http://cscott.net<nowiki/>x'''
23055 http://cscott.net<nowiki/>x
23059 WTS of autolinks with nowikis (round-trip)
23061 x<nowiki/>http://cscott.net<nowiki/>x
23063 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
23066 # this is the "easy" test because it leaves in place all the
23067 # data-parsoid information indicating this is an autolink
23069 WTS of autolinks with escapes (editing)
23072 "modes": ["wt2wt"],
23074 [ "meta", "remove" ]
23078 x<nowiki/>http://cscott.net<nowiki/>x
23080 x<nowiki/>http://cscott.net<nowiki/>x
23084 Edited Redirect link should emit a non-piped wikitext link
23088 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
23094 T75121: Infer extension name from typeOf if data-mw is not present
23098 <div typeOf="mw:Extension/foo"></div>
23103 # -----------------------------------------------------------------
23104 # End of section for Parsoid-only html2wt tests for serialization
23106 # -----------------------------------------------------------------
23113 Try for 100% code coverage