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 formdness
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-only test (not run by PHP parser)
25 # php php-only test (not run by the parsoid parser)
26 # showtitle make the first line the title
27 # comment run through Linker::formatComment() instead of main parser
28 # local format section links in edit comment text as local links
30 # You can also set the following parser properties via test options:
31 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
32 # wgLinkHolderBatchSize, wgRawHtml
34 # For testing purposes, temporary articles can created:
35 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
36 # where '/' denotes a newline.
38 # This is the standard article assumed to exist.
63 MediaWiki:bad image list
65 * [[File:Bad.jpg]] except [[Nasty page]]
99 Template:echo_with_span
105 Template:echo_with_div
117 Template:table_attribs
120 |</noinclude>style="color: red"| Foo
126 {{table_attribs}} || Bar || Baz
130 Template:image_attribs
133 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
161 This is a simple paragraph.
163 <p>This is a simple paragraph.
168 Paragraphs with extra newline spacing
191 Paragraphs with newline spacing with comment lines in between
199 <!--foo--><!--More than 1 comment, still stripped-->
203 <!--foo--> <!----> <!-- bar -->
264 Paragraphs with newline spacing with non-empty white-space lines in between
291 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
299 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
338 Extra newlines: More paragraphs with indented comment
353 Extra newlines followed by heading
368 <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>
369 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
372 <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>
377 Extra newlines between heading and content are swallowed
385 <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>
386 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
393 http://fr.wikipedia.org/wiki/🍺
394 <!-- EasterEgg we love beer, better be able be able to link to it -->
396 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
416 * plain''italic''plain
417 * plain''italic''plain''italic''plain
418 * plain'''bold'''plain
419 * plain'''bold'''plain'''bold'''plain
420 * plain''italic''plain'''bold'''plain
421 * plain'''bold'''plain''italic''plain
422 * plain''italic'''bold-italic'''italic''plain
423 * plain'''bold''bold-italic''bold'''plain
424 * plain'''''bold-italic'''italic''plain
425 * plain'''''bold-italic''bold'''plain
426 * plain''italic'''bold-italic'''''plain
427 * plain'''bold''bold-italic'''''plain
428 * plain l'''italic''plain
429 * plain l''''bold''' plain
432 </li><li> plain<i>italic</i>plain
433 </li><li> plain<i>italic</i>plain<i>italic</i>plain
434 </li><li> plain<b>bold</b>plain
435 </li><li> plain<b>bold</b>plain<b>bold</b>plain
436 </li><li> plain<i>italic</i>plain<b>bold</b>plain
437 </li><li> plain<b>bold</b>plain<i>italic</i>plain
438 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
439 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
440 </li><li> plain<i><b>bold-italic</b>italic</i>plain
441 </li><li> plain<b><i>bold-italic</i>bold</b>plain
442 </li><li> plain<i>italic<b>bold-italic</b></i>plain
443 </li><li> plain<b>bold<i>bold-italic</i></b>plain
444 </li><li> plain l'<i>italic</i>plain
445 </li><li> plain l'<b>bold</b> plain
450 # this example taken from the [[simple:Moon]] article (bug 47326)
452 Italics and possessives (1)
454 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
456 <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
460 # this example taken from [[en:Flaming Pie]] (bug 49926)
462 Italics and possessives (2)
464 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
466 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
470 # this example taken from [[en:Dictionary]] (bug 49926)
472 Italics and possessives (3)
474 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''.
476 <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>.
482 ### 2-quote opening sequence tests
485 Italics and bold: 2-quote opening sequence: (2,2)
495 Italics and bold: 2-quote opening sequence: (2,3)
505 Italics and bold: 2-quote opening sequence: (2,4)
515 Italics and bold: 2-quote opening sequence: (2,5) (php)
524 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
526 Italics and bold: 2-quote opening sequence: (2,5) (parsoid)
538 ### 3-quote opening sequence tests
542 Italics and bold: 3-quote opening sequence: (3,2)
552 Italics and bold: 3-quote opening sequence: (3,3)
562 Italics and bold: 3-quote opening sequence: (3,4)
572 Italics and bold: 3-quote opening sequence: (3,5) (php)
581 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
583 Italics and bold: 3-quote opening sequence: (3,5) (parsoid)
595 ### 4-quote opening sequence tests
599 Italics and bold: 4-quote opening sequence: (4,2)
609 Italics and bold: 4-quote opening sequence: (4,3)
619 Italics and bold: 4-quote opening sequence: (4,4)
629 Italics and bold: 4-quote opening sequence: (4,5) (php)
638 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
640 Italics and bold: 4-quote opening sequence: (4,5) (parsoid)
646 <p>'<b>foo</b><i></i>
652 ### 5-quote opening sequence tests
656 Italics and bold: 5-quote opening sequence: (5,2)
667 Italics and bold: 5-quote opening sequence: (5,3)
677 Italics and bold: 5-quote opening sequence: (5,4)
681 <p><i><b>foo'</b></i>
687 Italics and bold: 5-quote opening sequence: (5,5)
696 ### multiple quote sequences in a line
699 Italics and bold: multiple quote sequences: (2,4,2)
703 <p><i>foo'<b>bar</b></i>
709 Italics and bold: multiple quote sequences: (2,4,3)
713 <p><i>foo'<b>bar</b></i>
719 Italics and bold: multiple quote sequences: (2,4,4)
723 <p><i>foo'<b>bar'</b></i>
729 Italics and bold: multiple quote sequences: (3,4,2) (php)
738 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
740 Italics and bold: multiple quote sequences: (3,4,2) (parsoid)
746 <p><b>foo'</b>bar<i></i>
752 Italics and bold: multiple quote sequences: (3,4,3) (php)
761 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
763 Italics and bold: multiple quote sequences: (3,4,3) (parsoid)
769 <p><b>foo'</b>bar<b></b>
774 ### other quote tests
777 Italics and bold: other quote tests: (2,3,5)
779 ''this is about '''foo's family'''''
781 <p><i>this is about <b>foo's family</b></i>
787 Italics and bold: other quote tests: (2,(3,3),2)
789 ''this is about '''foo's''' family''
791 <p><i>this is about <b>foo's</b> family</i>
797 Italics and bold: other quote tests: (3,2,3,2)
799 '''this is about ''foo'''s family''
801 <p><b>this is about <i>foo</i></b><i>s family</i>
807 Italics and bold: other quote tests: (3,2,3,3)
810 '''this is about ''foo'''s family'''
812 <p>'<i>this is about </i>foo<b>s family</b>
818 Italics and bold: other quote tests: (3,(2,2),3)
820 '''this is about ''foo's'' family'''
822 <p><b>this is about <i>foo's</i> family</b>
828 Italicized possessive
830 The ''[[Main Page]]'''s talk page.
832 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
837 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
838 (Requires tidy for PHP parser output to be fixed up)
840 parsoid=wt2html,wt2wt
848 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
849 <td><i>a</i></td><td><i>b</i></td></tr>
858 Non-html5 tags should be accepted
860 <center>''foo''</center>
863 <strike>''foo''</strike>
866 <center><i>foo</i></center>
867 <p><big><i>foo</i></big>
868 <font><i>foo</i></font>
869 <strike><i>foo</i></strike>
875 <wbr> is valid wikitext (bug 52468)
883 # <strike> is HTML4, <s> is HTML4/5.
885 <s> or <strike> for strikethrough
887 <strike>strike</strike>
891 <p><strike>strike</strike>
897 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
899 <b→> doesn't work! </b>
901 <bä> doesn't work! </b>
903 <boo> works fine </b>
911 <p><b→> doesn't work! </b>
912 </p><p><bä> doesn't work! </b>
913 </p><p><boo> works fine </b>
914 </p><p><s.foo>foo</s>
915 </p><p><s.foo>s.foo</s.foo>
916 </p><p><sub-ID#1>
921 ### Special characters
925 Bare pipe character (bug 52363)
934 Bare pipe character from a template (bug 52363)
943 ### <nowiki> test cases
947 <nowiki> unordered list
949 <nowiki>* This is not an unordered list item.</nowiki>
951 <p>* This is not an unordered list item.
958 <nowiki>Lorem ipsum dolor
979 :There is not nowiki.
980 :There is <nowiki>nowiki</nowiki>.
982 #There is not nowiki.
983 #There is <nowiki>nowiki</nowiki>.
985 *There is not nowiki.
986 *There is <nowiki>nowiki</nowiki>.
988 <dl><dd>There is not nowiki.
989 </dd><dd>There is nowiki.
991 <ol><li>There is not nowiki.
992 </li><li>There is nowiki.
994 <ul><li>There is not nowiki.
995 </li><li>There is nowiki.
1001 Entities inside <nowiki>
1003 <nowiki><</nowiki>
1010 Entities inside template parameters
1016 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span>
1024 Comments and Indent-Pre
1026 <!-- comment 1 --> asdf
1028 <!-- comment 1 --> asdf
1031 <!-- comment 1 --> asdf
1032 <!-- comment 2 -->xyz
1034 <!-- comment 1 --> asdf
1035 <!-- comment 2 --> xyz
1091 asdf<!-- comment 1 -->jkl
1101 <!-- foo --> b <!-- bar -->
1115 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1121 Comment semantics and delimiters
1123 <!-- --><!----><!-----><!------>
1129 Comment semantics and delimiters, redux
1131 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1132 -- foo -- funky huh? ... -->
1138 Comment semantics and delimiters: directors cut
1140 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1141 everything starting with < followed by !-- until the first -- and > we see,
1142 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1150 Comment semantics: nesting
1152 <!--<!-- no, we're not going to do anything fancy here -->-->
1159 Comment semantics: unclosed comment at end
1161 <!--This comment will run out to the end of the document
1167 Comment in template title
1176 Comment on its own line post-expand
1188 Comment on its own line post-expand with non-significant whitespace
1200 ### paragraph wrapping tests
1215 Block tag on one line (<div>)
1227 Block tag on one line (<blockquote>)
1229 a <blockquote>foo</blockquote>
1233 a <blockquote>foo</blockquote>
1239 Block tag on both lines (<div>)
1251 Block tag on both lines (<blockquote>)
1253 a <blockquote>foo</blockquote>
1255 b <blockquote>foo</blockquote>
1257 a <blockquote>foo</blockquote>
1258 b <blockquote>foo</blockquote>
1263 Multiple lines without block tags
1281 Empty lines between lines with block tags
1311 ### Preformatted text
1320 And a [[Main Page|link]]
1326 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1331 Tabs don't trigger preformatted text
1335 This is preformatted text.
1341 <pre>This is preformatted text.
1347 Ident preformatting with inline content
1358 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1375 Regression with preformatted in <center>
1389 Bug 52763: Preformatted in <blockquote>
1403 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1420 Bug 15491: <ins>/<del> in blockquote
1423 Foo <del>bar</del> <ins>baz</ins> quux
1427 <p>Foo <del>bar</del> <ins>baz</ins> quux
1433 # Note that the p-wrapping is newline sensitive, which could be
1434 # considered a bug: tidy will wrap only the 'Foo' in the example
1435 # below in a <p> tag. (see comment 23-25 of bug #6200)
1437 Bug 15491: <ins>/<del> in blockquote (2)
1439 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1442 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1448 <pre> with attributes (bug 3202)
1450 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1452 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1457 <pre> with width attribute (bug 3202)
1459 <pre width="8">Narrow screen goodies</pre>
1461 <pre width="8">Narrow screen goodies</pre>
1466 <pre> with forbidden attribute (bug 3202)
1468 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1470 <pre width="8">Narrow screen goodies</pre>
1475 Entities inside <pre>
1484 <pre> with forbidden attribute values (bug 3202)
1486 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1488 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1493 <nowiki> inside <pre> (bug 13238)
1501 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1509 <pre><nowiki>Foo</nowiki></pre>
1514 <nowiki> and <pre> preference (first one wins)
1545 </pre> inside nowiki
1547 <nowiki></pre></nowiki>
1554 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1562 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1572 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1584 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1605 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1609 {{echo| foo}}{{echo| bar}}
1614 {{echo|<!--cmt--> foo}}
1616 <!--cmt-->{{echo| foo}}
1618 {{echo|{{echo| }}bar}}
1636 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1672 # TODO / maybe: fix wt2wt for this
1674 Parsoid: Don't paragraph-wrap fosterable content
1700 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
1728 #--------------------------------------------------------------------
1729 # Transclusion parameter whitespace stripping tests
1730 # Behavior is different for positional and named parameters
1731 #--------------------------------------------------------------------
1733 Templates: Strip leading and trailing whitespace from named-param values
1737 {{echo|1= {{echo|b}} }}
1756 Templates: Don't strip whitespace from positional-param values
1760 {{echo|{{echo|b}} }}
1801 Templates: Handle empty comment-and-ws-only lines correctly
1804 <!--should be ignored-->
1805 <!--should be ignored as well-->
1813 #--------------------------------------------------------------------
1814 # Transclusion parameter escaping tests
1815 #--------------------------------------------------------------------
1817 Templates: Parsoid parameter escaping test 1
1821 {{echo|[foo]|{{echo|[bar]}}}}
1823 <p about="#mwt1" typeof="mw:Transclusion"
1824 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
1828 Parsoid: Pipes in external links in template parameter
1832 {{echo|[{{echo|http://example.com}} link]}}
1834 <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>
1838 Parsoid: pipe in transclusion parameter
1842 {{echo|http://foo.com/a|b}}
1844 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1845 typeof="mw:Transclusion"
1846 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>
1850 Parsoid: Pipe in external link target and content in template parameter
1852 parsoid=html2wt,wt2wt
1854 {{echo|[http://foo.com/a|b a|b]}}
1856 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1857 typeof="mw:Transclusion"
1858 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
1859 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
1863 Templates: Dont escape already nowiki-escaped text in template parameters
1865 parsoid=html2wt,wt2wt
1867 {{echo|foo<nowiki>|</nowiki>bar}}
1868 {{echo|<nowiki><div></nowiki>}}
1869 {{echo|<nowiki></nowiki>}}
1871 <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>
1872 <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>
1873 <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>
1879 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
1881 parsoid=html2wt,wt2wt
1883 {{echo|{{echo|1=bar}}}}
1885 <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>
1889 ### Parsoid-centric tests for testing RT edge cases for pre
1893 1a. Indent-Pre and Comments
1906 1b. Indent-Pre and Comments
1919 1c. Indent-Pre and Comments
1932 1d. Indent-Pre and Comments
1933 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
1946 2a. Indent-Pre and tables
1967 2b. Indent-Pre and tables
1983 2c. Indent-Pre and tables (bug 42252)
2000 3a. Indent-Pre and block tags (single-line html)
2004 <blockquote> foo </blockquote>
2009 <blockquote> foo </blockquote>
2010 <pre><span> foo </span>
2015 3b. Indent-Pre and block tags (pre-content on separate line)
2079 4. Multiple spaces at start-of-line
2098 5. White-space in indent-pre
2099 NOTE: the white-space char on 2nd line is significant
2112 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2135 7a. Indent-pre and category links
2137 parsoid=wt2html,wt2wt
2139 [[Category:foo]] <!-- No pre-wrapping -->
2140 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2142 <link rel="mw:WikiLink/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2143 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span>
2144 <link rel="mw:WikiLink/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2148 7b. Indent-pre and category links
2150 parsoid=wt2html,wt2wt
2153 [[Category:foo]] {{echo|b}}
2156 <link rel="mw:WikiLink/Category" href="./Category:Foo"> a
2158 <link rel="mw:WikiLink/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>
2162 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2166 HTML-pre: 1. embedded newlines
2202 HTML-pre: 2: indented text
2215 HTML-pre: 3: other wikitext
2236 ### Definition lists
2243 <dl><dt> name </dt><dd> Definition
2249 Definition list for indentation only
2253 <dl><dd> Indented text
2259 Definition list with no space
2263 <dl><dt>name</dt><dd>Definition
2269 Definition list with URL link
2271 ; http://example.com/ : definition
2273 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt><dd> definition
2279 Definition list with bracketed URL link
2281 ;[http://www.example.com/ Example]:Something about it
2283 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt><dd>Something about it
2289 Definition list with wikilink containing colon
2291 ; [[Help:FAQ]]: The least-read page on Wikipedia
2293 <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><dd> The least-read page on Wikipedia
2298 # At Brion's and JeLuF's insistence... :)
2300 Definition list with news link containing colon
2302 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2304 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
2310 Malformed definition list with colon
2312 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2314 <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
2320 Definition lists: colon in external link text
2322 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2324 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up
2330 Definition lists: colon in HTML attribute
2332 ;<b style="display: inline">bold</b>
2334 <dl><dt><b style="display: inline">bold</b>
2340 Definition lists: self-closed tag
2342 ;one<br/>two : two-line fun
2344 <dl><dt>one<br />two </dt><dd> two-line fun
2350 Bug 11748: Literal closing tags
2354 <dd>test test test test test</dd>
2356 <dd>test test test test test</dd>
2361 <dd>test test test test test</dd>
2363 <dd>test test test test test</dd>
2369 Definition and unordered list using wiki syntax nested in unordered list using html tags.
2372 ; term : description
2378 <dl><dt> term </dt><dd> description
2389 Definition list with empty definition and following paragraph
2394 <dl><dt> term</dt><dd>
2401 Nested definition lists using html syntax
2418 Definition Lists: No nesting: Multiple dd's
2432 Definition Lists: Indentation: Regular
2448 Definition Lists: Indentation: Missing 1st level
2462 Definition Lists: Indentation: Multi-level indent
2466 <dl><dd><dl><dd><dl><dd>i3
2474 Definition Lists: Hacky use to indent tables
2481 should be left alone
2483 <dl><dd><dl><dd><table>
2488 </td></tr></table></dd></dl></dd></dl>
2490 should be left alone
2496 Definition Lists: Hacky use to indent tables (WS-insensitive)
2504 <dl><dd> <table><tr><td>a</td></tr></table> </dd></dl>
2506 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
2507 ## as an empty dt item. It also ignores all but the last ";" when followed
2508 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
2509 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
2512 ## Ex: ";;t2 ::d2" is transformed into:
2524 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
2525 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
2536 ## All Parsoid only definition list tests have this difference.
2538 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
2539 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
2542 Table / list interaction: indented table with lists in table contents
2564 </td></tr></table></dd></dl>
2569 Table / list interaction: lists nested in tables nested in indented lists
2594 </td></tr></table></dd></dl>
2602 Definition Lists: Nesting: Multi-level (Parsoid only)
2632 Definition Lists: Nesting: Test 2 (Parsoid only)
2652 Definition Lists: Nesting: Test 3 (Parsoid only)
2680 Definition Lists: Nesting: Test 4
2685 <dl><dd><dl><dd><dl><dt>t3
2694 ## The Parsoid team believes the following three test exposes a
2695 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
2696 ## wrong to close the <dl> after the <dt> containing the <ul>.)
2698 Definition Lists: Mixed Lists: Test 1 (php)
2706 <dl><dd><dl><dt><ul><li> foo
2716 Definition Lists: Mixed Lists: Test 1 (parsoid)
2724 <dl><dd><dl><dt><ul><li> foo
2725 </li></ul></dt><dd><ul><li> bar
2726 </li></ul></dd><dt> baz</dt></dl></dd></dl>
2730 Definition Lists: Mixed Lists: Test 2
2744 Definition Lists: Mixed Lists: Test 3
2749 <ul><li><dl><dd><dl><dd><dl><dd> d1
2760 Definition Lists: Mixed Lists: Test 4
2765 <ul><li><dl><dt>d1 </dt><dd>d2
2766 </dd><dt>d3 </dt><dd>d4
2774 Definition Lists: Mixed Lists: Test 5
2789 Definition Lists: Mixed Lists: Test 6
2794 <ol><li><ul><li><dl><dd>d1
2806 Definition Lists: Mixed Lists: Test 7
2820 Definition Lists: Mixed Lists: Test 8
2836 Definition Lists: Mixed Lists: Test 9
2840 <ul><li><dl><dt>foo </dt><dd>bar
2848 Definition Lists: Mixed Lists: Test 10
2852 <ul><li><ol><li><dl><dt>foo </dt><dd>bar
2859 # The Parsoid team disagrees with the PHP parser's seemingly-random
2860 # rules regarding dd/dt on the next two tests. Parsoid is more
2861 # consistent, and recognizes the shared nesting and keeps the
2862 # still-open tags around until the nesting is complete.
2865 Definition Lists: Mixed Lists: Test 11 (php)
2872 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt><dd><ul><li><dl><dt><dl><dt>bar
2877 <dl><dt>boo </dt><dd>baz
2886 Definition Lists: Mixed Lists: Test 11 (parsoid)
2908 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2909 <dd data-parsoid='{"stx":"row"}'>bar</dd></dl></dt></dl></li></ul></dt>
2910 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2911 <dd data-parsoid='{"stx":"row"}'>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
2916 Definition Lists: Weird Ones: Test 1 (php)
2920 *#;*::;; foo : bar (who uses this?)
2922 <ul><li><ol><li><dl><dt> foo </dt><dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)
2934 Definition Lists: Weird Ones: Test 1 (parsoid)
2938 *#;*::;; foo : bar (who uses this?)
2955 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2956 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd></dl></dt></dl></dd></dl></dd></dl></li></ul></dt></dl></li></ol></li></ul>
2963 External links: non-bracketed
2965 Non-bracketed: http://example.com
2967 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2972 External links: numbered
2974 Numbered: [http://example.com]
2975 Numbered: [http://example.net]
2976 Numbered: [http://example.com]
2978 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
2979 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
2980 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
2985 External links: specified text
2987 Specified text: [http://example.com link]
2989 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
2994 External links: trail
2996 Linktrails should not work for external links: [http://example.com link]s
2998 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3003 External links: dollar sign in URL
3005 http://example.com/1$2345
3007 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3012 External links: dollar sign in URL (named)
3014 [http://example.com/1$2345]
3016 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3021 External links: open square bracket forbidden in URL (bug 4377)
3023 http://example.com/1[2345
3025 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3030 External links: open square bracket forbidden in URL (named) (bug 4377)
3032 [http://example.com/1[2345]
3034 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3039 External links: nowiki in URL link text (bug 6230)
3041 [http://example.com/ <nowiki>''example site''</nowiki>]
3043 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
3048 External links: newline forbidden in text (bug 6230 regression check)
3050 [http://example.com/ first
3053 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
3059 External links: Pipe char between url and text
3061 [http://example.com | link]
3063 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
3068 External links: protocol-relative URL in brackets
3070 [//example.com/ Test]
3072 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
3077 External links: protocol-relative URL in brackets without text
3081 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
3086 External links: protocol-relative URL in free text is left alone
3090 <p>//example.com/Foo
3095 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
3097 foo//example.com/Foo
3099 <p>foo//example.com/Foo
3106 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3108 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3113 External image from https
3115 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3117 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3122 External image (when not allowed)
3124 wgAllowExternalImages=0
3126 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3128 <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>
3133 Link to non-http image, no img tag
3135 Link to non-http image, no img tag: ftp://example.com/test.jpg
3137 <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>
3142 External links: terminating separator
3144 Terminating separator: http://example.com/thing,
3146 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
3151 External links: intervening separator
3153 Intervening separator: http://example.com/1,2,3
3155 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
3160 External links: old bug with URL in query
3162 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
3164 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
3169 External links: old URL-in-URL bug, mixed protocols
3171 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
3173 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
3178 External links: URL in text
3180 URL in text: [http://example.com http://example.com]
3182 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3187 External links: Clickable images
3189 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
3191 <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>
3196 External links: raw ampersand
3198 Old & use: http://x&y
3200 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3205 External links: encoded ampersand
3207 Old & use: http://x&y
3209 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3214 External links: encoded equals (bug 6102)
3216 http://example.com/?foo=bar
3218 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
3223 External links: [raw ampersand]
3225 Old & use: [http://x&y]
3227 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3232 External links: [encoded ampersand]
3234 Old & use: [http://x&y]
3236 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3241 External links: [encoded equals] (bug 6102)
3243 [http://example.com/?foo=bar]
3245 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3250 External links: [IDN ignored character reference in hostname; strip it right off]
3252 [http://e‌xample.com/]
3254 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
3258 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
3259 # Where an external link could easily circumvent the sanitization of the text of
3260 # a link like this (where an IDN-ignore character is in the URL somewhere), this
3261 # test demands a higher standard. That's a bit strange.
3265 # http://example.com -> [http://example.com|http://example.com]
3266 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
3268 # The first example is sanitized, but the second is not. Any security benefits
3269 # from this production are trivial to circumvent. Either remove this test and
3270 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
3271 # the test accordingly.
3276 External links: IDN ignored character reference in hostname; strip it right off
3278 http://e‌xample.com/
3280 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
3285 External links: www.jpeg.org (bug 554)
3289 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
3294 External links: URL within URL (original bug 2)
3296 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
3298 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
3303 BUG 361: URL inside bracketed URL
3305 [http://www.example.com/foo http://www.example.com/bar]
3307 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
3312 BUG 361: URL within URL, not bracketed
3314 http://www.example.com/foo?=http://www.example.com/bar
3316 <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>
3321 BUG 289: ">"-token in URL-tail
3323 http://www.example.com/<hello>
3325 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
3330 BUG 289: literal ">"-token in URL-tail
3332 http://www.example.com/<b>html</b>
3334 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
3339 BUG 289: ">"-token in bracketed URL
3341 [http://www.example.com/<hello> stuff]
3343 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
3348 BUG 289: literal ">"-token in bracketed URL
3350 [http://www.example.com/<b>html</b> stuff]
3352 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
3357 BUG 289: literal double quote at end of URL
3359 http://www.example.com/"hello"
3361 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
3366 BUG 289: literal double quote in bracketed URL
3368 [http://www.example.com/"hello" stuff]
3370 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
3375 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
3377 [http://www.example.com test]
3379 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
3384 External links: link text with spaces
3386 [http://www.example.com a b c]
3387 [http://www.example.com ''a'' ''b'']
3389 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
3390 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
3395 External links: wiki links within external link (Bug 3695)
3397 [http://example.com [[wikilink]] embedded in ext link]
3399 <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>
3404 BUG 787: Links with one slash after the url protocol are invalid
3408 [http:/example.com title]
3410 <p>http:/example.com
3411 </p><p>[http:/example.com title]
3416 Bracketed external links with template-generated invalid target
3418 [{{echo|http:/example.com}} title]
3420 <p>[http:/example.com title]
3425 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
3427 ''[http://example.com text'']
3428 [http://example.com '''text]'''
3429 ''Something [http://example.com in italic'']
3430 ''Something [http://example.com mixed''''', even bold]'''
3431 '''''Now [http://example.com both''''']
3433 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
3434 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
3435 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
3436 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
3437 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
3443 Bug 4781: %26 in URL
3445 http://www.example.com/?title=AT%26T
3447 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
3451 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
3452 # % is actually legal in HTML5. Any change in output would need testing though.
3454 Bug 4781, 5267: %25 in URL
3456 http://www.example.com/?title=100%25_Bran
3458 <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>
3463 Bug 4781, 5267: %28, %29 in URL
3465 http://www.example.com/?title=Ben-Hur_%281959_film%29
3467 <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>
3473 Bug 4781: %26 in autonumber URL
3475 [http://www.example.com/?title=AT%26T]
3477 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
3482 Bug 4781, 5267: %26 in autonumber URL
3484 [http://www.example.com/?title=100%25_Bran]
3486 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
3491 Bug 4781, 5267: %28, %29 in autonumber URL
3493 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
3495 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
3501 Bug 4781: %26 in bracketed URL
3503 [http://www.example.com/?title=AT%26T link]
3505 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
3510 Bug 4781, 5267: %26 in bracketed URL
3512 [http://www.example.com/?title=100%25_Bran link]
3514 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
3519 Bug 4781, 5267: %28, %29 in bracketed URL
3521 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
3523 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
3528 External link containing double-single-quotes in text '' (bug 4598 sanity check)
3530 Some [http://example.com/ pretty ''italics'' and stuff]!
3532 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
3537 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
3539 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
3541 <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>
3546 External link containing double-single-quotes with no space separating the url from text in italics
3548 [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]].]
3550 <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>
3555 External link with comments in link text
3557 [http://www.google.com Google <!-- comment -->]
3559 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
3564 URL-encoding in URL functions (single parameter)
3566 {{localurl:Some page|amp=&}}
3568 <p>/index.php?title=Some_page&amp=&
3573 URL-encoding in URL functions (multiple parameters)
3575 {{localurl:Some page|q=?&=&}}
3577 <p>/index.php?title=Some_page&q=?&amp=&
3584 http://example.com/index.php?foozoid%5B%5D=bar
3586 http://example.com/index.php?foozoid[]=bar
3588 <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>
3589 </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>
3594 IPv6 urls (bug 21261)
3598 http://[2404:130:0:1000::187:2]/index.php
3600 <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>
3605 Non-extlinks in brackets
3614 [{{echo|foo}} ''bar'']
3615 [{{echo|foo}}l's] errand
3616 [{{echo|foo}}l's errand]
3618 [url=http://example.com]
3631 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
3636 Parsoid: Percent encoding in external links
3640 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
3642 <p><a rel="mw:ExtLink"
3643 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
3647 Parsoid: use url link syntax for links where the content is equal the link
3654 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
3664 Normal text. '''Bold text.''' Normal text. ''Italic text.''
3666 Normal text. '''''Bold italic text.''''' Normal text.
3668 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
3669 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
3675 Unclosed and unmatched quotes (php)
3679 '''''Bold italic text '''with bold deactivated''' in between.'''''
3681 '''''Bold italic text ''with italic deactivated'' in between.'''''
3685 ..spanning two paragraphs (should not work).'''
3687 '''Bold tag left open
3689 ''Italic tag left open
3693 <!-- Unmatching number of opening, closing tags: -->
3694 '''This year''''s election ''should'' beat '''last year''''s.
3696 ''Tom'''s car is bigger than ''Susan'''s.
3698 Plain ''italic'''s plain
3700 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3701 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
3702 </p><p><b>Bold text..</b>
3703 </p><p>..spanning two paragraphs (should not work).
3704 </p><p><b>Bold tag left open</b>
3705 </p><p><i>Italic tag left open</i>
3707 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3708 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3709 </p><p>Plain <i>italic'</i>s plain
3712 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
3713 # parser strips. The wikitext contains just the first half of the bold
3716 Unclosed and unmatched quotes (parsoid)
3720 '''''Bold italic text '''with bold deactivated''' in between.'''''
3722 '''''Bold italic text ''with italic deactivated'' in between.'''''
3726 ..spanning two paragraphs (should not work).'''
3728 '''Bold tag left open
3730 ''Italic tag left open
3734 <!-- Unmatching number of opening, closing tags: -->
3735 '''This year''''s election ''should'' beat '''last year''''s.
3737 ''Tom'''s car is bigger than ''Susan'''s.
3739 Plain ''italic'''s plain
3741 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3742 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
3743 </p><p><b>Bold text..</b>
3744 </p><p>..spanning two paragraphs (should not work).<b></b>
3745 </p><p><b>Bold tag left open</b>
3746 </p><p><i>Italic tag left open</i>
3748 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3749 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3750 </p><p>Plain <i>italic'</i>s plain
3757 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
3760 # This should not produce <table></table> as <table><tr><td></td></tr></table>
3761 # is the bare minimum required by the spec, see:
3762 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
3764 A table with no data. (php)
3771 # Parsoid team replies: empty table tags are legal in HTML5
3773 A table with no data. (parsoid)
3782 # A table with nothing but a caption is invalid XHTML, we might want to render
3783 # this as <p>caption</p>
3785 A table with nothing but a caption (php)
3795 </caption><tr><td></td></tr></table>
3798 # Parsoid team replies: table with only a caption is legal in HTML5
3800 A table with nothing but a caption (parsoid)
3808 <table><caption> caption</caption></table>
3812 A table with caption with default-spaced attributes and a table row
3815 |+ style="color: red;" | caption1
3821 <caption style="color: red;"> caption1
3830 A table with captions with non-default spaced attributes and a table row
3833 |+style="color: red;"|caption2
3834 |+ style="color: red;"| caption3
3840 <caption style="color: red;">caption2
3842 <caption style="color: red;"> caption3
3851 Table td-cell syntax variations
3855 | foo bar foo || baz
3856 | style='color:red;' | baz
3857 | style='color:red;' || baz
3864 <td> foo bar foo </td>
3867 <td style="color:red;"> baz
3869 <td> style='color:red;' </td>
3897 Simple table but with multiple dashes for row wikitext
3915 Multiplication table
3917 {| border="1" cellpadding="2"
3918 |+Multiplication table
3920 ! × !! 1 !! 2 !! 3
3938 <table border="1" cellpadding="2">
3939 <caption>Multiplication table
3986 Accept "||" in table headings
4001 Accept "||" in indented table headings
4011 </th></tr></table></dd></dl>
4016 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
4033 Accept "| !" at start of line in tables (ignore !-attribute)
4037 | !style="color:red" | bar
4049 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 +/-
4053 |style='color:red;'|+1
4054 |style='color:blue;'|-1
4066 <td style="color:red;">+1
4068 <td style="color:blue;">-1
4092 |rowspan=2| Cell 2, row 1 (and 2)
4103 <td rowspan="2"> Cell 2, row 1 (and 2)
4121 {| bgcolor=#ABCDEF border=2
4126 |the original table again
4134 <table bgcolor="#ABCDEF" border="2">
4142 <td>the original table again
4148 Invalid attributes in table cell (bug 1830)
4163 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
4166 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
4170 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
4171 <td>]" onmouseover="alert(document.cookie)">test
4180 Indented table markup mixed with indented pre content (proposed in bug 6200)
4185 Text that should be rendered preformatted
4193 <pre>Text that should be rendered preformatted
4202 Template-generated table cell attributes and cell content
4211 <td style="color: red"> Foo
4213 <td style="color: red"> Foo
4219 Template-generated table cell attributes and cell content (2)
4222 |align=center {{table_attribs}}
4227 <td align="center" style="color: red"> Foo
4233 Template-generated table cell attributes and cell content (3)
4236 |align=center {{table_cells}}
4241 <td align="center" style="color: red"> Foo </td>
4249 Table with row followed by newlines and table heading
4267 Table with empty line following the start tag
4284 # FIXME: Preserve the attribute properly (with an empty string as value) in
4285 # the PHP parser. Parsoid implements the behavior below.
4287 Table attributes with empty value
4299 </td></tr></tbody></table>
4304 Wikitext table with a lot of comments
4327 Wikitext table with double-line table cell
4344 Table cell with a single comment
4360 # The expected HTML structure in this test is debatable. The PHP parser does
4361 # not parse this kind of table at all. The main focus for Parsoid is on
4362 # round-tripping, so this output is ok for now. TODO: revisit!
4364 Wikitext table with html-syntax row (Parsoid)
4376 <td>foo</td></tr></tbody></table>
4380 Implicit <td> after a |-
4381 (PHP parser relies on Tidy to add the missing <td> tags)
4383 parsoid=wt2html,wt2wt
4396 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
4397 (PHP parser relies on Tidy to add the missing <td> tags)
4399 parsoid=wt2html,wt2wt
4411 <tr><td><pre>a</pre></td></tr>
4412 <tr><td> b</td></tr>
4418 Lists should be recognized in an implicit <td> context
4419 (PHP parser relies on Tidy to add the missing <td> tags)
4421 parsoid=wt2html,wt2wt
4430 <td><ul><li>a</li></ul></td>
4436 Parsoid: Round-trip tables directly followed by content (bug 51219)
4438 parsoid=wt2html,wt2wt
4450 <td>foo</td></tr></tbody></table> bar
4454 <td>baz</td></tr></tbody></table><b>quux</b>
4458 Parsoid: Default to a newline after tables in new content (bug 51219)
4465 <nowiki> </nowiki>bar
4472 <tr><td>foo</td></tr></tbody></table> bar
4474 <tr><td>baz</td></tr></tbody></table><b>quux</b>
4481 Plain link, capitalized
4485 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
4490 Plain link, uncapitalized
4494 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
4501 [[Main Page|The Main Page]]
4503 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4508 Piped link with comment in link text
4510 [[Main Page|The Main<!--front--> Page]]
4512 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4521 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
4526 Broken link with fragment
4528 [[Zigzagzogzagzig#zug]]
4530 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
4535 Special page link with fragment
4537 [[Special:Version#anchor]]
4539 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
4544 Nonexistent special page link with fragment
4546 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
4548 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
4555 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
4557 <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>
4564 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
4566 <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>!!!
4577 Bug 43661: Piped links with identical prefixes
4579 [[prefixed article|prefixed articles with spaces]]
4581 [[prefixed article|prefixed articlesaoeu]]
4583 [[Main Page|Main Page test]]
4585 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
4586 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
4587 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
4593 Link with HTML entity in suffix / tail
4595 [[Main Page]]", [[Main Page]]a
4597 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
4602 Link with 3 brackets
4611 Piped link with 3 brackets
4613 [[[main page|the main page]]]
4615 <p>[[[main page|the main page]]]
4620 Link with multiple pipes
4622 [[Main Page|The|Main|Page]]
4624 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
4631 [[Talk:Parser testing]], [[Meta:Disclaimers]]
4633 <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>
4638 Piped link to namespace
4640 [[Meta:Disclaimers|The disclaimers]]
4642 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
4649 [[Usually caused by a typo (oops}]]
4651 <p>[[Usually caused by a typo (oops}]]
4656 Link containing % (not as a hex sequence)
4660 <p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a>
4665 Link containing % as a single hex sequence interpreted to char
4669 <p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a>
4674 Link containing % as a double hex sequence interpreted to hex sequence
4678 <p>[[7%2525 Solution]]
4683 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
4684 Example for such a section: == < ==
4686 [[%23%3c]][[%23%3e]]
4688 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
4693 Link containing "<#" and ">#" as a hex sequences
4695 [[%3c%23]][[%3e%23]]
4697 <p>[[%3c%23]][[%3e%23]]
4702 Link containing an equals sign
4704 [[Special:BookSources/isbn=4-00-026157-6]]
4706 <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>
4713 Just a test of an article title containing a tilde.
4716 # note that links containing signatures, like [[Foo~~~~]], are
4717 # massaged by the pre-save transform (PST) and so the tildes are never
4718 # seen by the parser.
4720 Link containing a tilde
4724 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
4729 Link containing double-single-quotes '' (bug 4598)
4731 [[Lista d''e paise d''o munno]]
4733 <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>
4738 Link containing double-single-quotes '' in text (bug 4598 sanity check)
4740 Some [[Link|pretty ''italics'' and stuff]]!
4742 <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>!
4747 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
4749 ''Some [[Link|pretty ''italics'' and stuff]]!
4751 <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>
4756 Link with double quotes in title part (literal) and alternate part (interpreted)
4758 [[File:Denys Savchenko ''Pentecoste''.jpg]]
4762 [[''Pentecoste''|Pentecoste]]
4764 [[''Pentecoste''|''Pentecoste'']]
4766 <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>
4767 </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>
4768 </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>
4769 </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>
4774 Broken image links with HTML captions (bug 39700)
4776 [[File:Nonexistent|<script></script>]]
4777 [[File:Nonexistent|100px|<script></script>]]
4778 [[File:Nonexistent|<]]
4779 [[File:Nonexistent|a<i>b</i>c]]
4781 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4782 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4783 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
4784 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
4791 [[http://www.example.com]]
4793 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
4798 Plain link to URL with link text
4800 [[http://www.example.com Link text]]
4802 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
4807 Plain link to protocol-relative URL
4809 [[//www.example.com]]
4811 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
4816 Plain link to protocol-relative URL with link text
4818 [[//www.example.com Link text]]
4820 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
4825 Plain link to page with question mark in title
4831 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
4832 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
4837 # I'm fairly sure the expected result here is wrong.
4838 # We want these to be URL links, not pseudo-pages with URLs for titles....
4839 # However the current output is also pretty screwy.
4842 # I'm changing it to match the current output--it arguably makes more
4843 # sense in the light of the test above. Old expected result was:
4844 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
4846 # But I think this test is bordering on "garbage in, garbage out" anyway.
4851 Piped link to URL: [[http://www.example.com|an example URL]]
4853 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
4858 BUG 2: [[page|http://url/]] should link to page, not http://url/
4860 [[Main Page|http://url/]]
4862 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
4867 BUG 337: Escaped self-links should be bold
4871 [[Bug462]] [[Bug462]]
4873 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
4878 Self-link to section should not be bold
4882 [[Main Page#section]]
4884 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
4895 Self-link to numeric title
4901 <p><strong class="selflink">0</strong>
4906 Link to numeric-equivalent title
4912 <p><a href="/wiki/00" title="00">00</a>
4917 <nowiki> inside a link
4919 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
4921 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
4926 Non-breaking spaces in title
4928 [[ Main Page ]]
4930 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
4935 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
4941 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
4946 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
4952 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
4957 Internal link with en linktrail: no apostrophes (bug 27473)
4963 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
4968 Internal link with ca linktrail with apostrophes (bug 27473)
4974 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
4979 Internal link with kaa linktrail with apostrophes (bug 27473)
4985 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
4996 Internal link with is link prefix
5000 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
5002 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
5013 Internal link with is link trail and link prefix
5017 [[mótmælendatrú|xxx]]ar
5019 mótmælenda[[söfnuður]]
5020 mótmælenda[[söfnuður|söfnuðir]]
5021 mótmælenda[[söfnuður|söfnuðir]]xxx
5023 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
5024 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
5025 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
5026 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
5027 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
5032 Parsoid link trail escaping
5034 parsoid=html2wt,html2html
5038 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
5042 Parsoid link prefix escaping
5045 parsoid=html2wt,html2html
5047 Aðrir mótmælenda<nowiki/>[[söfnuður]]
5049 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
5053 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
5061 [http://wp.org ''foo'']
5063 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
5064 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
5065 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
5066 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
5071 ### Interwiki links (see maintenance/interwiki.sql)
5075 Inline interwiki link
5077 [[MeatBall:SoftSecurity]]
5079 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
5084 Inline interwiki link with empty title (bug 2372)
5088 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
5093 Interwiki link encoding conversion (bug 1636)
5095 *[[Wikipedia:ro:Olteniţa]]
5096 *[[Wikipedia:ro:Olteniţa]]
5098 <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>
5099 </li><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a>
5105 Interwiki link with fragment (bug 2130)
5107 [[MeatBall:SoftSecurity#foo]]
5109 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
5115 ### Interlanguage links
5116 ### Language links (so that searching for '### language' matches..)
5130 Double interlanguage link
5141 Interlanguage link, with prefix links
5153 Double interlanguage link, with prefix links (bug 8897)
5166 Parsoid-specific test: Wikilinks with should RT properly
5172 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
5177 Parsoid bug 53221: Wikilinks should be properly entity-escaped
5181 He&nbsp;llo [[Foo|He&nbsp;llo]]
5183 He&nbsp;llo [[He&nbsp;llo]]
5185 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
5186 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
5190 Parsoid: handle constructor well
5198 <p data-parsoid="{"dsr":[0,15,0,0]}"><a rel="mw:WikiLink" href="./Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"},"dsr":[0,15,2,2]}">constructor</a></p>
5201 <p data-parsoid="{"dsr":[17,36,0,0]}"><a rel="mw:WikiLink" href="./Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"},"dsr":[17,36,2,2]}">constructor:foo</a></p>
5205 Parsoid: recognize interlanguage links without a target page
5212 <link rel="mw:WikiLink/Language" href="http://ko.wikipedia.org/wiki/"></p>
5216 Parsoid: recognize interwiki links without a target page
5222 <p><a rel="mw:WikiLink/Interwiki" href="http://ko.wikipedia.org/wiki/">ko:</a></p>
5226 ### Redirects, Parsoid-only
5229 Simple redirect to page
5233 #REDIRECT [[Main Page]]
5235 <link rel="mw:PageProp/redirect" href="./Main_Page">
5239 Optional colon in #REDIRECT
5241 # the colon is archaic syntax. we support it for wt2html, but we
5242 # don't care that it roundtrips back to the modern syntax.
5243 parsoid=wt2html,html2html
5245 #REDIRECT:[[Main Page]]
5247 <link rel="mw:PageProp/redirect" href="./Main_Page">
5251 Whitespace in #REDIRECT with optional colon
5253 # the colon and gratuitous whitespace is archaic syntax. we support
5254 # it for wt2html, but we don't care that it roundtrips back to the
5255 # modern syntax (without extra whitespace)
5256 parsoid=wt2html,html2html
5263 <link rel="mw:PageProp/redirect" href="./Main_Page">
5267 Piped link in #REDIRECT
5269 # content after piped link is ignored. we support this syntax,
5270 # but don't care that the piped link is lost when we roundtrip this.
5273 #REDIRECT [[Main Page|bar]]
5275 <link rel="mw:PageProp/redirect" href="./Main_Page">
5279 Redirect to category
5283 #REDIRECT [[Category:Foo]]
5285 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
5289 Redirect to category with URL encoding
5293 #REDIRECT [[Category%3AFoo]]
5295 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
5299 Redirect to category page
5301 parsoid=wt2html,html2html
5303 #REDIRECT [[:Category:Foo]]
5305 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
5309 Redirect to image page (1)
5313 #REDIRECT [[File:Wiki.png]]
5315 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5319 Redirect to image page (2)
5323 #REDIRECT [[Image:Wiki.png]]
5325 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5329 Redirect to language
5333 #REDIRECT [[en:File:Wiki.png]]
5335 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5339 Redirect to interwiki
5343 #REDIRECT [[meatball:File:Wiki.png]]
5345 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5349 Non-English #REDIRECT
5354 #TILVÍSUN [[Main Page]]
5356 <link rel="mw:PageProp/redirect" href="./Main_Page">
5373 Broken br tag sanitization
5383 # TODO: Fix html2html mode (bug 51055)!
5385 Parsoid: Broken br tag recognition
5395 Incorrecly removing closing slashes from correctly formed XHTML
5397 <br style="clear:both;" />
5399 <p><br style="clear:both;" />
5404 Failing to transform badly formed HTML into correct XHTML
5406 <br style="clear: left;">
5407 <br style="clear: right;">
5408 <br style="clear: both;">
5410 <p><br style="clear: left;" />
5411 <br style="clear: right;" />
5412 <br style="clear: both;" />
5417 Handling html with a div self-closing tag
5426 <p><div title />
5430 <p><div title=bar />
5431 <div title=bar/>
5433 <div title="bar/"></div>
5439 Handling html with a br self-closing tag
5448 <p><br title="title" />
5449 <br title="title" />
5458 Horizontal ruler (should it add that extra space?)
5472 Horizontal ruler -- 4+ dashes render hr
5481 Horizontal ruler -- eats additional dashes on the same line
5490 Horizontal ruler -- does not collapse dashes on consecutive lines
5501 Horizontal ruler -- <4 dashes render as plain text
5510 Horizontal ruler -- Supports content following dashes on same line
5519 ### Block-level elements
5542 <ol><li>Numbered list
5559 ***#Number on level 4
5561 **#Number on level 3
5562 **#Number on level 3
5566 #** Level 3, but ordered
5569 <ol><li> with numbers
5571 <ul><li> and bullets
5573 <ol><li> and numbers
5575 </li><li>bullets again
5576 <ul><li>bullet level 2
5577 <ul><li>bullet level 3
5578 <ol><li>Number on level 4
5581 </li><li>bullet level 2
5582 <ol><li>Number on level 3
5583 </li><li>Number on level 3
5586 <ol><li>number level 2
5589 <ul><li><ul><li> Level 3
5593 <ol><li><ul><li><ul><li> Level 3, but ordered
5627 Nested lists 3 (first element empty)
5640 Nested lists 4 (first element empty)
5653 Nested lists 5 (both elements empty)
5666 Nested lists 6 (both elements empty)
5679 Nested lists 7 (skip initial nesting levels)
5683 <ul><li><ul><li><ul><li> foo
5691 Nested lists 8 (multiple nesting transitions)
5699 <ul><li><ul><li> bar
5709 1. Lists with start-of-line-transparent tokens before bullets: Comments
5723 2. Lists with start-of-line-transparent tokens before bullets: Template close
5735 List items are not parsed correctly following a <pre> block (bug 785)
5741 <ul><li> <pre>foo</pre>
5742 </li><li> <pre>bar</pre>
5749 List items from template
5760 * notSOL{{inner list}}
5779 List interrupted by empty line or heading
5789 <ul><li><ul><li> bar
5792 <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>
5793 <ul><li> Another list item
5799 Multiple list tags generated by templates
5814 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
5817 <!--This line will NOT split the list-->
5819 <!--This line will NOT split the list either-->
5821 <!--foo--> <!----> <!--This line NOT split the list either-->
5833 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
5836 <!--This line will NOT split the list-->
5838 <!--This line will NOT split the list either-->
5840 <!--foo--> <!----> <!--This line NOT split the list
5854 (Cannot test this with PHP parser since it relies on Tidy for the hack)
5856 parsoid=wt2html,wt2wt
5860 * {{echo|<li>templated li-hack}}
5861 * <!--foo--> <li> unsupported li-hack with preceding comments
5864 <li><li>not a li-hack
5870 <li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>templated li-hack"}}}}]}'>templated li-hack</li>
5871 <li> <!--foo--> </li><li> li-hack with preceding comments</li></ul>
5874 <li></li><li>not a li-hack
5880 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
5891 <ol><li> foo<ol><li> bar</li></ol></li></ol><ul><li> foo<ul><li> bar</li></ul></li></ul><dl><dd> foo<dl><dd> bar</dd></dl></dd></dl>
5895 Parsoid: Test of whitespace serialization with Templated bullets
5902 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
5906 # ------------------------------------------------------------------------
5907 # The next set of tests are about Parsoid's ability to handle badly nested
5908 # tags (parse, minimize scope of fixup, and roundtrip back)
5909 # ------------------------------------------------------------------------
5912 Unbalanced closing block tags break a list
5913 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5923 </li></ul></div><div>
5929 Unbalanced closing non-block tags don't break a list
5930 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5940 <ul><li>a<span></span>
5946 Unclosed formatting tags that straddle lists are closed and reopened
5947 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5955 </li><li> <s> b </s>
5960 List embedded in a non-block tag
5961 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
5969 <p><small></small></p>
5975 <p><small></small></p>
5979 Table with missing opening <tr> tag
5981 parsoid=wt2html,wt2wt
5999 # Note that the current date is hard-coded as
6000 # 1970-01-01T00:02:03Z (a Thursday)
6001 # when running parser tests. The timezone is also fixed to GMT, so
6002 # local date will be identical to current date.
6005 Magic Word: {{CURRENTDAY}}
6014 Magic Word: {{CURRENTDAY2}}
6023 Magic Word: {{CURRENTDAYNAME}}
6032 Magic Word: {{CURRENTDOW}}
6041 Magic Word: {{CURRENTMONTH}}
6050 Magic Word: {{CURRENTMONTH1}}
6059 Magic Word: {{CURRENTMONTHABBREV}}
6061 {{CURRENTMONTHABBREV}}
6068 Magic Word: {{CURRENTMONTHNAME}}
6070 {{CURRENTMONTHNAME}}
6077 Magic Word: {{CURRENTMONTHNAMEGEN}}
6079 {{CURRENTMONTHNAMEGEN}}
6086 Magic Word: {{CURRENTTIME}}
6095 Magic Word: {{CURRENTHOUR}}
6104 Magic Word: {{CURRENTWEEK}} (@bug 4594)
6113 Magic Word: {{CURRENTYEAR}}
6122 Magic Word: {{CURRENTTIMESTAMP}}
6124 {{CURRENTTIMESTAMP}}
6131 Magic Words LOCAL (UTC)
6135 * {{LOCALMONTHNAME}}
6136 * {{LOCALMONTHNAMEGEN}}
6137 * {{LOCALMONTHABBREV}}
6146 * {{LOCALTIMESTAMP}}
6161 </li><li> 19700101000203
6167 Magic Word: {{FULLPAGENAME}}
6169 title=[[User:Ævar Arnfjörð Bjarmason]]
6173 <p>User:Ævar Arnfjörð Bjarmason
6178 Magic Word: {{FULLPAGENAMEE}}
6180 title=[[User:Ævar Arnfjörð Bjarmason]]
6184 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6189 Magic Word: {{TALKSPACE}}
6191 title=[[User:Ævar Arnfjörð Bjarmason]]
6200 Magic Word: {{TALKSPACE}}, same namespace
6202 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6211 Magic Word: {{TALKSPACE}}, main namespace
6213 title=[[Parser Test]]
6222 Magic Word: {{TALKSPACEE}}
6224 title=[[User:Ævar Arnfjörð Bjarmason]]
6233 Magic Word: {{SUBJECTSPACE}}
6235 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6244 Magic Word: {{SUBJECTSPACE}}, same namespace
6246 title=[[User:Ævar Arnfjörð Bjarmason]]
6255 Magic Word: {{SUBJECTSPACE}}, main namespace
6257 title=[[Parser Test]]
6265 Magic Word: {{SUBJECTSPACEE}}
6267 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6276 Magic Word: {{NAMESPACE}}
6278 title=[[User:Ævar Arnfjörð Bjarmason]]
6287 Magic Word: {{NAMESPACEE}}
6289 title=[[User:Ævar Arnfjörð Bjarmason]]
6298 Magic Word: {{NAMESPACENUMBER}}
6300 title=[[User:Ævar Arnfjörð Bjarmason]]
6309 Magic Word: {{SUBPAGENAME}}
6311 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
6320 Magic Word: {{SUBPAGENAMEE}}
6322 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
6331 Magic Word: {{ROOTPAGENAME}}
6333 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
6337 <p>Ævar Arnfjörð Bjarmason
6342 Magic Word: {{ROOTPAGENAMEE}}
6344 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
6348 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6353 Magic Word: {{BASEPAGENAME}}
6355 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
6359 <p>Ævar Arnfjörð Bjarmason
6364 Magic Word: {{BASEPAGENAMEE}}
6366 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
6370 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6375 Magic Word: {{TALKPAGENAME}}
6377 title=[[User:Ævar Arnfjörð Bjarmason]]
6381 <p>User talk:Ævar Arnfjörð Bjarmason
6386 Magic Word: {{TALKPAGENAMEE}}
6388 title=[[User:Ævar Arnfjörð Bjarmason]]
6392 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6397 Magic Word: {{SUBJECTPAGENAME}}
6399 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6403 <p>User:Ævar Arnfjörð Bjarmason
6408 Magic Word: {{SUBJECTPAGENAMEE}}
6410 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6412 {{SUBJECTPAGENAMEE}}
6414 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6419 Magic Word: {{NUMBEROFFILES}}
6428 Magic Word: {{PAGENAME}}
6430 title=[[User:Ævar Arnfjörð Bjarmason]]
6434 <p>Ævar Arnfjörð Bjarmason
6439 Magic Word: {{PAGENAME}} with metacharacters
6441 title=[['foo & bar = baz']]
6445 <p><i>'foo & bar = baz'</i>
6450 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
6452 title=[[*RFC 1234 http://example.com/]]
6456 <p>*RFC 1234 http://example.com/
6461 Magic Word: {{PAGENAMEE}}
6463 title=[[User:Ævar Arnfjörð Bjarmason]]
6467 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6472 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
6474 title=[[*RFC 1234 http://example.com/]]
6478 <p>*RFC_1234_http://example.com/
6483 Magic Word: {{REVISIONID}}
6492 Magic Word: {{SCRIPTPATH}}
6501 Magic Word: {{STYLEPATH}}
6510 Magic Word: {{SERVER}}
6514 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
6519 Magic Word: {{SERVERNAME}}
6528 Magic Word: {{SITENAME}}
6537 Case-sensitive magic words, when cased differently, should just be template transclusions
6544 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
6545 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
6546 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
6547 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
6552 Case-insensitive magic words should still work with weird casing.
6562 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
6567 Namespace 1 {{ns:1}}
6576 Namespace 1 {{ns:01}}
6585 Namespace 0 {{ns:0}} (bug 4783)
6593 Namespace 0 {{ns:00}} (bug 4783)
6601 Namespace -1 {{ns:-1}}
6610 Namespace User {{ns:User}}
6619 Namespace User talk {{ns:User_talk}}
6628 Namespace User talk {{ns:uSeR tAlK}}
6637 Namespace File {{ns:File}}
6646 Namespace File {{ns:Image}}
6655 Namespace (lang=de) Benutzer {{ns:User}}
6666 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
6672 <p>Benutzer Diskussion
6680 {{urlencode:hi world?!}}
6681 {{urlencode:hi world?!|WIKI}}
6682 {{urlencode:hi world?!|PATH}}
6683 {{urlencode:hi world?!|QUERY}}
6696 Magic links: internal link to RFC (bug 479)
6700 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
6705 Magic links: RFC (bug 479)
6709 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
6714 Magic links: ISBN (bug 1937)
6718 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
6723 Magic links: PMID incorrectly converts space to underscore
6727 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
6736 Nonexistent template
6738 {{thistemplatedoesnotexist}}
6740 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
6745 Template with invalid target containing tags
6747 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
6749 <p>{{a<b>b</b>|foo|a=b|a = b}}
6754 Template with invalid target containing unclosed tag
6756 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
6758 <p>{{a<b>|foo|a=b|a = b}}</b>
6765 This is a test template
6773 <p>This is a test template
6778 Template with explicit namespace
6782 <p>This is a test template
6790 This is a test template with parameter {{{param}}}
6796 {{paramtest|param=foo}}
6798 <p>This is a test template with parameter foo
6803 Template:paramtestnum
6809 Template unnamed parameter
6811 {{paramtestnum|Main Page|the main page}}
6813 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
6818 Template:templatesimple
6824 Template:templateredirect
6826 #redirect [[Template:templatesimple]]
6830 Template:templateasargtestnum
6836 Template:templateasargtest
6838 {{template{{{templ}}}}}
6842 Template:templateasargtest2
6848 Template with template name as unnamed argument
6850 {{templateasargtestnum|templatesimple}}
6857 Template with template name as argument
6859 {{templateasargtest|templ=simple}}
6866 Template with template name as argument (2)
6868 {{templateasargtest2|templ=templatesimple}}
6875 Template:templateasargtestdefault
6877 {{{{{templ|templatesimple}}}}}
6887 Template with default value
6889 {{templateasargtestdefault}}
6896 Template with default value (value set)
6898 {{templateasargtestdefault|templ=templa}}
6907 {{templateredirect}}
6914 Template with argument in separate line
6916 {{ templateasargtest |
6924 Template with complex template as argument
6927 param ={{ templateasargtest |
6930 <p>This is a test template with parameter (test)
6935 Template with thumb image (with link in description)
6938 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
6940 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>
6945 Template:complextemplate
6947 {{{1}}} {{paramtest|
6948 param ={{{param}}}}}
6952 Template with complex arguments
6955 param ={{ templateasargtest |
6956 templ = simple }}|[[Template:complextemplate|link]]}}
6958 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
6963 BUG 553: link with two variables in a piped link
6966 |[[{{{1}}}|{{{2}}}]]
6971 <td>[[{{{1}}}|{{{2}}}]]
6977 Magic variable as template parameter
6979 {{paramtest|param={{SITENAME}}}}
6981 <p>This is a test template with parameter MediaWiki
6988 [[{{{param}}}|link]]
6992 Template parameter as link source
6994 {{linktest|param=Main Page}}
6996 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
7001 Template-generated attribute string (k='v')
7003 <span {{attr_str|id|v1}}>bar</span>
7005 <p><span id="v1">bar</span>
7012 including another template, {{paramtest|param={{{arg}}}}}
7016 Template passing argument to another template
7018 {{paramtest2|arg='hmm'}}
7020 <p>including another template, This is a test template with parameter 'hmm'
7031 Template as link source
7035 [[{{linktest2}}|Main Page]]
7037 [[{{linktest2}}]]Page
7039 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7040 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7041 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
7059 Template infinite loop
7063 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
7068 Template from main namespace
7087 BUG 529: Template with table, not included at beginning of line
7106 BUG 523: Template shouldn't eat newline (or add an extra one before table)
7126 BUG 41: Template parameters shown as broken links
7135 Template with targets containing wikilinks
7139 {{[[{{echo|foo}}]]}}
7141 {{{{echo|[[foo}}]]}}
7143 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
7144 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
7152 ''None'' of '''this''' should be
7154 but rather passed unmodified
7158 # hmm, fix this or just deprecate msgnw and document its behavior?
7164 {{msgnw:MSGNW test}}
7166 <p>''None'' of '''this''' should be
7168 but rather passed unmodified
7176 {{int:youhavenewmessages|lots of money|not!}}
7178 <p>You have lots of money (not!).
7185 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
7189 <includeonly> and <noinclude> being included
7200 <onlyinclude>Foo</onlyinclude>bar
7204 <onlyinclude> being included
7216 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
7220 <onlyinclude> and <includeonly> being included
7229 <includeonly> and <noinclude> on a page
7231 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
7238 Un-closed <noinclude>
7245 <onlyinclude> on a page
7247 <onlyinclude>Foo</onlyinclude>bar
7254 Un-closed <onlyinclude>
7261 Self-closed noinclude, includeonly, onlyinclude tags
7272 Unbalanced includeonly and noinclude tags
7276 |b</noinclude></noinclude>
7277 |c</noinclude></includeonly>
7278 |d</includeonly></includeonly>
7287 <td>c</includeonly>
7289 <td>d</includeonly></includeonly>
7295 Template:Includeonly section
7298 ==Includeonly section==
7304 Bug 6563: Edit link generation for section shown by <includeonly>
7306 {{includeonly section}}
7308 <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>
7309 <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>
7313 # Uses same input as the contents of [[Template:Includeonly section]]
7315 Bug 6563: Section extraction for section shown by <includeonly>
7320 ==Includeonly section==
7328 Bug 6563: Edit link generation for section suppressed by <includeonly>
7331 ==Includeonly section==
7335 <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>
7340 Bug 6563: Section extraction for section suppressed by <includeonly>
7345 ==Includeonly section==
7353 Un-closed <includeonly>
7359 # TODO: test with DOM fragment reuse!
7361 Parsoid: DOM fragment reuse
7363 parsoid=wt2wt,wt2html
7365 a{{echo|b<table></table>c}}d
7377 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
7378 <table></table>c"}},"i":0}}]}'>b</span>
7379 <table about="#mwt1"></table><span about="#mwt1">c</span>d
7382 <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"]}'>ab</p><span about="#mwt2">
7384 <table about="#mwt2"></table><span about="#mwt2">
7386 <p about="#mwt2">cd</p>
7389 <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}}]}'>a</p><span about="#mwt3">
7392 <table about="#mwt3"></table><span about="#mwt3">
7395 <p about="#mwt3">b</p>
7399 Parsoid: Merge double tds (bug 50603)
7408 <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>
7413 Parsoid: Merge double tds in nested transclusion content (bug 50603)
7423 <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}}]}'>
7425 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
7431 ### <includeonly> and <noinclude> in attributes
7434 0. includeonly around the entire attribute
7436 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
7438 <p><span id="v2">bar</span>
7443 1. includeonly in html attr key
7445 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
7447 <p><span id="foo">bar</span>
7452 2. includeonly in html attr value
7454 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
7455 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
7457 <p><span id="v1">bar</span>
7458 <span id="v1">bar</span>
7463 3. includeonly in part of an attr value
7465 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
7467 <p><span style="color:red;">bar</span>
7472 ### Testing parsing of templates where a template arg
7473 ### has the same name as the template itself.
7483 Templates: Template Name/Arg clash: 1. Use of positional param
7492 Templates: Template Name/Arg clash: 2. Use of named param
7501 Templates: Template Name/Arg clash: 3. Use of named param with empty input
7510 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
7514 Templates: 1. Simple use
7523 Templates: 2. Inside a block tag
7525 <div>{{echo|Foo}}</div>
7526 <blockquote>{{echo|Foo}}</blockquote>
7529 <blockquote>Foo</blockquote>
7534 Templates: P-wrapping: 1a. Templates on consecutive lines
7545 Templates: P-wrapping: 1b. Templates on consecutive lines
7559 Templates: P-wrapping: 1c. Templates on consecutive lines
7562 {{echo|bar}} <div>baz</div>
7571 Templates: P-wrapping: 1d. Template preceded by comment-only line
7580 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
7584 Templates: Inline Text: 1. Multiple tmeplate uses
7586 {{echo|Foo}}bar{{echo|baz}}
7593 Templates: Inline Text: 2. Back-to-back template uses
7595 {{echo|Foo}}{{echo|bar}}
7602 Templates: Block Tags: 1. Multiple template uses
7604 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
7606 <div>Foo</div><div>bar</div><div>baz</div>
7611 Templates: Block Tags: 2. Back-to-back template uses
7613 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
7615 <div>Foo</div><div>bar</div>
7620 Templates: Links: 1. Simple example
7622 {{echo|[[Foo|bar]]}}
7624 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7629 Templates: Links: 2. Generation of link href
7631 [[{{echo|Foo}}|bar]]
7633 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7638 Templates: Links: 3. Generation of part of a link href
7640 [[Fo{{echo|o}}|bar]]
7644 [[Foo{{echo|bar}}baz]]
7646 [[Foo{{echo|bar}}|bar]]
7648 [[:Foo{{echo|bar}}]]
7650 [[:Foo{{echo|bar}}|bar]]
7652 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7653 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7654 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
7655 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
7656 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7657 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
7662 Templates: Links: 4. Multiple templates generating link href
7664 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
7666 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7671 Templates: Links: 5. Generation of link text
7673 [[Foo|{{echo|bar}}]]
7675 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7680 Templates: Links: 5. Nested templates (only outermost template should be marked)
7682 {{echo|[[{{echo|Foo}}|bar]]}}
7684 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7689 Templates: HTML Tag: 1. Generation of HTML attr. key
7691 <div {{echo|style}}="color:red;">foo</div>
7693 <div style="color:red;">foo</div>
7698 Templates: HTML Tag: 2. Generation of HTML attr. value
7700 <div style={{echo|'color:red;'}}>foo</div>
7702 <div style="color:red;">foo</div>
7707 Templates: HTML Tag: 3. Generation of HTML attr key and value
7709 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
7711 <div style="color:red;">foo</div>
7716 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
7718 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
7720 <div title="This is a long title with just one piece templated">foo</div>
7725 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
7727 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
7729 <div title="This is a long title with just one piece templated">foo</div>
7734 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
7736 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
7738 <div title="This is a long title with just one piece templated">foo</div>
7743 Templates: HTML Tag: 7. Generation of partial attribute key string
7745 <div st{{echo|yle}}="color:red;">foo</div>
7747 <div style="color:red;">foo</div>
7752 Templates: HTML Tables: 1. Generating start of a HTML table
7754 {{echo|<table><tr><td>foo</td>}}</tr></table>
7756 <table><tr><td>foo</td></tr></table>
7761 Templates: HTML Tables: 2a. Generating middle of a HTML table
7763 <table><tr>{{echo|<td>foo</td>}}</tr></table>
7765 <table><tr><td>foo</td></tr></table>
7770 Templates: HTML Tables: 2b. Generating middle of a HTML table
7772 <table>{{echo|<tr><td>foo</td></tr>}}</table>
7774 <table><tr><td>foo</td></tr></table>
7779 Templates: HTML Tables: 3. Generating end of a HTML table
7781 <table><tr>{{echo|<td>foo</td></tr></table>}}
7783 <table><tr><td>foo</td></tr></table>
7788 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
7790 {{echo|<table>}}<tr><td>foo</td></tr></table>
7792 <table><tr><td>foo</td></tr></table>
7797 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
7799 <table>{{echo|<tr>}}<td>foo</td></tr></table>
7801 <table><tr><td>foo</td></tr></table>
7806 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
7808 <table><tr>{{echo|<td>}}foo</td></tr></table>
7810 <table><tr><td>foo</td></tr></table>
7815 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
7817 <table><tr><td>foo{{echo|</td>}}</tr></table>
7819 <table><tr><td>foo</td></tr></table>
7824 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
7826 <table><tr><td>foo</td>{{echo|</tr>}}</table>
7828 <table><tr><td>foo</td></tr></table>
7833 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
7835 <table><tr><td>foo</td></tr>{{echo|</table>}}
7837 <table><tr><td>foo</td></tr></table>
7842 Templates: HTML Tables: 5. Proper fostering of categories from inside
7844 parsoid=wt2html,wt2wt
7846 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
7847 <!--Two categories (Bug 50330)-->
7848 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
7850 <link rel="mw:WikiLink/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
7851 <!--Two categories (Bug 50330)-->
7852 <link rel="mw:WikiLink/Category" href="./Category:Bar1"><link rel="mw:WikiLink/Category" href="./Category:Bar2"><table><tbody><tr><td>foo</td></tr></tbody></table>
7856 Templates: Wiki Tables: 1a. Fostering of entire template content
7864 <tr><td></td></tr></table>
7869 Templates: Wiki Tables: 1b. Fostering of entire template content
7882 <tr><td></td></tr></table>
7887 Templates: Wiki Tables: 2. Fostering of partial template content
7897 <tr><td></td></tr></table>
7902 Templates: Wiki Tables: 3. td-content via multiple templates
7905 {{echo|{{pipe}}a}}{{echo|b}}
7916 Templates: Wiki Tables: 4. Templated tags, no content
7922 <tr><td></td></tr></table>
7927 Templates: Wiki Tables: 5. Templated tags, regular td-tags
7941 Templates: Wiki Tables: 6. Templated tags, templated td-tags
7955 Templates: Lists: Multi-line list-items via templates
7957 *{{echo|a {{nonexistent|
7959 *{{echo|b {{nonexistent|
7962 <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>
7963 </li><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>
7969 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
7971 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
7973 <p><i>ab</i>c<i>d</i>e
7978 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
7979 (PHP parser generates misnested html)
7983 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
7985 <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>
7989 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
7990 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
7992 parsoid=wt2html,wt2wt
7994 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
7996 <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>
7997 <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>
7998 <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>
8002 Templates: Ugly nesting: 4. Divs opened/closed across templates
8004 a<div>b{{echo|c</div>d}}e
8011 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
8017 |{{echo|foo</table>}}
8021 <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|}"]}'>
8025 <td>foo</td></tr></tbody></table><span about="#mwt1">
8026 </span><span about="#mwt1">bar</span><span about="#mwt1">
8031 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
8041 <td>1. {{echo|foo </table>}}</td>
8043 <td>2. {{echo|baz </table>}}</td>
8056 <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>"]}'>
8061 <td>1. foo </td></tr></tbody></table></td>
8063 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
8064 </span><span about="#mwt2">
8065 </span><span about="#mwt2">
8066 </span><span about="#mwt2">abc</span><span about="#mwt2">
8067 </span><span about="#mwt2">
8068 </span><span about="#mwt2">
8069 </span><span about="#mwt2">
8070 </span><span about="#mwt2">
8071 </span><span about="#mwt2">
8072 </span><span about="#mwt2">xyz</span><span about="#mwt2">
8073 </span><span about="#mwt2">
8078 Templates: Ugly templates: 3. newline-only template parameter
8087 # This looks like a bug: a single newline triggers p/br for some reason.
8089 Templates: Ugly templates: 4. newline-only template parameter inconsistency
8100 Parser Functions: 1. Simple example
8109 Parser Functions: 2. Nested use (only outermost should be marked up)
8118 ### Pre-save transform tests
8121 pre-save transform: subst:
8127 This is a test template
8131 pre-save transform: normal template
8141 pre-save transform: nonexistent template
8145 {{thistemplatedoesnotexist}}
8147 {{thistemplatedoesnotexist}}
8152 pre-save transform: subst magic variables
8161 # This is bug 89, which I fixed. -- wtm
8163 pre-save transform: subst: templates with parameters
8167 {{subst:paramtest|param="something else"}}
8169 This is a test template with parameter "something else"
8175 <nowiki>'''not wiki'''</nowiki>
8179 pre-save transform: nowiki in subst (bug 1188)
8183 {{subst:nowikitest}}
8185 <nowiki>'''not wiki'''</nowiki>
8190 Template:commenttest
8192 This template has <!-- a comment --> in it.
8196 pre-save transform: comment in subst (bug 1936)
8200 {{subst:commenttest}}
8202 This template has <!-- a comment --> in it.
8206 pre-save transform: unclosed tag
8210 <nowiki>'''not wiki'''
8212 <nowiki>'''not wiki'''
8216 pre-save transform: mixed tag case
8220 <NOwiki>'''not wiki'''</noWIKI>
8222 <NOwiki>'''not wiki'''</noWIKI>
8226 pre-save transform: unclosed comment in <nowiki>
8230 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
8232 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
8235 # Leading @ in this template definition works around a limitation
8236 # in parsoid's parserTests which otherwise strips the <span> from the
8237 # result (confusing it for a template wrapper)
8241 @<span onmouseover="alert('crap')">Oh no</span>
8245 (confirming safety of fix for subst bug 1936)
8247 {{Template:dangerous}}
8249 <p>@<span>Oh no</span>
8254 pre-save transform: comment containing gallery (bug 5024)
8258 <!-- <gallery>data</gallery> -->
8260 <!-- <gallery>data</gallery> -->
8264 pre-save transform: comment containing extension
8268 <!-- <tag>data</tag> -->
8270 <!-- <tag>data</tag> -->
8274 pre-save transform: comment containing nowiki
8278 <!-- <nowiki>data</nowiki> -->
8280 <!-- <nowiki>data</nowiki> -->
8284 pre-save transform: <noinclude> in subst (bug 3298)
8294 pre-save transform: <onlyinclude> in subst (bug 3298)
8306 {{<includeonly>subst:</includeonly>Includes}}
8310 Template:SafeSubstTest
8312 {{<includeonly>safesubst:</includeonly>Includes}}
8316 bug 22297: safesubst: works during PST
8320 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
8326 bug 22297: safesubst: works during normal parse
8335 subst: does not work during normal parse
8339 <p>{{subst:Includes}}
8344 pre-save transform: context links ("pipe trick")
8348 [[Article (context)|]]
8351 [[Bar:Article (context)|]]
8352 [[:Bar:Article (context)|]]
8354 [[|Article (context)]]
8358 [[Article (context)|Article]]
8359 [[Bar:Article|Article]]
8360 [[:Bar:Article|Article]]
8361 [[Bar:Article (context)|Article]]
8362 [[:Bar:Article (context)|Article]]
8364 [[Article (context)]]
8365 [[Bar:X (Y) Z|X (Y) Z]]
8366 [[:Bar:X (Y) Z|X (Y) Z]]
8370 pre-save transform: context links ("pipe trick") with interwiki prefix
8374 [[interwiki:Article|]]
8375 [[:interwiki:Article|]]
8376 [[interwiki:Bar:Article|]]
8377 [[:interwiki:Bar:Article|]]
8379 [[interwiki:Article|Article]]
8380 [[:interwiki:Article|Article]]
8381 [[interwiki:Bar:Article|Bar:Article]]
8382 [[:interwiki:Bar:Article|Bar:Article]]
8386 pre-save transform: context links ("pipe trick") with parens in title
8388 pst title=[[Somearticle (context)]]
8392 [[Article (context)|Article]]
8396 pre-save transform: context links ("pipe trick") with comma in title
8398 pst title=[[Someplace, Somewhere]]
8401 [[Otherplace, Elsewhere|]]
8402 [[Otherplace, Elsewhere, Anywhere|]]
8404 [[Otherplace, Somewhere|Otherplace]]
8405 [[Otherplace, Elsewhere|Otherplace]]
8406 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
8410 pre-save transform: context links ("pipe trick") with parens and comma
8412 pst title=[[Someplace (IGNORED), Somewhere]]
8415 [[Otherplace (place), Elsewhere|]]
8417 [[Otherplace, Somewhere|Otherplace]]
8418 [[Otherplace (place), Elsewhere|Otherplace]]
8422 pre-save transform: context links ("pipe trick") with comma and parens
8424 pst title=[[Who, me? (context)]]
8427 [[Me, Myself, and I (1937 song)|]]
8429 [[Yes, you. (context)|Yes, you.]]
8430 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
8434 pre-save transform: context links ("pipe trick") with namespace
8436 pst title=[[Ns:Somearticle]]
8440 [[Ns:Article|Article]]
8444 pre-save transform: context links ("pipe trick") with namespace and parens
8446 pst title=[[Ns:Somearticle (context)]]
8450 [[Ns:Article (context)|Article]]
8454 pre-save transform: context links ("pipe trick") with namespace and comma
8456 pst title=[[Ns:Somearticle, Context, Whatever]]
8460 [[Ns:Article, Context, Whatever|Article]]
8464 pre-save transform: context links ("pipe trick") with namespace, comma and parens
8466 pst title=[[Ns:Somearticle, Context (context)]]
8470 [[Ns:Article (context)|Article]]
8474 pre-save transform: context links ("pipe trick") with namespace, parens and comma
8476 pst title=[[Ns:Somearticle (IGNORED), Context]]
8480 [[Ns:Article, Context|Article]]
8484 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
8488 [[Article(context)|]]
8489 [[Bar:Article(context)|]]
8490 [[:Bar:Article(context)|]]
8491 [[|Article(context)]]
8495 [[Article(context)|Article]]
8496 [[Bar:Article(context)|Article]]
8497 [[:Bar:Article(context)|Article]]
8498 [[Article(context)]]
8500 [[:Bar:X(Y)Z|X(Y)Z]]
8504 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
8508 [[Article (context)|]]
8509 [[Bar:Article (context)|]]
8510 [[:Bar:Article (context)|]]
8511 [[|Article (context)]]
8515 [[Article (context)|Article]]
8516 [[Bar:Article (context)|Article]]
8517 [[:Bar:Article (context)|Article]]
8518 [[Article (context)]]
8519 [[Bar:X (Y) Z|X (Y) Z]]
8520 [[:Bar:X (Y) Z|X (Y) Z]]
8524 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
8528 [[Article(context)|]]
8529 [[Bar:Article(context)|]]
8530 [[:Bar:Article(context)|]]
8531 [[|Article(context)]]
8535 [[Article(context)|Article]]
8536 [[Bar:Article(context)|Article]]
8537 [[:Bar:Article(context)|Article]]
8538 [[Article(context)]]
8540 [[:Bar:X(Y)Z|X(Y)Z]]
8544 pre-save transform: context links ("pipe trick") with commas (bug 21660)
8548 [[Article (context), context|]]
8549 [[Article (context),context|]]
8550 [[Bar:Article (context), context|]]
8551 [[Bar:Article (context),context|]]
8552 [[:Bar:Article (context), context|]]
8553 [[:Bar:Article (context),context|]]
8555 [[Article (context), context|Article]]
8556 [[Article (context),context|Article]]
8557 [[Bar:Article (context), context|Article]]
8558 [[Bar:Article (context),context|Article]]
8559 [[:Bar:Article (context), context|Article]]
8560 [[:Bar:Article (context),context|Article]]
8564 pre-save transform: trim trailing empty lines
8568 Empty lines are trimmed
8574 Empty lines are trimmed
8578 pre-save transform: Signature expansion
8583 * <noinclude>~~~</noinclude>
8584 * <includeonly>~~~</includeonly>
8585 * <onlyinclude>~~~</onlyinclude>
8587 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
8588 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
8589 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
8590 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
8595 pre-save transform: Signature expansion in nowiki tags (bug 93)
8601 <nowiki>~~~~</nowiki>
8603 <includeonly><nowiki>~~~~</nowiki></includeonly>
8605 <noinclude><nowiki>~~~~</nowiki></noinclude>
8607 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
8609 {{subst:Foo}} shall be converted to FOO
8611 As well as inside noinclude/onlyinclude
8612 <noinclude>{{subst:Foo}}</noinclude>
8613 <onlyinclude>{{subst:Foo}}</onlyinclude>
8615 But not inside includeonly
8616 <includeonly>{{subst:Foo}}</includeonly>
8620 <nowiki>~~~~</nowiki>
8622 <includeonly><nowiki>~~~~</nowiki></includeonly>
8624 <noinclude><nowiki>~~~~</nowiki></noinclude>
8626 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
8628 FOO shall be converted to FOO
8630 As well as inside noinclude/onlyinclude
8631 <noinclude>FOO</noinclude>
8632 <onlyinclude>FOO</onlyinclude>
8634 But not inside includeonly
8635 <includeonly>{{subst:Foo}}</includeonly>
8639 Parsoid: Recognize nowiki with trailing space in tags
8643 <nowiki ><div>[[foo]]</nowiki >
8651 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
8658 Parsoid: Recognize nowiki with odd capitalization
8662 <noWikI ><div>[[foo]]</Nowiki >
8664 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
8669 Parsoid: Escape nowiki with trailing space in tags
8673 <nowiki > foo </nowiki >
8679 <p><nowiki > foo </nowiki ></p>
8680 <p>a<nowiki />b</p>
8681 <p>c<nowiki/ >d</p>
8685 Parsoid: Escape weird noWikI capitalizations
8689 <noWikI > foo </NoWikI >
8691 <p><noWikI > foo </NoWikI ></p>
8695 ### Message transform tests
8698 message transform: magic variables
8708 message transform: should not transform wiki markup
8718 message transform: <noinclude> in transcluded template (bug 4926)
8728 message transform: <onlyinclude> in transcluded template (bug 4926)
8738 {{#special:}} page name, known
8742 {{#special:Recentchanges}}
8744 Special:RecentChanges
8748 {{#special:}} page name with subpage, known
8752 {{#special:Recentchanges/param}}
8754 Special:RecentChanges/param
8758 {{#special:}} page name, unknown
8762 {{#special:foobar nonexistent}}
8764 Special:Foobar nonexistent
8768 {{#speciale:}} page name, known
8772 {{#speciale:Recentchanges}}
8774 Special:RecentChanges
8778 {{#speciale:}} page name with subpage, known
8782 {{#speciale:Recentchanges/param}}
8784 Special:RecentChanges/param
8788 {{#speciale:}} page name, unknown
8792 {{#speciale:foobar nonexistent}}
8794 Special:Foobar_nonexistent
8800 ### For Parsoid-specific tests, see
8801 #### http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
8808 [[Image:foobar.jpg]]
8810 <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>
8815 Simple image (parsoid)
8819 [[Image:foobar.jpg]]
8821 <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>
8826 Simple image (using File: namespace, now canonical) (php)
8832 <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>
8837 Simple image (using File: namespace, now canonical) (parsoid)
8843 <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>
8848 Right-aligned image (php)
8852 [[Image:foobar.jpg|right]]
8854 <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>
8859 Right-aligned image (parsoid)
8863 [[File:Foobar.jpg|right]]
8865 <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>
8869 Image with caption (php)
8873 [[File:Foobar.jpg|right|Caption text]]
8875 <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>
8880 Image with caption (parsoid)
8884 [[File:Foobar.jpg|right|Caption text]]
8886 <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>
8890 Image with empty attribute (php)
8894 [[File:Foobar.jpg|right||Caption text]]
8896 <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>
8901 Image with empty attribute (parsoid)
8905 [[File:Foobar.jpg|right||Caption text]]
8907 <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>
8911 Image with attributes from template (php)
8915 [[File:Foobar.jpg|{{image_attribs}}]]
8917 <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>
8922 Image with attributes from template (parsoid)
8926 [[File:Foobar.jpg|{{image_attribs}}]]
8928 <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>
8932 Image with link tails (php)
8936 123[[File:Foobar.jpg]]456
8937 123[[File:Foobar.jpg|right]]456
8938 123[[File:Foobar.jpg|thumb]]456
8940 <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
8942 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
8943 123<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" 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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div></div></div></div>456
8948 Image with link tails (parsoid)
8952 123[[File:Foobar.jpg]]456
8953 123[[File:Foobar.jpg|right]]456
8954 123[[File:Foobar.jpg|thumb]]456
8956 <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>
8957 123<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>456
8958 123<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="20" width="180"></a></figure>456
8962 Image with multiple captions -- only last one is accepted (php)
8966 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8968 <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>
8973 Image with multiple captions -- only last one is accepted (parsoid)
8977 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8979 <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>
8983 Image with width attribute at different positions (php)
8987 [[File:Foobar.jpg|200px|right|Caption]]
8988 [[File:Foobar.jpg|right|200px|Caption]]
8989 [[File:Foobar.jpg|right|Caption|200px]]
8991 <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>
8992 <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>
8993 <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>
8998 Image with width attribute at different positions (parsoid)
9002 [[File:Foobar.jpg|200px|right|Caption]]
9003 [[File:Foobar.jpg|right|200px|Caption]]
9004 [[File:Foobar.jpg|right|Caption|200px]]
9006 <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>
9007 <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>
9008 <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>
9012 Image with link parameter, wiki target (php)
9016 [[File:Foobar.jpg|link=Main Page]]
9018 <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>
9023 Image with link parameter, wiki target (parsoid)
9027 [[File:Foobar.jpg|link=Main Page]]
9029 <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>
9033 Image with link parameter, URL target (php)
9037 [[File:Foobar.jpg|link=http://example.com/]]
9039 <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>
9043 # parsoid bug 49293 (part 1)
9045 Image with link parameter, URL target (parsoid)
9049 [[File:Foobar.jpg|link=http://example.com/]]
9051 <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>
9055 Image with link parameter, protocol-less URL target (php)
9059 [[File:Foobar.jpg|link=//example.com/]]
9061 <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>
9065 # parsoid bug 49293 (part 2)
9067 Image with link parameter, protocol-less URL target (parsoid)
9071 [[File:Foobar.jpg|link=//example.com/]]
9073 <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>
9077 Image with link parameter, wgExternalLinkTarget
9079 [[Image:foobar.jpg|link=http://example.com/]]
9081 wgExternalLinkTarget='foobar'
9083 <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>
9088 Image with link parameter, wgNoFollowLinks set to false
9090 [[Image:foobar.jpg|link=http://example.com/]]
9092 wgNoFollowLinks=false
9094 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9099 Image with link parameter, wgNoFollowDomainExceptions
9101 [[Image:foobar.jpg|link=http://example.com/]]
9103 wgNoFollowDomainExceptions='example.com'
9105 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9110 Image with link parameter, wgExternalLinkTarget, unnamed parameter
9112 [[Image:foobar.jpg|link=http://example.com/|Title]]
9114 wgExternalLinkTarget='foobar'
9116 <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>
9121 Image with empty link parameter (php)
9125 [[File:Foobar.jpg|link=]]
9127 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
9132 Image with empty link parameter (parsoid)
9136 [[File:Foobar.jpg|link=]]
9138 <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>
9142 Image with link parameter (wiki target) and unnamed parameter (php)
9146 [[File:Foobar.jpg|link=Main Page|Title]]
9148 <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>
9153 Image with link parameter (wiki target) and unnamed parameter (parsoid)
9157 [[File:Foobar.jpg|link=Main Page|Title]]
9159 <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>
9163 Image with link parameter (URL target) and unnamed parameter (php)
9167 [[File:Foobar.jpg|link=http://example.com/|Title]]
9169 <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>
9174 Image with link parameter (URL target) and unnamed parameter (parsoid)
9178 [[File:Foobar.jpg|link=http://example.com/|Title]]
9180 <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>
9184 Thumbnail image with link parameter
9188 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
9190 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="http://example.com/"><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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
9195 Manually-specified thumbnail image
9199 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
9201 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
9206 Manually-specified thumbnail image with explicit link to wiki page
9210 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
9212 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
9217 Manually-specified thumbnail image with explicit link to url
9221 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
9223 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
9228 Manually-specified thumbnail image with explicit no link
9232 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
9234 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
9239 Manually-specified thumbnail image with explicit link and alt text
9243 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
9245 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
9250 Image with frame and link
9252 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
9254 <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>
9259 Image with frame and link and explicit alt
9261 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
9263 <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>
9268 Image with wiki markup in implicit alt
9270 [[Image:Foobar.jpg|testing '''bold''' in alt]]
9272 <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>
9277 Image with wiki markup in explicit alt
9279 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
9281 <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>
9286 Link to image page- image page normally doesn't exists, hence edit link
9287 Add test with existing image page
9288 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
9292 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
9297 bug 18784 Link to non-existent image page with caption should use caption as link text
9299 [[:Image:test|caption]]
9301 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
9306 Frameless image caption with a free URL
9308 [[Image:foobar.jpg|http://example.com]]
9310 <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>
9315 Thumbnail image caption with a free URL
9317 [[Image:foobar.jpg|thumb|http://example.com]]
9319 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
9324 Thumbnail image caption with a free URL and explicit alt
9326 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
9328 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" 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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
9333 SVG thumbnails with no language set
9336 [[File:Foobar.svg|thumb|width=200]]
9338 <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="180" 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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>width=200</div></div></div>
9343 SVG thumbnails with language de
9346 [[File:Foobar.svg|thumb|width=200|lang=de]]
9348 <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="180" 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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>width=200</div></div></div>
9353 SVG thumbnails with invalid language code
9356 [[File:Foobar.svg|thumb|width=200|lang=invalid.language.code]]
9358 <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="180" 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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>lang=invalid.language.code</div></div></div>
9363 BUG 1887: A ISBN with a thumbnail
9365 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
9367 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
9372 BUG 1887: A RFC with a thumbnail
9374 [[Image:foobar.jpg|thumb|This is RFC 12354]]
9376 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
9381 BUG 1887: A mailto link with a thumbnail
9383 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
9385 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
9389 # Pending resolution to bug 368
9391 BUG 648: Frameless image caption with a link
9393 [[Image:foobar.jpg|text with a [[link]] in it]]
9395 <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>
9400 BUG 648: Frameless image caption with a link (suffix)
9402 [[Image:foobar.jpg|text with a [[link]]foo in it]]
9404 <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>
9409 BUG 648: Frameless image caption with an interwiki link
9411 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
9413 <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>
9418 BUG 648: Frameless image caption with a piped interwiki link
9420 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
9422 <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>
9427 Escape HTML special chars in image alt text
9429 [[Image:foobar.jpg|& < > "]]
9431 <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>
9436 BUG 499: Alt text should have Ӓ, not &1234;
9438 [[Image:foobar.jpg|♀]]
9440 <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>
9445 Broken image caption with link
9447 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
9449 <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.
9454 Image caption containing another image
9456 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
9458 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is a caption with another <a href="/index.php?title=Special:Upload&wpDestFile=Icon.png" class="new" title="File:Icon.png">image</a> inside it!</div></div></div>
9463 Image caption containing a newline
9465 [[Image:Foobar.jpg|This
9468 <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>
9473 Parsoid: Image caption containing leading space
9474 (The leading space should not trigger nowiki escaping in wt2wt mode)
9476 [[Image:Foobar.jpg|thumb| bar]]
9478 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>bar</div></div></div>
9483 Bug 3090: External links other than http: in image captions
9485 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
9487 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></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>
9494 [[Image:foobar.jpg|a|class=b]]
9496 <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>
9501 Localized image handling (1).
9505 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
9507 <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>
9512 Localized image handling (2).
9516 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
9518 <div class="thumb tleft"><div class="thumbinner" style="width:182px;"><a href="/wiki/Foo" title="Foo"><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/Archivo:Foobar.jpg" class="internal" title="Aumentar"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>caption</div></div></div>
9523 "border", "frameless" and "class" attributes on an image.
9525 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
9527 <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" class="extra thumbborder" 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>
9534 #REDIRECT [[File:Barfoo.jpg]]
9540 [[Image:Barfoo.jpg]]
9542 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
9547 Missing image with uploads disabled
9551 [[Image:Foobaz.jpg]]
9553 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
9557 # Parsoid-specific testing for images
9558 # http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
9559 # Currently imperfect due to a flaw in the Parsoid testrunner
9561 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
9565 Parsoid-specific image handling - simple image with size and middle alignment
9569 [[Image:Foobar.jpg|50px|middle]]
9572 <span class="mw-valign-middle" typeof="mw:Image">
9573 <a href="File:Foobar.jpg">
9574 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
9581 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
9585 [[Image:Foobar.jpg|500x10px|baseline|caption]]
9588 <span class="mw-valign-baseline" typeof="mw:Image" data-mw="{"caption":"caption"}">
9589 <a href="File:Foobar.jpg">
9590 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/89px-Foobar.jpg" height="10" width="89">
9597 Parsoid-specific image handling - simple image with border and size spec
9601 [[Image:Foobar.jpg|50px|border|caption]]
9604 <span class="mw-image-border" typeof="mw:Image" data-mw="{"caption":"caption"}">
9605 <a href="File:Foobar.jpg">
9606 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
9613 Parsoid-specific image handling - thumbnail with halign, valign, and caption
9617 [[Image:Foobar.jpg|thumb|left|baseline|caption content]]
9619 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
9620 <a href="File:Foobar.jpg">
9621 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="21" width="180" />
9623 <figcaption>caption content</figcaption>
9628 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
9632 [[Image:Foobar.jpg|thumb|50x50px|right|middle|caption]]
9634 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
9635 <a href="File:Foobar.jpg">
9636 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
9638 <figcaption>caption</figcaption>
9643 Parsoid-specific image handling - framed image with specific size and caption
9647 [[Image:Foobar.jpg|500x50px|frame|caption]]
9649 <figure typeof="mw:Image/Frame">
9650 <a href="File:Foobar.jpg">
9651 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9653 <figcaption>caption</figcaption>
9658 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
9662 [[Image:Foobar.jpg|500x50px|frame|left|baseline|caption]]
9664 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
9665 <a href="File:Foobar.jpg">
9666 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9668 <figcaption>caption</figcaption>
9673 Parsoid-specific image handling - frameless image with specific size, border, and caption
9677 [[Image:Foobar.jpg|frameless|500x50px|border|caption]]
9680 <span class="mw-image-border" typeof="mw:Image/Frameless" data-mw="{"caption":"caption"}">
9681 <a href="File:Foobar.jpg">
9682 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9688 #Parsoid-specific image handling - simple image with a formatted caption
9692 #[[Image:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
9695 #<span typeof="mw:Image">
9696 #<a class="mw-default-size" href="Image:Foobar.jpg">
9697 #<img alt="Foobar.jpg" class="mw-default-size" src="http://example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
9708 Subpage test/subpage
9716 subpage title=[[Subpage test]]
9720 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
9725 Subpage noslash link
9727 subpage title=[[Subpage test]]
9731 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
9735 # TODO: make this PHP-parser compatible!
9737 Relative subpage noslash link
9739 parsoid=wt2wt,wt2html,html2html
9740 subpage title=[[Subpage test/1/2/3/4]]
9746 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
9747 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
9750 # TODO: make this PHP-parser compatible!
9752 Parsoid: dot-slash prefixed wikilinks
9754 parsoid=wt2wt,wt2html,html2html
9762 <p><a rel="mw:WikiLink" href="./Foo">foo</a></p>
9763 <p><a rel="mw:WikiLink" href="./Bar">bar</a></p>
9764 <p><a rel="mw:WikiLink" href="./Baz/">baz/</a></p>
9772 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
9777 BUG 561: {{/Subpage}}
9779 subpage title=[[Page]]
9783 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
9791 Category:MediaWiki User's Guide
9799 [[:Category:MediaWiki User's Guide]]
9801 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
9810 [[Category:MediaWiki User's Guide]]
9812 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9816 PAGESINCATEGORY invalid title fatal (r33546 fix)
9818 {{PAGESINCATEGORY:<bogus>}}
9825 Category with different sort key
9829 [[Category:MediaWiki User's Guide|Foo]]
9831 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9835 Category with identical sort key
9839 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
9841 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9845 Category with empty sort key
9850 [[Category:MediaWiki User's Guide|]]
9852 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
9856 Category with empty sort key and parentheses
9861 [[Category:Foo (bar)|]]
9863 [[Category:Foo (bar)|Foo]]
9867 Category with link tail
9872 123[[Category:Foo]]456
9874 123[[Category:Foo]]456
9878 Category with template
9883 [[Category:{{echo|Foo}}]]
9885 [[Category:{{echo|Foo}}]]
9889 Category with template in sort key
9894 [[Category:Foo|{{echo|Bar}}]]
9896 [[Category:Foo|{{echo|Bar}}]]
9900 Category with template in sort key and title
9905 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
9907 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
9911 Category / paragraph interactions
9913 Foo [[Category:Baz]] Bar
9915 Foo [[Category:Baz]]
9923 [[Category:Baz]] Bar
9936 {{echo|[[Category:Baz]]}}
9951 Parsoid: Serialize link to category page with colon escape
9957 [[:Category:Foo|Bar]]
9960 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
9961 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
9966 Parsoid: Link prefix/suffixes aren't applied to category links
9968 parsoid=wt2html,wt2wt,html2html
9973 <p>x<link rel="mw:WikiLink/Category" href="Category:Foo">y</p>
9977 Parsoid: Serialize link to file page with colon escape
9983 [[:File:Foo.png|Bar]]
9986 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
9987 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
9992 Parsoid: Serialize a genuine category link without colon escape
9997 [[Category:Foo|Bar]]
9999 <link rel="mw:WikiLink/Category" href="Category:Foo">
10000 <link rel="mw:WikiLink/Category" href="Category:Foo#Bar">
10004 ### Inter-language links
10007 Inter-language links
10013 [[zh:食品]]
10015 es:Alimento fr:Nourriture zh:食品
10019 Duplicate interlanguage links (bug 24502)
10035 Basic section headings
10042 ===Smaller headline===
10045 <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>
10048 <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>
10051 <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>
10057 Section headings with TOC
10060 === Subheadline 1 ===
10061 ===== Skipping a level =====
10062 ====== Skipping a level ======
10066 ===Another headline===
10068 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10070 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
10072 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
10074 <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>
10076 <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>
10083 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
10085 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
10090 <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>
10091 <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>
10092 <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>
10093 <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>
10094 <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>
10097 <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>
10101 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
10103 Handling of sections up to level 6 and beyond
10106 == Level 2 Heading==
10107 === Level 3 Heading===
10108 ==== Level 4 Heading====
10109 ===== Level 5 Heading=====
10110 ====== Level 6 Heading======
10111 ======= Level 7 Heading=======
10112 ======== Level 8 Heading========
10113 ========= Level 9 Heading=========
10114 ========== Level 10 Heading==========
10116 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10118 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
10120 <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>
10122 <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>
10124 <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>
10126 <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>
10128 <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>
10129 <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>
10130 <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>
10131 <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>
10132 <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>
10145 <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>
10146 <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>
10147 <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>
10148 <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>
10149 <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>
10150 <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>
10151 <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>
10152 <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>
10153 <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>
10154 <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>
10159 TOC regression (bug 9764)
10163 ==== title 1.1.1 ====
10168 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10170 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10172 <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>
10174 <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>
10177 <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>
10180 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
10182 <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>
10187 <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>
10188 <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>
10189 <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>
10190 <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>
10191 <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>
10192 <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>
10197 TOC with wgMaxTocLevel=3 (bug 6204)
10203 ==== title 1.1.1 ====
10208 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10210 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10212 <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>
10213 <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>
10216 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
10218 <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>
10223 <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>
10224 <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>
10225 <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>
10226 <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>
10227 <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>
10228 <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>
10233 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
10239 ====Section 1.1.1====
10240 ====Section 1.1.1.1====
10243 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10245 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
10247 <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>
10250 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
10253 <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>
10254 <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>
10255 <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>
10256 <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>
10257 <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>
10263 Resolving duplicate section names
10268 <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>
10269 <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>
10274 Resolving duplicate section names with differing case (bug 10721)
10279 <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>
10280 <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>
10292 Template with sections, __NOTOC__
10299 <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>
10300 <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>
10301 <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>
10302 <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>
10307 __NOEDITSECTION__ keyword
10313 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
10314 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
10319 Link inside a section heading
10321 ==Section with a [[Main Page|link]] in it==
10323 <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>
10328 TOC regression (bug 12077)
10335 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10337 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10339 <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>
10342 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
10345 <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>
10346 <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>
10347 <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>
10352 BUG 1219 URL next to image (good)
10354 http://example.com [[Image:foobar.jpg]]
10356 <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>
10361 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
10364 The line above must have a trailing space!
10367 But just in case it doesn't...
10369 <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>
10370 <p>The line above must have a trailing space!
10372 <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>
10373 <p>But just in case it doesn't...
10378 Header with special characters (bug 25462)
10380 The tooltips shall not show entities to the user (ie. be double escaped)
10397 <p>The tooltips shall not show entities to the user (ie. be double escaped)
10399 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10401 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
10402 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
10403 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
10404 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
10405 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
10408 <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>
10411 <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>
10414 <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>
10417 <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>
10420 <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>
10426 Headers with excess '=' characters
10427 (Are similar tests necessary beyond the 1st level?)
10431 =''italic'' heading==
10432 ==''italic'' heading=
10434 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10436 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
10437 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
10438 <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>
10439 <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>
10442 <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>
10443 <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>
10444 <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>
10445 <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>
10450 HTML headers vs TOC (bug 23393)
10451 (__NOEDITSECTION__ for clearer output, doesn't matter here)
10463 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10465 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
10467 <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>
10468 <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>
10471 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
10473 <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>
10474 <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>
10479 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
10480 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
10481 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
10482 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
10483 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
10484 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
10489 BUG 1219 URL next to image (broken)
10491 http://example.com[[Image:foobar.jpg]]
10493 <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>
10498 Bug 1186 news: in the middle of text
10500 http://en.wikinews.org/wiki/Wikinews:Workplace
10502 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
10508 Namespaced link must have a title
10517 Namespaced link must have a title (bad fragment version)
10519 [[Project:#fragment]]
10521 <p>[[Project:#fragment]]
10527 ### HTML tags and HTML attributes
10531 div with no attributes
10533 <div>HTML rocks</div>
10535 <div>HTML rocks</div>
10540 div with double-quoted attribute
10542 <div id="rock">HTML rocks</div>
10544 <div id="rock">HTML rocks</div>
10549 div with single-quoted attribute
10551 <div id='rock'>HTML rocks</div>
10553 <div id="rock">HTML rocks</div>
10558 div with unquoted attribute
10560 <div id=rock>HTML rocks</div>
10562 <div id="rock">HTML rocks</div>
10567 div with illegal double attributes
10569 <div id="a" id="b">HTML rocks</div>
10571 <div id="b">HTML rocks</div>
10575 # FIXME: produce empty string instead of "class" in the PHP parser, following
10578 div with empty attribute value, space before equals
10582 <div class =>HTML rocks</div>
10584 <div class="">HTML rocks</div>
10588 # The PHP parser escapes the opening brace to { for some reason, so
10589 # disabled this test for it.
10591 div with braces in attribute value
10595 <div title="{}">Foo</div>
10597 <div title="{}">Foo</div>
10600 # This it very inconsistent in the PHP parser: it returns
10601 # class="class" if there is a space between the name and the equal sign (see
10602 # 'div with empty attribute value, space before equals'), but strips the
10603 # attribute completely if the space is missing. We hope that not much content
10604 # depends on this, so are implementing the behavior below in Parsoid for
10605 # consistencies' sake. Disabled for the PHP parser.
10606 # FIXME: fix this behavior in the PHP parser?
10608 div with empty attribute value, no space before equals
10612 <div class=>HTML rocks</div>
10614 <div class="">HTML rocks</div>
10619 HTML multiple attributes correction
10621 <p class="error" class="awesome">Awesome!</p>
10623 <p class="awesome">Awesome!</p>
10628 Table multiple attributes correction
10631 !+ class="error" class="awesome"| status
10636 <th class="awesome"> status
10644 <DIV ID="x">HTML ROCKS</DIV>
10646 <div id="x">HTML ROCKS</div>
10651 Non-ASCII pseudo-tags are rendered as text
10660 Pseudo-tag with URL 'name' renders as url link
10662 <http://example.com/>
10664 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
10669 text with amp in the middle of nowhere
10673 <p>Remember AT&T?
10678 text with character entity: eacute
10680 I always thought é was a cute letter.
10682 <p>I always thought é was a cute letter.
10687 text with entity-escaped character entity-like string: eacute
10689 I always thought &eacute; was a cute letter.
10691 <p>I always thought &eacute; was a cute letter.
10696 text with undefined character entity: xacute
10698 I always thought &xacute; was a cute letter.
10700 <p>I always thought &xacute; was a cute letter.
10706 ### Nesting tests (see bug 41545, 50604, 51081)
10709 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
10710 # Note that html2wt is considerably more difficult if we use <b> in
10711 # the test case, instead of <big>
10713 Ensure that HTML adoption agency algorithm is properly implemented.
10715 <big>X<big>Y</big>Z</big>
10717 <p><big>X<big>Y</big>Z</big>
10721 # This was bug 41545 in the PHP parser.
10725 <kbd>X<kbd>Y</kbd>Z</kbd>
10727 <p><kbd>X<kbd>Y</kbd>Z</kbd>
10731 # The following cases were bug 51081 in the PHP parser.
10732 # Note that there are some other nestable tags (b, i, etc) which are
10733 # not covered; see bug 51081 for discussion.
10737 <em>X<em>Y</em>Z</em>
10739 <p><em>X<em>Y</em>Z</em>
10744 Nesting of <strong>
10746 <strong>X<strong>Y</strong>Z</strong>
10748 <p><strong>X<strong>Y</strong>Z</strong>
10757 <p><q>X<q>Y</q>Z</q>
10764 <ruby>X<ruby>Y</ruby>Z</ruby>
10766 <p><ruby>X<ruby>Y</ruby>Z</ruby>
10773 <bdo>X<bdo>Y</bdo>Z</bdo>
10775 <p><bdo>X<bdo>Y</bdo>Z</bdo>
10787 [[Media:Foobar.jpg]]
10789 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
10794 Media link with text
10796 [[Media:Foobar.jpg|A neat file to look at]]
10798 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
10802 # FIXME: this is still bad HTML tag nesting
10804 Media link with nasty text
10805 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
10807 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
10809 <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>
10814 Media link to nonexistent file (bug 1702)
10816 [[Media:No such.jpg]]
10818 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
10823 Image link to nonexistent file (bug 1850 - good)
10825 [[Image:No such.jpg]]
10827 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
10832 :Image link to nonexistent file (bug 1850 - bad)
10834 [[:Image:No such.jpg]]
10836 <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>
10843 Character reference normalization in link text (bug 1938)
10845 [[Main Page|this&that]]
10847 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
10854 Test for unicode normalization
10856 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
10860 (bug 19451) Links should refer to the normalized form.
10868 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10869 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10870 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10871 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10872 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10877 Empty attribute crash test (bug 2067)
10879 <font color="">foo</font>
10881 <p><font color="">foo</font>
10886 Empty attribute crash test single-quotes (bug 2067)
10888 <font color=''>foo</font>
10890 <p><font color="">foo</font>
10895 Attribute test: equals, then nothing
10897 <font color=>foo</font>
10899 <p><font>foo</font>
10904 Attribute test: unquoted value
10906 <font color=x>foo</font>
10908 <p><font color="x">foo</font>
10913 Attribute test: unquoted but illegal value (hash)
10915 <font color=#x>foo</font>
10917 <p><font color="#x">foo</font>
10922 Attribute test: no value
10924 <font color>foo</font>
10926 <p><font color="color">foo</font>
10931 Bug 2095: link with three closing brackets
10935 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
10940 Bug 2095: link with pipe and three closing brackets
10942 [[Main Page|link]]]
10944 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
10949 Bug 2095: link with pipe and three closing brackets, version 2
10951 [[Main Page|[http://example.com/]]]
10953 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
10963 Template:Dangerous attribute
10965 " onmouseover="alert(document.cookie)
10969 Template:Dangerous style attribute
10971 border-size: expression(alert(document.cookie))
10977 <div style="float: right; {{{1}}}">Magic div</div>
10981 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
10983 <div title="{{test}}"></div>
10985 <div title="This is a test template"></div>
10990 Bug 2304: HTML attribute safety (dangerous template; 2309)
10992 <div title="{{dangerous attribute}}"></div>
10994 <div title=""></div>
10999 Bug 2304: HTML attribute safety (dangerous style template; 2309)
11001 <div style="{{dangerous style attribute}}"></div>
11003 <div style="/* insecure input */"></div>
11008 Bug 2304: HTML attribute safety (safe parameter; 2309)
11010 {{div style|width: 200px}}
11012 <div style="float: right; width: 200px">Magic div</div>
11017 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
11019 {{div style|width: expression(alert(document.cookie))}}
11021 <div style="/* insecure input */">Magic div</div>
11026 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
11028 {{div style|"><script>alert(document.cookie)</script>}}
11030 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
11035 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
11037 {{div style|" ><script>alert(document.cookie)</script>}}
11039 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
11044 Bug 2304: HTML attribute safety (link)
11046 <div title="[[Main Page]]"></div>
11048 <div title="[[Main Page]]"></div>
11053 Bug 2304: HTML attribute safety (italics)
11055 <div title="''foobar''"></div>
11057 <div title="''foobar''"></div>
11062 Bug 2304: HTML attribute safety (bold)
11064 <div title="'''foobar'''"></div>
11066 <div title="'''foobar'''"></div>
11072 Bug 2304: HTML attribute safety (ISBN)
11074 <div title="ISBN 1234567890"></div>
11076 <div title="ISBN 1234567890"></div>
11081 Bug 2304: HTML attribute safety (RFC)
11083 <div title="RFC 1234"></div>
11085 <div title="RFC 1234"></div>
11090 Bug 2304: HTML attribute safety (PMID)
11092 <div title="PMID 1234567890"></div>
11094 <div title="PMID 1234567890"></div>
11099 Bug 2304: HTML attribute safety (web link)
11101 <div title="http://example.com/"></div>
11103 <div title="http://example.com/"></div>
11108 Bug 2304: HTML attribute safety (named web link)
11110 <div title="[http://example.com/ link]"></div>
11112 <div title="[http://example.com/ link]"></div>
11117 Bug 3244: HTML attribute safety (extension; safe)
11119 <div style="<nowiki>background:blue</nowiki>"></div>
11121 <div style="background:blue"></div>
11126 Bug 3244: HTML attribute safety (extension; unsafe)
11128 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
11130 <div style="/* insecure input */"></div>
11134 # More MSIE fun discovered by Tom Gilder
11137 MSIE CSS safety test: spurious slash
11139 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
11141 <div style="/* insecure input */">evil</div>
11146 MSIE CSS safety test: hex code
11148 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
11150 <div style="/* insecure input */">evil</div>
11155 MSIE CSS safety test: comment in url
11157 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
11159 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
11164 MSIE CSS safety test: comment in expression
11166 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
11168 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
11174 Table attribute legitimate extension
11177 !+ style="<nowiki>color:blue</nowiki>"| status
11182 <th style="color:blue"> status
11188 Table attribute safety
11191 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
11196 <th style="/* insecure input */"> status
11202 CSS line continuation 1
11204 <div style="background-image: u\ rl(test.jpg);"></div>
11206 <div style="/* insecure input */"></div>
11211 CSS line continuation 2
11213 <div style="background-image: u\ rl(test.jpg); "></div>
11215 <div style="/* insecure input */"></div>
11226 Expansion of multi-line templates in attribute values (bug 6255)
11228 <div style="background: {{identity|#00FF00}}">-</div>
11230 <div style="background: #00FF00">-</div>
11236 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
11238 <div style="background:
11241 <div style="background: #00FF00">-</div>
11246 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
11248 <div style="background: #00FF00">-</div>
11250 <div style="background: #00FF00">-</div>
11255 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
11258 Parser hook: empty input
11271 Parser hook: empty input using terminated empty elements
11284 Parser hook: empty input using terminated empty elements (space before)
11297 Parser hook: basic input
11311 Parser hook: case insensitive
11325 Parser hook: case insensitive, redux
11338 Parser hook: nested tags
11342 <tag><tag></tag></tag>
11353 Parser hook: basic arguments
11355 <tag width=200 height = "100" depth = '50' square></tag>
11363 'square' => 'square',
11370 Parser hook: argument containing a forward slash (bug 5344)
11372 <tag filename='/tmp/bla'></tag>
11377 'filename' => '/tmp/bla',
11384 Parser hook: empty input using terminated empty elements (bug 2374)
11397 # </tag> should be output literally since there is no matching tag that begins it
11399 Parser hook: basic arguments using terminated empty elements (bug 2374)
11401 <tag width=200 height = "100" depth = '50' square/>
11411 'square' => 'square',
11420 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
11424 Parser hook: static parser hook not inside a comment
11426 <statictag>hello, world</statictag>
11427 <statictag action=flush/>
11435 Parser hook: static parser hook inside a comment
11437 <!-- <statictag>hello, world</statictag> -->
11438 <statictag action=flush/>
11444 # Nested template calls; this case was broken by Parser.php rev 1.506,
11448 Template:One-parameter
11450 (My parameter is: {{{1}}})
11454 Template:Map-one-parameter
11456 {{{{{1}}}|{{{2}}}}}
11460 Nested template calls
11462 {{Map-one-parameter|One-parameter|param}}
11464 <p>(My parameter is: param)
11473 Sanitizer: Closing of open tags
11475 <s></s><table></table>
11477 <s></s><table></table>
11482 Sanitizer: Closing of open but not closed tags
11491 Sanitizer: Closing of closed but not open tags
11500 Sanitizer: Closing of closed but not open table tags
11502 Table not started</td></tr></table>
11504 <p>Table not started</td></tr></table>
11509 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
11511 <span id="æ: v">byte</span>[[#æ: v|backlink]]
11513 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
11518 Sanitizer: Validating the contents of the id attribute (bug 4515)
11524 Something, but definitely not <br id="9" />...
11528 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
11532 <br id="foo" /><br id="foo" />
11534 Something need to be done. foo-2 ?
11538 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
11541 <meta itemprop="hello" content="world">
11542 <meta http-equiv="refresh" content="5">
11543 <meta itemprop="hello" http-equiv="refresh" content="5">
11544 <link itemprop="hello" href="{{SERVER}}">
11545 <link rel="stylesheet" href="{{SERVER}}">
11546 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
11549 <div itemscope="itemscope">
11550 <p> <meta itemprop="hello" content="world" />
11551 <meta http-equiv="refresh" content="5">
11552 <meta itemprop="hello" content="5" />
11554 <link itemprop="hello" href="http://example.org" />
11555 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
11556 <link itemprop="hello" href="http://example.org" />
11562 Language converter: output gets cut off unexpectedly (bug 5757)
11566 this bit is safe: }-
11568 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
11570 then we get cut off here: }-
11572 all additional text is vanished
11574 <p>this bit is safe: }-
11575 </p><p>but if we add a conversion instance: xxx
11576 </p><p>then we get cut off here: }-
11577 </p><p>all additional text is vanished
11582 Self closed html pairs (bug 5487)
11585 <center><font id="bug" />Centered text</center>
11586 <div><font id="bug2" />In div text</div>
11588 <center><font id="bug" />Centered text</center>
11589 <div><font id="bug2" />In div text</div>
11598 Punctuation: nbsp before exclamation
11602 <p>C'est grave !
11607 Punctuation: CSS !important (bug 11874)
11609 <div style="width:50% !important">important</div>
11611 <div style="width:50% !important">important</div>
11616 Punctuation: CSS ! important (bug 11874; with space after)
11618 <div style="width:50% ! important">important</div>
11620 <div style="width:50% ! important">important</div>
11626 HTML bullet list, closed tags (bug 5497)
11641 HTML bullet list, unclosed tags (bug 5497)
11658 HTML ordered list, closed tags (bug 5497)
11673 HTML ordered list, unclosed tags (bug 5497)
11690 HTML nested bullet list, closed tags (bug 5497)
11715 HTML nested bullet list, open tags (bug 5497)
11740 HTML nested ordered list, closed tags (bug 5497)
11765 HTML nested ordered list, open tags (bug 5497)
11790 HTML ordered list item with parameters oddity
11792 <ol><li id="fragment">One</li></ol>
11794 <ol><li id="fragment">One</li></ol>
11799 bug 5918: autonumbering
11801 [http://first/] [http://second] [ftp://ftp]
11805 [mailto:enclosed@mail.tld With target]
11807 [mailto:enclosed@mail.tld]
11809 mailto:inline@mail.tld
11811 <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>
11812 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
11813 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
11814 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
11815 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
11821 # Security and HTML correctness
11822 # From Nick Jenkins' fuzz testing
11826 Fuzz testing: Parser13
11841 Fuzz testing: Parser14
11846 <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>
11847 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11849 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
11856 Fuzz testing: Parser14-table
11861 <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>
11862 <table style="__TOC__">
11868 # Known to produce bogus xml (extra </td>)
11870 Fuzz testing: Parser16
11890 Fuzz testing: Parser21
11893 ! irc://{{ftp://a" onmouseover="alert('hello world');"
11898 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
11908 Fuzz testing: Parser22
11910 http://===r:::https://b
11914 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
11922 # Known to produce bad XML for now
11924 Fuzz testing: Parser24
11931 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
11932 <br style="onmouseover='alert(document.cookie);' " />
11934 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
11939 <u class="|">}}}} >
11940 <br style="onmouseover='alert(document.cookie);'" />
11942 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
11951 # Note: the current result listed for this is not what the original one was,
11952 # but the original bug was JavaScript injection, which is fixed in any case.
11953 # It's not clear that the original result listed was any more correct than the
11954 # current one. Original result:
11957 # <li class="||">
11958 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
11960 Fuzz testing: Parser25 (bug 6055)
11966 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
11968 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
11973 Fuzz testing: URL adjacent extension (with space, clean)
11976 http://example.com <nowiki>junk</nowiki>
11978 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
11983 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
11986 http://example.com<nowiki>junk</nowiki>
11988 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
11993 Fuzz testing: URL adjacent extension (no space, dirty; pre)
11996 http://example.com<pre>junk</pre>
11998 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
12003 Fuzz testing: image with bogus manual thumbnail
12005 [[Image:foobar.jpg|thumbnail= ]]
12007 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
12012 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
12014 <pre dir=" "></pre>
12016 <pre dir=" "></pre>
12021 Parsing optional HTML elements (Bug 6171)
12026 <td> Some tabular data</td>
12027 <td> More tabular data ...
12028 <td> And yet som tabular data</td>
12034 <td> Some tabular data</td>
12035 <td> More tabular data ...
12036 </td><td> And yet som tabular data</td>
12043 Correct handling of <td>, <tr> (Bug 6171)
12048 <td> Some tabular data</td>
12049 <td> More tabular data ...</td>
12050 <td> And yet som tabular data</td>
12056 <td> Some tabular data</td>
12057 <td> More tabular data ...</td>
12058 <td> And yet som tabular data</td>
12066 Parsing crashing regression (fr:JavaScript)
12070 <p></body></x>
12075 Inline wiki vs wiki block nesting
12081 <p><b>Bold paragraph</b>
12082 </p><p>New wiki paragraph
12087 Inline HTML vs wiki block nesting
12095 <p><b>Bold paragraph</b>
12096 </p><p>New wiki paragraph
12100 # Original result was this:
12101 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
12103 # While that might be marginally more intuitive, maybe, the six-apostrophe
12104 # construct is clearly pathological and the result stated here (which is what
12105 # the parser actually does) is about as reasonable as anything.
12107 Mixing markup for italics and bold
12110 '''bold''''''bold''bolditalics'''''
12112 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
12120 Article for special page transclusion test
12124 Special page transclusion
12127 {{Special:Prefixindex/Xyzzyx}}
12129 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
12134 Special page transclusion twice (bug 5021)
12137 {{Special:Prefixindex/Xyzzyx}}
12138 {{Special:Prefixindex/Xyzzyx}}
12140 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
12141 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
12146 Transclusion of default MediaWiki message
12148 {{MediaWiki:Mainpage}}
12155 Transclusion of nonexistent MediaWiki message
12157 {{MediaWiki:Mainpagexxx}}
12159 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
12164 Transclusion of MediaWiki message with underscore
12166 {{MediaWiki:history_short}}
12173 Transclusion of MediaWiki message with space
12175 {{MediaWiki:history short}}
12182 Invalid header with following text
12192 Section extraction test (section 0)
12212 Section extraction test (section 1)
12234 Section extraction test (section 2)
12255 Section extraction test (section 3)
12275 Section extraction test (section 4)
12299 Section extraction test (section 5)
12319 Section extraction test (section 6)
12340 Section extraction test (section 7)
12360 Section extraction test (section 8)
12380 Section extraction test (section 9)
12401 Section extraction test (section 10)
12421 Section extraction test (nonexistent section 11)
12440 Section extraction test with bogus heading (section 1)
12445 ==bogus== not a legal section
12449 ==bogus== not a legal section
12453 Section extraction test with bogus heading (section 2)
12458 ==bogus== not a legal section
12465 Section extraction test with comment after heading (section 1)
12477 Section extraction test with comment after heading (section 2)
12489 Section extraction test with bogus <nowiki> heading (section 1)
12494 ==bogus== <nowiki>not a legal section</nowiki>
12498 ==bogus== <nowiki>not a legal section</nowiki>
12502 Section extraction test with bogus <nowiki> heading (section 2)
12507 ==bogus== <nowiki>not a legal section</nowiki>
12514 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
12515 # instead of respecting commented sections
12517 Section extraction prefixed by comment (section 1)
12528 Section extraction prefixed by comment (section 2)
12539 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
12540 # instead of respecting HTML-style headings
12542 Section extraction, mixed wiki and html (section 1)
12558 Section extraction, mixed wiki and html (section 2)
12574 # Formerly testing for bug 3342
12576 Section extraction, heading surrounded by <noinclude>
12580 <noinclude>==unmarked==</noinclude>
12586 # Test behavior of bug 19910
12588 Sectiion with all-equals
12593 The line above must have a trailing space
12596 But just in case it doesn't...
12600 But just in case it doesn't...
12604 Section replacement test (section 0)
12635 Section replacement test (section 1)
12664 Section replacement test (section 2)
12694 Section replacement test (section 3)
12725 Section replacement test (section 4)
12752 Section replacement test (section 5)
12783 Section replacement test (section 6)
12813 Section replacement test (section 7)
12844 Section replacement test (section 8)
12875 Section replacement test (section 9)
12904 Section replacement test (section 10)
12934 Section replacement test with initial whitespace (bug 13728)
12938 Preformatted initial line
12942 Preformatted initial line
12949 Section extraction, heading followed by pre with 20 spaces (bug 6398)
12961 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
12974 Section extraction, <pre> around bogus header (bug 10309)
12991 Section replacement, <pre> around bogus header (bug 10309)
12993 noxml replace=2,"xxx"
13014 Handling of 
 in URLs
13018 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
13025 5 quotes, code coverage +1 line (php)
13032 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
13034 5 quotes, code coverage +1 line (parsoid)
13040 <p><b><i></i></b></p>
13044 Special:Search page linking.
13048 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
13055 title=[[Parser test]]
13060 * {{FULLPAGENAMEE}}
13062 * {{BASEPAGENAMEE}}
13066 * {{ROOTPAGENAMEE}}
13068 * {{TALKPAGENAMEE}}
13069 * {{SUBJECTPAGENAME}}
13070 * {{SUBJECTPAGENAMEE}}
13073 * {{NAMESPACENUMBER}}
13077 * {{SUBJECTSPACEE}}
13078 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
13080 <ul><li> Parser test
13081 </li><li> Parser_test
13082 </li><li> Parser test
13083 </li><li> Parser_test
13084 </li><li> Parser test
13085 </li><li> Parser_test
13086 </li><li> Parser test
13087 </li><li> Parser_test
13088 </li><li> Parser test
13089 </li><li> Parser_test
13090 </li><li> Talk:Parser test
13091 </li><li> Talk:Parser_test
13092 </li><li> Parser test
13093 </li><li> Parser_test
13101 </li><li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a>
13105 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
13115 image4 |300px| centre
13116 image5.svg| http://///////
13121 <ul class="gallery mw-gallery-traditional">
13122 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13123 <div class="thumb" style="height: 150px;">Image1.png</div>
13124 <div class="gallerytext">
13127 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13128 <div class="thumb" style="height: 150px;">Image2.gif</div>
13129 <div class="gallerytext">
13134 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13135 <div class="thumb" style="height: 150px;">Image3</div>
13136 <div class="gallerytext">
13139 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13140 <div class="thumb" style="height: 150px;">Image4</div>
13141 <div class="gallerytext">
13146 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13147 <div class="thumb" style="height: 150px;">Image5.svg</div>
13148 <div class="gallerytext">
13149 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
13153 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13154 <div class="thumb" style="height: 150px;">* image6</div>
13155 <div class="gallerytext">
13163 Gallery (with options)
13165 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
13166 File:Nonexistant.jpg|caption
13167 File:Nonexistant.jpg
13168 image:foobar.jpg|some '''caption''' [[Main Page]]
13170 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
13173 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
13174 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
13175 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13176 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
13177 <div class="gallerytext">
13182 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13183 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
13184 <div class="gallerytext">
13187 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13188 <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>
13189 <div class="gallerytext">
13190 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13194 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13195 <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>
13196 <div class="gallerytext">
13199 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13200 <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>
13201 <div class="gallerytext">
13211 Gallery with wikitext inside caption
13214 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
13215 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
13218 <ul class="gallery mw-gallery-traditional">
13219 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13220 <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>
13221 <div class="gallerytext">
13222 <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>
13226 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13227 <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>
13228 <div class="gallerytext">
13229 <p>This is a test template
13238 gallery (with showfilename option)
13240 <gallery showfilename>
13241 File:Nonexistant.jpg|caption
13242 File:Nonexistant.jpg
13243 image:foobar.jpg|some '''caption''' [[Main Page]]
13247 <ul class="gallery mw-gallery-traditional">
13248 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13249 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13250 <div class="gallerytext">
13251 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
13256 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13257 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13258 <div class="gallerytext">
13259 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
13263 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13264 <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>
13265 <div class="gallerytext">
13266 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
13267 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13271 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13272 <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>
13273 <div class="gallerytext">
13274 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
13283 Gallery (with namespace-less filenames)
13286 File:Nonexistant.jpg
13292 <ul class="gallery mw-gallery-traditional">
13293 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13294 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13295 <div class="gallerytext">
13298 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13299 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13300 <div class="gallerytext">
13303 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13304 <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>
13305 <div class="gallerytext">
13308 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13309 <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>
13310 <div class="gallerytext">
13318 HTML Hex character encoding (spells the word "JavaScript")
13320 JavaScript
13322 <p>JavaScript
13327 HTML Hex character encoding bogus encoding (bug 26437 regression check)
13331 <p>&#xsee;&#XSEE;
13336 HTML Hex character encoding mixed case
13345 __FORCETOC__ override
13357 ISBN 978-0-1234-56 789
13359 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
13364 ISBN followed by 5 spaces
13375 ISBN ISBN 1234567890
13377 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
13382 Bug 22905: <abbr> followed by ISBN followed by </a>
13384 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
13386 <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>
13395 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
13400 Double RFC with a wiki link
13404 <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>
13413 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
13418 Centre-aligned image
13420 [[Image:foobar.jpg|centre]]
13422 <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>
13429 [[Image:foobar.jpg|none]]
13431 <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>
13436 Width + Height sized image (using px) (height is ignored)
13438 [[Image:foobar.jpg|640x480px]]
13440 <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>
13445 Width-sized image (using px, no following whitespace)
13447 [[Image:foobar.jpg|640px]]
13449 <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>
13454 Width-sized image (using px, with following whitespace - test regression from r39467)
13456 [[Image:foobar.jpg|640px ]]
13458 <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>
13463 Width-sized image (using px, with preceding whitespace - test regression from r39467)
13465 [[Image:foobar.jpg| 640px]]
13467 <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>
13472 Another italics / bold test
13480 # Note the results may be incorrect, as parserTest output included this:
13481 # XML error: Mismatched tag at byte 6120:
13482 # ...<dd> </dt></dl> </dd...
13490 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
13501 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
13503 Images with the "|" character in the comment
13505 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
13507 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div>
13512 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
13514 <html><script>alert(1);</script></html>
13516 <p><html><script>alert(1);</script></html>
13521 HTML with raw HTML ($wgRawHtml==true)
13525 <html><script>alert(1);</script></html>
13527 <p><script>alert(1);</script>
13532 Parents of subpages, one level up
13534 subpage title=[[Subpage test/L1/L2/L3]]
13538 <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>
13544 Parents of subpages, one level up, not named
13546 subpage title=[[Subpage test/L1/L2/L3]]
13550 <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>
13557 Parents of subpages, two levels up
13559 subpage title=[[Subpage test/L1/L2/L3]]
13565 <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
13566 </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>
13571 Parents of subpages, two levels up, without trailing slash or name.
13573 subpage title=[[Subpage test/L1/L2/L3]]
13582 Parents of subpages, two levels up, with lots of extra trailing slashes.
13584 subpage title=[[Subpage test/L1/L2/L3]]
13588 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
13593 Subpage test/L1/L2/L3Sibling
13599 Transclusion of a sibling page (one level up)
13601 subpage title=[[Subpage test/L1/L2/L3]]
13610 Transclusion of a child page
13612 subpage title=[[Subpage test/L1/L2]]
13621 Non-transclusion because of too many up levels
13623 subpage title=[[Subpage test/L1/L2/L3]]
13625 {{../../../../More than parent}}
13627 <p>{{../../../../More than parent}}
13632 Definition list code coverage
13638 <dl><dt> title  </dt><dd> def
13639 </dd><dt> title </dt><dd> def
13640 </dd><dt>title</dt><dd> def
13646 Don't fall for the self-closing div
13648 <div>hello world</div/>
13650 <div>hello world</div>
13659 <p>[[:Template:Msg]]
13668 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
13672 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
13674 Always escape literal '>' in output, not just after '<'
13688 <p>This is a test template
13689 This is a test template
13701 Inclusion of !userCanEdit() content
13705 <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>
13711 Out-of-order TOC heading levels
13720 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13722 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
13724 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
13725 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
13728 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
13730 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
13731 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
13736 <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>
13737 <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>
13738 <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>
13739 <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>
13740 <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>
13741 <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>
13747 ISBN with a dummy number
13757 ISBN with space-delimited number
13761 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
13767 ISBN with multiple spaces, no number
13786 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
13787 </p><p>ISBN 12345678901
13793 ISBN with trailing year (bug 8110)
13795 ISBN 1-234-56789-0 - 2006
13797 ISBN 1 234 56789 0 - 2006
13799 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
13800 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
13808 {{anchorencode:foo bar©#%n}}
13810 <p>foo_bar.C2.A9.23.25n
13815 anchorencode trims spaces
13817 {{anchorencode: __pretty__please__}}
13824 anchorencode deals with links
13826 {{anchorencode: [[hello|world]] [[hi]]}}
13833 anchorencode deals with templates
13835 {{anchorencode: {{Foo}} }}
13842 anchorencode encodes like the TOC generator: (bug 18431)
13844 === _ +:.3A%3A&&]] ===
13845 {{anchorencode: _ +:.3A%3A&&]] }}
13848 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
13849 <p>.2B:.3A.253A.26.26.5D.5D
13854 Bug 6200: blockquotes and paragraph formatting
13875 Bug 8293: Use of center tag ruins paragraph formatting
13896 Parsing of overlapping (improperly nested) inline html tags (PHP parser)
13900 <span><s>x</span></s>
13902 <p><span><s>x</span></s></span>
13907 Parsing of overlapping (improperly nested) inline html tags (Parsoid)
13911 <span><s>x</span></s>
13913 <p><span><s>x</s></span><s></s>
13918 ### Language variants related tests
13921 Self-link in language variants
13923 title=[[Dunav]] language=sr
13925 Both [[Dunav]] and [[Дунав]] are names for this river.
13927 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
13938 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
13940 title=[[Duna]] language=sr
13942 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
13944 <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.
13949 Link to pages in language variants
13953 Main Page can be written as [[Маин Паге]]
13955 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
13961 Multiple links to pages in language variants
13965 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
13967 <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>.
13973 Simple template in language variants
13979 <p>This is a test template
13985 Template with explicit namespace in language variants
13991 <p>This is a test template
13997 Basic test for template parameter in language variants
14001 {{парамтест|param=foo}}
14003 <p>This is a test template with parameter foo
14009 Simple category in language variants
14013 [[Category:МедиаWики Усер'с Гуиде]]
14015 <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>
14032 Don't convert blue categorylinks to another variant (bug 33210)
14036 [[A]][[Category:分类]]
14038 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
14043 Stripping -{}- tags (language variants)
14047 Latin proverb: -{Ne nuntium necare}-
14049 <p>Latin proverb: Ne nuntium necare
14055 Prevent conversion with -{}- tags (language variants)
14057 language=sr variant=sr-ec
14059 Latinski: -{Ne nuntium necare}-
14061 <p>Латински: Ne nuntium necare
14067 Prevent conversion of text with -{}- tags (language variants)
14069 language=sr variant=sr-ec
14071 Latinski: -{Ne nuntium necare}-
14073 <p>Латински: Ne nuntium necare
14079 Prevent conversion of links with -{}- tags (language variants)
14081 language=sr variant=sr-ec
14085 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
14091 -{}- tags within headlines (within html for parserConvert())
14093 language=sr variant=sr-ec
14097 <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>
14103 Explicit definition of language variant alternatives
14105 language=zh variant=zh-tw
14107 -{zh:China;zh-tw:Taiwan}-, not China
14109 <p>Taiwan, not China
14115 Conversion around HTML tags
14117 language=sr variant=sr-ec
14119 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
14120 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
14123 <span title="ЛаCтин">ски</span>
14129 Explicit session-wise language variant mapping (A flag and - flag)
14131 language=zh variant=zh-tw
14133 Taiwan is not China.
14134 But -{A|zh:China;zh-tw:Taiwan}- is China,
14135 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
14136 and -{China}- is China.
14138 <p>Taiwan is not China.
14139 But Taiwan is Taiwan,
14140 (This should be stripped!)
14141 and China is China.
14146 Explicit session-wise language variant mapping (H flag for hide)
14148 language=zh variant=zh-tw
14150 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
14153 <p>(This should be stripped!)
14159 Adding explicit conversion rule for title (T flag)
14161 language=zh variant=zh-tw showtitle
14163 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
14166 <p>Should be stripped!
14171 Testing that changing the language variant here in the tests actually works
14173 language=zh variant=zh showtitle
14175 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
14178 <p>Should be stripped!
14183 Recursive conversion of alt and title attrs shouldn't clear converter state
14185 language=zh variant=zh-cn showtitle
14187 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
14188 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
14192 Should be stripped<span title="Exclamation">!</span>
14197 Bug 24072: more test on conversion rule for title
14199 language=zh variant=zh-tw showtitle
14201 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
14202 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
14205 <p>This should be stripped!
14206 This won't take interferes with the title rule.
14211 Partly disable title conversion if variant == main language code
14213 language=zh variant=zh title=[[ZH]] showtitle
14215 -{T|zh-cn:CN;zh-tw:TW}-
14223 Partly disable title conversion if variant == main language code, more
14225 language=zh variant=zh title=[[ZH]] showtitle
14235 Raw output of variant escape tags (R flag)
14237 language=zh variant=zh-tw
14239 Raw: -{R|zh:China;zh-tw:Taiwan}-
14241 <p>Raw: zh:China;zh-tw:Taiwan
14246 Nested using of manual convert syntax
14248 language=zh variant=zh-hk
14250 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
14252 <p>Nested: Hello Hong Kong!
14257 Proper conversion of text in external links
14259 language=sr variant=sr-ec
14261 http://www.google.com
14262 gopher://www.google.com
14263 [http://www.google.com http://www.google.com]
14264 [gopher://www.google.com gopher://www.google.com]
14265 [https://www.google.com irc://www.google.com]
14266 [ftp://www.google.com www.google.com/ftp://dir]
14267 [//www.google.com www.google.com]
14269 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
14270 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
14271 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
14272 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
14273 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
14274 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
14275 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
14280 Do not convert roman numbers to language variants
14282 language=sr variant=sr-ec
14286 <p>Фридрих IV је цар.
14291 Unclosed language converter markup "-{"
14302 Don't convert raw rule "-{R|=>}-" to "=>"
14313 Bug 529: Uncovered bullet
14323 # Plain MediaWiki does not remove empty lists, but tidy actually does.
14324 # Templates in Wikipedia rely on this behavior, as tidy has always been
14325 # enabled there. These tests are normally run *without* tidy, so specify the
14326 # full output here.
14327 # To test realistic parsing behavior, apply a tidy-like transformation to both
14328 # the expected output and your parser's output.
14330 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
14332 ******* Foo {{bullet}}
14334 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
14347 Bug 529: Uncovered table already at line-start
14370 Bug 529: Uncovered bullet in parser function result
14372 * Foo {{lc:{{bullet}} }}
14381 Bug 5678: Double-parsed template argument
14383 {{lc:{{{1}}}|hello}}
14390 Bug 5678: Double-parsed template invocation
14392 {{lc:{{paramtest {{!}} param = hello }} }}
14394 <p>{{paramtest | param = hello }}
14399 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
14402 title=[[Main Page]]
14404 {{PRVNÍVELKÉ:ěščř}}
14405 {{prvnívelké:ěščř}}
14425 Morwen/13: Unclosed link followed by heading
14432 <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>
14437 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
14444 <h1><span class="mw-headline" id="heading">heading</span></h1>
14449 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
14456 <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>
14471 Paragraphs inside divs (no extra line breaks)
14483 Paragraphs inside divs (extra line break on open)
14498 Paragraphs inside divs (extra line break on close)
14513 Paragraphs inside divs (extra line break on open and close)
14530 Nesting tags, paragraphs on lines which begin with <div>
14534 <div></div><strong>A
14543 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
14545 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
14547 <blockquote>Line one
14549 Line two</blockquote>
14551 <blockquote>Line one
14552 Line two</blockquote>
14557 Bug 6200: paragraphs inside blockquotes (extra line break on open)
14562 Line two</blockquote>
14567 Line two</blockquote>
14572 Bug 6200: paragraphs inside blockquotes (extra line break on close)
14574 <blockquote>Line one
14579 <blockquote>Line one
14587 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
14604 Paragraphs inside blockquotes/divs (no extra line breaks)
14606 <blockquote><div>Line one
14608 Line two</div></blockquote>
14610 <blockquote><div>Line one
14611 Line two</div></blockquote>
14616 Paragraphs inside blockquotes/divs (extra line break on open)
14621 Line two</div></blockquote>
14626 Line two</div></blockquote>
14631 Paragraphs inside blockquotes/divs (extra line break on close)
14633 <blockquote><div>Line one
14636 </div></blockquote>
14638 <blockquote><div>Line one
14641 </div></blockquote>
14646 Paragraphs inside blockquotes/divs (extra line break on open and close)
14652 </div></blockquote>
14658 </div></blockquote>
14663 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
14665 wgLinkHolderBatchSize=0
14671 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
14672 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
14673 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
14678 Free external link invading image caption
14680 [[Image:Foobar.jpg|thumb|http://x|hello]]
14682 <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"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>hello</div></div></div>
14687 Bug 15196: localised external link numbers
14691 [http://en.wikipedia.org/]
14693 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
14698 Multibyte character in padleft
14700 {{padleft:-Hello|7|Æ}}
14707 Multibyte character in padright
14709 {{padright:Hello-|7|Æ}}
14716 formatdate parser function
14718 {{#formatdate:2009-03-24}}
14720 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
14725 formatdate parser function, with default format
14727 {{#formatdate:2009-03-24|mdy}}
14729 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
14734 Spacing of numbers in formatted dates
14736 {{#formatdate:January 15}}
14738 <p><span class="mw-formatted-date" title="01-15">January 15</span>
14743 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
14745 language=nl title=[[MediaWiki:Common.css]]
14747 {{#formatdate:2009-03-24|dmy}}
14749 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
14762 Edit comment with link
14766 I like the [[Main Page]] a lot
14768 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
14772 Edit comment with link and link text
14776 I like the [[Main Page|best pages]] a lot
14778 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
14782 Edit comment with link and link text with suffix
14786 I like the [[Main Page|best page]]s a lot
14788 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
14792 Edit comment with section link (non-local, eg in history list)
14794 comment title=[[Main Page]]
14796 /* External links */ removed bogus entries
14798 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
14802 Edit comment with section link and text before it (non-local, eg in history list)
14804 comment title=[[Main Page]]
14806 pre-comment text /* External links */ removed bogus entries
14808 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>
14812 Edit comment with section link (local, eg in diff view)
14814 comment local title=[[Main Page]]
14816 /* External links */ removed bogus entries
14818 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
14822 Edit comment with subpage link (bug 14080)
14826 title=[[Subpage test]]
14828 Poked at a [[/subpage]] here...
14830 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
14834 Edit comment with subpage link and link text (bug 14080)
14838 title=[[Subpage test]]
14840 Poked at a [[/subpage|neat little page]] here...
14842 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
14846 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
14849 title=[[Subpage test]]
14851 Poked at a [[/subpage]] here...
14853 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
14857 Edit comment with bare anchor link (local, as on diff)
14861 title=[[Main Page]]
14865 <a href="#section">#section</a>
14869 Edit comment with bare anchor link (non-local, as on history)
14872 title=[[Main Page]]
14876 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
14880 Anchor starting with underscore
14884 <p><a href="#_ref">One</a>
14889 Id starting with underscore
14891 <div id="_ref"></div>
14893 <div id="_ref"></div>
14898 Space normalisation on autocomment (bug 22784)
14901 title=[[Main Page]]
14903 /* __hello__world__ */
14905 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
14909 percent-encoding and + signs in comments (Bug 26410)
14913 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
14915 <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>
14919 Bad images - basic functionality
14928 Bad images - bug 16039: text after bad image disappears
14942 Verify that displaytitle works (bug #22501) no displaytitle
14946 wgAllowDisplayTitle=true
14947 wgRestrictDisplayTitle=false
14949 this is not the the title
14952 <p>this is not the the title
14957 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
14962 wgAllowDisplayTitle=true
14963 wgRestrictDisplayTitle=false
14965 this is not the the title
14966 {{DISPLAYTITLE:whatever}}
14969 <p>this is not the the title
14974 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
14979 wgAllowDisplayTitle=true
14980 wgRestrictDisplayTitle=true
14982 this is not the the title
14983 {{DISPLAYTITLE:whatever}}
14986 <p>this is not the the title
14991 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
14996 wgAllowDisplayTitle=true
14997 wgRestrictDisplayTitle=true
14999 this is not the the title
15000 {{DISPLAYTITLE:screen}}
15003 <p>this is not the the title
15008 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
15013 wgAllowDisplayTitle=false
15015 this is not the the title
15016 {{DISPLAYTITLE:screen}}
15019 <p>this is not the the title
15020 <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>
15025 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
15030 wgAllowDisplayTitle=false
15032 this is not the the title
15035 <p>this is not the the title
15040 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
15045 wgAllowDisplayTitle=true
15046 wgRestrictDisplayTitle=true
15048 this is not the the title
15049 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
15051 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
15052 <p>this is not the the title
15057 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
15062 wgAllowDisplayTitle=true
15063 wgRestrictDisplayTitle=true
15065 this is not the the title
15066 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
15068 <span style="color: red;">s</span>creen
15069 <p>this is not the the title
15074 preload: check <noinclude> and <includeonly>
15078 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
15084 preload: check <onlyinclude>
15088 Goodbye <onlyinclude>Hello world</onlyinclude>
15094 preload: can pass tags through if we want to
15098 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
15100 <includeonly>Hello world</includeonly>
15104 preload: check that it doesn't try to do tricks
15108 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
15110 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
15114 Play a bit with r67090 and bug 3158
15118 <div style="width:50% !important"> </div>
15119 <div style="width:50% !important"> </div>
15120 <div style="width:50% !important"> </div>
15121 <div style="border : solid;"> </div>
15123 <div style="width:50% !important"> </div>
15124 <div style="width:50% !important"> </div>
15125 <div style="width:50% !important"> </div>
15126 <div style="border : solid;"> </div>
15131 HTML5 data attributes
15133 <span data-foo="bar">Baz</span>
15134 <p data-abc-def_hij="">Quuz</p>
15136 <p><span data-foo="bar">Baz</span>
15138 <p data-abc-def_hij="">Quuz</p>
15143 percent-encoding and + signs in internal links (Bug 26410)
15145 [[User:+%]] [[Page+title%]]
15146 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
15147 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
15148 [[%33%45]] [[%33%45+]]
15150 <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>
15151 <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>
15152 <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>
15153 <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>
15158 Special characters in embedded file links (bug 27679)
15160 [[File:Contains & ampersand.jpg]]
15161 [[File:Does not exist.jpg|Title with & ampersand]]
15163 <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>
15164 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
15170 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
15172 Text's been normalized?
15174 <p>Text's been normalized?
15179 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
15181 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
15183 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
15188 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
15190 [http://www.example.org/ ideograms]
15192 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
15197 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
15199 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
15201 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
15225 Bug 31098 Template which includes system messages which includes the template
15229 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
15230 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
15235 Bug31490 Turkish: ucfirst 'blah'
15246 Bug31490 Turkish: ucfirst 'ix'
15257 Bug31490 Turkish: lcfirst 'BLAH'
15268 Bug31490 Turkish: ucfırst (with a dotless i)
15274 <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>
15279 Bug31490 ucfırst (with a dotless i) with English language
15285 <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>
15290 Bug 26375: TOC with italics
15292 title=[[Main Page]]
15295 == ''Lost'' episodes ==
15297 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15299 <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>
15302 <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>
15307 Bug 26375: TOC with bold
15309 title=[[Main Page]]
15312 == '''should be bold''' then normal text ==
15314 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15316 <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>
15319 <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>
15324 Bug 33845: Headings become cursive in TOC when they contain an image
15326 title=[[Main Page]]
15329 == Image [[Image:foobar.jpg]] ==
15331 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15333 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
15336 <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>
15341 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
15343 title=[[Main Page]]
15346 == <blockquote>Quote</blockquote> ==
15348 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15350 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
15353 <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>
15358 Unclosed tags in TOC
15360 title=[[Main Page]]
15364 <small>Hanc marginis exiguitas non caperet.</small>
15367 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15369 <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>
15372 <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>
15373 <p><small>Hanc marginis exiguitas non caperet.</small>
15379 Multiple tags in TOC
15382 == <i>Foo</i> <b>Bar</b> ==
15384 == <i>Foo</i> <blockquote>Bar</blockquote> ==
15386 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15388 <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>
15389 <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>
15392 <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>
15393 <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>
15398 Tags with parameters in TOC
15401 == <sup class="in-h2">Hello</sup> ==
15403 == <sup class="a > b">Evilbye</sup> ==
15405 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15407 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
15408 <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>
15411 <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>
15412 <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>
15417 span tags with directionality in TOC
15420 == <span dir="ltr">C++</span> ==
15422 == <span dir="rtl">זבנג!</span> ==
15424 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
15426 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
15428 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
15430 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15432 <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>
15433 <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>
15434 <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>
15435 <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>
15436 <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>
15439 <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>
15440 <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>
15441 <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>
15442 <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>
15443 <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>
15450 == {{int:headline_sample}} ==
15454 Bug 32057: Title needed when expanding <h> nodes.
15456 title=[[Main Page]]
15460 <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>
15465 Strip marker in urlencode
15467 {{urlencode:x<nowiki/>y}}
15468 {{urlencode:x<nowiki/>y|wiki}}
15469 {{urlencode:x<nowiki/>y|path}}
15496 Strip marker in formatNum
15498 {{formatnum:1<nowiki/>2}}
15499 {{formatnum:1<nowiki/>2|R}}
15507 Check noCommafy in formatNum
15511 {{formatnum:123456.78}}
15512 {{formatnum:123456.78|NOSEP}}
15520 Strip marker in grammar
15524 {{grammar:elative|foo<nowiki/>bar}}
15531 Strip marker in padleft
15533 {{padleft:|2|x<nowiki/>y}}
15540 Strip marker in padright
15542 {{padright:|2|x<nowiki/>y}}
15549 Strip marker in anchorencode
15551 {{anchorencode:x<nowiki/>y}}
15558 nowiki inside link inside heading (bug 18295)
15560 ==[[foo|x<nowiki>y</nowiki>z]]==
15562 <h2><span class="mw-headline" id="xyz"><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">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>
15567 new support for bdi element (bug 31817)
15569 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
15571 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
15576 Ignore pipe between table row attributes
15580 |- id=foo | style='color: red'
15588 <tr id="foo" style="color: red">
15595 Gallery override link with WikiLink (bug 34852)
15598 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
15601 <ul class="gallery mw-gallery-traditional">
15602 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15603 <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>
15604 <div class="gallerytext">
15614 Gallery override link with absolute external link (bug 34852)
15617 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
15620 <ul class="gallery mw-gallery-traditional">
15621 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15622 <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>
15623 <div class="gallerytext">
15633 Gallery override link with malicious javascript (bug 34852)
15636 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
15639 <ul class="gallery mw-gallery-traditional">
15640 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15641 <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>
15642 <div class="gallerytext">
15652 Gallery with invalid title as link (bug 43964)
15655 File:foobar.jpg|link=<
15658 <ul class="gallery mw-gallery-traditional">
15659 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15660 <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>
15661 <div class="gallerytext">
15669 Language parser function
15678 Padleft and padright as substr
15680 {{padleft:|3|abcde}}
15681 {{padright:|3|abcde}}
15689 Special parser function
15691 {{#special:RandomPage}}
15692 {{#special:BaDtItLe}}
15693 {{#special:Foobar}}
15702 Bug 34939 - Case insensitive link parsing ([HttP://])
15704 [HttP://MediaWiki.Org/]
15706 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
15711 Bug 34939 - Case insensitive link parsing ([HttP:// title])
15713 [HttP://MediaWiki.Org/ MediaWiki]
15715 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
15720 Bug 34939 - Case insensitive link parsing (HttP://)
15722 HttP://MediaWiki.Org/
15724 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
15730 ### Parsoids-specific tests
15731 ### Parsoid-PHP parser incompatibilities
15734 1. SOL-sensitive wikitext tokens as template-args
15736 parsoid=wt2html,wt2wt
15742 <span about="#mwt1" typeof="mw:Transclusion">
15743 </span><ul about="#mwt1"><li>a</li></ul>
15744 <span about="#mwt2" typeof="mw:Transclusion">
15745 </span><ol about="#mwt2"><li>a</li></ol>
15746 <span about="#mwt3" typeof="mw:Transclusion">
15747 </span><dl about="#mwt3"><dd>a</dd></dl>
15750 #### ----------------------------------------------------------------
15751 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
15752 #### tags. Parsoid's output for these tags differs from that of the
15754 #### ----------------------------------------------------------------
15757 Ref: 1. ref-location should be replaced with an index span
15762 B <ref name="x">foo</ref>
15765 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span>
15766 B <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}' id="cite_ref-x-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-2">[2]</a></span>
15767 C <span about="#mwt3" class="reference" data-mw='{"name":"ref","attrs":{"name":"y"}}' id="cite_ref-y-3-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-y-3">[3]</a></span></p>
15771 Ref: 2. ref-tags with identical names should all get the same index
15775 A <ref name="x">foo</ref>
15778 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}' id="cite_ref-x-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span>
15779 B <span about="#mwt2" class="reference" data-mw='{"name":"ref","attrs":{"name":"x"}}' id="cite_ref-x-1-1" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span></p>
15783 Ref: 3. spaces in ref-names should be ignored
15787 A <ref name="x">foo</ref>
15788 B <ref name=" x " />
15791 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}' id="cite_ref-x-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span>
15792 B <span about="#mwt2" class="reference" data-mw='{"name":"ref","attrs":{"name":"x"}}' id="cite_ref-x-1-1" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span>
15793 C <span about="#mwt3" class="reference" data-mw='{"name":"ref","attrs":{"name":"x"}}' id="cite_ref-x-1-2" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span></p>
15797 Ref: 4. 'constructor' should be accepted as a valid ref-name
15798 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
15802 A <ref name="constructor">foo</ref>
15804 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"constructor"}}' id="cite_ref-constructor-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-constructor-1">[1]</a></span></p>
15808 Ref: 5. body should accept generic wikitext
15813 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
15818 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"This is a <b data-parsoid=\"{&quot;dsr&quot;:[19,40,3,3]}\"><a rel=\"mw:WikiLink\" href=\"./Bolded_link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Bolded_link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;bolded link&quot;},&quot;dsr&quot;:[22,37,2,2]}\">bolded link</a></b> and this is a <span about=\"#mwt5\" typeof=\"mw:Transclusion\" 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;transclusion&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[55,76,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">transclusion</span>\n"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
15820 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'>
15821 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> This is a <b><a rel="mw:WikiLink" href="./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>
15826 Ref: 6. indent-pres should not be output in ref-body
15838 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo\n bar\n baz\n"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
15840 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
15841 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
15848 Ref: 7. No p-wrapping in ref-body
15867 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo\n\nbar\n\n\nbaz\n\n\n\nbooz\n"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
15869 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15870 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
15884 Ref: 8. transclusion wikitext has lower precedence
15888 A <ref> foo {{echo|</ref> B C}}
15892 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo <span typeof=\"mw:Nowiki\" data-parsoid=\"{&quot;src&quot;:&quot;{{&quot;,&quot;dsr&quot;:[12,14,0,0]}\">{{</span>echo|"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> B C<span typeof="mw:Nowiki">}}</span></p>
15894 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15895 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <span typeof="mw:Nowiki">{{</span>echo|</li></ol>
15899 Ref: 9. unclosed comments should not leak out of ref-body
15903 A <ref> foo <!--</ref> B C
15907 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo <!---->"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> B C</p>
15909 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15910 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li></ol>
15914 Ref: 10. Unclosed HTML tags should not leak out of ref-body
15918 A <ref> <b> foo </ref> B C
15922 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"<b data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;autoInsertedEnd&quot;:true,&quot;dsr&quot;:[8,16,3,0]}\"> foo </b>"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> B C</p>
15924 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15925 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> <b> foo </b></li></ol>
15929 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
15936 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> B
15937 C <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2">[2]</a></span> D</p>
15941 Ref: 12. ref-tags act as trailing newline migration barrier
15945 <!--the newline at the end of this line moves out of the p-tag-->a
15947 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
15952 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
15955 <p>b<!--the newline at the end of this line stays inside the p-tag--> <span about="#mwt1" class="reference" data-mw='{"name":"ref","attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span>
15956 <span about="#mwt2" class="reference" data-mw='{"name":"ref","attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2">[2]</a></span></p>
15963 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
15971 <p><span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> A
15972 <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"bar\n"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2">[2]</a></span> B</p>
15976 Ref: 14. A nested ref-tag should be emitted as plain text
15980 <ref>foo <ref>bar</ref> baz</ref>
15984 <p><span about="#mwt1" class="reference" data-mw="{"name":"ref","body":{"html":"foo &lt;ref&gt;bar&lt;/ref&gt; baz"},"attrs":{}}" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
15986 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw="{"name":"references","attrs":{}}">
15987 <li about="#cite_note-1" id="cite_note-1" data-parsoid="{}"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <ref>bar</ref> baz</li></ol>
15991 Ref: 15. ref-tags with identical names should get identical indexes
15995 A1 <ref name="a">foo</ref> A2 <ref name="a" />
15996 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
16000 <p>A1 <span about="#mwt3" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a"}}' id="cite_ref-a-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-a-1">[1]</a></span> A2 <span about="#mwt4" class="reference" data-mw='{"name":"ref","attrs":{"name":"a"}}' id="cite_ref-a-1-1" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-a-1">[1]</a></span>
16001 B1 <span about="#mwt7" class="reference" data-mw='{"name":"ref","attrs":{"name":"b"}}' id="cite_ref-b-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-b-2">[2]</a></span> B2 <span about="#mwt8" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}' id="cite_ref-b-2-1" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-b-2">[2]</a></span></p>
16003 <ol about="#mwt10" class="references" typeof="mw:Extension/references" 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></ol>
16007 References: 1. references tag without any refs should be handled properly
16013 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
16017 References: 2. references tag with group only outputs references from that group
16021 A <ref group="a">foo</ref>
16022 B <ref group="b">bar</ref>
16024 <references group='a' />
16026 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"group":"a"}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[a 1]</a></span>
16027 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"group":"b"}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[b 1]</a></span></p>
16029 <ol about="#mwt6" class="references" typeof="mw:Extension/references" 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-0">↑</a></span> foo</li></ol>
16033 References: 3. ref list should be cleared after processing references
16045 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
16047 <ol about="#mwt4" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
16049 <p>B <span about="#mwt6" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
16051 <ol about="#mwt8" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> bar</li></ol>
16055 References: 4. only referenced group should be cleared after processing references
16059 A <ref group="a">afoo</ref>
16062 <references group="a"/>
16068 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"afoo"},"attrs":{"group":"a"}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[a 1]</a></span>
16069 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bfoo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>bfoo</ref>","dsr":[30,45,5,6]}'><a href="#cite_note-1">[1]</a></span></p>
16071 <ol about="#mwt6" class="references" typeof="mw:Extension/references" 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-0">↑</a></span> afoo</li></ol>
16073 <p>C <span about="#mwt8" class="reference" data-mw='{"name":"ref","body":{"html":"cfoo"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2">[2]</a></span></p>
16075 <ol about="#mwt10" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> bfoo</li><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2-0">↑</a></span> cfoo</li></ol>
16079 References: 5. ref tags in references should be processed while ignoring all other content
16084 B <ref name="b">bar</ref>
16087 <ref name="a">foo</ref>
16088 This should just get lost.
16091 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","attrs":{"name":"a"}}' id="cite_ref-a-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-a-1">[1]</a></span>
16092 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}' id="cite_ref-b-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-b-2">[2]</a></span></p>
16094 <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\" data-mw=\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;foo&quot;},&quot;attrs&quot;:{&quot;name&quot;:&quot;a&quot;}}\" rel=\"dc:references\" typeof=\"mw:Extension/ref\"><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></ol>
16098 References: 6. <references /> from a transclusion
16102 {{echo|<references />}}
16104 <ol class="references" about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}}]}'></ol>
16108 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
16112 A <ref>foo bar for a</ref>
16118 <ref name="b">foo</ref>
16121 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo bar for a"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span>
16122 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","attrs":{"name":"b"}}' id="cite_ref-b-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-b-2">[2]</a></span></p>
16124 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
16125 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo bar for a</li>
16126 <li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b-2-0">↑</a></span> </li></ol>
16128 <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\" data-mw=\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;foo&quot;},&quot;attrs&quot;:{&quot;name&quot;:&quot;b&quot;}}\" rel=\"dc:references\" typeof=\"mw:Extension/ref\"><a href=\"#cite_note-b-1\">[1]</a></span>\n"},"attrs":{}}'>
16129 <li about="#cite_note-b-1" id="cite_note-b-1"><span rel="mw:referencedBy">↑</span> foo</li></ol>
16132 #### ----------------------------------------------------------------
16133 #### The following section of tests are primarily to test
16134 #### wikitext escaping capabilities of Parsoid. Given that
16135 #### escaping can be done any number of ways, the wikitext (input)
16136 #### is always adjusted to reflect how Parsoid adds nowiki
16139 #### We are marking several tests as parsoid-only since the
16140 #### HTML in the result section is different from what the
16141 #### PHP parser generates for it.
16142 #### ----------------------------------------------------------------
16145 #### --------------- Headings ---------------
16147 #### 1. Nested inside html <h1>=foo=</h1>
16148 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
16149 #### 3. Nested inside html with wikitext split by html tags
16150 #### 4. No escape needed
16151 #### 5. Empty headings <h1></h1>
16152 #### 6. Heading chars in SOL context
16153 #### ----------------------------------------
16155 Headings: 0. Unnested
16159 <nowiki>=foo=</nowiki>
16161 <nowiki> =foo= </nowiki>
16163 <nowiki>=foo=</nowiki>
16165 =foo''a''<nowiki>=</nowiki>
16167 <p><span typeof="mw:Nowiki">=foo=</span></p>
16169 <p><span typeof="mw:Nowiki"> =foo= </span>
16171 <span typeof="mw:Nowiki">=foo=</span></p>
16173 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
16177 Headings: 1. Nested inside html
16181 =<nowiki>=foo=</nowiki>=
16183 ==<nowiki>=foo=</nowiki>==
16185 ===<nowiki>=foo=</nowiki>===
16187 ====<nowiki>=foo=</nowiki>====
16189 =====<nowiki>=foo=</nowiki>=====
16191 ======<nowiki>=foo=</nowiki>======
16193 <h1><span typeof="mw:Nowiki">=foo=</span></h1>
16194 <h2><span typeof="mw:Nowiki">=foo=</span></h2>
16195 <h3><span typeof="mw:Nowiki">=foo=</span></h3>
16196 <h4><span typeof="mw:Nowiki">=foo=</span></h4>
16197 <h5><span typeof="mw:Nowiki">=foo=</span></h5>
16198 <h6><span typeof="mw:Nowiki">=foo=</span></h6>
16202 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
16207 <nowiki>*</nowiki>bar
16213 <nowiki>=bar=</nowiki>
16221 Headings: 3. Nested inside html with wikitext split by html tags
16225 =='''bold'''<nowiki>foo=</nowiki>=
16227 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
16231 Headings: 4a. No escaping needed (testing just h1 and h2)
16249 =<nowiki>=</nowiki>=
16257 <h1><i>=</i>foo=</h1>
16258 <h1><span typeof="mw:Nowiki">=</span></h1>
16262 Headings: 4b. No escaping needed (inside p-tags)
16277 Headings: 5. Empty headings
16289 =====<nowiki/>=====
16291 ======<nowiki/>======
16302 Headings: 6a. Heading chars in SOL context (with trailing spaces)
16306 <nowiki>=a=</nowiki>
16308 <nowiki>=a=</nowiki>
16310 <nowiki>=a=</nowiki>
16312 <nowiki>=a=</nowiki>
16321 Headings: 6b. Heading chars in SOL context (with trailing newlines)
16349 Headings: 6c. Heading chars in SOL context (leading newline break)
16354 <nowiki>=b=</nowiki>
16361 Headings: 6d. Heading chars in SOL context (with interspersed comments)
16365 <!--c0--><nowiki>=a=</nowiki>
16367 <nowiki>=a=</nowiki> <!--c2--> <!--c3-->
16369 <p><!--c0-->=a=</p>
16370 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
16374 Headings: 6d. Heading chars in SOL context (No escaping needed)
16383 #### --------------- Lists ---------------
16384 #### 0. Outside nests (*foo, etc.)
16385 #### 1. Nested inside html <ul><li>*foo</li></ul>
16386 #### 2. Inside definition lists
16387 #### 3. Only bullets at start should be escaped
16388 #### 4. No escapes needed
16389 #### 5. No unnecessary escapes
16390 #### 6. Escape bullets in SOL position
16391 #### 7. Escape bullets in a multi-line context
16392 #### ----------------------------------------
16395 Lists: 0. Outside nests
16397 <nowiki>*</nowiki>foo
16399 <nowiki>#</nowiki>foo
16407 Lists: 1. Nested inside html
16409 *<nowiki>*foo</nowiki>
16411 *<nowiki>#foo</nowiki>
16413 *<nowiki>:foo</nowiki>
16415 *<nowiki>;foo</nowiki>
16417 #<nowiki>*foo</nowiki>
16419 #<nowiki>#foo</nowiki>
16421 #<nowiki>:foo</nowiki>
16423 #<nowiki>;foo</nowiki>
16445 Lists: 2. Inside definition lists
16447 ;<nowiki>;foo</nowiki>
16449 ;<nowiki>:foo</nowiki>
16451 ;<nowiki>:foo</nowiki>
16454 :<nowiki>:foo</nowiki>
16469 Lists: 3. Only bullets at start of text should be escaped
16471 *<nowiki>*foo*bar</nowiki>
16473 *<nowiki>*foo</nowiki>''it''*bar
16477 <ul><li>*foo<i>it</i>*bar
16483 Lists: 4. No escapes needed
16495 <ul><li><i>foo</i>*bar
16497 <ul><li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
16502 Lists: 5. No unnecessary escapes
16504 * bar <span><nowiki>[[foo]]</nowiki></span>
16506 *=bar <span><nowiki>[[foo]]</nowiki></span>
16508 *[[bar <span><nowiki>[[foo]]</nowiki></span>
16510 *]]bar <span><nowiki>[[foo]]</nowiki></span>
16512 *=bar <span>foo]]</span>=
16516 <ul><li> bar <span>[[foo]]</span>
16518 <ul><li>=bar <span>[[foo]]</span>
16520 <ul><li>[[bar <span>[[foo]]</span>
16522 <ul><li>]]bar <span>[[foo]]</span>
16524 <ul><li>=bar <span>foo]]</span>=
16526 <ul><li> <s></s>: a
16532 Lists: 6. Escape bullets in SOL position
16536 <!--cmt--><nowiki>*foo</nowiki>
16538 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
16542 Lists: 7. Escape bullets in a multi-line context
16545 <nowiki>*</nowiki>b
16552 #### --------------- HRs ---------------
16553 #### 1. Single line
16554 #### -----------------------------------
16557 HRs: 1. Single line
16561 ----<nowiki>----</nowiki>
16565 <hr><span typeof="mw:Nowiki">----</span>
16570 #### --------------- Tables ---------------
16571 #### 1a. Simple example
16572 #### 1b. No escaping needed (!foo)
16573 #### 1c. No escaping needed (|foo)
16574 #### 1d. No escaping needed (|}foo)
16576 #### 2a. Nested in td (<td>foo|bar</td>)
16577 #### 2b. Nested in td (<td>foo||bar</td>)
16578 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
16580 #### 3a. Nested in th (<th>foo!bar</th>)
16581 #### 3b. Nested in th (<th>foo!!bar</th>)
16582 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
16586 #### 4c. No escaping needed
16587 #### --------------------------------------
16590 Tables: 1a. Simple example
16601 Tables: 1b. No escaping needed
16610 Tables: 1c. No escaping needed
16619 Tables: 1d. No escaping needed
16628 Tables: 2a. Nested in td
16633 |<nowiki>foo|bar</nowiki>
16637 <td><span typeof="mw:Nowiki">foo|bar</span></td></tr></tbody></table>
16641 Tables: 2b. Nested in td
16646 |<nowiki>foo||bar</nowiki>
16647 |''it''<nowiki>foo||bar</nowiki>
16651 <td><span typeof="mw:Nowiki">foo||bar</span></td>
16652 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
16656 Tables: 2c. Nested in td -- no escaping needed
16664 <table><tbody><tr><td>foo!!bar
16665 </td></tr></tbody></table>
16670 Tables: 3a. Nested in th
16678 <table><tbody><tr><th>foo!bar
16679 </th></tr></tbody></table>
16684 Tables: 3b. Nested in th
16689 !<nowiki>foo!!bar</nowiki>
16693 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
16698 Tables: 3c. Nested in th -- no escaping needed
16703 !<nowiki>foo||bar</nowiki>
16707 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
16711 Tables: 4a. Escape -
16718 |<nowiki>-bar</nowiki>
16722 <tr><th>-bar</th></tr>
16724 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
16728 Tables: 4b. Escape +
16735 |<nowiki>+bar</nowiki>
16739 <tr><th>+bar</th></tr>
16741 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
16745 Tables: 4c. No escaping needed
16763 <tr><td>foo-bar</td><td>foo+bar</td></tr>
16764 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
16772 ### SSS FIXME: Disabled right now because accurate html2wt
16773 ### on this snippet requires data-parsoid flags that we've
16774 ### stripped out of these tests. We should scheme how we
16775 ### we want to handle these kind of tests that require
16776 ### data-parsoid flags for accurate html2wt serialization
16779 Tables: 4d. No escaping needed
16797 #### --------------- Links ----------------
16798 #### 1. Quote marks in link text
16799 #### 2. Wikilinks: Escapes needed
16800 #### 3. Wikilinks: No escapes needed
16801 #### 4. Extlinks: Escapes needed
16802 #### 5. Extlinks: No escapes needed
16803 #### --------------------------------------
16805 Links 1. Quote marks in link text
16809 [[Foo|Foo<nowiki>''boo''</nowiki>]]
16811 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
16815 Links 2. WikiLinks: Escapes needed
16819 [[Foo|<nowiki>[Foobar]</nowiki>]]
16820 [[Foo|<nowiki>Foobar]</nowiki>]]
16821 [[Foo|x [Foobar] x]]
16822 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
16823 [[Foo|<nowiki>[[Bar]]</nowiki>]]
16824 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
16825 [[Foo|<nowiki>|Bar</nowiki>]]
16826 [[Foo|<nowiki>]]bar</nowiki>]]
16827 [[Foo|<nowiki>[[bar</nowiki>]]
16828 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
16830 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
16831 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
16832 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
16833 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
16834 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
16835 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
16836 <a href="Foo" rel="mw:WikiLink">|Bar</a>
16837 <a href="Foo" rel="mw:WikiLink">]]bar</a>
16838 <a href="Foo" rel="mw:WikiLink">[[bar</a>
16839 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
16843 Links 3. WikiLinks: No escapes needed
16850 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
16851 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
16855 Links 4. ExtLinks: Escapes needed
16859 [http://google.com <nowiki>[google]</nowiki>]
16860 [http://google.com <nowiki>google]</nowiki>]
16862 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
16863 <a href="http://google.com" rel="mw:ExtLink">google]</a>
16867 Links 5. ExtLinks: No escapes needed
16871 [http://google.com [google]
16873 <a href="http://google.com" rel="mw:ExtLink">[google</a>
16876 #### --------------- Quotes ---------------
16877 #### 1. Quotes inside <b> and <i>
16878 #### 2. Link fragments separated by <i> and <b> tags
16879 #### 3. Link fragments inside <i> and <b>
16880 #### 4. No escaping needed
16881 #### --------------------------------------
16883 1. Quotes inside <b> and <i>
16885 parsoid=html2wt,wt2wt
16887 ''<nowiki>'foo'</nowiki>''
16888 ''<nowiki>''foo''</nowiki>''
16889 ''<nowiki>'''foo'''</nowiki>''
16891 '''<nowiki>'foo'</nowiki>'''
16892 '''<nowiki>''foo''</nowiki>'''
16893 '''<nowiki>'''foo'''</nowiki>'''
16894 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
16895 '''foo'''<nowiki/>'s
16898 '<nowiki/>''foo''<nowiki/>'
16900 '''foo'''<nowiki/>'
16901 '<nowiki/>'''foo'''<nowiki/>'
16910 <b>foo'<i>bar'</i>baz</b>
16921 2. Link fragments separated by <i> and <b> tags
16923 [[''foo''<nowiki>hello]]</nowiki>
16925 [['''foo'''<nowiki>hello]]</nowiki>
16927 <p>[[<i>foo</i>hello]]
16928 </p><p>[[<b>foo</b>hello]]
16933 3. Link fragments inside <i> and <b>
16934 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
16935 this is one of the shortcomings of this format)
16937 ''[[foo''<nowiki>]]</nowiki>
16939 '''[[foo'''<nowiki>]]</nowiki>
16942 </p><p><b>[[foo</b>]]
16947 4. No escaping needed
16949 '<span>''bar''</span>'
16950 '<span>'''bar'''</span>'
16952 <p>'<span><i>bar</i></span>'
16953 '<span><b>bar</b></span>'
16957 #### ----------- Paragraphs ---------------
16958 #### 1. No unnecessary escapes
16959 #### --------------------------------------
16962 1. No unnecessary escapes
16964 bar <span><nowiki>[[foo]]</nowiki></span>
16966 =bar <span><nowiki>[[foo]]</nowiki></span>
16968 [[bar <span><nowiki>[[foo]]</nowiki></span>
16970 ]]bar <span><nowiki>[[foo]]</nowiki></span>
16972 =bar <span>foo]]</span><nowiki>=</nowiki>
16974 <p>bar <span>[[foo]]</span>
16975 </p><p>=bar <span>[[foo]]</span>
16976 </p><p>[[bar <span>[[foo]]</span>
16977 </p><p>]]bar <span>[[foo]]</span>
16978 </p><p>=bar <span>foo]]</span>=
16982 #### ----------------------- PRE --------------------------
16983 #### 1. Leading whitespace in SOL context should be escaped
16984 #### ------------------------------------------------------
16986 1. Leading whitespace in SOL context should be escaped
16990 <nowiki> </nowiki>a
16992 <nowiki> </nowiki> a
16994 <nowiki> </nowiki>a(tab)
16996 <nowiki> </nowiki> a
16998 <nowiki> </nowiki> a
17001 <nowiki> </nowiki>b
17004 <nowiki> </nowiki>b
17007 <nowiki> </nowiki> b
17013 <p><!--cmt--> a</p>
17022 #### --------------- HTML tags ---------------
17025 #### 3. multi-line html tag
17026 #### -----------------------------------------
17032 <a href="http://google.com">google</a>
17034 <a href="http://google.com">google</a>
17040 <nowiki><div>foo</div>
17041 <div style="color:red">foo</div></nowiki>
17043 <p><div>foo</div>
17044 <div style="color:red">foo</div>
17049 3. multi-line html tag
17064 <nowiki><ref>foo</ref></nowiki>
17066 <p><ref>foo</ref>
17070 #### --------------- Others ---------------
17074 <nowiki>foo</nowiki>
17076 <p><nowiki>foo</nowiki>
17080 ## The quote-char in the input is necessary for triggering the bug
17082 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
17084 parsoid=wt2wt,html2wt
17093 Tag-like HTML structures are passed through as text
17115 </p><p>1<d e>f
17120 # This was a bug in the PHP parser (see bug 17663 and its dups,
17121 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
17123 Tag names followed by punctuation should not be recognized as tags
17127 <p><s.ome> text
17132 HTML tag with necessary entities in attributes
17134 <span title="&amp;">foo</span>
17136 <p><span title="&amp;">foo</span>
17141 HTML tag with 'unnecessary' entity encoding in attributes
17143 <span title="&">foo</span>
17145 <p><span title="&">foo</span>
17150 HTML tag with broken attribute value quoting
17152 <span title="Hello world>Foo</span>
17154 <p><span>Foo</span>
17159 Parsoid-only: HTML tag with broken attribute value quoting
17163 <span title="Hello world>Foo</span>
17165 <p><span title="Hello world">Foo</span>
17170 Table with broken attribute value quoting
17173 | title="Hello world|Foo
17184 Table with broken attribute value quoting on consecutive lines
17187 | title="Hello world|Foo
17188 | style="color:red|Bar
17201 Parsoid-only: Table with broken attribute value quoting on consecutive lines
17206 | title="Hello world|Foo
17207 | style="color:red|Bar
17212 <td title="Hello world">Foo
17213 </td><td style="color: red">Bar
17214 </td></tr></tbody></table>
17219 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
17229 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
17239 Accept empty td cell attribute
17242 | align="center" | foo || |
17247 <td align="center"> foo </td>
17254 Non-empty attributes in th-cells
17257 ! Foo !! style="color: red" | Bar
17263 <th style="color: red"> Bar
17269 Accept empty attributes in th-cells
17284 Empty table rows go away
17305 ### Parsoid-centric tests for testing RTing of inter-element separators
17306 ### Edge cases not tested by existing parser tests and specific to
17307 ### Parsoid-specific serialization strategies.
17311 RT-ed inter-element separators should be valid separators
17324 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
17325 (Parsoid-only since PHP parser relies on Tidy for correct output)
17341 Empty TD followed by TD with tpl-generated attribute
17346 |{{echo|style='color:red'}}|foo
17360 Indented table with an empty td
17379 Empty TR followed by a template-generated TR
17380 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
17386 {{echo|<tr><td>foo</td></tr>}}
17392 <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}}]}'>
17397 ## PHP and parsoid output differ for this, and since this is primarily
17398 ## for testing Parsoid's serializer, marking this Parsoid only
17400 Empty TR followed by mixed-ws-comment line should RT correctly
17416 <!--c--> </tr><!--d-->
17422 Multi-line image caption generated by templates with/without trailing newlines
17426 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
17427 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
17429 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Foo.jpg" class="new" title="File:Foo.jpg">File:Foo.jpg</a> <div class="thumbcaption">foo\nA\nB\nC</div></div></div>
17430 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Foo.jpg" class="new" title="File:Foo.jpg">File:Foo.jpg</a> <div class="thumbcaption">foo\nA\nB\nC\n\n</div></div></div>
17434 ## PHP emits broken html for this, and since this is primarily
17435 ## a Parsoid serializer test, marking this Parsoid only
17437 Improperly nested inline or quotes tags with whitespace in between
17441 <span> <s>x</span> </s>
17444 <p><span> <s>x</s></span><s> </s>
17445 <b> <i>x</i></b><i> </i>
17450 Encapsulate protected attributes from wt
17454 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
17456 <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>
17460 ## Currently the p-wrapper is fragile in how adds / removes transformations.
17461 ## Having nested or stray pre tags results in the attempt to add duplicates,
17462 ## causing an assertion fail. This test tries to prevent that situation.
17464 Ensure ParagraphWrapper can deal with stray closing pre tags
17474 Ensure fostered text content is wrapped in spans
17478 <table>hi</table><table>ho</table>
17486 # -----------------------------------------------------------------
17487 # The following section of tests are primarily to spec requirements
17488 # around serialization of new/edited content.
17490 # All these tests are marked Parsoid html2wt and html2html only
17491 # ----------------------------------------------------------------
17494 Image: Modifying size of an image
17498 [[Image:Wiki.png|230x230px]]
17500 <p data-parsoid='{"dsr":[0,24,0,0]}'><span typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100px"}],"cacheKey":"[[Image:Wiki.png|100px]]","img":{"h":115,"w":100,"wdset":true},"dsr":[0,24,null,null]}'><a href="./File:Wiki.png" data-parsoid='{"a":{"href":"./File:Wiki.png"}}'><img resource="./File:Wiki.png" src="//upload.wikimedia.org/wikipedia/en/thumb/b/bc/Wiki.png/100px-Wiki.png" height="230" width="200" data-parsoid='{"a":{"resource":"./File:Wiki.png"},"sa":{"resource":"Image:Wiki.png"}}'></a></span></p>
17504 Image: New block level image should have \n before and after
17509 [[File:Wiki.png|right|thumb|150x150px]]
17512 <p>123</p><figure typeof="mw:Image/Thumb" class="mw-halign-right"><a href="./File:Wiki.png"><img src="http://192.168.142.128/mw/images/thumb/b/bc/Wiki.png/131px-Wiki.png" width="131" height="150" resource="./File:Wiki.png"></a></figure><p>456</p>
17515 # Wacky -- the leading newline in input is required because
17516 # that is what the serializer emits. To be fixed. Not fixing
17517 # the test because this test is required to test serialization of
17518 # new content and preferred whitespace style.
17520 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
17528 <li><p>foo</p></li>
17532 # Wacky -- the leading newline in input is required because
17533 # that is what the serializer emits. To be fixed. Not fixing
17534 # the test because this test is required to test serialization of
17535 # new content and preferred whitespace style.
17537 Lists: Add space after bullets
17544 * <span> baz</span>
17549 <li><span> baz</span></li>
17554 Parsoid: Serialize positional parameters with = in them as named parameter
17560 {{echo|1 = f=oo|2 = bar}}
17562 <!--Orig params with data-parsoid has heuristics for handling = chars-->
17563 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
17564 {{echo|<nowiki>f=oo</nowiki>|bar}}
17566 <p about="#mwt1" typeof="mw:Transclusion"
17567 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
17569 <p about="#mwt1" typeof="mw:Transclusion"
17570 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
17572 <!--Orig params with data-parsoid has heuristics for handling = chars-->
17573 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
17574 <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>
17578 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
17594 <div>a<p>b</p></div>
17602 #-----------------------------
17603 # I/B quote minimization tests
17604 #-----------------------------
17607 1. I/B qoute minimization: wikitext-only tags should be combined
17621 <p><i>A</i><i>B</i></p>
17622 <p><b>A</b><b>B</b></p>
17623 <p><i>A</i><b><i>B</i></b></p>
17624 <p><b>A</b><i><b>B</b></i></p>
17625 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
17629 2. I/B qoute minimization: wikitext and html tags should not be combined
17635 ''A'''''<i>B</i>'''
17637 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
17638 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
17642 3. I/B qoute minimization: templated content stops minimization
17646 ''A''{{echo|''B''}}
17648 ''A''{{echo|'''''B'''''}}
17650 <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>
17651 <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>
17655 4. I/B qoute minimization: new content should be mimimized with adjacent old content
17665 <p><i>A</i><i data-parsoid='{}'>B</i></p>
17666 <p><b data-parsoid='{}'>A</b><b>B</b></p>
17667 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
17670 # -----------------------------------------------------------------
17671 # End of section for Parsoid-only html2wt tests for serialization
17673 # -----------------------------------------------------------------
17680 Try for 100% code coverage