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 MemoryAlpha:AlphaTest
4640 This is an article in the MemoryAlpha namespace
4641 (which shadows the memoryalpha interwiki link).
4645 Namespace takes precedence over interwiki link (bug 51680)
4647 [[MemoryAlpha:AlphaTest]]
4649 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
4654 Piped link to namespace
4656 [[Meta:Disclaimers|The disclaimers]]
4658 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
4665 [[Usually caused by a typo (oops}]]
4667 <p>[[Usually caused by a typo (oops}]]
4672 Link containing % (not as a hex sequence)
4676 <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>
4681 Link containing % as a single hex sequence interpreted to char
4685 <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>
4690 Link containing % as a double hex sequence interpreted to hex sequence
4694 <p>[[7%2525 Solution]]
4699 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
4700 Example for such a section: == < ==
4702 [[%23%3c]][[%23%3e]]
4704 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
4709 Link containing "<#" and ">#" as a hex sequences
4711 [[%3c%23]][[%3e%23]]
4713 <p>[[%3c%23]][[%3e%23]]
4718 Link containing an equals sign
4720 [[Special:BookSources/isbn=4-00-026157-6]]
4722 <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>
4729 Just a test of an article title containing a tilde.
4732 # note that links containing signatures, like [[Foo~~~~]], are
4733 # massaged by the pre-save transform (PST) and so the tildes are never
4734 # seen by the parser.
4736 Link containing a tilde
4740 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
4745 Link containing double-single-quotes '' (bug 4598)
4747 [[Lista d''e paise d''o munno]]
4749 <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>
4754 Link containing double-single-quotes '' in text (bug 4598 sanity check)
4756 Some [[Link|pretty ''italics'' and stuff]]!
4758 <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>!
4763 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
4765 ''Some [[Link|pretty ''italics'' and stuff]]!
4767 <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>
4772 Link with double quotes in title part (literal) and alternate part (interpreted)
4774 [[File:Denys Savchenko ''Pentecoste''.jpg]]
4778 [[''Pentecoste''|Pentecoste]]
4780 [[''Pentecoste''|''Pentecoste'']]
4782 <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>
4783 </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>
4784 </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>
4785 </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>
4790 Broken image links with HTML captions (bug 39700)
4792 [[File:Nonexistent|<script></script>]]
4793 [[File:Nonexistent|100px|<script></script>]]
4794 [[File:Nonexistent|<]]
4795 [[File:Nonexistent|a<i>b</i>c]]
4797 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4798 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4799 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
4800 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
4807 [[http://www.example.com]]
4809 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
4814 Plain link to URL with link text
4816 [[http://www.example.com Link text]]
4818 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
4823 Plain link to protocol-relative URL
4825 [[//www.example.com]]
4827 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
4832 Plain link to protocol-relative URL with link text
4834 [[//www.example.com Link text]]
4836 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
4841 Plain link to page with question mark in title
4847 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
4848 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
4853 # I'm fairly sure the expected result here is wrong.
4854 # We want these to be URL links, not pseudo-pages with URLs for titles....
4855 # However the current output is also pretty screwy.
4858 # I'm changing it to match the current output--it arguably makes more
4859 # sense in the light of the test above. Old expected result was:
4860 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
4862 # But I think this test is bordering on "garbage in, garbage out" anyway.
4867 Piped link to URL: [[http://www.example.com|an example URL]]
4869 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
4874 BUG 2: [[page|http://url/]] should link to page, not http://url/
4876 [[Main Page|http://url/]]
4878 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
4883 BUG 337: Escaped self-links should be bold
4887 [[Bug462]] [[Bug462]]
4889 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
4894 Self-link to section should not be bold
4898 [[Main Page#section]]
4900 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
4911 Self-link to numeric title
4917 <p><strong class="selflink">0</strong>
4922 Link to numeric-equivalent title
4928 <p><a href="/wiki/00" title="00">00</a>
4933 <nowiki> inside a link
4935 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
4937 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
4942 Non-breaking spaces in title
4944 [[ Main Page ]]
4946 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
4951 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
4957 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
4962 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
4968 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
4973 Internal link with en linktrail: no apostrophes (bug 27473)
4979 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
4984 Internal link with ca linktrail with apostrophes (bug 27473)
4990 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
4995 Internal link with kaa linktrail with apostrophes (bug 27473)
5001 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
5012 Internal link with is link prefix
5016 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
5018 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
5029 Internal link with is link trail and link prefix
5033 [[mótmælendatrú|xxx]]ar
5035 mótmælenda[[söfnuður]]
5036 mótmælenda[[söfnuður|söfnuðir]]
5037 mótmælenda[[söfnuður|söfnuðir]]xxx
5039 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
5040 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
5041 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
5042 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
5043 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
5048 Parsoid link trail escaping
5050 parsoid=html2wt,html2html
5054 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
5058 Parsoid link prefix escaping
5061 parsoid=html2wt,html2html
5063 Aðrir mótmælenda<nowiki/>[[söfnuður]]
5065 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
5069 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
5077 [http://wp.org ''foo'']
5079 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
5080 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
5081 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
5082 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
5087 ### Interwiki links (see maintenance/interwiki.sql)
5091 Inline interwiki link
5093 [[MeatBall:SoftSecurity]]
5095 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
5100 Inline interwiki link with empty title (bug 2372)
5104 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
5109 Interwiki link encoding conversion (bug 1636)
5111 *[[Wikipedia:ro:Olteniţa]]
5112 *[[Wikipedia:ro:Olteniţa]]
5114 <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>
5115 </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>
5121 Interwiki link with fragment (bug 2130)
5123 [[MeatBall:SoftSecurity#foo]]
5125 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
5131 ### Interlanguage links
5132 ### Language links (so that searching for '### language' matches..)
5146 Double interlanguage link
5157 Interlanguage link, with prefix links
5169 Double interlanguage link, with prefix links (bug 8897)
5182 Parsoid-specific test: Wikilinks with should RT properly
5188 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
5193 Parsoid bug 53221: Wikilinks should be properly entity-escaped
5197 He&nbsp;llo [[Foo|He&nbsp;llo]]
5199 He&nbsp;llo [[He&nbsp;llo]]
5201 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
5202 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
5206 Parsoid: handle constructor well
5214 <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>
5217 <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>
5221 Parsoid: recognize interlanguage links without a target page
5228 <link rel="mw:WikiLink/Language" href="http://ko.wikipedia.org/wiki/"></p>
5232 Parsoid: recognize interwiki links without a target page
5238 <p><a rel="mw:WikiLink/Interwiki" href="http://ko.wikipedia.org/wiki/">ko:</a></p>
5242 ### Redirects, Parsoid-only
5245 Simple redirect to page
5249 #REDIRECT [[Main Page]]
5251 <link rel="mw:PageProp/redirect" href="./Main_Page">
5255 Optional colon in #REDIRECT
5257 # the colon is archaic syntax. we support it for wt2html, but we
5258 # don't care that it roundtrips back to the modern syntax.
5259 parsoid=wt2html,html2html
5261 #REDIRECT:[[Main Page]]
5263 <link rel="mw:PageProp/redirect" href="./Main_Page">
5267 Whitespace in #REDIRECT with optional colon
5269 # the colon and gratuitous whitespace is archaic syntax. we support
5270 # it for wt2html, but we don't care that it roundtrips back to the
5271 # modern syntax (without extra whitespace)
5272 parsoid=wt2html,html2html
5279 <link rel="mw:PageProp/redirect" href="./Main_Page">
5283 Piped link in #REDIRECT
5285 # content after piped link is ignored. we support this syntax,
5286 # but don't care that the piped link is lost when we roundtrip this.
5289 #REDIRECT [[Main Page|bar]]
5291 <link rel="mw:PageProp/redirect" href="./Main_Page">
5295 Redirect to category
5299 #REDIRECT [[Category:Foo]]
5301 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
5305 Redirect to category with URL encoding
5309 #REDIRECT [[Category%3AFoo]]
5311 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
5315 Redirect to category page
5317 parsoid=wt2html,html2html
5319 #REDIRECT [[:Category:Foo]]
5321 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
5325 Redirect to image page (1)
5329 #REDIRECT [[File:Wiki.png]]
5331 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5335 Redirect to image page (2)
5339 #REDIRECT [[Image:Wiki.png]]
5341 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5345 Redirect to language
5349 #REDIRECT [[en:File:Wiki.png]]
5351 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5355 Redirect to interwiki
5359 #REDIRECT [[meatball:File:Wiki.png]]
5361 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5365 Non-English #REDIRECT
5370 #TILVÍSUN [[Main Page]]
5372 <link rel="mw:PageProp/redirect" href="./Main_Page">
5389 Broken br tag sanitization
5399 # TODO: Fix html2html mode (bug 51055)!
5401 Parsoid: Broken br tag recognition
5411 Incorrecly removing closing slashes from correctly formed XHTML
5413 <br style="clear:both;" />
5415 <p><br style="clear:both;" />
5420 Failing to transform badly formed HTML into correct XHTML
5422 <br style="clear: left;">
5423 <br style="clear: right;">
5424 <br style="clear: both;">
5426 <p><br style="clear: left;" />
5427 <br style="clear: right;" />
5428 <br style="clear: both;" />
5433 Handling html with a div self-closing tag
5442 <p><div title />
5446 <p><div title=bar />
5447 <div title=bar/>
5449 <div title="bar/"></div>
5455 Handling html with a br self-closing tag
5464 <p><br title="title" />
5465 <br title="title" />
5474 Horizontal ruler (should it add that extra space?)
5488 Horizontal ruler -- 4+ dashes render hr
5497 Horizontal ruler -- eats additional dashes on the same line
5506 Horizontal ruler -- does not collapse dashes on consecutive lines
5517 Horizontal ruler -- <4 dashes render as plain text
5526 Horizontal ruler -- Supports content following dashes on same line
5535 ### Block-level elements
5558 <ol><li>Numbered list
5575 ***#Number on level 4
5577 **#Number on level 3
5578 **#Number on level 3
5582 #** Level 3, but ordered
5585 <ol><li> with numbers
5587 <ul><li> and bullets
5589 <ol><li> and numbers
5591 </li><li>bullets again
5592 <ul><li>bullet level 2
5593 <ul><li>bullet level 3
5594 <ol><li>Number on level 4
5597 </li><li>bullet level 2
5598 <ol><li>Number on level 3
5599 </li><li>Number on level 3
5602 <ol><li>number level 2
5605 <ul><li><ul><li> Level 3
5609 <ol><li><ul><li><ul><li> Level 3, but ordered
5643 Nested lists 3 (first element empty)
5656 Nested lists 4 (first element empty)
5669 Nested lists 5 (both elements empty)
5682 Nested lists 6 (both elements empty)
5695 Nested lists 7 (skip initial nesting levels)
5699 <ul><li><ul><li><ul><li> foo
5707 Nested lists 8 (multiple nesting transitions)
5715 <ul><li><ul><li> bar
5725 1. Lists with start-of-line-transparent tokens before bullets: Comments
5739 2. Lists with start-of-line-transparent tokens before bullets: Template close
5751 List items are not parsed correctly following a <pre> block (bug 785)
5757 <ul><li> <pre>foo</pre>
5758 </li><li> <pre>bar</pre>
5765 List items from template
5776 * notSOL{{inner list}}
5795 List interrupted by empty line or heading
5805 <ul><li><ul><li> bar
5808 <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>
5809 <ul><li> Another list item
5815 Multiple list tags generated by templates
5830 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
5833 <!--This line will NOT split the list-->
5835 <!--This line will NOT split the list either-->
5837 <!--foo--> <!----> <!--This line NOT split the list either-->
5849 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
5852 <!--This line will NOT split the list-->
5854 <!--This line will NOT split the list either-->
5856 <!--foo--> <!----> <!--This line NOT split the list
5870 (Cannot test this with PHP parser since it relies on Tidy for the hack)
5872 parsoid=wt2html,wt2wt
5876 * {{echo|<li>templated li-hack}}
5877 * <!--foo--> <li> unsupported li-hack with preceding comments
5880 <li><li>not a li-hack
5886 <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>
5887 <li> <!--foo--> </li><li> li-hack with preceding comments</li></ul>
5890 <li></li><li>not a li-hack
5896 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
5907 <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>
5911 Parsoid: Test of whitespace serialization with Templated bullets
5918 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
5922 # ------------------------------------------------------------------------
5923 # The next set of tests are about Parsoid's ability to handle badly nested
5924 # tags (parse, minimize scope of fixup, and roundtrip back)
5925 # ------------------------------------------------------------------------
5928 Unbalanced closing block tags break a list
5929 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5939 </li></ul></div><div>
5945 Unbalanced closing non-block tags don't break a list
5946 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5956 <ul><li>a<span></span>
5962 Unclosed formatting tags that straddle lists are closed and reopened
5963 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5971 </li><li> <s> b </s>
5976 List embedded in a non-block tag
5977 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
5985 <p><small></small></p>
5991 <p><small></small></p>
5995 Table with missing opening <tr> tag
5997 parsoid=wt2html,wt2wt
6015 # Note that the current date is hard-coded as
6016 # 1970-01-01T00:02:03Z (a Thursday)
6017 # when running parser tests. The timezone is also fixed to GMT, so
6018 # local date will be identical to current date.
6021 Magic Word: {{CURRENTDAY}}
6030 Magic Word: {{CURRENTDAY2}}
6039 Magic Word: {{CURRENTDAYNAME}}
6048 Magic Word: {{CURRENTDOW}}
6057 Magic Word: {{CURRENTMONTH}}
6066 Magic Word: {{CURRENTMONTH1}}
6075 Magic Word: {{CURRENTMONTHABBREV}}
6077 {{CURRENTMONTHABBREV}}
6084 Magic Word: {{CURRENTMONTHNAME}}
6086 {{CURRENTMONTHNAME}}
6093 Magic Word: {{CURRENTMONTHNAMEGEN}}
6095 {{CURRENTMONTHNAMEGEN}}
6102 Magic Word: {{CURRENTTIME}}
6111 Magic Word: {{CURRENTHOUR}}
6120 Magic Word: {{CURRENTWEEK}} (@bug 4594)
6129 Magic Word: {{CURRENTYEAR}}
6138 Magic Word: {{CURRENTTIMESTAMP}}
6140 {{CURRENTTIMESTAMP}}
6147 Magic Words LOCAL (UTC)
6151 * {{LOCALMONTHNAME}}
6152 * {{LOCALMONTHNAMEGEN}}
6153 * {{LOCALMONTHABBREV}}
6162 * {{LOCALTIMESTAMP}}
6177 </li><li> 19700101000203
6183 Magic Word: {{FULLPAGENAME}}
6185 title=[[User:Ævar Arnfjörð Bjarmason]]
6189 <p>User:Ævar Arnfjörð Bjarmason
6194 Magic Word: {{FULLPAGENAMEE}}
6196 title=[[User:Ævar Arnfjörð Bjarmason]]
6200 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6205 Magic Word: {{TALKSPACE}}
6207 title=[[User:Ævar Arnfjörð Bjarmason]]
6216 Magic Word: {{TALKSPACE}}, same namespace
6218 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6227 Magic Word: {{TALKSPACE}}, main namespace
6229 title=[[Parser Test]]
6238 Magic Word: {{TALKSPACEE}}
6240 title=[[User:Ævar Arnfjörð Bjarmason]]
6249 Magic Word: {{SUBJECTSPACE}}
6251 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6260 Magic Word: {{SUBJECTSPACE}}, same namespace
6262 title=[[User:Ævar Arnfjörð Bjarmason]]
6271 Magic Word: {{SUBJECTSPACE}}, main namespace
6273 title=[[Parser Test]]
6281 Magic Word: {{SUBJECTSPACEE}}
6283 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6292 Magic Word: {{NAMESPACE}}
6294 title=[[User:Ævar Arnfjörð Bjarmason]]
6303 Magic Word: {{NAMESPACEE}}
6305 title=[[User:Ævar Arnfjörð Bjarmason]]
6314 Magic Word: {{NAMESPACENUMBER}}
6316 title=[[User:Ævar Arnfjörð Bjarmason]]
6325 Magic Word: {{SUBPAGENAME}}
6327 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
6336 Magic Word: {{SUBPAGENAMEE}}
6338 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
6347 Magic Word: {{ROOTPAGENAME}}
6349 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
6353 <p>Ævar Arnfjörð Bjarmason
6358 Magic Word: {{ROOTPAGENAMEE}}
6360 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
6364 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6369 Magic Word: {{BASEPAGENAME}}
6371 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
6375 <p>Ævar Arnfjörð Bjarmason
6380 Magic Word: {{BASEPAGENAMEE}}
6382 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
6386 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6391 Magic Word: {{TALKPAGENAME}}
6393 title=[[User:Ævar Arnfjörð Bjarmason]]
6397 <p>User talk:Ævar Arnfjörð Bjarmason
6402 Magic Word: {{TALKPAGENAMEE}}
6404 title=[[User:Ævar Arnfjörð Bjarmason]]
6408 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6413 Magic Word: {{SUBJECTPAGENAME}}
6415 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6419 <p>User:Ævar Arnfjörð Bjarmason
6424 Magic Word: {{SUBJECTPAGENAMEE}}
6426 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6428 {{SUBJECTPAGENAMEE}}
6430 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6435 Magic Word: {{NUMBEROFFILES}}
6444 Magic Word: {{PAGENAME}}
6446 title=[[User:Ævar Arnfjörð Bjarmason]]
6450 <p>Ævar Arnfjörð Bjarmason
6455 Magic Word: {{PAGENAME}} with metacharacters
6457 title=[['foo & bar = baz']]
6461 <p><i>'foo & bar = baz'</i>
6466 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
6468 title=[[*RFC 1234 http://example.com/]]
6472 <p>*RFC 1234 http://example.com/
6477 Magic Word: {{PAGENAMEE}}
6479 title=[[User:Ævar Arnfjörð Bjarmason]]
6483 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6488 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
6490 title=[[*RFC 1234 http://example.com/]]
6494 <p>*RFC_1234_http://example.com/
6499 Magic Word: {{REVISIONID}}
6508 Magic Word: {{SCRIPTPATH}}
6517 Magic Word: {{STYLEPATH}}
6526 Magic Word: {{SERVER}}
6530 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
6535 Magic Word: {{SERVERNAME}}
6544 Magic Word: {{SITENAME}}
6553 Case-sensitive magic words, when cased differently, should just be template transclusions
6560 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
6561 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
6562 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
6563 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
6568 Case-insensitive magic words should still work with weird casing.
6578 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
6583 Namespace 1 {{ns:1}}
6592 Namespace 1 {{ns:01}}
6601 Namespace 0 {{ns:0}} (bug 4783)
6609 Namespace 0 {{ns:00}} (bug 4783)
6617 Namespace -1 {{ns:-1}}
6626 Namespace User {{ns:User}}
6635 Namespace User talk {{ns:User_talk}}
6644 Namespace User talk {{ns:uSeR tAlK}}
6653 Namespace File {{ns:File}}
6662 Namespace File {{ns:Image}}
6671 Namespace (lang=de) Benutzer {{ns:User}}
6682 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
6688 <p>Benutzer Diskussion
6696 {{urlencode:hi world?!}}
6697 {{urlencode:hi world?!|WIKI}}
6698 {{urlencode:hi world?!|PATH}}
6699 {{urlencode:hi world?!|QUERY}}
6712 Magic links: internal link to RFC (bug 479)
6716 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
6721 Magic links: RFC (bug 479)
6725 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
6730 Magic links: ISBN (bug 1937)
6734 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
6739 Magic links: PMID incorrectly converts space to underscore
6743 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
6752 Nonexistent template
6754 {{thistemplatedoesnotexist}}
6756 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
6761 Template with invalid target containing tags
6763 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
6765 <p>{{a<b>b</b>|foo|a=b|a = b}}
6770 Template with invalid target containing unclosed tag
6772 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
6774 <p>{{a<b>|foo|a=b|a = b}}</b>
6781 This is a test template
6789 <p>This is a test template
6794 Template with explicit namespace
6798 <p>This is a test template
6806 This is a test template with parameter {{{param}}}
6812 {{paramtest|param=foo}}
6814 <p>This is a test template with parameter foo
6819 Template:paramtestnum
6825 Template unnamed parameter
6827 {{paramtestnum|Main Page|the main page}}
6829 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
6834 Template:templatesimple
6840 Template:templateredirect
6842 #redirect [[Template:templatesimple]]
6846 Template:templateasargtestnum
6852 Template:templateasargtest
6854 {{template{{{templ}}}}}
6858 Template:templateasargtest2
6864 Template with template name as unnamed argument
6866 {{templateasargtestnum|templatesimple}}
6873 Template with template name as argument
6875 {{templateasargtest|templ=simple}}
6882 Template with template name as argument (2)
6884 {{templateasargtest2|templ=templatesimple}}
6891 Template:templateasargtestdefault
6893 {{{{{templ|templatesimple}}}}}
6903 Template with default value
6905 {{templateasargtestdefault}}
6912 Template with default value (value set)
6914 {{templateasargtestdefault|templ=templa}}
6923 {{templateredirect}}
6930 Template with argument in separate line
6932 {{ templateasargtest |
6940 Template with complex template as argument
6943 param ={{ templateasargtest |
6946 <p>This is a test template with parameter (test)
6951 Template with thumb image (with link in description)
6954 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
6956 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>
6961 Template:complextemplate
6963 {{{1}}} {{paramtest|
6964 param ={{{param}}}}}
6968 Template with complex arguments
6971 param ={{ templateasargtest |
6972 templ = simple }}|[[Template:complextemplate|link]]}}
6974 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
6979 BUG 553: link with two variables in a piped link
6982 |[[{{{1}}}|{{{2}}}]]
6987 <td>[[{{{1}}}|{{{2}}}]]
6993 Magic variable as template parameter
6995 {{paramtest|param={{SITENAME}}}}
6997 <p>This is a test template with parameter MediaWiki
7004 [[{{{param}}}|link]]
7008 Template parameter as link source
7010 {{linktest|param=Main Page}}
7012 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
7017 Template-generated attribute string (k='v')
7019 <span {{attr_str|id|v1}}>bar</span>
7021 <p><span id="v1">bar</span>
7028 including another template, {{paramtest|param={{{arg}}}}}
7032 Template passing argument to another template
7034 {{paramtest2|arg='hmm'}}
7036 <p>including another template, This is a test template with parameter 'hmm'
7047 Template as link source
7051 [[{{linktest2}}|Main Page]]
7053 [[{{linktest2}}]]Page
7055 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7056 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7057 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
7075 Template infinite loop
7079 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
7084 Template from main namespace
7103 BUG 529: Template with table, not included at beginning of line
7122 BUG 523: Template shouldn't eat newline (or add an extra one before table)
7142 BUG 41: Template parameters shown as broken links
7151 Template with targets containing wikilinks
7155 {{[[{{echo|foo}}]]}}
7157 {{{{echo|[[foo}}]]}}
7159 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
7160 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
7168 ''None'' of '''this''' should be
7170 but rather passed unmodified
7174 # hmm, fix this or just deprecate msgnw and document its behavior?
7180 {{msgnw:MSGNW test}}
7182 <p>''None'' of '''this''' should be
7184 but rather passed unmodified
7192 {{int:youhavenewmessages|lots of money|not!}}
7194 <p>You have lots of money (not!).
7201 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
7205 <includeonly> and <noinclude> being included
7216 <onlyinclude>Foo</onlyinclude>bar
7220 <onlyinclude> being included
7232 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
7236 <onlyinclude> and <includeonly> being included
7245 <includeonly> and <noinclude> on a page
7247 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
7254 Un-closed <noinclude>
7261 <onlyinclude> on a page
7263 <onlyinclude>Foo</onlyinclude>bar
7270 Un-closed <onlyinclude>
7277 Self-closed noinclude, includeonly, onlyinclude tags
7288 Unbalanced includeonly and noinclude tags
7292 |b</noinclude></noinclude>
7293 |c</noinclude></includeonly>
7294 |d</includeonly></includeonly>
7303 <td>c</includeonly>
7305 <td>d</includeonly></includeonly>
7311 Template:Includeonly section
7314 ==Includeonly section==
7320 Bug 6563: Edit link generation for section shown by <includeonly>
7322 {{includeonly section}}
7324 <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>
7325 <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>
7329 # Uses same input as the contents of [[Template:Includeonly section]]
7331 Bug 6563: Section extraction for section shown by <includeonly>
7336 ==Includeonly section==
7344 Bug 6563: Edit link generation for section suppressed by <includeonly>
7347 ==Includeonly section==
7351 <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>
7356 Bug 6563: Section extraction for section suppressed by <includeonly>
7361 ==Includeonly section==
7369 Un-closed <includeonly>
7375 # TODO: test with DOM fragment reuse!
7377 Parsoid: DOM fragment reuse
7379 parsoid=wt2wt,wt2html
7381 a{{echo|b<table></table>c}}d
7393 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
7394 <table></table>c"}},"i":0}}]}'>b</span>
7395 <table about="#mwt1"></table><span about="#mwt1">c</span>d
7398 <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">
7400 <table about="#mwt2"></table><span about="#mwt2">
7402 <p about="#mwt2">cd</p>
7405 <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">
7408 <table about="#mwt3"></table><span about="#mwt3">
7411 <p about="#mwt3">b</p>
7415 Parsoid: Merge double tds (bug 50603)
7424 <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>
7429 Parsoid: Merge double tds in nested transclusion content (bug 50603)
7439 <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}}]}'>
7441 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
7447 ### <includeonly> and <noinclude> in attributes
7450 0. includeonly around the entire attribute
7452 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
7454 <p><span id="v2">bar</span>
7459 1. includeonly in html attr key
7461 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
7463 <p><span id="foo">bar</span>
7468 2. includeonly in html attr value
7470 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
7471 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
7473 <p><span id="v1">bar</span>
7474 <span id="v1">bar</span>
7479 3. includeonly in part of an attr value
7481 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
7483 <p><span style="color:red;">bar</span>
7488 ### Testing parsing of templates where a template arg
7489 ### has the same name as the template itself.
7499 Templates: Template Name/Arg clash: 1. Use of positional param
7508 Templates: Template Name/Arg clash: 2. Use of named param
7517 Templates: Template Name/Arg clash: 3. Use of named param with empty input
7526 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
7530 Templates: 1. Simple use
7539 Templates: 2. Inside a block tag
7541 <div>{{echo|Foo}}</div>
7542 <blockquote>{{echo|Foo}}</blockquote>
7545 <blockquote>Foo</blockquote>
7550 Templates: P-wrapping: 1a. Templates on consecutive lines
7561 Templates: P-wrapping: 1b. Templates on consecutive lines
7575 Templates: P-wrapping: 1c. Templates on consecutive lines
7578 {{echo|bar}} <div>baz</div>
7587 Templates: P-wrapping: 1d. Template preceded by comment-only line
7596 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
7600 Templates: Inline Text: 1. Multiple tmeplate uses
7602 {{echo|Foo}}bar{{echo|baz}}
7609 Templates: Inline Text: 2. Back-to-back template uses
7611 {{echo|Foo}}{{echo|bar}}
7618 Templates: Block Tags: 1. Multiple template uses
7620 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
7622 <div>Foo</div><div>bar</div><div>baz</div>
7627 Templates: Block Tags: 2. Back-to-back template uses
7629 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
7631 <div>Foo</div><div>bar</div>
7636 Templates: Links: 1. Simple example
7638 {{echo|[[Foo|bar]]}}
7640 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7645 Templates: Links: 2. Generation of link href
7647 [[{{echo|Foo}}|bar]]
7649 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7654 Templates: Links: 3. Generation of part of a link href
7656 [[Fo{{echo|o}}|bar]]
7660 [[Foo{{echo|bar}}baz]]
7662 [[Foo{{echo|bar}}|bar]]
7664 [[:Foo{{echo|bar}}]]
7666 [[:Foo{{echo|bar}}|bar]]
7668 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7669 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7670 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
7671 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
7672 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7673 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
7678 Templates: Links: 4. Multiple templates generating link href
7680 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
7682 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7687 Templates: Links: 5. Generation of link text
7689 [[Foo|{{echo|bar}}]]
7691 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7696 Templates: Links: 5. Nested templates (only outermost template should be marked)
7698 {{echo|[[{{echo|Foo}}|bar]]}}
7700 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7705 Templates: HTML Tag: 1. Generation of HTML attr. key
7707 <div {{echo|style}}="color:red;">foo</div>
7709 <div style="color:red;">foo</div>
7714 Templates: HTML Tag: 2. Generation of HTML attr. value
7716 <div style={{echo|'color:red;'}}>foo</div>
7718 <div style="color:red;">foo</div>
7723 Templates: HTML Tag: 3. Generation of HTML attr key and value
7725 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
7727 <div style="color:red;">foo</div>
7732 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
7734 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
7736 <div title="This is a long title with just one piece templated">foo</div>
7741 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
7743 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
7745 <div title="This is a long title with just one piece templated">foo</div>
7750 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
7752 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
7754 <div title="This is a long title with just one piece templated">foo</div>
7759 Templates: HTML Tag: 7. Generation of partial attribute key string
7761 <div st{{echo|yle}}="color:red;">foo</div>
7763 <div style="color:red;">foo</div>
7768 Templates: HTML Tables: 1. Generating start of a HTML table
7770 {{echo|<table><tr><td>foo</td>}}</tr></table>
7772 <table><tr><td>foo</td></tr></table>
7777 Templates: HTML Tables: 2a. Generating middle of a HTML table
7779 <table><tr>{{echo|<td>foo</td>}}</tr></table>
7781 <table><tr><td>foo</td></tr></table>
7786 Templates: HTML Tables: 2b. Generating middle of a HTML table
7788 <table>{{echo|<tr><td>foo</td></tr>}}</table>
7790 <table><tr><td>foo</td></tr></table>
7795 Templates: HTML Tables: 3. Generating end of a HTML table
7797 <table><tr>{{echo|<td>foo</td></tr></table>}}
7799 <table><tr><td>foo</td></tr></table>
7804 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
7806 {{echo|<table>}}<tr><td>foo</td></tr></table>
7808 <table><tr><td>foo</td></tr></table>
7813 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
7815 <table>{{echo|<tr>}}<td>foo</td></tr></table>
7817 <table><tr><td>foo</td></tr></table>
7822 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
7824 <table><tr>{{echo|<td>}}foo</td></tr></table>
7826 <table><tr><td>foo</td></tr></table>
7831 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
7833 <table><tr><td>foo{{echo|</td>}}</tr></table>
7835 <table><tr><td>foo</td></tr></table>
7840 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
7842 <table><tr><td>foo</td>{{echo|</tr>}}</table>
7844 <table><tr><td>foo</td></tr></table>
7849 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
7851 <table><tr><td>foo</td></tr>{{echo|</table>}}
7853 <table><tr><td>foo</td></tr></table>
7858 Templates: HTML Tables: 5. Proper fostering of categories from inside
7860 parsoid=wt2html,wt2wt
7862 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
7863 <!--Two categories (Bug 50330)-->
7864 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
7866 <link rel="mw:WikiLink/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
7867 <!--Two categories (Bug 50330)-->
7868 <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>
7872 Templates: Wiki Tables: 1a. Fostering of entire template content
7880 <tr><td></td></tr></table>
7885 Templates: Wiki Tables: 1b. Fostering of entire template content
7898 <tr><td></td></tr></table>
7903 Templates: Wiki Tables: 2. Fostering of partial template content
7913 <tr><td></td></tr></table>
7918 Templates: Wiki Tables: 3. td-content via multiple templates
7921 {{echo|{{pipe}}a}}{{echo|b}}
7932 Templates: Wiki Tables: 4. Templated tags, no content
7938 <tr><td></td></tr></table>
7943 Templates: Wiki Tables: 5. Templated tags, regular td-tags
7957 Templates: Wiki Tables: 6. Templated tags, templated td-tags
7971 Templates: Lists: Multi-line list-items via templates
7973 *{{echo|a {{nonexistent|
7975 *{{echo|b {{nonexistent|
7978 <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>
7979 </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>
7985 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
7987 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
7989 <p><i>ab</i>c<i>d</i>e
7994 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
7995 (PHP parser generates misnested html)
7999 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
8001 <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>
8005 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
8006 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
8008 parsoid=wt2html,wt2wt
8010 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
8012 <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>
8013 <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>
8014 <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>
8018 Templates: Ugly nesting: 4. Divs opened/closed across templates
8020 a<div>b{{echo|c</div>d}}e
8027 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
8033 |{{echo|foo</table>}}
8037 <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|}"]}'>
8041 <td>foo</td></tr></tbody></table><span about="#mwt1">
8042 </span><span about="#mwt1">bar</span><span about="#mwt1">
8047 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
8057 <td>1. {{echo|foo </table>}}</td>
8059 <td>2. {{echo|baz </table>}}</td>
8072 <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>"]}'>
8077 <td>1. foo </td></tr></tbody></table></td>
8079 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
8080 </span><span about="#mwt2">
8081 </span><span about="#mwt2">
8082 </span><span about="#mwt2">abc</span><span about="#mwt2">
8083 </span><span about="#mwt2">
8084 </span><span about="#mwt2">
8085 </span><span about="#mwt2">
8086 </span><span about="#mwt2">
8087 </span><span about="#mwt2">
8088 </span><span about="#mwt2">xyz</span><span about="#mwt2">
8089 </span><span about="#mwt2">
8094 Templates: Ugly templates: 3. newline-only template parameter
8103 # This looks like a bug: a single newline triggers p/br for some reason.
8105 Templates: Ugly templates: 4. newline-only template parameter inconsistency
8116 Parser Functions: 1. Simple example
8125 Parser Functions: 2. Nested use (only outermost should be marked up)
8134 ### Pre-save transform tests
8137 pre-save transform: subst:
8143 This is a test template
8147 pre-save transform: normal template
8157 pre-save transform: nonexistent template
8161 {{thistemplatedoesnotexist}}
8163 {{thistemplatedoesnotexist}}
8168 pre-save transform: subst magic variables
8177 # This is bug 89, which I fixed. -- wtm
8179 pre-save transform: subst: templates with parameters
8183 {{subst:paramtest|param="something else"}}
8185 This is a test template with parameter "something else"
8191 <nowiki>'''not wiki'''</nowiki>
8195 pre-save transform: nowiki in subst (bug 1188)
8199 {{subst:nowikitest}}
8201 <nowiki>'''not wiki'''</nowiki>
8206 Template:commenttest
8208 This template has <!-- a comment --> in it.
8212 pre-save transform: comment in subst (bug 1936)
8216 {{subst:commenttest}}
8218 This template has <!-- a comment --> in it.
8222 pre-save transform: unclosed tag
8226 <nowiki>'''not wiki'''
8228 <nowiki>'''not wiki'''
8232 pre-save transform: mixed tag case
8236 <NOwiki>'''not wiki'''</noWIKI>
8238 <NOwiki>'''not wiki'''</noWIKI>
8242 pre-save transform: unclosed comment in <nowiki>
8246 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
8248 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
8251 # Leading @ in this template definition works around a limitation
8252 # in parsoid's parserTests which otherwise strips the <span> from the
8253 # result (confusing it for a template wrapper)
8257 @<span onmouseover="alert('crap')">Oh no</span>
8261 (confirming safety of fix for subst bug 1936)
8263 {{Template:dangerous}}
8265 <p>@<span>Oh no</span>
8270 pre-save transform: comment containing gallery (bug 5024)
8274 <!-- <gallery>data</gallery> -->
8276 <!-- <gallery>data</gallery> -->
8280 pre-save transform: comment containing extension
8284 <!-- <tag>data</tag> -->
8286 <!-- <tag>data</tag> -->
8290 pre-save transform: comment containing nowiki
8294 <!-- <nowiki>data</nowiki> -->
8296 <!-- <nowiki>data</nowiki> -->
8300 pre-save transform: <noinclude> in subst (bug 3298)
8310 pre-save transform: <onlyinclude> in subst (bug 3298)
8322 {{<includeonly>subst:</includeonly>Includes}}
8326 Template:SafeSubstTest
8328 {{<includeonly>safesubst:</includeonly>Includes}}
8332 bug 22297: safesubst: works during PST
8336 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
8342 bug 22297: safesubst: works during normal parse
8351 subst: does not work during normal parse
8355 <p>{{subst:Includes}}
8360 pre-save transform: context links ("pipe trick")
8364 [[Article (context)|]]
8367 [[Bar:Article (context)|]]
8368 [[:Bar:Article (context)|]]
8370 [[|Article (context)]]
8374 [[Article (context)|Article]]
8375 [[Bar:Article|Article]]
8376 [[:Bar:Article|Article]]
8377 [[Bar:Article (context)|Article]]
8378 [[:Bar:Article (context)|Article]]
8380 [[Article (context)]]
8381 [[Bar:X (Y) Z|X (Y) Z]]
8382 [[:Bar:X (Y) Z|X (Y) Z]]
8386 pre-save transform: context links ("pipe trick") with interwiki prefix
8390 [[interwiki:Article|]]
8391 [[:interwiki:Article|]]
8392 [[interwiki:Bar:Article|]]
8393 [[:interwiki:Bar:Article|]]
8395 [[interwiki:Article|Article]]
8396 [[:interwiki:Article|Article]]
8397 [[interwiki:Bar:Article|Bar:Article]]
8398 [[:interwiki:Bar:Article|Bar:Article]]
8402 pre-save transform: context links ("pipe trick") with parens in title
8404 pst title=[[Somearticle (context)]]
8408 [[Article (context)|Article]]
8412 pre-save transform: context links ("pipe trick") with comma in title
8414 pst title=[[Someplace, Somewhere]]
8417 [[Otherplace, Elsewhere|]]
8418 [[Otherplace, Elsewhere, Anywhere|]]
8420 [[Otherplace, Somewhere|Otherplace]]
8421 [[Otherplace, Elsewhere|Otherplace]]
8422 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
8426 pre-save transform: context links ("pipe trick") with parens and comma
8428 pst title=[[Someplace (IGNORED), Somewhere]]
8431 [[Otherplace (place), Elsewhere|]]
8433 [[Otherplace, Somewhere|Otherplace]]
8434 [[Otherplace (place), Elsewhere|Otherplace]]
8438 pre-save transform: context links ("pipe trick") with comma and parens
8440 pst title=[[Who, me? (context)]]
8443 [[Me, Myself, and I (1937 song)|]]
8445 [[Yes, you. (context)|Yes, you.]]
8446 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
8450 pre-save transform: context links ("pipe trick") with namespace
8452 pst title=[[Ns:Somearticle]]
8456 [[Ns:Article|Article]]
8460 pre-save transform: context links ("pipe trick") with namespace and parens
8462 pst title=[[Ns:Somearticle (context)]]
8466 [[Ns:Article (context)|Article]]
8470 pre-save transform: context links ("pipe trick") with namespace and comma
8472 pst title=[[Ns:Somearticle, Context, Whatever]]
8476 [[Ns:Article, Context, Whatever|Article]]
8480 pre-save transform: context links ("pipe trick") with namespace, comma and parens
8482 pst title=[[Ns:Somearticle, Context (context)]]
8486 [[Ns:Article (context)|Article]]
8490 pre-save transform: context links ("pipe trick") with namespace, parens and comma
8492 pst title=[[Ns:Somearticle (IGNORED), Context]]
8496 [[Ns:Article, Context|Article]]
8500 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
8504 [[Article(context)|]]
8505 [[Bar:Article(context)|]]
8506 [[:Bar:Article(context)|]]
8507 [[|Article(context)]]
8511 [[Article(context)|Article]]
8512 [[Bar:Article(context)|Article]]
8513 [[:Bar:Article(context)|Article]]
8514 [[Article(context)]]
8516 [[:Bar:X(Y)Z|X(Y)Z]]
8520 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
8524 [[Article (context)|]]
8525 [[Bar:Article (context)|]]
8526 [[:Bar:Article (context)|]]
8527 [[|Article (context)]]
8531 [[Article (context)|Article]]
8532 [[Bar:Article (context)|Article]]
8533 [[:Bar:Article (context)|Article]]
8534 [[Article (context)]]
8535 [[Bar:X (Y) Z|X (Y) Z]]
8536 [[:Bar:X (Y) Z|X (Y) Z]]
8540 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
8544 [[Article(context)|]]
8545 [[Bar:Article(context)|]]
8546 [[:Bar:Article(context)|]]
8547 [[|Article(context)]]
8551 [[Article(context)|Article]]
8552 [[Bar:Article(context)|Article]]
8553 [[:Bar:Article(context)|Article]]
8554 [[Article(context)]]
8556 [[:Bar:X(Y)Z|X(Y)Z]]
8560 pre-save transform: context links ("pipe trick") with commas (bug 21660)
8564 [[Article (context), context|]]
8565 [[Article (context),context|]]
8566 [[Bar:Article (context), context|]]
8567 [[Bar:Article (context),context|]]
8568 [[:Bar:Article (context), context|]]
8569 [[:Bar:Article (context),context|]]
8571 [[Article (context), context|Article]]
8572 [[Article (context),context|Article]]
8573 [[Bar:Article (context), context|Article]]
8574 [[Bar:Article (context),context|Article]]
8575 [[:Bar:Article (context), context|Article]]
8576 [[:Bar:Article (context),context|Article]]
8580 pre-save transform: trim trailing empty lines
8584 Empty lines are trimmed
8590 Empty lines are trimmed
8594 pre-save transform: Signature expansion
8599 * <noinclude>~~~</noinclude>
8600 * <includeonly>~~~</includeonly>
8601 * <onlyinclude>~~~</onlyinclude>
8603 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
8604 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
8605 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
8606 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
8611 pre-save transform: Signature expansion in nowiki tags (bug 93)
8617 <nowiki>~~~~</nowiki>
8619 <includeonly><nowiki>~~~~</nowiki></includeonly>
8621 <noinclude><nowiki>~~~~</nowiki></noinclude>
8623 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
8625 {{subst:Foo}} shall be converted to FOO
8627 As well as inside noinclude/onlyinclude
8628 <noinclude>{{subst:Foo}}</noinclude>
8629 <onlyinclude>{{subst:Foo}}</onlyinclude>
8631 But not inside includeonly
8632 <includeonly>{{subst:Foo}}</includeonly>
8636 <nowiki>~~~~</nowiki>
8638 <includeonly><nowiki>~~~~</nowiki></includeonly>
8640 <noinclude><nowiki>~~~~</nowiki></noinclude>
8642 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
8644 FOO shall be converted to FOO
8646 As well as inside noinclude/onlyinclude
8647 <noinclude>FOO</noinclude>
8648 <onlyinclude>FOO</onlyinclude>
8650 But not inside includeonly
8651 <includeonly>{{subst:Foo}}</includeonly>
8655 Parsoid: Recognize nowiki with trailing space in tags
8659 <nowiki ><div>[[foo]]</nowiki >
8667 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
8674 Parsoid: Recognize nowiki with odd capitalization
8678 <noWikI ><div>[[foo]]</Nowiki >
8680 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
8685 Parsoid: Escape nowiki with trailing space in tags
8689 <nowiki > foo </nowiki >
8695 <p><nowiki > foo </nowiki ></p>
8696 <p>a<nowiki />b</p>
8697 <p>c<nowiki/ >d</p>
8701 Parsoid: Escape weird noWikI capitalizations
8705 <noWikI > foo </NoWikI >
8707 <p><noWikI > foo </NoWikI ></p>
8711 ### Message transform tests
8714 message transform: magic variables
8724 message transform: should not transform wiki markup
8734 message transform: <noinclude> in transcluded template (bug 4926)
8744 message transform: <onlyinclude> in transcluded template (bug 4926)
8754 {{#special:}} page name, known
8758 {{#special:Recentchanges}}
8760 Special:RecentChanges
8764 {{#special:}} page name with subpage, known
8768 {{#special:Recentchanges/param}}
8770 Special:RecentChanges/param
8774 {{#special:}} page name, unknown
8778 {{#special:foobar nonexistent}}
8780 Special:Foobar nonexistent
8784 {{#speciale:}} page name, known
8788 {{#speciale:Recentchanges}}
8790 Special:RecentChanges
8794 {{#speciale:}} page name with subpage, known
8798 {{#speciale:Recentchanges/param}}
8800 Special:RecentChanges/param
8804 {{#speciale:}} page name, unknown
8808 {{#speciale:foobar nonexistent}}
8810 Special:Foobar_nonexistent
8816 ### For Parsoid-specific tests, see
8817 #### http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
8824 [[Image:foobar.jpg]]
8826 <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>
8831 Simple image (parsoid)
8835 [[Image:foobar.jpg]]
8837 <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>
8842 Simple image (using File: namespace, now canonical) (php)
8848 <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>
8853 Simple image (using File: namespace, now canonical) (parsoid)
8859 <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>
8864 Right-aligned image (php)
8868 [[Image:foobar.jpg|right]]
8870 <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>
8875 Right-aligned image (parsoid)
8879 [[File:Foobar.jpg|right]]
8881 <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>
8885 Image with caption (php)
8889 [[File:Foobar.jpg|right|Caption text]]
8891 <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>
8896 Image with caption (parsoid)
8900 [[File:Foobar.jpg|right|Caption text]]
8902 <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>
8906 Image with empty attribute (php)
8910 [[File:Foobar.jpg|right||Caption text]]
8912 <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>
8917 Image with empty attribute (parsoid)
8921 [[File:Foobar.jpg|right||Caption text]]
8923 <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>
8927 Image with attributes from template (php)
8931 [[File:Foobar.jpg|{{image_attribs}}]]
8933 <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>
8938 Image with attributes from template (parsoid)
8942 [[File:Foobar.jpg|{{image_attribs}}]]
8944 <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>
8948 Image with link tails (php)
8952 123[[File:Foobar.jpg]]456
8953 123[[File:Foobar.jpg|right]]456
8954 123[[File:Foobar.jpg|thumb]]456
8956 <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
8958 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
8959 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
8964 Image with link tails (parsoid)
8968 123[[File:Foobar.jpg]]456
8969 123[[File:Foobar.jpg|right]]456
8970 123[[File:Foobar.jpg|thumb]]456
8972 <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>
8973 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
8974 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
8978 Image with multiple captions -- only last one is accepted (php)
8982 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8984 <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>
8989 Image with multiple captions -- only last one is accepted (parsoid)
8993 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8995 <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>
8999 Image with width attribute at different positions (php)
9003 [[File:Foobar.jpg|200px|right|Caption]]
9004 [[File:Foobar.jpg|right|200px|Caption]]
9005 [[File:Foobar.jpg|right|Caption|200px]]
9007 <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>
9008 <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>
9009 <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>
9014 Image with width attribute at different positions (parsoid)
9018 [[File:Foobar.jpg|200px|right|Caption]]
9019 [[File:Foobar.jpg|right|200px|Caption]]
9020 [[File:Foobar.jpg|right|Caption|200px]]
9022 <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>
9023 <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>
9024 <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>
9028 Image with link parameter, wiki target (php)
9032 [[File:Foobar.jpg|link=Main Page]]
9034 <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>
9039 Image with link parameter, wiki target (parsoid)
9043 [[File:Foobar.jpg|link=Main Page]]
9045 <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>
9049 Image with link parameter, URL target (php)
9053 [[File:Foobar.jpg|link=http://example.com/]]
9055 <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>
9059 # parsoid bug 49293 (part 1)
9061 Image with link parameter, URL target (parsoid)
9065 [[File:Foobar.jpg|link=http://example.com/]]
9067 <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>
9071 Image with link parameter, protocol-less URL target (php)
9075 [[File:Foobar.jpg|link=//example.com/]]
9077 <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>
9081 # parsoid bug 49293 (part 2)
9083 Image with link parameter, protocol-less URL target (parsoid)
9087 [[File:Foobar.jpg|link=//example.com/]]
9089 <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>
9093 Image with link parameter, wgExternalLinkTarget
9095 [[Image:foobar.jpg|link=http://example.com/]]
9097 wgExternalLinkTarget='foobar'
9099 <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>
9104 Image with link parameter, wgNoFollowLinks set to false
9106 [[Image:foobar.jpg|link=http://example.com/]]
9108 wgNoFollowLinks=false
9110 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9115 Image with link parameter, wgNoFollowDomainExceptions
9117 [[Image:foobar.jpg|link=http://example.com/]]
9119 wgNoFollowDomainExceptions='example.com'
9121 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9126 Image with link parameter, wgExternalLinkTarget, unnamed parameter
9128 [[Image:foobar.jpg|link=http://example.com/|Title]]
9130 wgExternalLinkTarget='foobar'
9132 <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>
9137 Image with empty link parameter (php)
9141 [[File:Foobar.jpg|link=]]
9143 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
9148 Image with empty link parameter (parsoid)
9152 [[File:Foobar.jpg|link=]]
9154 <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>
9158 Image with link parameter (wiki target) and unnamed parameter (php)
9162 [[File:Foobar.jpg|link=Main Page|Title]]
9164 <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>
9169 Image with link parameter (wiki target) and unnamed parameter (parsoid)
9173 [[File:Foobar.jpg|link=Main Page|Title]]
9175 <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>
9179 Image with link parameter (URL target) and unnamed parameter (php)
9183 [[File:Foobar.jpg|link=http://example.com/|Title]]
9185 <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>
9190 Image with link parameter (URL target) and unnamed parameter (parsoid)
9194 [[File:Foobar.jpg|link=http://example.com/|Title]]
9196 <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>
9200 Thumbnail image with link parameter
9204 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
9206 <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>
9211 Manually-specified thumbnail image
9215 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
9217 <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>
9222 Manually-specified thumbnail image with explicit link to wiki page
9226 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
9228 <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>
9233 Manually-specified thumbnail image with explicit link to url
9237 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
9239 <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>
9244 Manually-specified thumbnail image with explicit no link
9248 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
9250 <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>
9255 Manually-specified thumbnail image with explicit link and alt text
9259 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
9261 <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>
9266 Image with frame and link
9268 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
9270 <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>
9275 Image with frame and link and explicit alt
9277 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
9279 <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>
9284 Image with wiki markup in implicit alt
9286 [[Image:Foobar.jpg|testing '''bold''' in alt]]
9288 <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>
9293 Image with wiki markup in explicit alt
9295 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
9297 <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>
9302 Link to image page- image page normally doesn't exists, hence edit link
9303 Add test with existing image page
9304 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
9308 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
9313 bug 18784 Link to non-existent image page with caption should use caption as link text
9315 [[:Image:test|caption]]
9317 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
9322 Frameless image caption with a free URL
9324 [[Image:foobar.jpg|http://example.com]]
9326 <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>
9331 Thumbnail image caption with a free URL
9333 [[Image:foobar.jpg|thumb|http://example.com]]
9335 <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>
9340 Thumbnail image caption with a free URL and explicit alt
9342 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
9344 <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>
9349 SVG thumbnails with no language set
9352 [[File:Foobar.svg|thumb|width=200]]
9354 <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>
9359 SVG thumbnails with language de
9362 [[File:Foobar.svg|thumb|width=200|lang=de]]
9364 <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>
9369 SVG thumbnails with invalid language code
9372 [[File:Foobar.svg|thumb|width=200|lang=invalid.language.code]]
9374 <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>
9379 BUG 1887: A ISBN with a thumbnail
9381 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
9383 <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>
9388 BUG 1887: A RFC with a thumbnail
9390 [[Image:foobar.jpg|thumb|This is RFC 12354]]
9392 <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>
9397 BUG 1887: A mailto link with a thumbnail
9399 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
9401 <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>
9405 # Pending resolution to bug 368
9407 BUG 648: Frameless image caption with a link
9409 [[Image:foobar.jpg|text with a [[link]] in it]]
9411 <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>
9416 BUG 648: Frameless image caption with a link (suffix)
9418 [[Image:foobar.jpg|text with a [[link]]foo in it]]
9420 <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>
9425 BUG 648: Frameless image caption with an interwiki link
9427 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
9429 <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>
9434 BUG 648: Frameless image caption with a piped interwiki link
9436 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
9438 <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>
9443 Escape HTML special chars in image alt text
9445 [[Image:foobar.jpg|& < > "]]
9447 <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>
9452 BUG 499: Alt text should have Ӓ, not &1234;
9454 [[Image:foobar.jpg|♀]]
9456 <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>
9461 Broken image caption with link
9463 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
9465 <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.
9470 Image caption containing another image
9472 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
9474 <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>
9479 Image caption containing a newline
9481 [[Image:Foobar.jpg|This
9484 <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>
9489 Parsoid: Image caption containing leading space
9490 (The leading space should not trigger nowiki escaping in wt2wt mode)
9492 [[Image:Foobar.jpg|thumb| bar]]
9494 <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>
9499 Bug 3090: External links other than http: in image captions
9501 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
9503 <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>
9510 [[Image:foobar.jpg|a|class=b]]
9512 <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>
9517 Localized image handling (1).
9521 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
9523 <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>
9528 Localized image handling (2).
9532 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
9534 <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>
9539 "border", "frameless" and "class" attributes on an image.
9541 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
9543 <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>
9550 #REDIRECT [[File:Barfoo.jpg]]
9556 [[Image:Barfoo.jpg]]
9558 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
9563 Missing image with uploads disabled
9567 [[Image:Foobaz.jpg]]
9569 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
9573 # Parsoid-specific testing for images
9574 # http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
9575 # Currently imperfect due to a flaw in the Parsoid testrunner
9577 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
9581 Parsoid-specific image handling - simple image with size and middle alignment
9585 [[Image:Foobar.jpg|50px|middle]]
9588 <span class="mw-valign-middle" typeof="mw:Image">
9589 <a href="File:Foobar.jpg">
9590 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
9597 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
9601 [[Image:Foobar.jpg|500x10px|baseline|caption]]
9604 <span class="mw-valign-baseline" 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/89px-Foobar.jpg" height="10" width="89">
9613 Parsoid-specific image handling - simple image with border and size spec
9617 [[Image:Foobar.jpg|50px|border|caption]]
9620 <span class="mw-image-border" typeof="mw:Image" data-mw="{"caption":"caption"}">
9621 <a href="File:Foobar.jpg">
9622 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
9629 Parsoid-specific image handling - thumbnail with halign, valign, and caption
9633 [[Image:Foobar.jpg|thumb|left|baseline|caption content]]
9635 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
9636 <a href="File:Foobar.jpg">
9637 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="21" width="180" />
9639 <figcaption>caption content</figcaption>
9644 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
9648 [[Image:Foobar.jpg|thumb|50x50px|right|middle|caption]]
9650 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
9651 <a href="File:Foobar.jpg">
9652 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
9654 <figcaption>caption</figcaption>
9659 Parsoid-specific image handling - framed image with specific size and caption
9663 [[Image:Foobar.jpg|500x50px|frame|caption]]
9665 <figure typeof="mw:Image/Frame">
9666 <a href="File:Foobar.jpg">
9667 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9669 <figcaption>caption</figcaption>
9674 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
9678 [[Image:Foobar.jpg|500x50px|frame|left|baseline|caption]]
9680 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
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" />
9684 <figcaption>caption</figcaption>
9689 Parsoid-specific image handling - frameless image with specific size, border, and caption
9693 [[Image:Foobar.jpg|frameless|500x50px|border|caption]]
9696 <span class="mw-image-border" typeof="mw:Image/Frameless" data-mw="{"caption":"caption"}">
9697 <a href="File:Foobar.jpg">
9698 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9704 #Parsoid-specific image handling - simple image with a formatted caption
9708 #[[Image:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
9711 #<span typeof="mw:Image">
9712 #<a class="mw-default-size" href="Image:Foobar.jpg">
9713 #<img alt="Foobar.jpg" class="mw-default-size" src="http://example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
9724 Subpage test/subpage
9732 subpage title=[[Subpage test]]
9736 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
9741 Subpage noslash link
9743 subpage title=[[Subpage test]]
9747 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
9751 # TODO: make this PHP-parser compatible!
9753 Relative subpage noslash link
9755 parsoid=wt2wt,wt2html,html2html
9756 subpage title=[[Subpage test/1/2/3/4]]
9762 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
9763 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
9766 # TODO: make this PHP-parser compatible!
9768 Parsoid: dot-slash prefixed wikilinks
9770 parsoid=wt2wt,wt2html,html2html
9778 <p><a rel="mw:WikiLink" href="./Foo">foo</a></p>
9779 <p><a rel="mw:WikiLink" href="./Bar">bar</a></p>
9780 <p><a rel="mw:WikiLink" href="./Baz/">baz/</a></p>
9788 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
9793 BUG 561: {{/Subpage}}
9795 subpage title=[[Page]]
9799 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
9807 Category:MediaWiki User's Guide
9815 [[:Category:MediaWiki User's Guide]]
9817 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
9826 [[Category:MediaWiki User's Guide]]
9828 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9832 PAGESINCATEGORY invalid title fatal (r33546 fix)
9834 {{PAGESINCATEGORY:<bogus>}}
9841 Category with different sort key
9845 [[Category:MediaWiki User's Guide|Foo]]
9847 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9851 Category with identical sort key
9855 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
9857 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9861 Category with empty sort key
9866 [[Category:MediaWiki User's Guide|]]
9868 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
9872 Category with empty sort key and parentheses
9877 [[Category:Foo (bar)|]]
9879 [[Category:Foo (bar)|Foo]]
9883 Category with link tail
9888 123[[Category:Foo]]456
9890 123[[Category:Foo]]456
9894 Category with template
9899 [[Category:{{echo|Foo}}]]
9901 [[Category:{{echo|Foo}}]]
9905 Category with template in sort key
9910 [[Category:Foo|{{echo|Bar}}]]
9912 [[Category:Foo|{{echo|Bar}}]]
9916 Category with template in sort key and title
9921 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
9923 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
9927 Category / paragraph interactions
9929 Foo [[Category:Baz]] Bar
9931 Foo [[Category:Baz]]
9939 [[Category:Baz]] Bar
9952 {{echo|[[Category:Baz]]}}
9967 Parsoid: Serialize link to category page with colon escape
9973 [[:Category:Foo|Bar]]
9976 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
9977 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
9982 Parsoid: Link prefix/suffixes aren't applied to category links
9984 parsoid=wt2html,wt2wt,html2html
9989 <p>x<link rel="mw:WikiLink/Category" href="Category:Foo">y</p>
9993 Parsoid: Serialize link to file page with colon escape
9999 [[:File:Foo.png|Bar]]
10002 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
10003 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
10008 Parsoid: Serialize a genuine category link without colon escape
10013 [[Category:Foo|Bar]]
10015 <link rel="mw:WikiLink/Category" href="Category:Foo">
10016 <link rel="mw:WikiLink/Category" href="Category:Foo#Bar">
10020 ### Inter-language links
10023 Inter-language links
10029 [[zh:食品]]
10031 es:Alimento fr:Nourriture zh:食品
10035 Duplicate interlanguage links (bug 24502)
10051 Basic section headings
10058 ===Smaller headline===
10061 <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>
10064 <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>
10067 <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>
10073 Section headings with TOC
10076 === Subheadline 1 ===
10077 ===== Skipping a level =====
10078 ====== Skipping a level ======
10082 ===Another headline===
10084 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10086 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
10088 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
10090 <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>
10092 <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>
10099 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
10101 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
10106 <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>
10107 <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>
10108 <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>
10109 <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>
10110 <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>
10113 <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>
10117 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
10119 Handling of sections up to level 6 and beyond
10122 == Level 2 Heading==
10123 === Level 3 Heading===
10124 ==== Level 4 Heading====
10125 ===== Level 5 Heading=====
10126 ====== Level 6 Heading======
10127 ======= Level 7 Heading=======
10128 ======== Level 8 Heading========
10129 ========= Level 9 Heading=========
10130 ========== Level 10 Heading==========
10132 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10134 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
10136 <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>
10138 <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>
10140 <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>
10142 <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>
10144 <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>
10145 <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>
10146 <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>
10147 <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>
10148 <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>
10161 <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>
10162 <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>
10163 <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>
10164 <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>
10165 <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>
10166 <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>
10167 <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>
10168 <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>
10169 <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>
10170 <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>
10175 TOC regression (bug 9764)
10179 ==== title 1.1.1 ====
10184 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10186 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10188 <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>
10190 <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>
10193 <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>
10196 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
10198 <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>
10203 <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>
10204 <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>
10205 <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>
10206 <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>
10207 <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>
10208 <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>
10213 TOC with wgMaxTocLevel=3 (bug 6204)
10219 ==== title 1.1.1 ====
10224 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10226 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10228 <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>
10229 <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>
10232 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
10234 <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>
10239 <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>
10240 <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>
10241 <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>
10242 <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>
10243 <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>
10244 <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>
10249 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
10255 ====Section 1.1.1====
10256 ====Section 1.1.1.1====
10259 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10261 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
10263 <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>
10266 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
10269 <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>
10270 <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>
10271 <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>
10272 <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>
10273 <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>
10279 Resolving duplicate section names
10284 <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>
10285 <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>
10290 Resolving duplicate section names with differing case (bug 10721)
10295 <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>
10296 <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>
10308 Template with sections, __NOTOC__
10315 <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>
10316 <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>
10317 <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>
10318 <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>
10323 __NOEDITSECTION__ keyword
10329 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
10330 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
10335 Link inside a section heading
10337 ==Section with a [[Main Page|link]] in it==
10339 <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>
10344 TOC regression (bug 12077)
10351 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10353 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10355 <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>
10358 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
10361 <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>
10362 <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>
10363 <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>
10368 BUG 1219 URL next to image (good)
10370 http://example.com [[Image:foobar.jpg]]
10372 <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>
10377 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
10380 The line above must have a trailing space!
10383 But just in case it doesn't...
10385 <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>
10386 <p>The line above must have a trailing space!
10388 <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>
10389 <p>But just in case it doesn't...
10394 Header with special characters (bug 25462)
10396 The tooltips shall not show entities to the user (ie. be double escaped)
10413 <p>The tooltips shall not show entities to the user (ie. be double escaped)
10415 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10417 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
10418 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
10419 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
10420 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
10421 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
10424 <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>
10427 <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>
10430 <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>
10433 <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>
10436 <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>
10442 Headers with excess '=' characters
10443 (Are similar tests necessary beyond the 1st level?)
10447 =''italic'' heading==
10448 ==''italic'' heading=
10450 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10452 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
10453 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
10454 <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>
10455 <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>
10458 <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>
10459 <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>
10460 <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>
10461 <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>
10466 HTML headers vs TOC (bug 23393)
10467 (__NOEDITSECTION__ for clearer output, doesn't matter here)
10479 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10481 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
10483 <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>
10484 <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>
10487 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
10489 <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>
10490 <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>
10495 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
10496 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
10497 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
10498 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
10499 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
10500 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
10505 BUG 1219 URL next to image (broken)
10507 http://example.com[[Image:foobar.jpg]]
10509 <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>
10514 Bug 1186 news: in the middle of text
10516 http://en.wikinews.org/wiki/Wikinews:Workplace
10518 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
10524 Namespaced link must have a title
10533 Namespaced link must have a title (bad fragment version)
10535 [[Project:#fragment]]
10537 <p>[[Project:#fragment]]
10543 ### HTML tags and HTML attributes
10547 div with no attributes
10549 <div>HTML rocks</div>
10551 <div>HTML rocks</div>
10556 div with double-quoted attribute
10558 <div id="rock">HTML rocks</div>
10560 <div id="rock">HTML rocks</div>
10565 div with single-quoted attribute
10567 <div id='rock'>HTML rocks</div>
10569 <div id="rock">HTML rocks</div>
10574 div with unquoted attribute
10576 <div id=rock>HTML rocks</div>
10578 <div id="rock">HTML rocks</div>
10583 div with illegal double attributes
10585 <div id="a" id="b">HTML rocks</div>
10587 <div id="b">HTML rocks</div>
10591 # FIXME: produce empty string instead of "class" in the PHP parser, following
10594 div with empty attribute value, space before equals
10598 <div class =>HTML rocks</div>
10600 <div class="">HTML rocks</div>
10604 # The PHP parser escapes the opening brace to { for some reason, so
10605 # disabled this test for it.
10607 div with braces in attribute value
10611 <div title="{}">Foo</div>
10613 <div title="{}">Foo</div>
10616 # This it very inconsistent in the PHP parser: it returns
10617 # class="class" if there is a space between the name and the equal sign (see
10618 # 'div with empty attribute value, space before equals'), but strips the
10619 # attribute completely if the space is missing. We hope that not much content
10620 # depends on this, so are implementing the behavior below in Parsoid for
10621 # consistencies' sake. Disabled for the PHP parser.
10622 # FIXME: fix this behavior in the PHP parser?
10624 div with empty attribute value, no space before equals
10628 <div class=>HTML rocks</div>
10630 <div class="">HTML rocks</div>
10635 HTML multiple attributes correction
10637 <p class="error" class="awesome">Awesome!</p>
10639 <p class="awesome">Awesome!</p>
10644 Table multiple attributes correction
10647 !+ class="error" class="awesome"| status
10652 <th class="awesome"> status
10660 <DIV ID="x">HTML ROCKS</DIV>
10662 <div id="x">HTML ROCKS</div>
10667 Non-ASCII pseudo-tags are rendered as text
10676 Pseudo-tag with URL 'name' renders as url link
10678 <http://example.com/>
10680 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
10685 text with amp in the middle of nowhere
10689 <p>Remember AT&T?
10694 text with character entity: eacute
10696 I always thought é was a cute letter.
10698 <p>I always thought é was a cute letter.
10703 text with entity-escaped character entity-like string: eacute
10705 I always thought &eacute; was a cute letter.
10707 <p>I always thought &eacute; was a cute letter.
10712 text with undefined character entity: xacute
10714 I always thought &xacute; was a cute letter.
10716 <p>I always thought &xacute; was a cute letter.
10722 ### Nesting tests (see bug 41545, 50604, 51081)
10725 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
10726 # Note that html2wt is considerably more difficult if we use <b> in
10727 # the test case, instead of <big>
10729 Ensure that HTML adoption agency algorithm is properly implemented.
10731 <big>X<big>Y</big>Z</big>
10733 <p><big>X<big>Y</big>Z</big>
10737 # This was bug 41545 in the PHP parser.
10741 <kbd>X<kbd>Y</kbd>Z</kbd>
10743 <p><kbd>X<kbd>Y</kbd>Z</kbd>
10747 # The following cases were bug 51081 in the PHP parser.
10748 # Note that there are some other nestable tags (b, i, etc) which are
10749 # not covered; see bug 51081 for discussion.
10753 <em>X<em>Y</em>Z</em>
10755 <p><em>X<em>Y</em>Z</em>
10760 Nesting of <strong>
10762 <strong>X<strong>Y</strong>Z</strong>
10764 <p><strong>X<strong>Y</strong>Z</strong>
10773 <p><q>X<q>Y</q>Z</q>
10780 <ruby>X<ruby>Y</ruby>Z</ruby>
10782 <p><ruby>X<ruby>Y</ruby>Z</ruby>
10789 <bdo>X<bdo>Y</bdo>Z</bdo>
10791 <p><bdo>X<bdo>Y</bdo>Z</bdo>
10803 [[Media:Foobar.jpg]]
10805 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
10810 Media link with text
10812 [[Media:Foobar.jpg|A neat file to look at]]
10814 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
10818 # FIXME: this is still bad HTML tag nesting
10820 Media link with nasty text
10821 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
10823 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
10825 <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>
10830 Media link to nonexistent file (bug 1702)
10832 [[Media:No such.jpg]]
10834 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
10839 Image link to nonexistent file (bug 1850 - good)
10841 [[Image:No such.jpg]]
10843 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
10848 :Image link to nonexistent file (bug 1850 - bad)
10850 [[:Image:No such.jpg]]
10852 <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>
10859 Character reference normalization in link text (bug 1938)
10861 [[Main Page|this&that]]
10863 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
10870 Test for unicode normalization
10872 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
10876 (bug 19451) Links should refer to the normalized form.
10884 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10885 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10886 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10887 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10888 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10893 Empty attribute crash test (bug 2067)
10895 <font color="">foo</font>
10897 <p><font color="">foo</font>
10902 Empty attribute crash test single-quotes (bug 2067)
10904 <font color=''>foo</font>
10906 <p><font color="">foo</font>
10911 Attribute test: equals, then nothing
10913 <font color=>foo</font>
10915 <p><font>foo</font>
10920 Attribute test: unquoted value
10922 <font color=x>foo</font>
10924 <p><font color="x">foo</font>
10929 Attribute test: unquoted but illegal value (hash)
10931 <font color=#x>foo</font>
10933 <p><font color="#x">foo</font>
10938 Attribute test: no value
10940 <font color>foo</font>
10942 <p><font color="color">foo</font>
10947 Bug 2095: link with three closing brackets
10951 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
10956 Bug 2095: link with pipe and three closing brackets
10958 [[Main Page|link]]]
10960 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
10965 Bug 2095: link with pipe and three closing brackets, version 2
10967 [[Main Page|[http://example.com/]]]
10969 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
10979 Template:Dangerous attribute
10981 " onmouseover="alert(document.cookie)
10985 Template:Dangerous style attribute
10987 border-size: expression(alert(document.cookie))
10993 <div style="float: right; {{{1}}}">Magic div</div>
10997 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
10999 <div title="{{test}}"></div>
11001 <div title="This is a test template"></div>
11006 Bug 2304: HTML attribute safety (dangerous template; 2309)
11008 <div title="{{dangerous attribute}}"></div>
11010 <div title=""></div>
11015 Bug 2304: HTML attribute safety (dangerous style template; 2309)
11017 <div style="{{dangerous style attribute}}"></div>
11019 <div style="/* insecure input */"></div>
11024 Bug 2304: HTML attribute safety (safe parameter; 2309)
11026 {{div style|width: 200px}}
11028 <div style="float: right; width: 200px">Magic div</div>
11033 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
11035 {{div style|width: expression(alert(document.cookie))}}
11037 <div style="/* insecure input */">Magic div</div>
11042 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
11044 {{div style|"><script>alert(document.cookie)</script>}}
11046 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
11051 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
11053 {{div style|" ><script>alert(document.cookie)</script>}}
11055 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
11060 Bug 2304: HTML attribute safety (link)
11062 <div title="[[Main Page]]"></div>
11064 <div title="[[Main Page]]"></div>
11069 Bug 2304: HTML attribute safety (italics)
11071 <div title="''foobar''"></div>
11073 <div title="''foobar''"></div>
11078 Bug 2304: HTML attribute safety (bold)
11080 <div title="'''foobar'''"></div>
11082 <div title="'''foobar'''"></div>
11088 Bug 2304: HTML attribute safety (ISBN)
11090 <div title="ISBN 1234567890"></div>
11092 <div title="ISBN 1234567890"></div>
11097 Bug 2304: HTML attribute safety (RFC)
11099 <div title="RFC 1234"></div>
11101 <div title="RFC 1234"></div>
11106 Bug 2304: HTML attribute safety (PMID)
11108 <div title="PMID 1234567890"></div>
11110 <div title="PMID 1234567890"></div>
11115 Bug 2304: HTML attribute safety (web link)
11117 <div title="http://example.com/"></div>
11119 <div title="http://example.com/"></div>
11124 Bug 2304: HTML attribute safety (named web link)
11126 <div title="[http://example.com/ link]"></div>
11128 <div title="[http://example.com/ link]"></div>
11133 Bug 3244: HTML attribute safety (extension; safe)
11135 <div style="<nowiki>background:blue</nowiki>"></div>
11137 <div style="background:blue"></div>
11142 Bug 3244: HTML attribute safety (extension; unsafe)
11144 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
11146 <div style="/* insecure input */"></div>
11150 # More MSIE fun discovered by Tom Gilder
11153 MSIE CSS safety test: spurious slash
11155 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
11157 <div style="/* insecure input */">evil</div>
11162 MSIE CSS safety test: hex code
11164 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
11166 <div style="/* insecure input */">evil</div>
11171 MSIE CSS safety test: comment in url
11173 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
11175 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
11180 MSIE CSS safety test: comment in expression
11182 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
11184 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
11190 Table attribute legitimate extension
11193 !+ style="<nowiki>color:blue</nowiki>"| status
11198 <th style="color:blue"> status
11204 Table attribute safety
11207 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
11212 <th style="/* insecure input */"> status
11218 CSS line continuation 1
11220 <div style="background-image: u\ rl(test.jpg);"></div>
11222 <div style="/* insecure input */"></div>
11227 CSS line continuation 2
11229 <div style="background-image: u\ rl(test.jpg); "></div>
11231 <div style="/* insecure input */"></div>
11242 Expansion of multi-line templates in attribute values (bug 6255)
11244 <div style="background: {{identity|#00FF00}}">-</div>
11246 <div style="background: #00FF00">-</div>
11252 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
11254 <div style="background:
11257 <div style="background: #00FF00">-</div>
11262 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
11264 <div style="background: #00FF00">-</div>
11266 <div style="background: #00FF00">-</div>
11271 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
11274 Parser hook: empty input
11287 Parser hook: empty input using terminated empty elements
11300 Parser hook: empty input using terminated empty elements (space before)
11313 Parser hook: basic input
11327 Parser hook: case insensitive
11341 Parser hook: case insensitive, redux
11354 Parser hook: nested tags
11358 <tag><tag></tag></tag>
11369 Parser hook: basic arguments
11371 <tag width=200 height = "100" depth = '50' square></tag>
11379 'square' => 'square',
11386 Parser hook: argument containing a forward slash (bug 5344)
11388 <tag filename='/tmp/bla'></tag>
11393 'filename' => '/tmp/bla',
11400 Parser hook: empty input using terminated empty elements (bug 2374)
11413 # </tag> should be output literally since there is no matching tag that begins it
11415 Parser hook: basic arguments using terminated empty elements (bug 2374)
11417 <tag width=200 height = "100" depth = '50' square/>
11427 'square' => 'square',
11436 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
11440 Parser hook: static parser hook not inside a comment
11442 <statictag>hello, world</statictag>
11443 <statictag action=flush/>
11451 Parser hook: static parser hook inside a comment
11453 <!-- <statictag>hello, world</statictag> -->
11454 <statictag action=flush/>
11460 # Nested template calls; this case was broken by Parser.php rev 1.506,
11464 Template:One-parameter
11466 (My parameter is: {{{1}}})
11470 Template:Map-one-parameter
11472 {{{{{1}}}|{{{2}}}}}
11476 Nested template calls
11478 {{Map-one-parameter|One-parameter|param}}
11480 <p>(My parameter is: param)
11489 Sanitizer: Closing of open tags
11491 <s></s><table></table>
11493 <s></s><table></table>
11498 Sanitizer: Closing of open but not closed tags
11507 Sanitizer: Closing of closed but not open tags
11516 Sanitizer: Closing of closed but not open table tags
11518 Table not started</td></tr></table>
11520 <p>Table not started</td></tr></table>
11525 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
11527 <span id="æ: v">byte</span>[[#æ: v|backlink]]
11529 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
11534 Sanitizer: Validating the contents of the id attribute (bug 4515)
11540 Something, but definitely not <br id="9" />...
11544 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
11548 <br id="foo" /><br id="foo" />
11550 Something need to be done. foo-2 ?
11554 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
11557 <meta itemprop="hello" content="world">
11558 <meta http-equiv="refresh" content="5">
11559 <meta itemprop="hello" http-equiv="refresh" content="5">
11560 <link itemprop="hello" href="{{SERVER}}">
11561 <link rel="stylesheet" href="{{SERVER}}">
11562 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
11565 <div itemscope="itemscope">
11566 <p> <meta itemprop="hello" content="world" />
11567 <meta http-equiv="refresh" content="5">
11568 <meta itemprop="hello" content="5" />
11570 <link itemprop="hello" href="http://example.org" />
11571 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
11572 <link itemprop="hello" href="http://example.org" />
11578 Language converter: output gets cut off unexpectedly (bug 5757)
11582 this bit is safe: }-
11584 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
11586 then we get cut off here: }-
11588 all additional text is vanished
11590 <p>this bit is safe: }-
11591 </p><p>but if we add a conversion instance: xxx
11592 </p><p>then we get cut off here: }-
11593 </p><p>all additional text is vanished
11598 Self closed html pairs (bug 5487)
11601 <center><font id="bug" />Centered text</center>
11602 <div><font id="bug2" />In div text</div>
11604 <center><font id="bug" />Centered text</center>
11605 <div><font id="bug2" />In div text</div>
11614 Punctuation: nbsp before exclamation
11618 <p>C'est grave !
11623 Punctuation: CSS !important (bug 11874)
11625 <div style="width:50% !important">important</div>
11627 <div style="width:50% !important">important</div>
11632 Punctuation: CSS ! important (bug 11874; with space after)
11634 <div style="width:50% ! important">important</div>
11636 <div style="width:50% ! important">important</div>
11642 HTML bullet list, closed tags (bug 5497)
11657 HTML bullet list, unclosed tags (bug 5497)
11674 HTML ordered list, closed tags (bug 5497)
11689 HTML ordered list, unclosed tags (bug 5497)
11706 HTML nested bullet list, closed tags (bug 5497)
11731 HTML nested bullet list, open tags (bug 5497)
11756 HTML nested ordered list, closed tags (bug 5497)
11781 HTML nested ordered list, open tags (bug 5497)
11806 HTML ordered list item with parameters oddity
11808 <ol><li id="fragment">One</li></ol>
11810 <ol><li id="fragment">One</li></ol>
11815 bug 5918: autonumbering
11817 [http://first/] [http://second] [ftp://ftp]
11821 [mailto:enclosed@mail.tld With target]
11823 [mailto:enclosed@mail.tld]
11825 mailto:inline@mail.tld
11827 <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>
11828 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
11829 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
11830 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
11831 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
11837 # Security and HTML correctness
11838 # From Nick Jenkins' fuzz testing
11842 Fuzz testing: Parser13
11857 Fuzz testing: Parser14
11862 <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>
11863 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11865 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
11872 Fuzz testing: Parser14-table
11877 <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>
11878 <table style="__TOC__">
11884 # Known to produce bogus xml (extra </td>)
11886 Fuzz testing: Parser16
11906 Fuzz testing: Parser21
11909 ! irc://{{ftp://a" onmouseover="alert('hello world');"
11914 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
11924 Fuzz testing: Parser22
11926 http://===r:::https://b
11930 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
11938 # Known to produce bad XML for now
11940 Fuzz testing: Parser24
11947 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
11948 <br style="onmouseover='alert(document.cookie);' " />
11950 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
11955 <u class="|">}}}} >
11956 <br style="onmouseover='alert(document.cookie);'" />
11958 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
11967 # Note: the current result listed for this is not what the original one was,
11968 # but the original bug was JavaScript injection, which is fixed in any case.
11969 # It's not clear that the original result listed was any more correct than the
11970 # current one. Original result:
11973 # <li class="||">
11974 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
11976 Fuzz testing: Parser25 (bug 6055)
11982 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
11984 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
11989 Fuzz testing: URL adjacent extension (with space, clean)
11992 http://example.com <nowiki>junk</nowiki>
11994 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
11999 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
12002 http://example.com<nowiki>junk</nowiki>
12004 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
12009 Fuzz testing: URL adjacent extension (no space, dirty; pre)
12012 http://example.com<pre>junk</pre>
12014 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
12019 Fuzz testing: image with bogus manual thumbnail
12021 [[Image:foobar.jpg|thumbnail= ]]
12023 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
12028 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
12030 <pre dir=" "></pre>
12032 <pre dir=" "></pre>
12037 Parsing optional HTML elements (Bug 6171)
12042 <td> Some tabular data</td>
12043 <td> More tabular data ...
12044 <td> And yet som tabular data</td>
12050 <td> Some tabular data</td>
12051 <td> More tabular data ...
12052 </td><td> And yet som tabular data</td>
12059 Correct handling of <td>, <tr> (Bug 6171)
12064 <td> Some tabular data</td>
12065 <td> More tabular data ...</td>
12066 <td> And yet som tabular data</td>
12072 <td> Some tabular data</td>
12073 <td> More tabular data ...</td>
12074 <td> And yet som tabular data</td>
12082 Parsing crashing regression (fr:JavaScript)
12086 <p></body></x>
12091 Inline wiki vs wiki block nesting
12097 <p><b>Bold paragraph</b>
12098 </p><p>New wiki paragraph
12103 Inline HTML vs wiki block nesting
12111 <p><b>Bold paragraph</b>
12112 </p><p>New wiki paragraph
12116 # Original result was this:
12117 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
12119 # While that might be marginally more intuitive, maybe, the six-apostrophe
12120 # construct is clearly pathological and the result stated here (which is what
12121 # the parser actually does) is about as reasonable as anything.
12123 Mixing markup for italics and bold
12126 '''bold''''''bold''bolditalics'''''
12128 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
12136 Article for special page transclusion test
12140 Special page transclusion
12143 {{Special:Prefixindex/Xyzzyx}}
12145 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
12150 Special page transclusion twice (bug 5021)
12153 {{Special:Prefixindex/Xyzzyx}}
12154 {{Special:Prefixindex/Xyzzyx}}
12156 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
12157 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
12162 Transclusion of default MediaWiki message
12164 {{MediaWiki:Mainpage}}
12171 Transclusion of nonexistent MediaWiki message
12173 {{MediaWiki:Mainpagexxx}}
12175 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
12180 Transclusion of MediaWiki message with underscore
12182 {{MediaWiki:history_short}}
12189 Transclusion of MediaWiki message with space
12191 {{MediaWiki:history short}}
12198 Invalid header with following text
12208 Section extraction test (section 0)
12228 Section extraction test (section 1)
12250 Section extraction test (section 2)
12271 Section extraction test (section 3)
12291 Section extraction test (section 4)
12315 Section extraction test (section 5)
12335 Section extraction test (section 6)
12356 Section extraction test (section 7)
12376 Section extraction test (section 8)
12396 Section extraction test (section 9)
12417 Section extraction test (section 10)
12437 Section extraction test (nonexistent section 11)
12456 Section extraction test with bogus heading (section 1)
12461 ==bogus== not a legal section
12465 ==bogus== not a legal section
12469 Section extraction test with bogus heading (section 2)
12474 ==bogus== not a legal section
12481 Section extraction test with comment after heading (section 1)
12493 Section extraction test with comment after heading (section 2)
12505 Section extraction test with bogus <nowiki> heading (section 1)
12510 ==bogus== <nowiki>not a legal section</nowiki>
12514 ==bogus== <nowiki>not a legal section</nowiki>
12518 Section extraction test with bogus <nowiki> heading (section 2)
12523 ==bogus== <nowiki>not a legal section</nowiki>
12530 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
12531 # instead of respecting commented sections
12533 Section extraction prefixed by comment (section 1)
12544 Section extraction prefixed by comment (section 2)
12555 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
12556 # instead of respecting HTML-style headings
12558 Section extraction, mixed wiki and html (section 1)
12574 Section extraction, mixed wiki and html (section 2)
12590 # Formerly testing for bug 3342
12592 Section extraction, heading surrounded by <noinclude>
12596 <noinclude>==unmarked==</noinclude>
12602 # Test behavior of bug 19910
12604 Sectiion with all-equals
12609 The line above must have a trailing space
12612 But just in case it doesn't...
12616 But just in case it doesn't...
12620 Section replacement test (section 0)
12651 Section replacement test (section 1)
12680 Section replacement test (section 2)
12710 Section replacement test (section 3)
12741 Section replacement test (section 4)
12768 Section replacement test (section 5)
12799 Section replacement test (section 6)
12829 Section replacement test (section 7)
12860 Section replacement test (section 8)
12891 Section replacement test (section 9)
12920 Section replacement test (section 10)
12950 Section replacement test with initial whitespace (bug 13728)
12954 Preformatted initial line
12958 Preformatted initial line
12965 Section extraction, heading followed by pre with 20 spaces (bug 6398)
12977 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
12990 Section extraction, <pre> around bogus header (bug 10309)
13007 Section replacement, <pre> around bogus header (bug 10309)
13009 noxml replace=2,"xxx"
13030 Handling of 
 in URLs
13034 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
13041 5 quotes, code coverage +1 line (php)
13048 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
13050 5 quotes, code coverage +1 line (parsoid)
13056 <p><b><i></i></b></p>
13060 Special:Search page linking.
13064 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
13071 title=[[Parser test]]
13076 * {{FULLPAGENAMEE}}
13078 * {{BASEPAGENAMEE}}
13082 * {{ROOTPAGENAMEE}}
13084 * {{TALKPAGENAMEE}}
13085 * {{SUBJECTPAGENAME}}
13086 * {{SUBJECTPAGENAMEE}}
13089 * {{NAMESPACENUMBER}}
13093 * {{SUBJECTSPACEE}}
13094 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
13096 <ul><li> Parser test
13097 </li><li> Parser_test
13098 </li><li> Parser test
13099 </li><li> Parser_test
13100 </li><li> Parser test
13101 </li><li> Parser_test
13102 </li><li> Parser test
13103 </li><li> Parser_test
13104 </li><li> Parser test
13105 </li><li> Parser_test
13106 </li><li> Talk:Parser test
13107 </li><li> Talk:Parser_test
13108 </li><li> Parser test
13109 </li><li> Parser_test
13117 </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>
13121 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
13131 image4 |300px| centre
13132 image5.svg| http://///////
13137 <ul class="gallery mw-gallery-traditional">
13138 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13139 <div class="thumb" style="height: 150px;">Image1.png</div>
13140 <div class="gallerytext">
13143 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13144 <div class="thumb" style="height: 150px;">Image2.gif</div>
13145 <div class="gallerytext">
13150 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13151 <div class="thumb" style="height: 150px;">Image3</div>
13152 <div class="gallerytext">
13155 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13156 <div class="thumb" style="height: 150px;">Image4</div>
13157 <div class="gallerytext">
13162 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13163 <div class="thumb" style="height: 150px;">Image5.svg</div>
13164 <div class="gallerytext">
13165 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
13169 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13170 <div class="thumb" style="height: 150px;">* image6</div>
13171 <div class="gallerytext">
13179 Gallery (with options)
13181 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
13182 File:Nonexistant.jpg|caption
13183 File:Nonexistant.jpg
13184 image:foobar.jpg|some '''caption''' [[Main Page]]
13186 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
13189 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
13190 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
13191 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13192 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
13193 <div class="gallerytext">
13198 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13199 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
13200 <div class="gallerytext">
13203 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13204 <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>
13205 <div class="gallerytext">
13206 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13210 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13211 <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>
13212 <div class="gallerytext">
13215 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13216 <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>
13217 <div class="gallerytext">
13227 Gallery with wikitext inside caption
13230 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
13231 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
13234 <ul class="gallery mw-gallery-traditional">
13235 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13236 <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>
13237 <div class="gallerytext">
13238 <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>
13242 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13243 <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>
13244 <div class="gallerytext">
13245 <p>This is a test template
13254 gallery (with showfilename option)
13256 <gallery showfilename>
13257 File:Nonexistant.jpg|caption
13258 File:Nonexistant.jpg
13259 image:foobar.jpg|some '''caption''' [[Main Page]]
13263 <ul class="gallery mw-gallery-traditional">
13264 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13265 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13266 <div class="gallerytext">
13267 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
13272 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13273 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13274 <div class="gallerytext">
13275 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
13279 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13280 <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>
13281 <div class="gallerytext">
13282 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
13283 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13287 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13288 <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>
13289 <div class="gallerytext">
13290 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
13299 Gallery (with namespace-less filenames)
13302 File:Nonexistant.jpg
13308 <ul class="gallery mw-gallery-traditional">
13309 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13310 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13311 <div class="gallerytext">
13314 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13315 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13316 <div class="gallerytext">
13319 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13320 <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>
13321 <div class="gallerytext">
13324 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13325 <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>
13326 <div class="gallerytext">
13334 HTML Hex character encoding (spells the word "JavaScript")
13336 JavaScript
13338 <p>JavaScript
13343 HTML Hex character encoding bogus encoding (bug 26437 regression check)
13347 <p>&#xsee;&#XSEE;
13352 HTML Hex character encoding mixed case
13361 __FORCETOC__ override
13373 ISBN 978-0-1234-56 789
13375 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
13380 ISBN followed by 5 spaces
13391 ISBN ISBN 1234567890
13393 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
13398 Bug 22905: <abbr> followed by ISBN followed by </a>
13400 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
13402 <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>
13411 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
13416 Double RFC with a wiki link
13420 <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>
13429 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
13434 Centre-aligned image
13436 [[Image:foobar.jpg|centre]]
13438 <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>
13445 [[Image:foobar.jpg|none]]
13447 <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>
13452 Width + Height sized image (using px) (height is ignored)
13454 [[Image:foobar.jpg|640x480px]]
13456 <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>
13461 Width-sized image (using px, no following whitespace)
13463 [[Image:foobar.jpg|640px]]
13465 <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>
13470 Width-sized image (using px, with following whitespace - test regression from r39467)
13472 [[Image:foobar.jpg|640px ]]
13474 <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>
13479 Width-sized image (using px, with preceding whitespace - test regression from r39467)
13481 [[Image:foobar.jpg| 640px]]
13483 <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>
13488 Another italics / bold test
13496 # Note the results may be incorrect, as parserTest output included this:
13497 # XML error: Mismatched tag at byte 6120:
13498 # ...<dd> </dt></dl> </dd...
13506 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
13517 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
13519 Images with the "|" character in the comment
13521 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
13523 <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>
13528 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
13530 <html><script>alert(1);</script></html>
13532 <p><html><script>alert(1);</script></html>
13537 HTML with raw HTML ($wgRawHtml==true)
13541 <html><script>alert(1);</script></html>
13543 <p><script>alert(1);</script>
13548 Parents of subpages, one level up
13550 subpage title=[[Subpage test/L1/L2/L3]]
13554 <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>
13560 Parents of subpages, one level up, not named
13562 subpage title=[[Subpage test/L1/L2/L3]]
13566 <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>
13573 Parents of subpages, two levels up
13575 subpage title=[[Subpage test/L1/L2/L3]]
13581 <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
13582 </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>
13587 Parents of subpages, two levels up, without trailing slash or name.
13589 subpage title=[[Subpage test/L1/L2/L3]]
13598 Parents of subpages, two levels up, with lots of extra trailing slashes.
13600 subpage title=[[Subpage test/L1/L2/L3]]
13604 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
13609 Subpage test/L1/L2/L3Sibling
13615 Transclusion of a sibling page (one level up)
13617 subpage title=[[Subpage test/L1/L2/L3]]
13626 Transclusion of a child page
13628 subpage title=[[Subpage test/L1/L2]]
13637 Non-transclusion because of too many up levels
13639 subpage title=[[Subpage test/L1/L2/L3]]
13641 {{../../../../More than parent}}
13643 <p>{{../../../../More than parent}}
13648 Definition list code coverage
13654 <dl><dt> title  </dt><dd> def
13655 </dd><dt> title </dt><dd> def
13656 </dd><dt>title</dt><dd> def
13662 Don't fall for the self-closing div
13664 <div>hello world</div/>
13666 <div>hello world</div>
13675 <p>[[:Template:Msg]]
13684 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
13688 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
13690 Always escape literal '>' in output, not just after '<'
13704 <p>This is a test template
13705 This is a test template
13717 Inclusion of !userCanEdit() content
13721 <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>
13727 Out-of-order TOC heading levels
13736 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13738 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
13740 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
13741 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
13744 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
13746 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
13747 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
13752 <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>
13753 <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>
13754 <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>
13755 <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>
13756 <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>
13757 <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>
13763 ISBN with a dummy number
13773 ISBN with space-delimited number
13777 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
13783 ISBN with multiple spaces, no number
13802 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
13803 </p><p>ISBN 12345678901
13809 ISBN with trailing year (bug 8110)
13811 ISBN 1-234-56789-0 - 2006
13813 ISBN 1 234 56789 0 - 2006
13815 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
13816 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
13824 {{anchorencode:foo bar©#%n}}
13826 <p>foo_bar.C2.A9.23.25n
13831 anchorencode trims spaces
13833 {{anchorencode: __pretty__please__}}
13840 anchorencode deals with links
13842 {{anchorencode: [[hello|world]] [[hi]]}}
13849 anchorencode deals with templates
13851 {{anchorencode: {{Foo}} }}
13858 anchorencode encodes like the TOC generator: (bug 18431)
13860 === _ +:.3A%3A&&]] ===
13861 {{anchorencode: _ +:.3A%3A&&]] }}
13864 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
13865 <p>.2B:.3A.253A.26.26.5D.5D
13870 Bug 6200: blockquotes and paragraph formatting
13891 Bug 8293: Use of center tag ruins paragraph formatting
13912 Parsing of overlapping (improperly nested) inline html tags (PHP parser)
13916 <span><s>x</span></s>
13918 <p><span><s>x</span></s></span>
13923 Parsing of overlapping (improperly nested) inline html tags (Parsoid)
13927 <span><s>x</span></s>
13929 <p><span><s>x</s></span><s></s>
13934 ### Language variants related tests
13937 Self-link in language variants
13939 title=[[Dunav]] language=sr
13941 Both [[Dunav]] and [[Дунав]] are names for this river.
13943 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
13954 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
13956 title=[[Duna]] language=sr
13958 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
13960 <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.
13965 Link to pages in language variants
13969 Main Page can be written as [[Маин Паге]]
13971 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
13977 Multiple links to pages in language variants
13981 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
13983 <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>.
13989 Simple template in language variants
13995 <p>This is a test template
14001 Template with explicit namespace in language variants
14007 <p>This is a test template
14013 Basic test for template parameter in language variants
14017 {{парамтест|param=foo}}
14019 <p>This is a test template with parameter foo
14025 Simple category in language variants
14029 [[Category:МедиаWики Усер'с Гуиде]]
14031 <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>
14048 Don't convert blue categorylinks to another variant (bug 33210)
14052 [[A]][[Category:分类]]
14054 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
14059 Stripping -{}- tags (language variants)
14063 Latin proverb: -{Ne nuntium necare}-
14065 <p>Latin proverb: Ne nuntium necare
14071 Prevent conversion with -{}- tags (language variants)
14073 language=sr variant=sr-ec
14075 Latinski: -{Ne nuntium necare}-
14077 <p>Латински: Ne nuntium necare
14083 Prevent conversion of text with -{}- tags (language variants)
14085 language=sr variant=sr-ec
14087 Latinski: -{Ne nuntium necare}-
14089 <p>Латински: Ne nuntium necare
14095 Prevent conversion of links with -{}- tags (language variants)
14097 language=sr variant=sr-ec
14101 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
14107 -{}- tags within headlines (within html for parserConvert())
14109 language=sr variant=sr-ec
14113 <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>
14119 Explicit definition of language variant alternatives
14121 language=zh variant=zh-tw
14123 -{zh:China;zh-tw:Taiwan}-, not China
14125 <p>Taiwan, not China
14131 Conversion around HTML tags
14133 language=sr variant=sr-ec
14135 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
14136 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
14139 <span title="ЛаCтин">ски</span>
14145 Explicit session-wise language variant mapping (A flag and - flag)
14147 language=zh variant=zh-tw
14149 Taiwan is not China.
14150 But -{A|zh:China;zh-tw:Taiwan}- is China,
14151 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
14152 and -{China}- is China.
14154 <p>Taiwan is not China.
14155 But Taiwan is Taiwan,
14156 (This should be stripped!)
14157 and China is China.
14162 Explicit session-wise language variant mapping (H flag for hide)
14164 language=zh variant=zh-tw
14166 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
14169 <p>(This should be stripped!)
14175 Adding explicit conversion rule for title (T flag)
14177 language=zh variant=zh-tw showtitle
14179 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
14182 <p>Should be stripped!
14187 Testing that changing the language variant here in the tests actually works
14189 language=zh variant=zh showtitle
14191 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
14194 <p>Should be stripped!
14199 Recursive conversion of alt and title attrs shouldn't clear converter state
14201 language=zh variant=zh-cn showtitle
14203 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
14204 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
14208 Should be stripped<span title="Exclamation">!</span>
14213 Bug 24072: more test on conversion rule for title
14215 language=zh variant=zh-tw showtitle
14217 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
14218 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
14221 <p>This should be stripped!
14222 This won't take interferes with the title rule.
14227 Partly disable title conversion if variant == main language code
14229 language=zh variant=zh title=[[ZH]] showtitle
14231 -{T|zh-cn:CN;zh-tw:TW}-
14239 Partly disable title conversion if variant == main language code, more
14241 language=zh variant=zh title=[[ZH]] showtitle
14251 Raw output of variant escape tags (R flag)
14253 language=zh variant=zh-tw
14255 Raw: -{R|zh:China;zh-tw:Taiwan}-
14257 <p>Raw: zh:China;zh-tw:Taiwan
14262 Nested using of manual convert syntax
14264 language=zh variant=zh-hk
14266 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
14268 <p>Nested: Hello Hong Kong!
14273 Proper conversion of text in external links
14275 language=sr variant=sr-ec
14277 http://www.google.com
14278 gopher://www.google.com
14279 [http://www.google.com http://www.google.com]
14280 [gopher://www.google.com gopher://www.google.com]
14281 [https://www.google.com irc://www.google.com]
14282 [ftp://www.google.com www.google.com/ftp://dir]
14283 [//www.google.com www.google.com]
14285 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
14286 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
14287 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
14288 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
14289 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
14290 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
14291 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
14296 Do not convert roman numbers to language variants
14298 language=sr variant=sr-ec
14302 <p>Фридрих IV је цар.
14307 Unclosed language converter markup "-{"
14318 Don't convert raw rule "-{R|=>}-" to "=>"
14329 Bug 529: Uncovered bullet
14339 # Plain MediaWiki does not remove empty lists, but tidy actually does.
14340 # Templates in Wikipedia rely on this behavior, as tidy has always been
14341 # enabled there. These tests are normally run *without* tidy, so specify the
14342 # full output here.
14343 # To test realistic parsing behavior, apply a tidy-like transformation to both
14344 # the expected output and your parser's output.
14346 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
14348 ******* Foo {{bullet}}
14350 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
14363 Bug 529: Uncovered table already at line-start
14386 Bug 529: Uncovered bullet in parser function result
14388 * Foo {{lc:{{bullet}} }}
14397 Bug 5678: Double-parsed template argument
14399 {{lc:{{{1}}}|hello}}
14406 Bug 5678: Double-parsed template invocation
14408 {{lc:{{paramtest {{!}} param = hello }} }}
14410 <p>{{paramtest | param = hello }}
14415 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
14418 title=[[Main Page]]
14420 {{PRVNÍVELKÉ:ěščř}}
14421 {{prvnívelké:ěščř}}
14441 Morwen/13: Unclosed link followed by heading
14448 <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>
14453 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
14460 <h1><span class="mw-headline" id="heading">heading</span></h1>
14465 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
14472 <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>
14487 Paragraphs inside divs (no extra line breaks)
14499 Paragraphs inside divs (extra line break on open)
14514 Paragraphs inside divs (extra line break on close)
14529 Paragraphs inside divs (extra line break on open and close)
14546 Nesting tags, paragraphs on lines which begin with <div>
14550 <div></div><strong>A
14559 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
14561 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
14563 <blockquote>Line one
14565 Line two</blockquote>
14567 <blockquote>Line one
14568 Line two</blockquote>
14573 Bug 6200: paragraphs inside blockquotes (extra line break on open)
14578 Line two</blockquote>
14583 Line two</blockquote>
14588 Bug 6200: paragraphs inside blockquotes (extra line break on close)
14590 <blockquote>Line one
14595 <blockquote>Line one
14603 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
14620 Paragraphs inside blockquotes/divs (no extra line breaks)
14622 <blockquote><div>Line one
14624 Line two</div></blockquote>
14626 <blockquote><div>Line one
14627 Line two</div></blockquote>
14632 Paragraphs inside blockquotes/divs (extra line break on open)
14637 Line two</div></blockquote>
14642 Line two</div></blockquote>
14647 Paragraphs inside blockquotes/divs (extra line break on close)
14649 <blockquote><div>Line one
14652 </div></blockquote>
14654 <blockquote><div>Line one
14657 </div></blockquote>
14662 Paragraphs inside blockquotes/divs (extra line break on open and close)
14668 </div></blockquote>
14674 </div></blockquote>
14679 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
14681 wgLinkHolderBatchSize=0
14687 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
14688 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
14689 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
14694 Free external link invading image caption
14696 [[Image:Foobar.jpg|thumb|http://x|hello]]
14698 <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>
14703 Bug 15196: localised external link numbers
14707 [http://en.wikipedia.org/]
14709 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
14714 Multibyte character in padleft
14716 {{padleft:-Hello|7|Æ}}
14723 Multibyte character in padright
14725 {{padright:Hello-|7|Æ}}
14732 formatdate parser function
14734 {{#formatdate:2009-03-24}}
14736 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
14741 formatdate parser function, with default format
14743 {{#formatdate:2009-03-24|mdy}}
14745 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
14750 Spacing of numbers in formatted dates
14752 {{#formatdate:January 15}}
14754 <p><span class="mw-formatted-date" title="01-15">January 15</span>
14759 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
14761 language=nl title=[[MediaWiki:Common.css]]
14763 {{#formatdate:2009-03-24|dmy}}
14765 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
14778 Edit comment with link
14782 I like the [[Main Page]] a lot
14784 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
14788 Edit comment with link and link text
14792 I like the [[Main Page|best pages]] a lot
14794 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
14798 Edit comment with link and link text with suffix
14802 I like the [[Main Page|best page]]s a lot
14804 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
14808 Edit comment with section link (non-local, eg in history list)
14810 comment title=[[Main Page]]
14812 /* External links */ removed bogus entries
14814 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
14818 Edit comment with section link and text before it (non-local, eg in history list)
14820 comment title=[[Main Page]]
14822 pre-comment text /* External links */ removed bogus entries
14824 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>
14828 Edit comment with section link (local, eg in diff view)
14830 comment local title=[[Main Page]]
14832 /* External links */ removed bogus entries
14834 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
14838 Edit comment with subpage link (bug 14080)
14842 title=[[Subpage test]]
14844 Poked at a [[/subpage]] here...
14846 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
14850 Edit comment with subpage link and link text (bug 14080)
14854 title=[[Subpage test]]
14856 Poked at a [[/subpage|neat little page]] here...
14858 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
14862 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
14865 title=[[Subpage test]]
14867 Poked at a [[/subpage]] here...
14869 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
14873 Edit comment with bare anchor link (local, as on diff)
14877 title=[[Main Page]]
14881 <a href="#section">#section</a>
14885 Edit comment with bare anchor link (non-local, as on history)
14888 title=[[Main Page]]
14892 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
14896 Anchor starting with underscore
14900 <p><a href="#_ref">One</a>
14905 Id starting with underscore
14907 <div id="_ref"></div>
14909 <div id="_ref"></div>
14914 Space normalisation on autocomment (bug 22784)
14917 title=[[Main Page]]
14919 /* __hello__world__ */
14921 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
14925 percent-encoding and + signs in comments (Bug 26410)
14929 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
14931 <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>
14935 Bad images - basic functionality
14944 Bad images - bug 16039: text after bad image disappears
14958 Verify that displaytitle works (bug #22501) no displaytitle
14962 wgAllowDisplayTitle=true
14963 wgRestrictDisplayTitle=false
14965 this is not the the title
14968 <p>this is not the the title
14973 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
14978 wgAllowDisplayTitle=true
14979 wgRestrictDisplayTitle=false
14981 this is not the the title
14982 {{DISPLAYTITLE:whatever}}
14985 <p>this is not the the title
14990 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
14995 wgAllowDisplayTitle=true
14996 wgRestrictDisplayTitle=true
14998 this is not the the title
14999 {{DISPLAYTITLE:whatever}}
15002 <p>this is not the the title
15007 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
15012 wgAllowDisplayTitle=true
15013 wgRestrictDisplayTitle=true
15015 this is not the the title
15016 {{DISPLAYTITLE:screen}}
15019 <p>this is not the the title
15024 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
15029 wgAllowDisplayTitle=false
15031 this is not the the title
15032 {{DISPLAYTITLE:screen}}
15035 <p>this is not the the title
15036 <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>
15041 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
15046 wgAllowDisplayTitle=false
15048 this is not the the title
15051 <p>this is not the the title
15056 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
15061 wgAllowDisplayTitle=true
15062 wgRestrictDisplayTitle=true
15064 this is not the the title
15065 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
15067 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
15068 <p>this is not the the title
15073 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
15078 wgAllowDisplayTitle=true
15079 wgRestrictDisplayTitle=true
15081 this is not the the title
15082 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
15084 <span style="color: red;">s</span>creen
15085 <p>this is not the the title
15090 preload: check <noinclude> and <includeonly>
15094 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
15100 preload: check <onlyinclude>
15104 Goodbye <onlyinclude>Hello world</onlyinclude>
15110 preload: can pass tags through if we want to
15114 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
15116 <includeonly>Hello world</includeonly>
15120 preload: check that it doesn't try to do tricks
15124 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
15126 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
15130 Play a bit with r67090 and bug 3158
15134 <div style="width:50% !important"> </div>
15135 <div style="width:50% !important"> </div>
15136 <div style="width:50% !important"> </div>
15137 <div style="border : solid;"> </div>
15139 <div style="width:50% !important"> </div>
15140 <div style="width:50% !important"> </div>
15141 <div style="width:50% !important"> </div>
15142 <div style="border : solid;"> </div>
15147 HTML5 data attributes
15149 <span data-foo="bar">Baz</span>
15150 <p data-abc-def_hij="">Quuz</p>
15152 <p><span data-foo="bar">Baz</span>
15154 <p data-abc-def_hij="">Quuz</p>
15159 percent-encoding and + signs in internal links (Bug 26410)
15161 [[User:+%]] [[Page+title%]]
15162 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
15163 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
15164 [[%33%45]] [[%33%45+]]
15166 <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>
15167 <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>
15168 <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>
15169 <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>
15174 Special characters in embedded file links (bug 27679)
15176 [[File:Contains & ampersand.jpg]]
15177 [[File:Does not exist.jpg|Title with & ampersand]]
15179 <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>
15180 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
15186 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
15188 Text's been normalized?
15190 <p>Text's been normalized?
15195 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
15197 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
15199 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
15204 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
15206 [http://www.example.org/ ideograms]
15208 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
15213 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
15215 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
15217 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
15241 Bug 31098 Template which includes system messages which includes the template
15245 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
15246 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
15251 Bug31490 Turkish: ucfirst 'blah'
15262 Bug31490 Turkish: ucfirst 'ix'
15273 Bug31490 Turkish: lcfirst 'BLAH'
15284 Bug31490 Turkish: ucfırst (with a dotless i)
15290 <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>
15295 Bug31490 ucfırst (with a dotless i) with English language
15301 <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>
15306 Bug 26375: TOC with italics
15308 title=[[Main Page]]
15311 == ''Lost'' episodes ==
15313 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15315 <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>
15318 <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>
15323 Bug 26375: TOC with bold
15325 title=[[Main Page]]
15328 == '''should be bold''' then normal text ==
15330 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15332 <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>
15335 <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>
15340 Bug 33845: Headings become cursive in TOC when they contain an image
15342 title=[[Main Page]]
15345 == Image [[Image:foobar.jpg]] ==
15347 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15349 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
15352 <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>
15357 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
15359 title=[[Main Page]]
15362 == <blockquote>Quote</blockquote> ==
15364 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15366 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
15369 <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>
15374 Unclosed tags in TOC
15376 title=[[Main Page]]
15380 <small>Hanc marginis exiguitas non caperet.</small>
15383 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15385 <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>
15388 <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>
15389 <p><small>Hanc marginis exiguitas non caperet.</small>
15395 Multiple tags in TOC
15398 == <i>Foo</i> <b>Bar</b> ==
15400 == <i>Foo</i> <blockquote>Bar</blockquote> ==
15402 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15404 <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>
15405 <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>
15408 <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>
15409 <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>
15414 Tags with parameters in TOC
15417 == <sup class="in-h2">Hello</sup> ==
15419 == <sup class="a > b">Evilbye</sup> ==
15421 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15423 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
15424 <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>
15427 <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>
15428 <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>
15433 span tags with directionality in TOC
15436 == <span dir="ltr">C++</span> ==
15438 == <span dir="rtl">זבנג!</span> ==
15440 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
15442 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
15444 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
15446 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15448 <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>
15449 <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>
15450 <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>
15451 <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>
15452 <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>
15455 <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>
15456 <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>
15457 <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>
15458 <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>
15459 <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>
15466 == {{int:headline_sample}} ==
15470 Bug 32057: Title needed when expanding <h> nodes.
15472 title=[[Main Page]]
15476 <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>
15481 Strip marker in urlencode
15483 {{urlencode:x<nowiki/>y}}
15484 {{urlencode:x<nowiki/>y|wiki}}
15485 {{urlencode:x<nowiki/>y|path}}
15512 Strip marker in formatNum
15514 {{formatnum:1<nowiki/>2}}
15515 {{formatnum:1<nowiki/>2|R}}
15523 Check noCommafy in formatNum
15527 {{formatnum:123456.78}}
15528 {{formatnum:123456.78|NOSEP}}
15536 Strip marker in grammar
15540 {{grammar:elative|foo<nowiki/>bar}}
15547 Strip marker in padleft
15549 {{padleft:|2|x<nowiki/>y}}
15556 Strip marker in padright
15558 {{padright:|2|x<nowiki/>y}}
15565 Strip marker in anchorencode
15567 {{anchorencode:x<nowiki/>y}}
15574 nowiki inside link inside heading (bug 18295)
15576 ==[[foo|x<nowiki>y</nowiki>z]]==
15578 <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>
15583 new support for bdi element (bug 31817)
15585 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
15587 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
15592 Ignore pipe between table row attributes
15596 |- id=foo | style='color: red'
15604 <tr id="foo" style="color: red">
15611 Gallery override link with WikiLink (bug 34852)
15614 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
15617 <ul class="gallery mw-gallery-traditional">
15618 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15619 <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>
15620 <div class="gallerytext">
15630 Gallery override link with absolute external link (bug 34852)
15633 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
15636 <ul class="gallery mw-gallery-traditional">
15637 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15638 <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>
15639 <div class="gallerytext">
15649 Gallery override link with malicious javascript (bug 34852)
15652 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
15655 <ul class="gallery mw-gallery-traditional">
15656 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15657 <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>
15658 <div class="gallerytext">
15668 Gallery with invalid title as link (bug 43964)
15671 File:foobar.jpg|link=<
15674 <ul class="gallery mw-gallery-traditional">
15675 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15676 <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>
15677 <div class="gallerytext">
15685 Language parser function
15694 Padleft and padright as substr
15696 {{padleft:|3|abcde}}
15697 {{padright:|3|abcde}}
15705 Special parser function
15707 {{#special:RandomPage}}
15708 {{#special:BaDtItLe}}
15709 {{#special:Foobar}}
15718 Bug 34939 - Case insensitive link parsing ([HttP://])
15720 [HttP://MediaWiki.Org/]
15722 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
15727 Bug 34939 - Case insensitive link parsing ([HttP:// title])
15729 [HttP://MediaWiki.Org/ MediaWiki]
15731 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
15736 Bug 34939 - Case insensitive link parsing (HttP://)
15738 HttP://MediaWiki.Org/
15740 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
15746 ### Parsoids-specific tests
15747 ### Parsoid-PHP parser incompatibilities
15750 1. SOL-sensitive wikitext tokens as template-args
15752 parsoid=wt2html,wt2wt
15758 <span about="#mwt1" typeof="mw:Transclusion">
15759 </span><ul about="#mwt1"><li>a</li></ul>
15760 <span about="#mwt2" typeof="mw:Transclusion">
15761 </span><ol about="#mwt2"><li>a</li></ol>
15762 <span about="#mwt3" typeof="mw:Transclusion">
15763 </span><dl about="#mwt3"><dd>a</dd></dl>
15766 #### ----------------------------------------------------------------
15767 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
15768 #### tags. Parsoid's output for these tags differs from that of the
15770 #### ----------------------------------------------------------------
15773 Ref: 1. ref-location should be replaced with an index span
15778 B <ref name="x">foo</ref>
15781 <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>
15782 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>
15783 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>
15787 Ref: 2. ref-tags with identical names should all get the same index
15791 A <ref name="x">foo</ref>
15794 <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>
15795 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>
15799 Ref: 3. spaces in ref-names should be ignored
15803 A <ref name="x">foo</ref>
15804 B <ref name=" x " />
15807 <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>
15808 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>
15809 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>
15813 Ref: 4. 'constructor' should be accepted as a valid ref-name
15814 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
15818 A <ref name="constructor">foo</ref>
15820 <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>
15824 Ref: 5. body should accept generic wikitext
15829 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
15834 <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>
15836 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'>
15837 <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>
15842 Ref: 6. indent-pres should not be output in ref-body
15854 <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>
15856 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
15857 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
15864 Ref: 7. No p-wrapping in ref-body
15883 <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>
15885 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15886 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
15900 Ref: 8. transclusion wikitext has lower precedence
15904 A <ref> foo {{echo|</ref> B C}}
15908 <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>
15910 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15911 <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>
15915 Ref: 9. unclosed comments should not leak out of ref-body
15919 A <ref> foo <!--</ref> B C
15923 <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>
15925 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15926 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li></ol>
15930 Ref: 10. Unclosed HTML tags should not leak out of ref-body
15934 A <ref> <b> foo </ref> B C
15938 <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>
15940 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15941 <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>
15945 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
15952 <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
15953 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>
15957 Ref: 12. ref-tags act as trailing newline migration barrier
15961 <!--the newline at the end of this line moves out of the p-tag-->a
15963 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
15968 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
15971 <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>
15972 <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>
15979 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
15987 <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
15988 <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>
15992 Ref: 14. A nested ref-tag should be emitted as plain text
15996 <ref>foo <ref>bar</ref> baz</ref>
16000 <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>
16002 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw="{"name":"references","attrs":{}}">
16003 <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>
16007 Ref: 15. ref-tags with identical names should get identical indexes
16011 A1 <ref name="a">foo</ref> A2 <ref name="a" />
16012 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
16016 <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>
16017 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>
16019 <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>
16023 References: 1. references tag without any refs should be handled properly
16029 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
16033 References: 2. references tag with group only outputs references from that group
16037 A <ref group="a">foo</ref>
16038 B <ref group="b">bar</ref>
16040 <references group='a' />
16042 <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>
16043 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>
16045 <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>
16049 References: 3. ref list should be cleared after processing references
16061 <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>
16063 <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>
16065 <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>
16067 <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>
16071 References: 4. only referenced group should be cleared after processing references
16075 A <ref group="a">afoo</ref>
16078 <references group="a"/>
16084 <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>
16085 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>
16087 <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>
16089 <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>
16091 <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>
16095 References: 5. ref tags in references should be processed while ignoring all other content
16100 B <ref name="b">bar</ref>
16103 <ref name="a">foo</ref>
16104 This should just get lost.
16107 <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>
16108 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>
16110 <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>
16114 References: 6. <references /> from a transclusion
16118 {{echo|<references />}}
16120 <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>
16124 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
16128 A <ref>foo bar for a</ref>
16134 <ref name="b">foo</ref>
16137 <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>
16138 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>
16140 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
16141 <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>
16142 <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>
16144 <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":{}}'>
16145 <li about="#cite_note-b-1" id="cite_note-b-1"><span rel="mw:referencedBy">↑</span> foo</li></ol>
16148 #### ----------------------------------------------------------------
16149 #### The following section of tests are primarily to test
16150 #### wikitext escaping capabilities of Parsoid. Given that
16151 #### escaping can be done any number of ways, the wikitext (input)
16152 #### is always adjusted to reflect how Parsoid adds nowiki
16155 #### We are marking several tests as parsoid-only since the
16156 #### HTML in the result section is different from what the
16157 #### PHP parser generates for it.
16158 #### ----------------------------------------------------------------
16161 #### --------------- Headings ---------------
16163 #### 1. Nested inside html <h1>=foo=</h1>
16164 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
16165 #### 3. Nested inside html with wikitext split by html tags
16166 #### 4. No escape needed
16167 #### 5. Empty headings <h1></h1>
16168 #### 6. Heading chars in SOL context
16169 #### ----------------------------------------
16171 Headings: 0. Unnested
16175 <nowiki>=foo=</nowiki>
16177 <nowiki> =foo= </nowiki>
16179 <nowiki>=foo=</nowiki>
16181 =foo''a''<nowiki>=</nowiki>
16183 <p><span typeof="mw:Nowiki">=foo=</span></p>
16185 <p><span typeof="mw:Nowiki"> =foo= </span>
16187 <span typeof="mw:Nowiki">=foo=</span></p>
16189 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
16193 Headings: 1. Nested inside html
16197 =<nowiki>=foo=</nowiki>=
16199 ==<nowiki>=foo=</nowiki>==
16201 ===<nowiki>=foo=</nowiki>===
16203 ====<nowiki>=foo=</nowiki>====
16205 =====<nowiki>=foo=</nowiki>=====
16207 ======<nowiki>=foo=</nowiki>======
16209 <h1><span typeof="mw:Nowiki">=foo=</span></h1>
16210 <h2><span typeof="mw:Nowiki">=foo=</span></h2>
16211 <h3><span typeof="mw:Nowiki">=foo=</span></h3>
16212 <h4><span typeof="mw:Nowiki">=foo=</span></h4>
16213 <h5><span typeof="mw:Nowiki">=foo=</span></h5>
16214 <h6><span typeof="mw:Nowiki">=foo=</span></h6>
16218 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
16223 <nowiki>*</nowiki>bar
16229 <nowiki>=bar=</nowiki>
16237 Headings: 3. Nested inside html with wikitext split by html tags
16241 =='''bold'''<nowiki>foo=</nowiki>=
16243 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
16247 Headings: 4a. No escaping needed (testing just h1 and h2)
16265 =<nowiki>=</nowiki>=
16273 <h1><i>=</i>foo=</h1>
16274 <h1><span typeof="mw:Nowiki">=</span></h1>
16278 Headings: 4b. No escaping needed (inside p-tags)
16293 Headings: 5. Empty headings
16305 =====<nowiki/>=====
16307 ======<nowiki/>======
16318 Headings: 6a. Heading chars in SOL context (with trailing spaces)
16322 <nowiki>=a=</nowiki>
16324 <nowiki>=a=</nowiki>
16326 <nowiki>=a=</nowiki>
16328 <nowiki>=a=</nowiki>
16337 Headings: 6b. Heading chars in SOL context (with trailing newlines)
16365 Headings: 6c. Heading chars in SOL context (leading newline break)
16370 <nowiki>=b=</nowiki>
16377 Headings: 6d. Heading chars in SOL context (with interspersed comments)
16381 <!--c0--><nowiki>=a=</nowiki>
16383 <nowiki>=a=</nowiki> <!--c2--> <!--c3-->
16385 <p><!--c0-->=a=</p>
16386 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
16390 Headings: 6d. Heading chars in SOL context (No escaping needed)
16399 #### --------------- Lists ---------------
16400 #### 0. Outside nests (*foo, etc.)
16401 #### 1. Nested inside html <ul><li>*foo</li></ul>
16402 #### 2. Inside definition lists
16403 #### 3. Only bullets at start should be escaped
16404 #### 4. No escapes needed
16405 #### 5. No unnecessary escapes
16406 #### 6. Escape bullets in SOL position
16407 #### 7. Escape bullets in a multi-line context
16408 #### ----------------------------------------
16411 Lists: 0. Outside nests
16413 <nowiki>*</nowiki>foo
16415 <nowiki>#</nowiki>foo
16423 Lists: 1. Nested inside html
16425 *<nowiki>*foo</nowiki>
16427 *<nowiki>#foo</nowiki>
16429 *<nowiki>:foo</nowiki>
16431 *<nowiki>;foo</nowiki>
16433 #<nowiki>*foo</nowiki>
16435 #<nowiki>#foo</nowiki>
16437 #<nowiki>:foo</nowiki>
16439 #<nowiki>;foo</nowiki>
16461 Lists: 2. Inside definition lists
16463 ;<nowiki>;foo</nowiki>
16465 ;<nowiki>:foo</nowiki>
16467 ;<nowiki>:foo</nowiki>
16470 :<nowiki>:foo</nowiki>
16485 Lists: 3. Only bullets at start of text should be escaped
16487 *<nowiki>*foo*bar</nowiki>
16489 *<nowiki>*foo</nowiki>''it''*bar
16493 <ul><li>*foo<i>it</i>*bar
16499 Lists: 4. No escapes needed
16511 <ul><li><i>foo</i>*bar
16513 <ul><li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
16518 Lists: 5. No unnecessary escapes
16520 * bar <span><nowiki>[[foo]]</nowiki></span>
16522 *=bar <span><nowiki>[[foo]]</nowiki></span>
16524 *[[bar <span><nowiki>[[foo]]</nowiki></span>
16526 *]]bar <span><nowiki>[[foo]]</nowiki></span>
16528 *=bar <span>foo]]</span>=
16532 <ul><li> bar <span>[[foo]]</span>
16534 <ul><li>=bar <span>[[foo]]</span>
16536 <ul><li>[[bar <span>[[foo]]</span>
16538 <ul><li>]]bar <span>[[foo]]</span>
16540 <ul><li>=bar <span>foo]]</span>=
16542 <ul><li> <s></s>: a
16548 Lists: 6. Escape bullets in SOL position
16552 <!--cmt--><nowiki>*foo</nowiki>
16554 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
16558 Lists: 7. Escape bullets in a multi-line context
16561 <nowiki>*</nowiki>b
16568 #### --------------- HRs ---------------
16569 #### 1. Single line
16570 #### -----------------------------------
16573 HRs: 1. Single line
16577 ----<nowiki>----</nowiki>
16581 <hr><span typeof="mw:Nowiki">----</span>
16586 #### --------------- Tables ---------------
16587 #### 1a. Simple example
16588 #### 1b. No escaping needed (!foo)
16589 #### 1c. No escaping needed (|foo)
16590 #### 1d. No escaping needed (|}foo)
16592 #### 2a. Nested in td (<td>foo|bar</td>)
16593 #### 2b. Nested in td (<td>foo||bar</td>)
16594 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
16596 #### 3a. Nested in th (<th>foo!bar</th>)
16597 #### 3b. Nested in th (<th>foo!!bar</th>)
16598 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
16602 #### 4c. No escaping needed
16603 #### --------------------------------------
16606 Tables: 1a. Simple example
16617 Tables: 1b. No escaping needed
16626 Tables: 1c. No escaping needed
16635 Tables: 1d. No escaping needed
16644 Tables: 2a. Nested in td
16649 |<nowiki>foo|bar</nowiki>
16653 <td><span typeof="mw:Nowiki">foo|bar</span></td></tr></tbody></table>
16657 Tables: 2b. Nested in td
16662 |<nowiki>foo||bar</nowiki>
16663 |''it''<nowiki>foo||bar</nowiki>
16667 <td><span typeof="mw:Nowiki">foo||bar</span></td>
16668 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
16672 Tables: 2c. Nested in td -- no escaping needed
16680 <table><tbody><tr><td>foo!!bar
16681 </td></tr></tbody></table>
16686 Tables: 3a. Nested in th
16694 <table><tbody><tr><th>foo!bar
16695 </th></tr></tbody></table>
16700 Tables: 3b. Nested in th
16705 !<nowiki>foo!!bar</nowiki>
16709 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
16714 Tables: 3c. Nested in th -- no escaping needed
16719 !<nowiki>foo||bar</nowiki>
16723 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
16727 Tables: 4a. Escape -
16734 |<nowiki>-bar</nowiki>
16738 <tr><th>-bar</th></tr>
16740 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
16744 Tables: 4b. Escape +
16751 |<nowiki>+bar</nowiki>
16755 <tr><th>+bar</th></tr>
16757 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
16761 Tables: 4c. No escaping needed
16779 <tr><td>foo-bar</td><td>foo+bar</td></tr>
16780 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
16788 ### SSS FIXME: Disabled right now because accurate html2wt
16789 ### on this snippet requires data-parsoid flags that we've
16790 ### stripped out of these tests. We should scheme how we
16791 ### we want to handle these kind of tests that require
16792 ### data-parsoid flags for accurate html2wt serialization
16795 Tables: 4d. No escaping needed
16813 #### --------------- Links ----------------
16814 #### 1. Quote marks in link text
16815 #### 2. Wikilinks: Escapes needed
16816 #### 3. Wikilinks: No escapes needed
16817 #### 4. Extlinks: Escapes needed
16818 #### 5. Extlinks: No escapes needed
16819 #### --------------------------------------
16821 Links 1. Quote marks in link text
16825 [[Foo|Foo<nowiki>''boo''</nowiki>]]
16827 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
16831 Links 2. WikiLinks: Escapes needed
16835 [[Foo|<nowiki>[Foobar]</nowiki>]]
16836 [[Foo|<nowiki>Foobar]</nowiki>]]
16837 [[Foo|x [Foobar] x]]
16838 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
16839 [[Foo|<nowiki>[[Bar]]</nowiki>]]
16840 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
16841 [[Foo|<nowiki>|Bar</nowiki>]]
16842 [[Foo|<nowiki>]]bar</nowiki>]]
16843 [[Foo|<nowiki>[[bar</nowiki>]]
16844 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
16846 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
16847 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
16848 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
16849 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
16850 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
16851 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
16852 <a href="Foo" rel="mw:WikiLink">|Bar</a>
16853 <a href="Foo" rel="mw:WikiLink">]]bar</a>
16854 <a href="Foo" rel="mw:WikiLink">[[bar</a>
16855 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
16859 Links 3. WikiLinks: No escapes needed
16866 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
16867 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
16871 Links 4. ExtLinks: Escapes needed
16875 [http://google.com <nowiki>[google]</nowiki>]
16876 [http://google.com <nowiki>google]</nowiki>]
16878 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
16879 <a href="http://google.com" rel="mw:ExtLink">google]</a>
16883 Links 5. ExtLinks: No escapes needed
16887 [http://google.com [google]
16889 <a href="http://google.com" rel="mw:ExtLink">[google</a>
16892 #### --------------- Quotes ---------------
16893 #### 1. Quotes inside <b> and <i>
16894 #### 2. Link fragments separated by <i> and <b> tags
16895 #### 3. Link fragments inside <i> and <b>
16896 #### 4. No escaping needed
16897 #### --------------------------------------
16899 1. Quotes inside <b> and <i>
16901 parsoid=html2wt,wt2wt
16903 ''<nowiki>'foo'</nowiki>''
16904 ''<nowiki>''foo''</nowiki>''
16905 ''<nowiki>'''foo'''</nowiki>''
16907 '''<nowiki>'foo'</nowiki>'''
16908 '''<nowiki>''foo''</nowiki>'''
16909 '''<nowiki>'''foo'''</nowiki>'''
16910 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
16911 '''foo'''<nowiki/>'s
16914 '<nowiki/>''foo''<nowiki/>'
16916 '''foo'''<nowiki/>'
16917 '<nowiki/>'''foo'''<nowiki/>'
16926 <b>foo'<i>bar'</i>baz</b>
16937 2. Link fragments separated by <i> and <b> tags
16939 [[''foo''<nowiki>hello]]</nowiki>
16941 [['''foo'''<nowiki>hello]]</nowiki>
16943 <p>[[<i>foo</i>hello]]
16944 </p><p>[[<b>foo</b>hello]]
16949 3. Link fragments inside <i> and <b>
16950 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
16951 this is one of the shortcomings of this format)
16953 ''[[foo''<nowiki>]]</nowiki>
16955 '''[[foo'''<nowiki>]]</nowiki>
16958 </p><p><b>[[foo</b>]]
16963 4. No escaping needed
16965 '<span>''bar''</span>'
16966 '<span>'''bar'''</span>'
16968 <p>'<span><i>bar</i></span>'
16969 '<span><b>bar</b></span>'
16973 #### ----------- Paragraphs ---------------
16974 #### 1. No unnecessary escapes
16975 #### --------------------------------------
16978 1. No unnecessary escapes
16980 bar <span><nowiki>[[foo]]</nowiki></span>
16982 =bar <span><nowiki>[[foo]]</nowiki></span>
16984 [[bar <span><nowiki>[[foo]]</nowiki></span>
16986 ]]bar <span><nowiki>[[foo]]</nowiki></span>
16988 =bar <span>foo]]</span><nowiki>=</nowiki>
16990 <p>bar <span>[[foo]]</span>
16991 </p><p>=bar <span>[[foo]]</span>
16992 </p><p>[[bar <span>[[foo]]</span>
16993 </p><p>]]bar <span>[[foo]]</span>
16994 </p><p>=bar <span>foo]]</span>=
16998 #### ----------------------- PRE --------------------------
16999 #### 1. Leading whitespace in SOL context should be escaped
17000 #### ------------------------------------------------------
17002 1. Leading whitespace in SOL context should be escaped
17006 <nowiki> </nowiki>a
17008 <nowiki> </nowiki> a
17010 <nowiki> </nowiki>a(tab)
17012 <nowiki> </nowiki> a
17014 <nowiki> </nowiki> a
17017 <nowiki> </nowiki>b
17020 <nowiki> </nowiki>b
17023 <nowiki> </nowiki> b
17029 <p><!--cmt--> a</p>
17038 #### --------------- HTML tags ---------------
17041 #### 3. multi-line html tag
17042 #### -----------------------------------------
17048 <a href="http://google.com">google</a>
17050 <a href="http://google.com">google</a>
17056 <nowiki><div>foo</div>
17057 <div style="color:red">foo</div></nowiki>
17059 <p><div>foo</div>
17060 <div style="color:red">foo</div>
17065 3. multi-line html tag
17080 <nowiki><ref>foo</ref></nowiki>
17082 <p><ref>foo</ref>
17086 #### --------------- Others ---------------
17090 <nowiki>foo</nowiki>
17092 <p><nowiki>foo</nowiki>
17096 ## The quote-char in the input is necessary for triggering the bug
17098 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
17100 parsoid=wt2wt,html2wt
17109 Tag-like HTML structures are passed through as text
17131 </p><p>1<d e>f
17136 # This was a bug in the PHP parser (see bug 17663 and its dups,
17137 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
17139 Tag names followed by punctuation should not be recognized as tags
17143 <p><s.ome> text
17148 HTML tag with necessary entities in attributes
17150 <span title="&amp;">foo</span>
17152 <p><span title="&amp;">foo</span>
17157 HTML tag with 'unnecessary' entity encoding in attributes
17159 <span title="&">foo</span>
17161 <p><span title="&">foo</span>
17166 HTML tag with broken attribute value quoting
17168 <span title="Hello world>Foo</span>
17170 <p><span>Foo</span>
17175 Parsoid-only: HTML tag with broken attribute value quoting
17179 <span title="Hello world>Foo</span>
17181 <p><span title="Hello world">Foo</span>
17186 Table with broken attribute value quoting
17189 | title="Hello world|Foo
17200 Table with broken attribute value quoting on consecutive lines
17203 | title="Hello world|Foo
17204 | style="color:red|Bar
17217 Parsoid-only: Table with broken attribute value quoting on consecutive lines
17222 | title="Hello world|Foo
17223 | style="color:red|Bar
17228 <td title="Hello world">Foo
17229 </td><td style="color: red">Bar
17230 </td></tr></tbody></table>
17235 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
17245 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
17255 Accept empty td cell attribute
17258 | align="center" | foo || |
17263 <td align="center"> foo </td>
17270 Non-empty attributes in th-cells
17273 ! Foo !! style="color: red" | Bar
17279 <th style="color: red"> Bar
17285 Accept empty attributes in th-cells
17300 Empty table rows go away
17321 ### Parsoid-centric tests for testing RTing of inter-element separators
17322 ### Edge cases not tested by existing parser tests and specific to
17323 ### Parsoid-specific serialization strategies.
17327 RT-ed inter-element separators should be valid separators
17340 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
17341 (Parsoid-only since PHP parser relies on Tidy for correct output)
17357 Empty TD followed by TD with tpl-generated attribute
17362 |{{echo|style='color:red'}}|foo
17376 Indented table with an empty td
17395 Empty TR followed by a template-generated TR
17396 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
17402 {{echo|<tr><td>foo</td></tr>}}
17408 <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}}]}'>
17413 ## PHP and parsoid output differ for this, and since this is primarily
17414 ## for testing Parsoid's serializer, marking this Parsoid only
17416 Empty TR followed by mixed-ws-comment line should RT correctly
17432 <!--c--> </tr><!--d-->
17438 Multi-line image caption generated by templates with/without trailing newlines
17442 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
17443 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
17445 <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>
17446 <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>
17450 ## PHP emits broken html for this, and since this is primarily
17451 ## a Parsoid serializer test, marking this Parsoid only
17453 Improperly nested inline or quotes tags with whitespace in between
17457 <span> <s>x</span> </s>
17460 <p><span> <s>x</s></span><s> </s>
17461 <b> <i>x</i></b><i> </i>
17466 Encapsulate protected attributes from wt
17470 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
17472 <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>
17476 ## Currently the p-wrapper is fragile in how adds / removes transformations.
17477 ## Having nested or stray pre tags results in the attempt to add duplicates,
17478 ## causing an assertion fail. This test tries to prevent that situation.
17480 Ensure ParagraphWrapper can deal with stray closing pre tags
17490 Ensure fostered text content is wrapped in spans
17494 <table>hi</table><table>ho</table>
17502 # -----------------------------------------------------------------
17503 # The following section of tests are primarily to spec requirements
17504 # around serialization of new/edited content.
17506 # All these tests are marked Parsoid html2wt and html2html only
17507 # ----------------------------------------------------------------
17510 Image: Modifying size of an image
17514 [[Image:Wiki.png|230x230px]]
17516 <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>
17520 Image: New block level image should have \n before and after
17525 [[File:Wiki.png|right|thumb|150x150px]]
17528 <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>
17531 # Wacky -- the leading newline in input is required because
17532 # that is what the serializer emits. To be fixed. Not fixing
17533 # the test because this test is required to test serialization of
17534 # new content and preferred whitespace style.
17536 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
17544 <li><p>foo</p></li>
17548 # Wacky -- the leading newline in input is required because
17549 # that is what the serializer emits. To be fixed. Not fixing
17550 # the test because this test is required to test serialization of
17551 # new content and preferred whitespace style.
17553 Lists: Add space after bullets
17560 * <span> baz</span>
17565 <li><span> baz</span></li>
17570 Parsoid: Serialize positional parameters with = in them as named parameter
17576 {{echo|1 = f=oo|2 = bar}}
17578 <!--Orig params with data-parsoid has heuristics for handling = chars-->
17579 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
17580 {{echo|<nowiki>f=oo</nowiki>|bar}}
17582 <p about="#mwt1" typeof="mw:Transclusion"
17583 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
17585 <p about="#mwt1" typeof="mw:Transclusion"
17586 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
17588 <!--Orig params with data-parsoid has heuristics for handling = chars-->
17589 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
17590 <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>
17594 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
17610 <div>a<p>b</p></div>
17618 #-----------------------------
17619 # I/B quote minimization tests
17620 #-----------------------------
17623 1. I/B qoute minimization: wikitext-only tags should be combined
17637 <p><i>A</i><i>B</i></p>
17638 <p><b>A</b><b>B</b></p>
17639 <p><i>A</i><b><i>B</i></b></p>
17640 <p><b>A</b><i><b>B</b></i></p>
17641 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
17645 2. I/B qoute minimization: wikitext and html tags should not be combined
17651 ''A'''''<i>B</i>'''
17653 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
17654 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
17658 3. I/B qoute minimization: templated content stops minimization
17662 ''A''{{echo|''B''}}
17664 ''A''{{echo|'''''B'''''}}
17666 <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>
17667 <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>
17671 4. I/B qoute minimization: new content should be mimimized with adjacent old content
17681 <p><i>A</i><i data-parsoid='{}'>B</i></p>
17682 <p><b data-parsoid='{}'>A</b><b>B</b></p>
17683 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
17686 # -----------------------------------------------------------------
17687 # End of section for Parsoid-only html2wt tests for serialization
17689 # -----------------------------------------------------------------
17696 Try for 100% code coverage