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
29 # notoc disable table of contents
31 # You can also set the following parser properties via test options:
32 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
33 # wgLinkHolderBatchSize, wgRawHtml
35 # For testing purposes, temporary articles can created:
36 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
37 # where '/' denotes a newline.
39 # This is the standard article assumed to exist.
64 MediaWiki:bad image list
66 * [[File:Bad.jpg]] except [[Nasty page]]
100 Template:echo_with_span
106 Template:echo_with_div
118 Template:table_attribs
121 |</noinclude>style="color: red"| Foo
127 {{table_attribs}} || Bar || Baz
131 Template:image_attribs
134 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
162 This is a simple paragraph.
164 <p>This is a simple paragraph.
169 Paragraphs with extra newline spacing
192 Paragraphs with newline spacing with comment lines in between
200 <!--foo--><!--More than 1 comment, still stripped-->
204 <!--foo--> <!----> <!-- bar -->
265 Paragraphs with newline spacing with non-empty white-space lines in between
292 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
300 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
339 Extra newlines: More paragraphs with indented comment
354 Extra newlines followed by heading
369 <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>
370 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
373 <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>
378 Extra newlines between heading and content are swallowed
386 <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>
387 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
394 http://fr.wikipedia.org/wiki/🍺
395 <!-- EasterEgg we love beer, better be able be able to link to it -->
397 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
417 * plain''italic''plain
418 * plain''italic''plain''italic''plain
419 * plain'''bold'''plain
420 * plain'''bold'''plain'''bold'''plain
421 * plain''italic''plain'''bold'''plain
422 * plain'''bold'''plain''italic''plain
423 * plain''italic'''bold-italic'''italic''plain
424 * plain'''bold''bold-italic''bold'''plain
425 * plain'''''bold-italic'''italic''plain
426 * plain'''''bold-italic''bold'''plain
427 * plain''italic'''bold-italic'''''plain
428 * plain'''bold''bold-italic'''''plain
429 * plain l'''italic''plain
430 * plain l''''bold''' plain
433 </li><li> plain<i>italic</i>plain
434 </li><li> plain<i>italic</i>plain<i>italic</i>plain
435 </li><li> plain<b>bold</b>plain
436 </li><li> plain<b>bold</b>plain<b>bold</b>plain
437 </li><li> plain<i>italic</i>plain<b>bold</b>plain
438 </li><li> plain<b>bold</b>plain<i>italic</i>plain
439 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
440 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
441 </li><li> plain<i><b>bold-italic</b>italic</i>plain
442 </li><li> plain<b><i>bold-italic</i>bold</b>plain
443 </li><li> plain<i>italic<b>bold-italic</b></i>plain
444 </li><li> plain<b>bold<i>bold-italic</i></b>plain
445 </li><li> plain l'<i>italic</i>plain
446 </li><li> plain l'<b>bold</b> plain
451 # this example taken from the [[simple:Moon]] article (bug 47326)
453 Italics and possessives (1)
455 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
457 <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
461 # this example taken from [[en:Flaming Pie]] (bug 49926)
463 Italics and possessives (2)
465 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
467 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
471 # this example taken from [[en:Dictionary]] (bug 49926)
473 Italics and possessives (3)
475 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''.
477 <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>.
483 ### 2-quote opening sequence tests
486 Italics and bold: 2-quote opening sequence: (2,2)
496 Italics and bold: 2-quote opening sequence: (2,3)
506 Italics and bold: 2-quote opening sequence: (2,4)
516 Italics and bold: 2-quote opening sequence: (2,5) (php)
525 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
527 Italics and bold: 2-quote opening sequence: (2,5) (parsoid)
539 ### 3-quote opening sequence tests
543 Italics and bold: 3-quote opening sequence: (3,2)
553 Italics and bold: 3-quote opening sequence: (3,3)
563 Italics and bold: 3-quote opening sequence: (3,4)
573 Italics and bold: 3-quote opening sequence: (3,5) (php)
582 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
584 Italics and bold: 3-quote opening sequence: (3,5) (parsoid)
596 ### 4-quote opening sequence tests
600 Italics and bold: 4-quote opening sequence: (4,2)
610 Italics and bold: 4-quote opening sequence: (4,3)
620 Italics and bold: 4-quote opening sequence: (4,4)
630 Italics and bold: 4-quote opening sequence: (4,5) (php)
639 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
641 Italics and bold: 4-quote opening sequence: (4,5) (parsoid)
647 <p>'<b>foo</b><i></i>
653 ### 5-quote opening sequence tests
657 Italics and bold: 5-quote opening sequence: (5,2)
668 Italics and bold: 5-quote opening sequence: (5,3)
678 Italics and bold: 5-quote opening sequence: (5,4)
682 <p><i><b>foo'</b></i>
688 Italics and bold: 5-quote opening sequence: (5,5)
697 ### multiple quote sequences in a line
700 Italics and bold: multiple quote sequences: (2,4,2)
704 <p><i>foo'<b>bar</b></i>
710 Italics and bold: multiple quote sequences: (2,4,3)
714 <p><i>foo'<b>bar</b></i>
720 Italics and bold: multiple quote sequences: (2,4,4)
724 <p><i>foo'<b>bar'</b></i>
730 Italics and bold: multiple quote sequences: (3,4,2) (php)
739 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
741 Italics and bold: multiple quote sequences: (3,4,2) (parsoid)
747 <p><b>foo'</b>bar<i></i>
753 Italics and bold: multiple quote sequences: (3,4,3) (php)
762 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
764 Italics and bold: multiple quote sequences: (3,4,3) (parsoid)
770 <p><b>foo'</b>bar<b></b>
775 ### other quote tests
778 Italics and bold: other quote tests: (2,3,5)
780 ''this is about '''foo's family'''''
782 <p><i>this is about <b>foo's family</b></i>
788 Italics and bold: other quote tests: (2,(3,3),2)
790 ''this is about '''foo's''' family''
792 <p><i>this is about <b>foo's</b> family</i>
798 Italics and bold: other quote tests: (3,2,3,2)
800 '''this is about ''foo'''s family''
802 <p><b>this is about <i>foo</i></b><i>s family</i>
808 Italics and bold: other quote tests: (3,2,3,3)
811 '''this is about ''foo'''s family'''
813 <p>'<i>this is about </i>foo<b>s family</b>
819 Italics and bold: other quote tests: (3,(2,2),3)
821 '''this is about ''foo's'' family'''
823 <p><b>this is about <i>foo's</i> family</b>
829 Italicized possessive
831 The ''[[Main Page]]'''s talk page.
833 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
838 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
839 (Requires tidy for PHP parser output to be fixed up)
841 parsoid=wt2html,wt2wt
849 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
850 <td><i>a</i></td><td><i>b</i></td></tr>
859 Non-html5 tags should be accepted
861 <center>''foo''</center>
864 <strike>''foo''</strike>
867 <center><i>foo</i></center>
868 <p><big><i>foo</i></big>
869 <font><i>foo</i></font>
870 <strike><i>foo</i></strike>
876 <wbr> is valid wikitext (bug 52468)
884 # <strike> is HTML4, <s> is HTML4/5.
886 <s> or <strike> for strikethrough
888 <strike>strike</strike>
892 <p><strike>strike</strike>
898 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
900 <b→> doesn't work! </b>
902 <bä> doesn't work! </b>
904 <boo> works fine </b>
912 <p><b→> doesn't work! </b>
913 </p><p><bä> doesn't work! </b>
914 </p><p><boo> works fine </b>
915 </p><p><s.foo>foo</s>
916 </p><p><s.foo>s.foo</s.foo>
917 </p><p><sub-ID#1>
922 ### Special characters
926 Bare pipe character (bug 52363)
935 Bare pipe character from a template (bug 52363)
944 ### <nowiki> test cases
948 <nowiki> unordered list
950 <nowiki>* This is not an unordered list item.</nowiki>
952 <p>* This is not an unordered list item.
959 <nowiki>Lorem ipsum dolor
980 :There is not nowiki.
981 :There is <nowiki>nowiki</nowiki>.
983 #There is not nowiki.
984 #There is <nowiki>nowiki</nowiki>.
986 *There is not nowiki.
987 *There is <nowiki>nowiki</nowiki>.
989 <dl><dd>There is not nowiki.
990 </dd><dd>There is nowiki.
992 <ol><li>There is not nowiki.
993 </li><li>There is nowiki.
995 <ul><li>There is not nowiki.
996 </li><li>There is nowiki.
1002 Entities inside <nowiki>
1004 <nowiki><</nowiki>
1011 Entities inside template parameters
1017 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span>
1025 Comments and Indent-Pre
1027 <!-- comment 1 --> asdf
1029 <!-- comment 1 --> asdf
1032 <!-- comment 1 --> asdf
1033 <!-- comment 2 -->xyz
1035 <!-- comment 1 --> asdf
1036 <!-- comment 2 --> xyz
1092 asdf<!-- comment 1 -->jkl
1102 <!-- foo --> b <!-- bar -->
1116 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1122 Comment semantics and delimiters
1124 <!-- --><!----><!-----><!------>
1130 Comment semantics and delimiters, redux
1132 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1133 -- foo -- funky huh? ... -->
1139 Comment semantics and delimiters: directors cut
1141 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1142 everything starting with < followed by !-- until the first -- and > we see,
1143 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1151 Comment semantics: nesting
1153 <!--<!-- no, we're not going to do anything fancy here -->-->
1160 Comment semantics: unclosed comment at end
1162 <!--This comment will run out to the end of the document
1168 Comment in template title
1177 Comment on its own line post-expand
1189 Comment on its own line post-expand with non-significant whitespace
1201 ### paragraph wrapping tests
1216 Block tag on one line (<div>)
1228 Block tag on one line (<blockquote>)
1230 a <blockquote>foo</blockquote>
1234 a <blockquote>foo</blockquote>
1240 Block tag on both lines (<div>)
1252 Block tag on both lines (<blockquote>)
1254 a <blockquote>foo</blockquote>
1256 b <blockquote>foo</blockquote>
1258 a <blockquote>foo</blockquote>
1259 b <blockquote>foo</blockquote>
1264 Multiple lines without block tags
1282 Empty lines between lines with block tags
1312 ### Preformatted text
1321 And a [[Main Page|link]]
1327 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1332 Tabs don't trigger preformatted text
1336 This is preformatted text.
1342 <pre>This is preformatted text.
1348 Ident preformatting with inline content
1359 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1376 Regression with preformatted in <center>
1390 Bug 52763: Preformatted in <blockquote>
1404 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1421 Bug 15491: <ins>/<del> in blockquote
1424 Foo <del>bar</del> <ins>baz</ins> quux
1428 <p>Foo <del>bar</del> <ins>baz</ins> quux
1434 # Note that the p-wrapping is newline sensitive, which could be
1435 # considered a bug: tidy will wrap only the 'Foo' in the example
1436 # below in a <p> tag. (see comment 23-25 of bug #6200)
1438 Bug 15491: <ins>/<del> in blockquote (2)
1440 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1443 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1449 <pre> with attributes (bug 3202)
1451 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1453 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1458 <pre> with width attribute (bug 3202)
1460 <pre width="8">Narrow screen goodies</pre>
1462 <pre width="8">Narrow screen goodies</pre>
1467 <pre> with forbidden attribute (bug 3202)
1469 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1471 <pre width="8">Narrow screen goodies</pre>
1476 Entities inside <pre>
1485 <pre> with forbidden attribute values (bug 3202)
1487 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1489 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1494 <nowiki> inside <pre> (bug 13238)
1502 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1510 <pre><nowiki>Foo</nowiki></pre>
1515 <nowiki> and <pre> preference (first one wins)
1546 </pre> inside nowiki
1548 <nowiki></pre></nowiki>
1555 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1563 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1573 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1585 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1606 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1610 {{echo| foo}}{{echo| bar}}
1615 {{echo|<!--cmt--> foo}}
1617 <!--cmt-->{{echo| foo}}
1619 {{echo|{{echo| }}bar}}
1637 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1673 # TODO / maybe: fix wt2wt for this
1675 Parsoid: Don't paragraph-wrap fosterable content
1701 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
1729 #--------------------------------------------------------------------
1730 # Transclusion parameter whitespace stripping tests
1731 # Behavior is different for positional and named parameters
1732 #--------------------------------------------------------------------
1734 Templates: Strip leading and trailing whitespace from named-param values
1738 {{echo|1= {{echo|b}} }}
1757 Templates: Don't strip whitespace from positional-param values
1761 {{echo|{{echo|b}} }}
1802 Templates: Handle empty comment-and-ws-only lines correctly
1805 <!--should be ignored-->
1806 <!--should be ignored as well-->
1814 #--------------------------------------------------------------------
1815 # Transclusion parameter escaping tests
1816 #--------------------------------------------------------------------
1818 Templates: Parsoid parameter escaping test 1
1822 {{echo|[foo]|{{echo|[bar]}}}}
1824 <p about="#mwt1" typeof="mw:Transclusion"
1825 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
1829 Parsoid: Pipes in external links in template parameter
1833 {{echo|[{{echo|http://example.com}} link]}}
1835 <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>
1839 Parsoid: pipe in transclusion parameter
1843 {{echo|http://foo.com/a|b}}
1845 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1846 typeof="mw:Transclusion"
1847 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>
1851 Parsoid: Pipe in external link target and content in template parameter
1853 parsoid=html2wt,wt2wt
1855 {{echo|[http://foo.com/a|b a|b]}}
1857 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1858 typeof="mw:Transclusion"
1859 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
1860 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
1864 Templates: Dont escape already nowiki-escaped text in template parameters
1866 parsoid=html2wt,wt2wt
1868 {{echo|foo<nowiki>|</nowiki>bar}}
1869 {{echo|<nowiki><div></nowiki>}}
1870 {{echo|<nowiki></nowiki>}}
1872 <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>
1873 <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>
1874 <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>
1880 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
1882 parsoid=html2wt,wt2wt
1884 {{echo|{{echo|1=bar}}}}
1886 <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>
1890 ### Parsoid-centric tests for testing RT edge cases for pre
1894 1a. Indent-Pre and Comments
1907 1b. Indent-Pre and Comments
1920 1c. Indent-Pre and Comments
1933 1d. Indent-Pre and Comments
1934 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
1947 2a. Indent-Pre and tables
1968 2b. Indent-Pre and tables
1984 2c. Indent-Pre and tables (bug 42252)
2001 3a. Indent-Pre and block tags (single-line html)
2005 <blockquote> foo </blockquote>
2010 <blockquote> foo </blockquote>
2011 <pre><span> foo </span>
2016 3b. Indent-Pre and block tags (pre-content on separate line)
2080 4. Multiple spaces at start-of-line
2099 5. White-space in indent-pre
2100 NOTE: the white-space char on 2nd line is significant
2113 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2136 7a. Indent-pre and category links
2138 parsoid=wt2html,wt2wt
2140 [[Category:foo]] <!-- No pre-wrapping -->
2141 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2143 <link rel="mw:WikiLink/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2144 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span>
2145 <link rel="mw:WikiLink/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2149 7b. Indent-pre and category links
2151 parsoid=wt2html,wt2wt
2154 [[Category:foo]] {{echo|b}}
2157 <link rel="mw:WikiLink/Category" href="./Category:Foo"> a
2159 <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>
2163 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2167 HTML-pre: 1. embedded newlines
2203 HTML-pre: 2: indented text
2216 HTML-pre: 3: other wikitext
2237 ### Definition lists
2244 <dl><dt> name </dt><dd> Definition
2250 Definition list for indentation only
2254 <dl><dd> Indented text
2260 Definition list with no space
2264 <dl><dt>name</dt><dd>Definition
2270 Definition list with URL link
2272 ; http://example.com/ : definition
2274 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt><dd> definition
2280 Definition list with bracketed URL link
2282 ;[http://www.example.com/ Example]:Something about it
2284 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt><dd>Something about it
2290 Definition list with wikilink containing colon
2292 ; [[Help:FAQ]]: The least-read page on Wikipedia
2294 <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
2299 # At Brion's and JeLuF's insistence... :)
2301 Definition list with news link containing colon
2303 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2305 <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!
2311 Malformed definition list with colon
2313 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2315 <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
2321 Definition lists: colon in external link text
2323 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2325 <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
2331 Definition lists: colon in HTML attribute
2333 ;<b style="display: inline">bold</b>
2335 <dl><dt><b style="display: inline">bold</b>
2341 Definition lists: self-closed tag
2343 ;one<br/>two : two-line fun
2345 <dl><dt>one<br />two </dt><dd> two-line fun
2351 Bug 11748: Literal closing tags
2355 <dd>test test test test test</dd>
2357 <dd>test test test test test</dd>
2362 <dd>test test test test test</dd>
2364 <dd>test test test test test</dd>
2370 Definition and unordered list using wiki syntax nested in unordered list using html tags.
2373 ; term : description
2379 <dl><dt> term </dt><dd> description
2390 Definition list with empty definition and following paragraph
2395 <dl><dt> term</dt><dd>
2402 Nested definition lists using html syntax
2419 Definition Lists: No nesting: Multiple dd's
2433 Definition Lists: Indentation: Regular
2449 Definition Lists: Indentation: Missing 1st level
2463 Definition Lists: Indentation: Multi-level indent
2467 <dl><dd><dl><dd><dl><dd>i3
2475 Definition Lists: Hacky use to indent tables
2482 should be left alone
2484 <dl><dd><dl><dd><table>
2489 </td></tr></table></dd></dl></dd></dl>
2491 should be left alone
2497 Definition Lists: Hacky use to indent tables (WS-insensitive)
2505 <dl><dd> <table><tr><td>a</td></tr></table> </dd></dl>
2507 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
2508 ## as an empty dt item. It also ignores all but the last ";" when followed
2509 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
2510 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
2513 ## Ex: ";;t2 ::d2" is transformed into:
2525 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
2526 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
2537 ## All Parsoid only definition list tests have this difference.
2539 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
2540 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
2543 Table / list interaction: indented table with lists in table contents
2565 </td></tr></table></dd></dl>
2570 Table / list interaction: lists nested in tables nested in indented lists
2595 </td></tr></table></dd></dl>
2603 Definition Lists: Nesting: Multi-level (Parsoid only)
2633 Definition Lists: Nesting: Test 2 (Parsoid only)
2653 Definition Lists: Nesting: Test 3 (Parsoid only)
2681 Definition Lists: Nesting: Test 4
2686 <dl><dd><dl><dd><dl><dt>t3
2695 ## The Parsoid team believes the following three test exposes a
2696 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
2697 ## wrong to close the <dl> after the <dt> containing the <ul>.)
2699 Definition Lists: Mixed Lists: Test 1 (php)
2707 <dl><dd><dl><dt><ul><li> foo
2717 Definition Lists: Mixed Lists: Test 1 (parsoid)
2725 <dl><dd><dl><dt><ul><li> foo
2726 </li></ul></dt><dd><ul><li> bar
2727 </li></ul></dd><dt> baz</dt></dl></dd></dl>
2731 Definition Lists: Mixed Lists: Test 2
2745 Definition Lists: Mixed Lists: Test 3
2750 <ul><li><dl><dd><dl><dd><dl><dd> d1
2761 Definition Lists: Mixed Lists: Test 4
2766 <ul><li><dl><dt>d1 </dt><dd>d2
2767 </dd><dt>d3 </dt><dd>d4
2775 Definition Lists: Mixed Lists: Test 5
2790 Definition Lists: Mixed Lists: Test 6
2795 <ol><li><ul><li><dl><dd>d1
2807 Definition Lists: Mixed Lists: Test 7
2821 Definition Lists: Mixed Lists: Test 8
2837 Definition Lists: Mixed Lists: Test 9
2841 <ul><li><dl><dt>foo </dt><dd>bar
2849 Definition Lists: Mixed Lists: Test 10
2853 <ul><li><ol><li><dl><dt>foo </dt><dd>bar
2860 # The Parsoid team disagrees with the PHP parser's seemingly-random
2861 # rules regarding dd/dt on the next two tests. Parsoid is more
2862 # consistent, and recognizes the shared nesting and keeps the
2863 # still-open tags around until the nesting is complete.
2866 Definition Lists: Mixed Lists: Test 11 (php)
2873 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt><dd><ul><li><dl><dt><dl><dt>bar
2878 <dl><dt>boo </dt><dd>baz
2887 Definition Lists: Mixed Lists: Test 11 (parsoid)
2909 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2910 <dd data-parsoid='{"stx":"row"}'>bar</dd></dl></dt></dl></li></ul></dt>
2911 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2912 <dd data-parsoid='{"stx":"row"}'>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
2917 Definition Lists: Weird Ones: Test 1 (php)
2921 *#;*::;; foo : bar (who uses this?)
2923 <ul><li><ol><li><dl><dt> foo </dt><dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)
2935 Definition Lists: Weird Ones: Test 1 (parsoid)
2939 *#;*::;; foo : bar (who uses this?)
2956 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2957 <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>
2964 External links: non-bracketed
2966 Non-bracketed: http://example.com
2968 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2973 External links: numbered
2975 Numbered: [http://example.com]
2976 Numbered: [http://example.net]
2977 Numbered: [http://example.com]
2979 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
2980 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
2981 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
2986 External links: specified text
2988 Specified text: [http://example.com link]
2990 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
2995 External links: trail
2997 Linktrails should not work for external links: [http://example.com link]s
2999 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3004 External links: dollar sign in URL
3006 http://example.com/1$2345
3008 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3013 External links: dollar sign in URL (named)
3015 [http://example.com/1$2345]
3017 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3022 External links: open square bracket forbidden in URL (bug 4377)
3024 http://example.com/1[2345
3026 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3031 External links: open square bracket forbidden in URL (named) (bug 4377)
3033 [http://example.com/1[2345]
3035 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3040 External links: nowiki in URL link text (bug 6230)
3042 [http://example.com/ <nowiki>''example site''</nowiki>]
3044 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
3049 External links: newline forbidden in text (bug 6230 regression check)
3051 [http://example.com/ first
3054 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
3060 External links: Pipe char between url and text
3062 [http://example.com | link]
3064 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
3069 External links: protocol-relative URL in brackets
3071 [//example.com/ Test]
3073 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
3078 External links: protocol-relative URL in brackets without text
3082 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
3087 External links: protocol-relative URL in free text is left alone
3091 <p>//example.com/Foo
3096 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
3098 foo//example.com/Foo
3100 <p>foo//example.com/Foo
3107 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3109 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3114 External image from https
3116 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3118 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3123 External image (when not allowed)
3125 wgAllowExternalImages=0
3127 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3129 <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>
3134 Link to non-http image, no img tag
3136 Link to non-http image, no img tag: ftp://example.com/test.jpg
3138 <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>
3143 External links: terminating separator
3145 Terminating separator: http://example.com/thing,
3147 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
3152 External links: intervening separator
3154 Intervening separator: http://example.com/1,2,3
3156 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
3161 External links: old bug with URL in query
3163 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
3165 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
3170 External links: old URL-in-URL bug, mixed protocols
3172 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
3174 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
3179 External links: URL in text
3181 URL in text: [http://example.com http://example.com]
3183 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3188 External links: Clickable images
3190 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
3192 <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>
3197 External links: raw ampersand
3199 Old & use: http://x&y
3201 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3206 External links: encoded ampersand
3208 Old & use: http://x&y
3210 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3215 External links: encoded equals (bug 6102)
3217 http://example.com/?foo=bar
3219 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
3224 External links: [raw ampersand]
3226 Old & use: [http://x&y]
3228 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3233 External links: [encoded ampersand]
3235 Old & use: [http://x&y]
3237 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3242 External links: [encoded equals] (bug 6102)
3244 [http://example.com/?foo=bar]
3246 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3251 External links: [IDN ignored character reference in hostname; strip it right off]
3253 [http://e‌xample.com/]
3255 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
3259 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
3260 # Where an external link could easily circumvent the sanitization of the text of
3261 # a link like this (where an IDN-ignore character is in the URL somewhere), this
3262 # test demands a higher standard. That's a bit strange.
3266 # http://example.com -> [http://example.com|http://example.com]
3267 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
3269 # The first example is sanitized, but the second is not. Any security benefits
3270 # from this production are trivial to circumvent. Either remove this test and
3271 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
3272 # the test accordingly.
3277 External links: IDN ignored character reference in hostname; strip it right off
3279 http://e‌xample.com/
3281 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
3286 External links: www.jpeg.org (bug 554)
3290 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
3295 External links: URL within URL (original bug 2)
3297 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
3299 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
3304 BUG 361: URL inside bracketed URL
3306 [http://www.example.com/foo http://www.example.com/bar]
3308 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
3313 BUG 361: URL within URL, not bracketed
3315 http://www.example.com/foo?=http://www.example.com/bar
3317 <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>
3322 BUG 289: ">"-token in URL-tail
3324 http://www.example.com/<hello>
3326 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
3331 BUG 289: literal ">"-token in URL-tail
3333 http://www.example.com/<b>html</b>
3335 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
3340 BUG 289: ">"-token in bracketed URL
3342 [http://www.example.com/<hello> stuff]
3344 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
3349 BUG 289: literal ">"-token in bracketed URL
3351 [http://www.example.com/<b>html</b> stuff]
3353 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
3358 BUG 289: literal double quote at end of URL
3360 http://www.example.com/"hello"
3362 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
3367 BUG 289: literal double quote in bracketed URL
3369 [http://www.example.com/"hello" stuff]
3371 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
3376 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
3378 [http://www.example.com test]
3380 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
3385 External links: link text with spaces
3387 [http://www.example.com a b c]
3388 [http://www.example.com ''a'' ''b'']
3390 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
3391 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
3396 External links: wiki links within external link (Bug 3695)
3398 [http://example.com [[wikilink]] embedded in ext link]
3400 <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>
3405 BUG 787: Links with one slash after the url protocol are invalid
3409 [http:/example.com title]
3411 <p>http:/example.com
3412 </p><p>[http:/example.com title]
3417 Bracketed external links with template-generated invalid target
3419 [{{echo|http:/example.com}} title]
3421 <p>[http:/example.com title]
3426 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
3428 ''[http://example.com text'']
3429 [http://example.com '''text]'''
3430 ''Something [http://example.com in italic'']
3431 ''Something [http://example.com mixed''''', even bold]'''
3432 '''''Now [http://example.com both''''']
3434 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
3435 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
3436 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
3437 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
3438 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
3444 Bug 4781: %26 in URL
3446 http://www.example.com/?title=AT%26T
3448 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
3452 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
3453 # % is actually legal in HTML5. Any change in output would need testing though.
3455 Bug 4781, 5267: %25 in URL
3457 http://www.example.com/?title=100%25_Bran
3459 <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>
3464 Bug 4781, 5267: %28, %29 in URL
3466 http://www.example.com/?title=Ben-Hur_%281959_film%29
3468 <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>
3474 Bug 4781: %26 in autonumber URL
3476 [http://www.example.com/?title=AT%26T]
3478 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
3483 Bug 4781, 5267: %26 in autonumber URL
3485 [http://www.example.com/?title=100%25_Bran]
3487 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
3492 Bug 4781, 5267: %28, %29 in autonumber URL
3494 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
3496 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
3502 Bug 4781: %26 in bracketed URL
3504 [http://www.example.com/?title=AT%26T link]
3506 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
3511 Bug 4781, 5267: %26 in bracketed URL
3513 [http://www.example.com/?title=100%25_Bran link]
3515 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
3520 Bug 4781, 5267: %28, %29 in bracketed URL
3522 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
3524 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
3529 External link containing double-single-quotes in text '' (bug 4598 sanity check)
3531 Some [http://example.com/ pretty ''italics'' and stuff]!
3533 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
3538 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
3540 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
3542 <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>
3547 External link containing double-single-quotes with no space separating the url from text in italics
3549 [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]].]
3551 <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>
3556 External link with comments in link text
3558 [http://www.google.com Google <!-- comment -->]
3560 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
3565 URL-encoding in URL functions (single parameter)
3567 {{localurl:Some page|amp=&}}
3569 <p>/index.php?title=Some_page&amp=&
3574 URL-encoding in URL functions (multiple parameters)
3576 {{localurl:Some page|q=?&=&}}
3578 <p>/index.php?title=Some_page&q=?&amp=&
3585 http://example.com/index.php?foozoid%5B%5D=bar
3587 http://example.com/index.php?foozoid[]=bar
3589 <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>
3590 </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>
3595 IPv6 urls (bug 21261)
3599 http://[2404:130:0:1000::187:2]/index.php
3601 <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>
3606 Non-extlinks in brackets
3615 [{{echo|foo}} ''bar'']
3616 [{{echo|foo}}l's] errand
3617 [{{echo|foo}}l's errand]
3619 [url=http://example.com]
3632 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
3637 Parsoid: Percent encoding in external links
3641 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
3643 <p><a rel="mw:ExtLink"
3644 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
3648 Parsoid: use url link syntax for links where the content is equal the link
3655 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
3665 Normal text. '''Bold text.''' Normal text. ''Italic text.''
3667 Normal text. '''''Bold italic text.''''' Normal text.
3669 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
3670 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
3676 Unclosed and unmatched quotes (php)
3680 '''''Bold italic text '''with bold deactivated''' in between.'''''
3682 '''''Bold italic text ''with italic deactivated'' in between.'''''
3686 ..spanning two paragraphs (should not work).'''
3688 '''Bold tag left open
3690 ''Italic tag left open
3694 <!-- Unmatching number of opening, closing tags: -->
3695 '''This year''''s election ''should'' beat '''last year''''s.
3697 ''Tom'''s car is bigger than ''Susan'''s.
3699 Plain ''italic'''s plain
3701 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3702 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
3703 </p><p><b>Bold text..</b>
3704 </p><p>..spanning two paragraphs (should not work).
3705 </p><p><b>Bold tag left open</b>
3706 </p><p><i>Italic tag left open</i>
3708 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3709 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3710 </p><p>Plain <i>italic'</i>s plain
3713 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
3714 # parser strips. The wikitext contains just the first half of the bold
3717 Unclosed and unmatched quotes (parsoid)
3721 '''''Bold italic text '''with bold deactivated''' in between.'''''
3723 '''''Bold italic text ''with italic deactivated'' in between.'''''
3727 ..spanning two paragraphs (should not work).'''
3729 '''Bold tag left open
3731 ''Italic tag left open
3735 <!-- Unmatching number of opening, closing tags: -->
3736 '''This year''''s election ''should'' beat '''last year''''s.
3738 ''Tom'''s car is bigger than ''Susan'''s.
3740 Plain ''italic'''s plain
3742 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3743 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
3744 </p><p><b>Bold text..</b>
3745 </p><p>..spanning two paragraphs (should not work).<b></b>
3746 </p><p><b>Bold tag left open</b>
3747 </p><p><i>Italic tag left open</i>
3749 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3750 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3751 </p><p>Plain <i>italic'</i>s plain
3758 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
3761 # This should not produce <table></table> as <table><tr><td></td></tr></table>
3762 # is the bare minimum required by the spec, see:
3763 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
3765 A table with no data. (php)
3772 # Parsoid team replies: empty table tags are legal in HTML5
3774 A table with no data. (parsoid)
3783 # A table with nothing but a caption is invalid XHTML, we might want to render
3784 # this as <p>caption</p>
3786 A table with nothing but a caption (php)
3796 </caption><tr><td></td></tr></table>
3799 # Parsoid team replies: table with only a caption is legal in HTML5
3801 A table with nothing but a caption (parsoid)
3809 <table><caption> caption</caption></table>
3813 A table with caption with default-spaced attributes and a table row
3816 |+ style="color: red;" | caption1
3822 <caption style="color: red;"> caption1
3831 A table with captions with non-default spaced attributes and a table row
3834 |+style="color: red;"|caption2
3835 |+ style="color: red;"| caption3
3841 <caption style="color: red;">caption2
3843 <caption style="color: red;"> caption3
3852 Table td-cell syntax variations
3856 | foo bar foo || baz
3857 | style='color:red;' | baz
3858 | style='color:red;' || baz
3865 <td> foo bar foo </td>
3868 <td style="color:red;"> baz
3870 <td> style='color:red;' </td>
3898 Simple table but with multiple dashes for row wikitext
3916 Multiplication table
3918 {| border="1" cellpadding="2"
3919 |+Multiplication table
3921 ! × !! 1 !! 2 !! 3
3939 <table border="1" cellpadding="2">
3940 <caption>Multiplication table
3987 Accept "||" in table headings
4002 Accept "||" in indented table headings
4012 </th></tr></table></dd></dl>
4017 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
4034 Accept "| !" at start of line in tables (ignore !-attribute)
4038 | !style="color:red" | bar
4050 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 +/-
4054 |style='color:red;'|+1
4055 |style='color:blue;'|-1
4067 <td style="color:red;">+1
4069 <td style="color:blue;">-1
4093 |rowspan=2| Cell 2, row 1 (and 2)
4104 <td rowspan="2"> Cell 2, row 1 (and 2)
4122 {| bgcolor=#ABCDEF border=2
4127 |the original table again
4135 <table bgcolor="#ABCDEF" border="2">
4143 <td>the original table again
4149 Invalid attributes in table cell (bug 1830)
4164 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
4167 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
4171 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
4172 <td>]" onmouseover="alert(document.cookie)">test
4181 Indented table markup mixed with indented pre content (proposed in bug 6200)
4186 Text that should be rendered preformatted
4194 <pre>Text that should be rendered preformatted
4203 Template-generated table cell attributes and cell content
4212 <td style="color: red"> Foo
4214 <td style="color: red"> Foo
4220 Template-generated table cell attributes and cell content (2)
4223 |align=center {{table_attribs}}
4228 <td align="center" style="color: red"> Foo
4234 Template-generated table cell attributes and cell content (3)
4237 |align=center {{table_cells}}
4242 <td align="center" style="color: red"> Foo </td>
4250 Table with row followed by newlines and table heading
4268 Table with empty line following the start tag
4285 # FIXME: Preserve the attribute properly (with an empty string as value) in
4286 # the PHP parser. Parsoid implements the behavior below.
4288 Table attributes with empty value
4300 </td></tr></tbody></table>
4305 Wikitext table with a lot of comments
4328 Wikitext table with double-line table cell
4345 Table cell with a single comment
4361 # The expected HTML structure in this test is debatable. The PHP parser does
4362 # not parse this kind of table at all. The main focus for Parsoid is on
4363 # round-tripping, so this output is ok for now. TODO: revisit!
4365 Wikitext table with html-syntax row (Parsoid)
4377 <td>foo</td></tr></tbody></table>
4381 Implicit <td> after a |-
4382 (PHP parser relies on Tidy to add the missing <td> tags)
4384 parsoid=wt2html,wt2wt
4397 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
4398 (PHP parser relies on Tidy to add the missing <td> tags)
4400 parsoid=wt2html,wt2wt
4412 <tr><td><pre>a</pre></td></tr>
4413 <tr><td> b</td></tr>
4419 Lists should be recognized in an implicit <td> context
4420 (PHP parser relies on Tidy to add the missing <td> tags)
4422 parsoid=wt2html,wt2wt
4431 <td><ul><li>a</li></ul></td>
4437 Parsoid: Round-trip tables directly followed by content (bug 51219)
4439 parsoid=wt2html,wt2wt
4451 <td>foo</td></tr></tbody></table> bar
4455 <td>baz</td></tr></tbody></table><b>quux</b>
4459 Parsoid: Default to a newline after tables in new content (bug 51219)
4466 <nowiki> </nowiki>bar
4473 <tr><td>foo</td></tr></tbody></table> bar
4475 <tr><td>baz</td></tr></tbody></table><b>quux</b>
4482 Plain link, capitalized
4486 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
4491 Plain link, uncapitalized
4495 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
4502 [[Main Page|The Main Page]]
4504 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4509 Piped link with comment in link text
4511 [[Main Page|The Main<!--front--> Page]]
4513 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4522 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
4527 Broken link with fragment
4529 [[Zigzagzogzagzig#zug]]
4531 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
4536 Special page link with fragment
4538 [[Special:Version#anchor]]
4540 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
4545 Nonexistent special page link with fragment
4547 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
4549 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
4556 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
4558 <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>
4565 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
4567 <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>!!!
4578 Bug 43661: Piped links with identical prefixes
4580 [[prefixed article|prefixed articles with spaces]]
4582 [[prefixed article|prefixed articlesaoeu]]
4584 [[Main Page|Main Page test]]
4586 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
4587 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
4588 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
4594 Link with HTML entity in suffix / tail
4596 [[Main Page]]", [[Main Page]]a
4598 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
4603 Link with 3 brackets
4612 Piped link with 3 brackets
4614 [[[main page|the main page]]]
4616 <p>[[[main page|the main page]]]
4621 Link with multiple pipes
4623 [[Main Page|The|Main|Page]]
4625 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
4632 [[Talk:Parser testing]], [[Meta:Disclaimers]]
4634 <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>
4639 MemoryAlpha:AlphaTest
4641 This is an article in the MemoryAlpha namespace
4642 (which shadows the memoryalpha interwiki link).
4646 Namespace takes precedence over interwiki link (bug 51680)
4648 [[MemoryAlpha:AlphaTest]]
4650 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
4655 Piped link to namespace
4657 [[Meta:Disclaimers|The disclaimers]]
4659 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
4666 [[Usually caused by a typo (oops}]]
4668 <p>[[Usually caused by a typo (oops}]]
4673 Link containing % (not as a hex sequence)
4677 <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>
4682 Link containing % as a single hex sequence interpreted to char
4686 <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>
4691 Link containing % as a double hex sequence interpreted to hex sequence
4695 <p>[[7%2525 Solution]]
4700 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
4701 Example for such a section: == < ==
4703 [[%23%3c]][[%23%3e]]
4705 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
4710 Link containing "<#" and ">#" as a hex sequences
4712 [[%3c%23]][[%3e%23]]
4714 <p>[[%3c%23]][[%3e%23]]
4719 Link containing an equals sign
4721 [[Special:BookSources/isbn=4-00-026157-6]]
4723 <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>
4730 Just a test of an article title containing a tilde.
4733 # note that links containing signatures, like [[Foo~~~~]], are
4734 # massaged by the pre-save transform (PST) and so the tildes are never
4735 # seen by the parser.
4737 Link containing a tilde
4741 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
4746 Link containing double-single-quotes '' (bug 4598)
4748 [[Lista d''e paise d''o munno]]
4750 <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>
4755 Link containing double-single-quotes '' in text (bug 4598 sanity check)
4757 Some [[Link|pretty ''italics'' and stuff]]!
4759 <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>!
4764 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
4766 ''Some [[Link|pretty ''italics'' and stuff]]!
4768 <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>
4773 Link with double quotes in title part (literal) and alternate part (interpreted)
4775 [[File:Denys Savchenko ''Pentecoste''.jpg]]
4779 [[''Pentecoste''|Pentecoste]]
4781 [[''Pentecoste''|''Pentecoste'']]
4783 <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>
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)">Pentecoste</a>
4786 </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>
4791 Broken image links with HTML captions (bug 39700)
4793 [[File:Nonexistent|<script></script>]]
4794 [[File:Nonexistent|100px|<script></script>]]
4795 [[File:Nonexistent|<]]
4796 [[File:Nonexistent|a<i>b</i>c]]
4798 <p><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"><script></script></a>
4800 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
4801 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
4808 [[http://www.example.com]]
4810 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
4815 Plain link to URL with link text
4817 [[http://www.example.com Link text]]
4819 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
4824 Plain link to protocol-relative URL
4826 [[//www.example.com]]
4828 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
4833 Plain link to protocol-relative URL with link text
4835 [[//www.example.com Link text]]
4837 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
4842 Plain link to page with question mark in title
4848 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
4849 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
4854 # I'm fairly sure the expected result here is wrong.
4855 # We want these to be URL links, not pseudo-pages with URLs for titles....
4856 # However the current output is also pretty screwy.
4859 # I'm changing it to match the current output--it arguably makes more
4860 # sense in the light of the test above. Old expected result was:
4861 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
4863 # But I think this test is bordering on "garbage in, garbage out" anyway.
4868 Piped link to URL: [[http://www.example.com|an example URL]]
4870 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
4875 BUG 2: [[page|http://url/]] should link to page, not http://url/
4877 [[Main Page|http://url/]]
4879 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
4884 BUG 337: Escaped self-links should be bold
4888 [[Bug462]] [[Bug462]]
4890 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
4895 Self-link to section should not be bold
4899 [[Main Page#section]]
4901 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
4912 Self-link to numeric title
4918 <p><strong class="selflink">0</strong>
4923 Link to numeric-equivalent title
4929 <p><a href="/wiki/00" title="00">00</a>
4934 <nowiki> inside a link
4936 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
4938 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
4943 Non-breaking spaces in title
4945 [[ Main Page ]]
4947 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
4952 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
4958 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
4963 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
4969 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
4974 Internal link with en linktrail: no apostrophes (bug 27473)
4980 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
4985 Internal link with ca linktrail with apostrophes (bug 27473)
4991 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
4996 Internal link with kaa linktrail with apostrophes (bug 27473)
5002 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
5013 Internal link with is link prefix
5017 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
5019 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
5030 Internal link with is link trail and link prefix
5034 [[mótmælendatrú|xxx]]ar
5036 mótmælenda[[söfnuður]]
5037 mótmælenda[[söfnuður|söfnuðir]]
5038 mótmælenda[[söfnuður|söfnuðir]]xxx
5040 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
5041 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
5042 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
5043 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
5044 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
5049 Parsoid link trail escaping
5051 parsoid=html2wt,html2html
5055 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
5059 Parsoid link prefix escaping
5062 parsoid=html2wt,html2html
5064 Aðrir mótmælenda<nowiki/>[[söfnuður]]
5066 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
5070 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
5078 [http://wp.org ''foo'']
5080 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
5081 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
5082 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
5083 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
5088 ### Interwiki links (see maintenance/interwiki.sql)
5092 Inline interwiki link
5094 [[MeatBall:SoftSecurity]]
5096 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
5101 Inline interwiki link with empty title (bug 2372)
5105 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
5110 Interwiki link encoding conversion (bug 1636)
5112 *[[Wikipedia:ro:Olteniţa]]
5113 *[[Wikipedia:ro:Olteniţa]]
5115 <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>
5116 </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>
5122 Interwiki link with fragment (bug 2130)
5124 [[MeatBall:SoftSecurity#foo]]
5126 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
5132 ### Interlanguage links
5133 ### Language links (so that searching for '### language' matches..)
5147 Double interlanguage link
5158 Interlanguage link, with prefix links
5170 Double interlanguage link, with prefix links (bug 8897)
5183 Parsoid-specific test: Wikilinks with should RT properly
5189 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
5194 Parsoid bug 53221: Wikilinks should be properly entity-escaped
5198 He&nbsp;llo [[Foo|He&nbsp;llo]]
5200 He&nbsp;llo [[He&nbsp;llo]]
5202 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
5203 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
5207 Parsoid: handle constructor well
5215 <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>
5218 <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>
5222 Parsoid: recognize interlanguage links without a target page
5229 <link rel="mw:WikiLink/Language" href="http://ko.wikipedia.org/wiki/"></p>
5233 Parsoid: recognize interwiki links without a target page
5239 <p><a rel="mw:WikiLink/Interwiki" href="http://ko.wikipedia.org/wiki/">ko:</a></p>
5243 ### Redirects, Parsoid-only
5246 Simple redirect to page
5250 #REDIRECT [[Main Page]]
5252 <link rel="mw:PageProp/redirect" href="./Main_Page">
5256 Optional colon in #REDIRECT
5258 # the colon is archaic syntax. we support it for wt2html, but we
5259 # don't care that it roundtrips back to the modern syntax.
5260 parsoid=wt2html,html2html
5262 #REDIRECT:[[Main Page]]
5264 <link rel="mw:PageProp/redirect" href="./Main_Page">
5268 Whitespace in #REDIRECT with optional colon
5270 # the colon and gratuitous whitespace is archaic syntax. we support
5271 # it for wt2html, but we don't care that it roundtrips back to the
5272 # modern syntax (without extra whitespace)
5273 parsoid=wt2html,html2html
5280 <link rel="mw:PageProp/redirect" href="./Main_Page">
5284 Piped link in #REDIRECT
5286 # content after piped link is ignored. we support this syntax,
5287 # but don't care that the piped link is lost when we roundtrip this.
5290 #REDIRECT [[Main Page|bar]]
5292 <link rel="mw:PageProp/redirect" href="./Main_Page">
5296 Redirect to category
5300 #REDIRECT [[Category:Foo]]
5302 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
5306 Redirect to category with URL encoding
5310 #REDIRECT [[Category%3AFoo]]
5312 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
5316 Redirect to category page
5318 parsoid=wt2html,html2html
5320 #REDIRECT [[:Category:Foo]]
5322 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
5326 Redirect to image page (1)
5330 #REDIRECT [[File:Wiki.png]]
5332 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5336 Redirect to image page (2)
5340 #REDIRECT [[Image:Wiki.png]]
5342 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5346 Redirect to language
5350 #REDIRECT [[en:File:Wiki.png]]
5352 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5356 Redirect to interwiki
5360 #REDIRECT [[meatball:File:Wiki.png]]
5362 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5366 Non-English #REDIRECT
5371 #TILVÍSUN [[Main Page]]
5373 <link rel="mw:PageProp/redirect" href="./Main_Page">
5390 Broken br tag sanitization
5400 # TODO: Fix html2html mode (bug 51055)!
5402 Parsoid: Broken br tag recognition
5412 Incorrecly removing closing slashes from correctly formed XHTML
5414 <br style="clear:both;" />
5416 <p><br style="clear:both;" />
5421 Failing to transform badly formed HTML into correct XHTML
5423 <br style="clear: left;">
5424 <br style="clear: right;">
5425 <br style="clear: both;">
5427 <p><br style="clear: left;" />
5428 <br style="clear: right;" />
5429 <br style="clear: both;" />
5434 Handling html with a div self-closing tag
5443 <p><div title />
5447 <p><div title=bar />
5448 <div title=bar/>
5450 <div title="bar/"></div>
5456 Handling html with a br self-closing tag
5465 <p><br title="title" />
5466 <br title="title" />
5475 Horizontal ruler (should it add that extra space?)
5489 Horizontal ruler -- 4+ dashes render hr
5498 Horizontal ruler -- eats additional dashes on the same line
5507 Horizontal ruler -- does not collapse dashes on consecutive lines
5518 Horizontal ruler -- <4 dashes render as plain text
5527 Horizontal ruler -- Supports content following dashes on same line
5536 ### Block-level elements
5559 <ol><li>Numbered list
5576 ***#Number on level 4
5578 **#Number on level 3
5579 **#Number on level 3
5583 #** Level 3, but ordered
5586 <ol><li> with numbers
5588 <ul><li> and bullets
5590 <ol><li> and numbers
5592 </li><li>bullets again
5593 <ul><li>bullet level 2
5594 <ul><li>bullet level 3
5595 <ol><li>Number on level 4
5598 </li><li>bullet level 2
5599 <ol><li>Number on level 3
5600 </li><li>Number on level 3
5603 <ol><li>number level 2
5606 <ul><li><ul><li> Level 3
5610 <ol><li><ul><li><ul><li> Level 3, but ordered
5644 Nested lists 3 (first element empty)
5657 Nested lists 4 (first element empty)
5670 Nested lists 5 (both elements empty)
5683 Nested lists 6 (both elements empty)
5696 Nested lists 7 (skip initial nesting levels)
5700 <ul><li><ul><li><ul><li> foo
5708 Nested lists 8 (multiple nesting transitions)
5716 <ul><li><ul><li> bar
5726 1. Lists with start-of-line-transparent tokens before bullets: Comments
5740 2. Lists with start-of-line-transparent tokens before bullets: Template close
5752 List items are not parsed correctly following a <pre> block (bug 785)
5758 <ul><li> <pre>foo</pre>
5759 </li><li> <pre>bar</pre>
5766 List items from template
5777 * notSOL{{inner list}}
5796 List interrupted by empty line or heading
5806 <ul><li><ul><li> bar
5809 <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>
5810 <ul><li> Another list item
5816 Multiple list tags generated by templates
5831 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
5834 <!--This line will NOT split the list-->
5836 <!--This line will NOT split the list either-->
5838 <!--foo--> <!----> <!--This line NOT split the list either-->
5850 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
5853 <!--This line will NOT split the list-->
5855 <!--This line will NOT split the list either-->
5857 <!--foo--> <!----> <!--This line NOT split the list
5871 (Cannot test this with PHP parser since it relies on Tidy for the hack)
5873 parsoid=wt2html,wt2wt
5877 * {{echo|<li>templated li-hack}}
5878 * <!--foo--> <li> unsupported li-hack with preceding comments
5881 <li><li>not a li-hack
5887 <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>
5888 <li> <!--foo--> </li><li> li-hack with preceding comments</li></ul>
5891 <li></li><li>not a li-hack
5897 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
5908 <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>
5912 Parsoid: Test of whitespace serialization with Templated bullets
5919 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
5923 # ------------------------------------------------------------------------
5924 # The next set of tests are about Parsoid's ability to handle badly nested
5925 # tags (parse, minimize scope of fixup, and roundtrip back)
5926 # ------------------------------------------------------------------------
5929 Unbalanced closing block tags break a list
5930 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5940 </li></ul></div><div>
5946 Unbalanced closing non-block tags don't break a list
5947 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5957 <ul><li>a<span></span>
5963 Unclosed formatting tags that straddle lists are closed and reopened
5964 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5972 </li><li> <s> b </s>
5977 List embedded in a non-block tag
5978 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
5986 <p><small></small></p>
5992 <p><small></small></p>
5996 Table with missing opening <tr> tag
5998 parsoid=wt2html,wt2wt
6016 # Note that the current date is hard-coded as
6017 # 1970-01-01T00:02:03Z (a Thursday)
6018 # when running parser tests. The timezone is also fixed to GMT, so
6019 # local date will be identical to current date.
6022 Magic Word: {{CURRENTDAY}}
6031 Magic Word: {{CURRENTDAY2}}
6040 Magic Word: {{CURRENTDAYNAME}}
6049 Magic Word: {{CURRENTDOW}}
6058 Magic Word: {{CURRENTMONTH}}
6067 Magic Word: {{CURRENTMONTH1}}
6076 Magic Word: {{CURRENTMONTHABBREV}}
6078 {{CURRENTMONTHABBREV}}
6085 Magic Word: {{CURRENTMONTHNAME}}
6087 {{CURRENTMONTHNAME}}
6094 Magic Word: {{CURRENTMONTHNAMEGEN}}
6096 {{CURRENTMONTHNAMEGEN}}
6103 Magic Word: {{CURRENTTIME}}
6112 Magic Word: {{CURRENTHOUR}}
6121 Magic Word: {{CURRENTWEEK}} (@bug 4594)
6130 Magic Word: {{CURRENTYEAR}}
6139 Magic Word: {{CURRENTTIMESTAMP}}
6141 {{CURRENTTIMESTAMP}}
6148 Magic Words LOCAL (UTC)
6152 * {{LOCALMONTHNAME}}
6153 * {{LOCALMONTHNAMEGEN}}
6154 * {{LOCALMONTHABBREV}}
6163 * {{LOCALTIMESTAMP}}
6178 </li><li> 19700101000203
6184 Magic Word: {{FULLPAGENAME}}
6186 title=[[User:Ævar Arnfjörð Bjarmason]]
6190 <p>User:Ævar Arnfjörð Bjarmason
6195 Magic Word: {{FULLPAGENAMEE}}
6197 title=[[User:Ævar Arnfjörð Bjarmason]]
6201 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6206 Magic Word: {{TALKSPACE}}
6208 title=[[User:Ævar Arnfjörð Bjarmason]]
6217 Magic Word: {{TALKSPACE}}, same namespace
6219 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6228 Magic Word: {{TALKSPACE}}, main namespace
6230 title=[[Parser Test]]
6239 Magic Word: {{TALKSPACEE}}
6241 title=[[User:Ævar Arnfjörð Bjarmason]]
6250 Magic Word: {{SUBJECTSPACE}}
6252 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6261 Magic Word: {{SUBJECTSPACE}}, same namespace
6263 title=[[User:Ævar Arnfjörð Bjarmason]]
6272 Magic Word: {{SUBJECTSPACE}}, main namespace
6274 title=[[Parser Test]]
6282 Magic Word: {{SUBJECTSPACEE}}
6284 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6293 Magic Word: {{NAMESPACE}}
6295 title=[[User:Ævar Arnfjörð Bjarmason]]
6304 Magic Word: {{NAMESPACEE}}
6306 title=[[User:Ævar Arnfjörð Bjarmason]]
6315 Magic Word: {{NAMESPACENUMBER}}
6317 title=[[User:Ævar Arnfjörð Bjarmason]]
6326 Magic Word: {{SUBPAGENAME}}
6328 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
6337 Magic Word: {{SUBPAGENAMEE}}
6339 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
6348 Magic Word: {{ROOTPAGENAME}}
6350 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
6354 <p>Ævar Arnfjörð Bjarmason
6359 Magic Word: {{ROOTPAGENAMEE}}
6361 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
6365 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6370 Magic Word: {{BASEPAGENAME}}
6372 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
6376 <p>Ævar Arnfjörð Bjarmason
6381 Magic Word: {{BASEPAGENAMEE}}
6383 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
6387 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6392 Magic Word: {{TALKPAGENAME}}
6394 title=[[User:Ævar Arnfjörð Bjarmason]]
6398 <p>User talk:Ævar Arnfjörð Bjarmason
6403 Magic Word: {{TALKPAGENAMEE}}
6405 title=[[User:Ævar Arnfjörð Bjarmason]]
6409 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6414 Magic Word: {{SUBJECTPAGENAME}}
6416 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6420 <p>User:Ævar Arnfjörð Bjarmason
6425 Magic Word: {{SUBJECTPAGENAMEE}}
6427 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6429 {{SUBJECTPAGENAMEE}}
6431 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6436 Magic Word: {{NUMBEROFFILES}}
6445 Magic Word: {{PAGENAME}}
6447 title=[[User:Ævar Arnfjörð Bjarmason]]
6451 <p>Ævar Arnfjörð Bjarmason
6456 Magic Word: {{PAGENAME}} with metacharacters
6458 title=[['foo & bar = baz']]
6462 <p><i>'foo & bar = baz'</i>
6467 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
6469 title=[[*RFC 1234 http://example.com/]]
6473 <p>*RFC 1234 http://example.com/
6478 Magic Word: {{PAGENAMEE}}
6480 title=[[User:Ævar Arnfjörð Bjarmason]]
6484 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6489 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
6491 title=[[*RFC 1234 http://example.com/]]
6495 <p>*RFC_1234_http://example.com/
6500 Magic Word: {{REVISIONID}}
6509 Magic Word: {{SCRIPTPATH}}
6518 Magic Word: {{STYLEPATH}}
6527 Magic Word: {{SERVER}}
6531 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
6536 Magic Word: {{SERVERNAME}}
6545 Magic Word: {{SITENAME}}
6554 Case-sensitive magic words, when cased differently, should just be template transclusions
6561 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
6562 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
6563 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
6564 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
6569 Case-insensitive magic words should still work with weird casing.
6579 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
6584 Namespace 1 {{ns:1}}
6593 Namespace 1 {{ns:01}}
6602 Namespace 0 {{ns:0}} (bug 4783)
6610 Namespace 0 {{ns:00}} (bug 4783)
6618 Namespace -1 {{ns:-1}}
6627 Namespace User {{ns:User}}
6636 Namespace User talk {{ns:User_talk}}
6645 Namespace User talk {{ns:uSeR tAlK}}
6654 Namespace File {{ns:File}}
6663 Namespace File {{ns:Image}}
6672 Namespace (lang=de) Benutzer {{ns:User}}
6683 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
6689 <p>Benutzer Diskussion
6697 {{urlencode:hi world?!}}
6698 {{urlencode:hi world?!|WIKI}}
6699 {{urlencode:hi world?!|PATH}}
6700 {{urlencode:hi world?!|QUERY}}
6713 Magic links: internal link to RFC (bug 479)
6717 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
6722 Magic links: RFC (bug 479)
6726 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
6731 Magic links: ISBN (bug 1937)
6735 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
6740 Magic links: PMID incorrectly converts space to underscore
6744 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
6753 Nonexistent template
6755 {{thistemplatedoesnotexist}}
6757 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
6762 Template with invalid target containing tags
6764 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
6766 <p>{{a<b>b</b>|foo|a=b|a = b}}
6771 Template with invalid target containing unclosed tag
6773 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
6775 <p>{{a<b>|foo|a=b|a = b}}</b>
6782 This is a test template
6790 <p>This is a test template
6795 Template with explicit namespace
6799 <p>This is a test template
6807 This is a test template with parameter {{{param}}}
6813 {{paramtest|param=foo}}
6815 <p>This is a test template with parameter foo
6820 Template:paramtestnum
6826 Template unnamed parameter
6828 {{paramtestnum|Main Page|the main page}}
6830 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
6835 Template:templatesimple
6841 Template:templateredirect
6843 #redirect [[Template:templatesimple]]
6847 Template:templateasargtestnum
6853 Template:templateasargtest
6855 {{template{{{templ}}}}}
6859 Template:templateasargtest2
6865 Template with template name as unnamed argument
6867 {{templateasargtestnum|templatesimple}}
6874 Template with template name as argument
6876 {{templateasargtest|templ=simple}}
6883 Template with template name as argument (2)
6885 {{templateasargtest2|templ=templatesimple}}
6892 Template:templateasargtestdefault
6894 {{{{{templ|templatesimple}}}}}
6904 Template with default value
6906 {{templateasargtestdefault}}
6913 Template with default value (value set)
6915 {{templateasargtestdefault|templ=templa}}
6924 {{templateredirect}}
6931 Template with argument in separate line
6933 {{ templateasargtest |
6941 Template with complex template as argument
6944 param ={{ templateasargtest |
6947 <p>This is a test template with parameter (test)
6952 Template with thumb image (with link in description)
6955 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
6957 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>
6962 Template:complextemplate
6964 {{{1}}} {{paramtest|
6965 param ={{{param}}}}}
6969 Template with complex arguments
6972 param ={{ templateasargtest |
6973 templ = simple }}|[[Template:complextemplate|link]]}}
6975 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
6980 BUG 553: link with two variables in a piped link
6983 |[[{{{1}}}|{{{2}}}]]
6988 <td>[[{{{1}}}|{{{2}}}]]
6994 Magic variable as template parameter
6996 {{paramtest|param={{SITENAME}}}}
6998 <p>This is a test template with parameter MediaWiki
7005 [[{{{param}}}|link]]
7009 Template parameter as link source
7011 {{linktest|param=Main Page}}
7013 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
7018 Template-generated attribute string (k='v')
7020 <span {{attr_str|id|v1}}>bar</span>
7022 <p><span id="v1">bar</span>
7029 including another template, {{paramtest|param={{{arg}}}}}
7033 Template passing argument to another template
7035 {{paramtest2|arg='hmm'}}
7037 <p>including another template, This is a test template with parameter 'hmm'
7048 Template as link source
7052 [[{{linktest2}}|Main Page]]
7054 [[{{linktest2}}]]Page
7056 <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>
7058 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
7076 Template infinite loop
7080 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
7085 Template from main namespace
7104 BUG 529: Template with table, not included at beginning of line
7123 BUG 523: Template shouldn't eat newline (or add an extra one before table)
7143 BUG 41: Template parameters shown as broken links
7152 Template with targets containing wikilinks
7156 {{[[{{echo|foo}}]]}}
7158 {{{{echo|[[foo}}]]}}
7160 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
7161 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
7169 ''None'' of '''this''' should be
7171 but rather passed unmodified
7175 # hmm, fix this or just deprecate msgnw and document its behavior?
7181 {{msgnw:MSGNW test}}
7183 <p>''None'' of '''this''' should be
7185 but rather passed unmodified
7193 {{int:youhavenewmessages|lots of money|not!}}
7195 <p>You have lots of money (not!).
7202 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
7206 <includeonly> and <noinclude> being included
7217 <onlyinclude>Foo</onlyinclude>bar
7221 <onlyinclude> being included
7233 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
7237 <onlyinclude> and <includeonly> being included
7246 <includeonly> and <noinclude> on a page
7248 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
7255 Un-closed <noinclude>
7262 <onlyinclude> on a page
7264 <onlyinclude>Foo</onlyinclude>bar
7271 Un-closed <onlyinclude>
7278 Self-closed noinclude, includeonly, onlyinclude tags
7289 Unbalanced includeonly and noinclude tags
7293 |b</noinclude></noinclude>
7294 |c</noinclude></includeonly>
7295 |d</includeonly></includeonly>
7304 <td>c</includeonly>
7306 <td>d</includeonly></includeonly>
7312 Template:Includeonly section
7315 ==Includeonly section==
7321 Bug 6563: Edit link generation for section shown by <includeonly>
7323 {{includeonly section}}
7325 <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>
7326 <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>
7330 # Uses same input as the contents of [[Template:Includeonly section]]
7332 Bug 6563: Section extraction for section shown by <includeonly>
7337 ==Includeonly section==
7345 Bug 6563: Edit link generation for section suppressed by <includeonly>
7348 ==Includeonly section==
7352 <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>
7357 Bug 6563: Section extraction for section suppressed by <includeonly>
7362 ==Includeonly section==
7370 Un-closed <includeonly>
7376 # TODO: test with DOM fragment reuse!
7378 Parsoid: DOM fragment reuse
7380 parsoid=wt2wt,wt2html
7382 a{{echo|b<table></table>c}}d
7394 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
7395 <table></table>c"}},"i":0}}]}'>b</span>
7396 <table about="#mwt1"></table><span about="#mwt1">c</span>d
7399 <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">
7401 <table about="#mwt2"></table><span about="#mwt2">
7403 <p about="#mwt2">cd</p>
7406 <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">
7409 <table about="#mwt3"></table><span about="#mwt3">
7412 <p about="#mwt3">b</p>
7416 Parsoid: Merge double tds (bug 50603)
7425 <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>
7430 Parsoid: Merge double tds in nested transclusion content (bug 50603)
7440 <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}}]}'>
7442 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
7448 ### <includeonly> and <noinclude> in attributes
7451 0. includeonly around the entire attribute
7453 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
7455 <p><span id="v2">bar</span>
7460 1. includeonly in html attr key
7462 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
7464 <p><span id="foo">bar</span>
7469 2. includeonly in html attr value
7471 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
7472 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
7474 <p><span id="v1">bar</span>
7475 <span id="v1">bar</span>
7480 3. includeonly in part of an attr value
7482 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
7484 <p><span style="color:red;">bar</span>
7489 ### Testing parsing of templates where a template arg
7490 ### has the same name as the template itself.
7500 Templates: Template Name/Arg clash: 1. Use of positional param
7509 Templates: Template Name/Arg clash: 2. Use of named param
7518 Templates: Template Name/Arg clash: 3. Use of named param with empty input
7527 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
7531 Templates: 1. Simple use
7540 Templates: 2. Inside a block tag
7542 <div>{{echo|Foo}}</div>
7543 <blockquote>{{echo|Foo}}</blockquote>
7546 <blockquote>Foo</blockquote>
7551 Templates: P-wrapping: 1a. Templates on consecutive lines
7562 Templates: P-wrapping: 1b. Templates on consecutive lines
7576 Templates: P-wrapping: 1c. Templates on consecutive lines
7579 {{echo|bar}} <div>baz</div>
7588 Templates: P-wrapping: 1d. Template preceded by comment-only line
7597 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
7601 Templates: Inline Text: 1. Multiple tmeplate uses
7603 {{echo|Foo}}bar{{echo|baz}}
7610 Templates: Inline Text: 2. Back-to-back template uses
7612 {{echo|Foo}}{{echo|bar}}
7619 Templates: Block Tags: 1. Multiple template uses
7621 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
7623 <div>Foo</div><div>bar</div><div>baz</div>
7628 Templates: Block Tags: 2. Back-to-back template uses
7630 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
7632 <div>Foo</div><div>bar</div>
7637 Templates: Links: 1. Simple example
7639 {{echo|[[Foo|bar]]}}
7641 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7646 Templates: Links: 2. Generation of link href
7648 [[{{echo|Foo}}|bar]]
7650 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7655 Templates: Links: 3. Generation of part of a link href
7657 [[Fo{{echo|o}}|bar]]
7661 [[Foo{{echo|bar}}baz]]
7663 [[Foo{{echo|bar}}|bar]]
7665 [[:Foo{{echo|bar}}]]
7667 [[:Foo{{echo|bar}}|bar]]
7669 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7670 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7671 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
7672 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
7673 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7674 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
7679 Templates: Links: 4. Multiple templates generating link href
7681 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
7683 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7688 Templates: Links: 5. Generation of link text
7690 [[Foo|{{echo|bar}}]]
7692 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7697 Templates: Links: 5. Nested templates (only outermost template should be marked)
7699 {{echo|[[{{echo|Foo}}|bar]]}}
7701 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7706 Templates: HTML Tag: 1. Generation of HTML attr. key
7708 <div {{echo|style}}="color:red;">foo</div>
7710 <div style="color:red;">foo</div>
7715 Templates: HTML Tag: 2. Generation of HTML attr. value
7717 <div style={{echo|'color:red;'}}>foo</div>
7719 <div style="color:red;">foo</div>
7724 Templates: HTML Tag: 3. Generation of HTML attr key and value
7726 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
7728 <div style="color:red;">foo</div>
7733 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
7735 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
7737 <div title="This is a long title with just one piece templated">foo</div>
7742 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
7744 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
7746 <div title="This is a long title with just one piece templated">foo</div>
7751 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
7753 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
7755 <div title="This is a long title with just one piece templated">foo</div>
7760 Templates: HTML Tag: 7. Generation of partial attribute key string
7762 <div st{{echo|yle}}="color:red;">foo</div>
7764 <div style="color:red;">foo</div>
7769 Templates: HTML Tables: 1. Generating start of a HTML table
7771 {{echo|<table><tr><td>foo</td>}}</tr></table>
7773 <table><tr><td>foo</td></tr></table>
7778 Templates: HTML Tables: 2a. Generating middle of a HTML table
7780 <table><tr>{{echo|<td>foo</td>}}</tr></table>
7782 <table><tr><td>foo</td></tr></table>
7787 Templates: HTML Tables: 2b. Generating middle of a HTML table
7789 <table>{{echo|<tr><td>foo</td></tr>}}</table>
7791 <table><tr><td>foo</td></tr></table>
7796 Templates: HTML Tables: 3. Generating end of a HTML table
7798 <table><tr>{{echo|<td>foo</td></tr></table>}}
7800 <table><tr><td>foo</td></tr></table>
7805 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
7807 {{echo|<table>}}<tr><td>foo</td></tr></table>
7809 <table><tr><td>foo</td></tr></table>
7814 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
7816 <table>{{echo|<tr>}}<td>foo</td></tr></table>
7818 <table><tr><td>foo</td></tr></table>
7823 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
7825 <table><tr>{{echo|<td>}}foo</td></tr></table>
7827 <table><tr><td>foo</td></tr></table>
7832 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
7834 <table><tr><td>foo{{echo|</td>}}</tr></table>
7836 <table><tr><td>foo</td></tr></table>
7841 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
7843 <table><tr><td>foo</td>{{echo|</tr>}}</table>
7845 <table><tr><td>foo</td></tr></table>
7850 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
7852 <table><tr><td>foo</td></tr>{{echo|</table>}}
7854 <table><tr><td>foo</td></tr></table>
7859 Templates: HTML Tables: 5. Proper fostering of categories from inside
7861 parsoid=wt2html,wt2wt
7863 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
7864 <!--Two categories (Bug 50330)-->
7865 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
7867 <link rel="mw:WikiLink/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
7868 <!--Two categories (Bug 50330)-->
7869 <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>
7873 Templates: Wiki Tables: 1a. Fostering of entire template content
7881 <tr><td></td></tr></table>
7886 Templates: Wiki Tables: 1b. Fostering of entire template content
7899 <tr><td></td></tr></table>
7904 Templates: Wiki Tables: 2. Fostering of partial template content
7914 <tr><td></td></tr></table>
7919 Templates: Wiki Tables: 3. td-content via multiple templates
7922 {{echo|{{pipe}}a}}{{echo|b}}
7933 Templates: Wiki Tables: 4. Templated tags, no content
7939 <tr><td></td></tr></table>
7944 Templates: Wiki Tables: 5. Templated tags, regular td-tags
7958 Templates: Wiki Tables: 6. Templated tags, templated td-tags
7972 Templates: Lists: Multi-line list-items via templates
7974 *{{echo|a {{nonexistent|
7976 *{{echo|b {{nonexistent|
7979 <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>
7980 </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>
7986 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
7988 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
7990 <p><i>ab</i>c<i>d</i>e
7995 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
7996 (PHP parser generates misnested html)
8000 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
8002 <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>
8006 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
8007 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
8009 parsoid=wt2html,wt2wt
8011 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
8013 <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>
8014 <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>
8015 <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>
8019 Templates: Ugly nesting: 4. Divs opened/closed across templates
8021 a<div>b{{echo|c</div>d}}e
8028 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
8034 |{{echo|foo</table>}}
8038 <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|}"]}'>
8042 <td>foo</td></tr></tbody></table><span about="#mwt1">
8043 </span><span about="#mwt1">bar</span><span about="#mwt1">
8048 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
8058 <td>1. {{echo|foo </table>}}</td>
8060 <td>2. {{echo|baz </table>}}</td>
8073 <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>"]}'>
8078 <td>1. foo </td></tr></tbody></table></td>
8080 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
8081 </span><span about="#mwt2">
8082 </span><span about="#mwt2">
8083 </span><span about="#mwt2">abc</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">
8089 </span><span about="#mwt2">xyz</span><span about="#mwt2">
8090 </span><span about="#mwt2">
8095 Templates: Ugly templates: 3. newline-only template parameter
8104 # This looks like a bug: a single newline triggers p/br for some reason.
8106 Templates: Ugly templates: 4. newline-only template parameter inconsistency
8117 Parser Functions: 1. Simple example
8126 Parser Functions: 2. Nested use (only outermost should be marked up)
8135 ### Pre-save transform tests
8138 pre-save transform: subst:
8144 This is a test template
8148 pre-save transform: normal template
8158 pre-save transform: nonexistent template
8162 {{thistemplatedoesnotexist}}
8164 {{thistemplatedoesnotexist}}
8169 pre-save transform: subst magic variables
8178 # This is bug 89, which I fixed. -- wtm
8180 pre-save transform: subst: templates with parameters
8184 {{subst:paramtest|param="something else"}}
8186 This is a test template with parameter "something else"
8192 <nowiki>'''not wiki'''</nowiki>
8196 pre-save transform: nowiki in subst (bug 1188)
8200 {{subst:nowikitest}}
8202 <nowiki>'''not wiki'''</nowiki>
8207 Template:commenttest
8209 This template has <!-- a comment --> in it.
8213 pre-save transform: comment in subst (bug 1936)
8217 {{subst:commenttest}}
8219 This template has <!-- a comment --> in it.
8223 pre-save transform: unclosed tag
8227 <nowiki>'''not wiki'''
8229 <nowiki>'''not wiki'''
8233 pre-save transform: mixed tag case
8237 <NOwiki>'''not wiki'''</noWIKI>
8239 <NOwiki>'''not wiki'''</noWIKI>
8243 pre-save transform: unclosed comment in <nowiki>
8247 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
8249 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
8252 # Leading @ in this template definition works around a limitation
8253 # in parsoid's parserTests which otherwise strips the <span> from the
8254 # result (confusing it for a template wrapper)
8258 @<span onmouseover="alert('crap')">Oh no</span>
8262 (confirming safety of fix for subst bug 1936)
8264 {{Template:dangerous}}
8266 <p>@<span>Oh no</span>
8271 pre-save transform: comment containing gallery (bug 5024)
8275 <!-- <gallery>data</gallery> -->
8277 <!-- <gallery>data</gallery> -->
8281 pre-save transform: comment containing extension
8285 <!-- <tag>data</tag> -->
8287 <!-- <tag>data</tag> -->
8291 pre-save transform: comment containing nowiki
8295 <!-- <nowiki>data</nowiki> -->
8297 <!-- <nowiki>data</nowiki> -->
8301 pre-save transform: <noinclude> in subst (bug 3298)
8311 pre-save transform: <onlyinclude> in subst (bug 3298)
8323 {{<includeonly>subst:</includeonly>Includes}}
8327 Template:SafeSubstTest
8329 {{<includeonly>safesubst:</includeonly>Includes}}
8333 bug 22297: safesubst: works during PST
8337 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
8343 bug 22297: safesubst: works during normal parse
8352 subst: does not work during normal parse
8356 <p>{{subst:Includes}}
8361 pre-save transform: context links ("pipe trick")
8365 [[Article (context)|]]
8368 [[Bar:Article (context)|]]
8369 [[:Bar:Article (context)|]]
8371 [[|Article (context)]]
8375 [[Article (context)|Article]]
8376 [[Bar:Article|Article]]
8377 [[:Bar:Article|Article]]
8378 [[Bar:Article (context)|Article]]
8379 [[:Bar:Article (context)|Article]]
8381 [[Article (context)]]
8382 [[Bar:X (Y) Z|X (Y) Z]]
8383 [[:Bar:X (Y) Z|X (Y) Z]]
8387 pre-save transform: context links ("pipe trick") with interwiki prefix
8391 [[interwiki:Article|]]
8392 [[:interwiki:Article|]]
8393 [[interwiki:Bar:Article|]]
8394 [[:interwiki:Bar:Article|]]
8396 [[interwiki:Article|Article]]
8397 [[:interwiki:Article|Article]]
8398 [[interwiki:Bar:Article|Bar:Article]]
8399 [[:interwiki:Bar:Article|Bar:Article]]
8403 pre-save transform: context links ("pipe trick") with parens in title
8405 pst title=[[Somearticle (context)]]
8409 [[Article (context)|Article]]
8413 pre-save transform: context links ("pipe trick") with comma in title
8415 pst title=[[Someplace, Somewhere]]
8418 [[Otherplace, Elsewhere|]]
8419 [[Otherplace, Elsewhere, Anywhere|]]
8421 [[Otherplace, Somewhere|Otherplace]]
8422 [[Otherplace, Elsewhere|Otherplace]]
8423 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
8427 pre-save transform: context links ("pipe trick") with parens and comma
8429 pst title=[[Someplace (IGNORED), Somewhere]]
8432 [[Otherplace (place), Elsewhere|]]
8434 [[Otherplace, Somewhere|Otherplace]]
8435 [[Otherplace (place), Elsewhere|Otherplace]]
8439 pre-save transform: context links ("pipe trick") with comma and parens
8441 pst title=[[Who, me? (context)]]
8444 [[Me, Myself, and I (1937 song)|]]
8446 [[Yes, you. (context)|Yes, you.]]
8447 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
8451 pre-save transform: context links ("pipe trick") with namespace
8453 pst title=[[Ns:Somearticle]]
8457 [[Ns:Article|Article]]
8461 pre-save transform: context links ("pipe trick") with namespace and parens
8463 pst title=[[Ns:Somearticle (context)]]
8467 [[Ns:Article (context)|Article]]
8471 pre-save transform: context links ("pipe trick") with namespace and comma
8473 pst title=[[Ns:Somearticle, Context, Whatever]]
8477 [[Ns:Article, Context, Whatever|Article]]
8481 pre-save transform: context links ("pipe trick") with namespace, comma and parens
8483 pst title=[[Ns:Somearticle, Context (context)]]
8487 [[Ns:Article (context)|Article]]
8491 pre-save transform: context links ("pipe trick") with namespace, parens and comma
8493 pst title=[[Ns:Somearticle (IGNORED), Context]]
8497 [[Ns:Article, Context|Article]]
8501 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
8505 [[Article(context)|]]
8506 [[Bar:Article(context)|]]
8507 [[:Bar:Article(context)|]]
8508 [[|Article(context)]]
8512 [[Article(context)|Article]]
8513 [[Bar:Article(context)|Article]]
8514 [[:Bar:Article(context)|Article]]
8515 [[Article(context)]]
8517 [[:Bar:X(Y)Z|X(Y)Z]]
8521 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
8525 [[Article (context)|]]
8526 [[Bar:Article (context)|]]
8527 [[:Bar:Article (context)|]]
8528 [[|Article (context)]]
8532 [[Article (context)|Article]]
8533 [[Bar:Article (context)|Article]]
8534 [[:Bar:Article (context)|Article]]
8535 [[Article (context)]]
8536 [[Bar:X (Y) Z|X (Y) Z]]
8537 [[:Bar:X (Y) Z|X (Y) Z]]
8541 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
8545 [[Article(context)|]]
8546 [[Bar:Article(context)|]]
8547 [[:Bar:Article(context)|]]
8548 [[|Article(context)]]
8552 [[Article(context)|Article]]
8553 [[Bar:Article(context)|Article]]
8554 [[:Bar:Article(context)|Article]]
8555 [[Article(context)]]
8557 [[:Bar:X(Y)Z|X(Y)Z]]
8561 pre-save transform: context links ("pipe trick") with commas (bug 21660)
8565 [[Article (context), context|]]
8566 [[Article (context),context|]]
8567 [[Bar:Article (context), context|]]
8568 [[Bar:Article (context),context|]]
8569 [[:Bar:Article (context), context|]]
8570 [[:Bar:Article (context),context|]]
8572 [[Article (context), context|Article]]
8573 [[Article (context),context|Article]]
8574 [[Bar:Article (context), context|Article]]
8575 [[Bar:Article (context),context|Article]]
8576 [[:Bar:Article (context), context|Article]]
8577 [[:Bar:Article (context),context|Article]]
8581 pre-save transform: trim trailing empty lines
8585 Empty lines are trimmed
8591 Empty lines are trimmed
8595 pre-save transform: Signature expansion
8600 * <noinclude>~~~</noinclude>
8601 * <includeonly>~~~</includeonly>
8602 * <onlyinclude>~~~</onlyinclude>
8604 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
8605 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
8606 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
8607 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
8612 pre-save transform: Signature expansion in nowiki tags (bug 93)
8618 <nowiki>~~~~</nowiki>
8620 <includeonly><nowiki>~~~~</nowiki></includeonly>
8622 <noinclude><nowiki>~~~~</nowiki></noinclude>
8624 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
8626 {{subst:Foo}} shall be converted to FOO
8628 As well as inside noinclude/onlyinclude
8629 <noinclude>{{subst:Foo}}</noinclude>
8630 <onlyinclude>{{subst:Foo}}</onlyinclude>
8632 But not inside includeonly
8633 <includeonly>{{subst:Foo}}</includeonly>
8637 <nowiki>~~~~</nowiki>
8639 <includeonly><nowiki>~~~~</nowiki></includeonly>
8641 <noinclude><nowiki>~~~~</nowiki></noinclude>
8643 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
8645 FOO shall be converted to FOO
8647 As well as inside noinclude/onlyinclude
8648 <noinclude>FOO</noinclude>
8649 <onlyinclude>FOO</onlyinclude>
8651 But not inside includeonly
8652 <includeonly>{{subst:Foo}}</includeonly>
8656 Parsoid: Recognize nowiki with trailing space in tags
8660 <nowiki ><div>[[foo]]</nowiki >
8668 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
8675 Parsoid: Recognize nowiki with odd capitalization
8679 <noWikI ><div>[[foo]]</Nowiki >
8681 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
8686 Parsoid: Escape nowiki with trailing space in tags
8690 <nowiki > foo </nowiki >
8696 <p><nowiki > foo </nowiki ></p>
8697 <p>a<nowiki />b</p>
8698 <p>c<nowiki/ >d</p>
8702 Parsoid: Escape weird noWikI capitalizations
8706 <noWikI > foo </NoWikI >
8708 <p><noWikI > foo </NoWikI ></p>
8712 ### Message transform tests
8715 message transform: magic variables
8725 message transform: should not transform wiki markup
8735 message transform: <noinclude> in transcluded template (bug 4926)
8745 message transform: <onlyinclude> in transcluded template (bug 4926)
8755 {{#special:}} page name, known
8759 {{#special:Recentchanges}}
8761 Special:RecentChanges
8765 {{#special:}} page name with subpage, known
8769 {{#special:Recentchanges/param}}
8771 Special:RecentChanges/param
8775 {{#special:}} page name, unknown
8779 {{#special:foobar nonexistent}}
8781 Special:Foobar nonexistent
8785 {{#speciale:}} page name, known
8789 {{#speciale:Recentchanges}}
8791 Special:RecentChanges
8795 {{#speciale:}} page name with subpage, known
8799 {{#speciale:Recentchanges/param}}
8801 Special:RecentChanges/param
8805 {{#speciale:}} page name, unknown
8809 {{#speciale:foobar nonexistent}}
8811 Special:Foobar_nonexistent
8817 ### For Parsoid-specific tests, see
8818 #### http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
8825 [[Image:foobar.jpg]]
8827 <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>
8832 Simple image (parsoid)
8836 [[Image:foobar.jpg]]
8838 <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>
8843 Simple image (using File: namespace, now canonical) (php)
8849 <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>
8854 Simple image (using File: namespace, now canonical) (parsoid)
8860 <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>
8865 Right-aligned image (php)
8869 [[Image:foobar.jpg|right]]
8871 <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>
8876 Right-aligned image (parsoid)
8880 [[File:Foobar.jpg|right]]
8882 <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>
8886 Image with caption (php)
8890 [[File:Foobar.jpg|right|Caption text]]
8892 <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>
8897 Image with caption (parsoid)
8901 [[File:Foobar.jpg|right|Caption text]]
8903 <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>
8907 Image with empty attribute (php)
8911 [[File:Foobar.jpg|right||Caption text]]
8913 <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>
8918 Image with empty attribute (parsoid)
8922 [[File:Foobar.jpg|right||Caption text]]
8924 <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>
8928 Image with attributes from template (php)
8932 [[File:Foobar.jpg|{{image_attribs}}]]
8934 <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>
8939 Image with attributes from template (parsoid)
8943 [[File:Foobar.jpg|{{image_attribs}}]]
8945 <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>
8949 Image with link tails (php)
8953 123[[File:Foobar.jpg]]456
8954 123[[File:Foobar.jpg|right]]456
8955 123[[File:Foobar.jpg|thumb]]456
8957 <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
8959 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
8960 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
8965 Image with link tails (parsoid)
8969 123[[File:Foobar.jpg]]456
8970 123[[File:Foobar.jpg|right]]456
8971 123[[File:Foobar.jpg|thumb]]456
8973 <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>
8974 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
8975 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
8979 Image with multiple captions -- only last one is accepted (php)
8983 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8985 <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>
8990 Image with multiple captions -- only last one is accepted (parsoid)
8994 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8996 <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>
9000 Image with width attribute at different positions (php)
9004 [[File:Foobar.jpg|200px|right|Caption]]
9005 [[File:Foobar.jpg|right|200px|Caption]]
9006 [[File:Foobar.jpg|right|Caption|200px]]
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>
9010 <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>
9015 Image with width attribute at different positions (parsoid)
9019 [[File:Foobar.jpg|200px|right|Caption]]
9020 [[File:Foobar.jpg|right|200px|Caption]]
9021 [[File:Foobar.jpg|right|Caption|200px]]
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>
9025 <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>
9029 Image with link parameter, wiki target (php)
9033 [[File:Foobar.jpg|link=Main Page]]
9035 <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>
9040 Image with link parameter, wiki target (parsoid)
9044 [[File:Foobar.jpg|link=Main Page]]
9046 <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>
9050 Image with link parameter, URL target (php)
9054 [[File:Foobar.jpg|link=http://example.com/]]
9056 <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>
9060 # parsoid bug 49293 (part 1)
9062 Image with link parameter, URL target (parsoid)
9066 [[File:Foobar.jpg|link=http://example.com/]]
9068 <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>
9072 Image with link parameter, protocol-less URL target (php)
9076 [[File:Foobar.jpg|link=//example.com/]]
9078 <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>
9082 # parsoid bug 49293 (part 2)
9084 Image with link parameter, protocol-less URL target (parsoid)
9088 [[File:Foobar.jpg|link=//example.com/]]
9090 <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>
9094 Image with link parameter, wgExternalLinkTarget
9096 [[Image:foobar.jpg|link=http://example.com/]]
9098 wgExternalLinkTarget='foobar'
9100 <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>
9105 Image with link parameter, wgNoFollowLinks set to false
9107 [[Image:foobar.jpg|link=http://example.com/]]
9109 wgNoFollowLinks=false
9111 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9116 Image with link parameter, wgNoFollowDomainExceptions
9118 [[Image:foobar.jpg|link=http://example.com/]]
9120 wgNoFollowDomainExceptions='example.com'
9122 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9127 Image with link parameter, wgExternalLinkTarget, unnamed parameter
9129 [[Image:foobar.jpg|link=http://example.com/|Title]]
9131 wgExternalLinkTarget='foobar'
9133 <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>
9138 Image with empty link parameter (php)
9142 [[File:Foobar.jpg|link=]]
9144 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
9149 Image with empty link parameter (parsoid)
9153 [[File:Foobar.jpg|link=]]
9155 <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>
9159 Image with link parameter (wiki target) and unnamed parameter (php)
9163 [[File:Foobar.jpg|link=Main Page|Title]]
9165 <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>
9170 Image with link parameter (wiki target) and unnamed parameter (parsoid)
9174 [[File:Foobar.jpg|link=Main Page|Title]]
9176 <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>
9180 Image with link parameter (URL target) and unnamed parameter (php)
9184 [[File:Foobar.jpg|link=http://example.com/|Title]]
9186 <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>
9191 Image with link parameter (URL target) and unnamed parameter (parsoid)
9195 [[File:Foobar.jpg|link=http://example.com/|Title]]
9197 <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>
9201 Thumbnail image with link parameter
9205 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
9207 <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>
9212 Manually-specified thumbnail image
9216 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
9218 <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>
9223 Manually-specified thumbnail image with explicit link to wiki page
9227 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
9229 <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>
9234 Manually-specified thumbnail image with explicit link to url
9238 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
9240 <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>
9245 Manually-specified thumbnail image with explicit no link
9249 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
9251 <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>
9256 Manually-specified thumbnail image with explicit link and alt text
9260 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
9262 <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>
9267 Image with frame and link
9269 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
9271 <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>
9276 Image with frame and link and explicit alt
9278 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
9280 <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>
9285 Image with wiki markup in implicit alt
9287 [[Image:Foobar.jpg|testing '''bold''' in alt]]
9289 <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>
9294 Image with wiki markup in explicit alt
9296 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
9298 <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>
9303 Link to image page- image page normally doesn't exists, hence edit link
9304 Add test with existing image page
9305 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
9309 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
9314 bug 18784 Link to non-existent image page with caption should use caption as link text
9316 [[:Image:test|caption]]
9318 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
9323 Frameless image caption with a free URL
9325 [[Image:foobar.jpg|http://example.com]]
9327 <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>
9332 Thumbnail image caption with a free URL
9334 [[Image:foobar.jpg|thumb|http://example.com]]
9336 <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>
9341 Thumbnail image caption with a free URL and explicit alt
9343 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
9345 <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>
9350 SVG thumbnails with no language set
9353 [[File:Foobar.svg|thumb|width=200]]
9355 <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>
9360 SVG thumbnails with language de
9363 [[File:Foobar.svg|thumb|width=200|lang=de]]
9365 <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>
9370 SVG thumbnails with invalid language code
9373 [[File:Foobar.svg|thumb|width=200|lang=invalid.language.code]]
9375 <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>
9380 BUG 1887: A ISBN with a thumbnail
9382 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
9384 <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>
9389 BUG 1887: A RFC with a thumbnail
9391 [[Image:foobar.jpg|thumb|This is RFC 12354]]
9393 <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>
9398 BUG 1887: A mailto link with a thumbnail
9400 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
9402 <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>
9406 # Pending resolution to bug 368
9408 BUG 648: Frameless image caption with a link
9410 [[Image:foobar.jpg|text with a [[link]] in it]]
9412 <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>
9417 BUG 648: Frameless image caption with a link (suffix)
9419 [[Image:foobar.jpg|text with a [[link]]foo in it]]
9421 <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>
9426 BUG 648: Frameless image caption with an interwiki link
9428 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
9430 <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>
9435 BUG 648: Frameless image caption with a piped interwiki link
9437 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
9439 <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>
9444 Escape HTML special chars in image alt text
9446 [[Image:foobar.jpg|& < > "]]
9448 <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>
9453 BUG 499: Alt text should have Ӓ, not &1234;
9455 [[Image:foobar.jpg|♀]]
9457 <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>
9462 Broken image caption with link
9464 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
9466 <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.
9471 Image caption containing another image
9473 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
9475 <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>
9480 Image caption containing a newline
9482 [[Image:Foobar.jpg|This
9485 <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>
9490 Parsoid: Image caption containing leading space
9491 (The leading space should not trigger nowiki escaping in wt2wt mode)
9493 [[Image:Foobar.jpg|thumb| bar]]
9495 <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>
9500 Bug 3090: External links other than http: in image captions
9502 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
9504 <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>
9511 [[Image:foobar.jpg|a|class=b]]
9513 <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>
9518 Localized image handling (1).
9522 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
9524 <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>
9529 Localized image handling (2).
9533 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
9535 <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>
9540 "border", "frameless" and "class" attributes on an image.
9542 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
9544 <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>
9551 #REDIRECT [[File:Barfoo.jpg]]
9557 [[Image:Barfoo.jpg]]
9559 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
9564 Missing image with uploads disabled
9568 [[Image:Foobaz.jpg]]
9570 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
9574 # Parsoid-specific testing for images
9575 # http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
9576 # Currently imperfect due to a flaw in the Parsoid testrunner
9578 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
9582 Parsoid-specific image handling - simple image with size and middle alignment
9586 [[Image:Foobar.jpg|50px|middle]]
9589 <span class="mw-valign-middle" typeof="mw:Image">
9590 <a href="File:Foobar.jpg">
9591 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
9598 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
9602 [[Image:Foobar.jpg|500x10px|baseline|caption]]
9605 <span class="mw-valign-baseline" typeof="mw:Image" data-mw="{"caption":"caption"}">
9606 <a href="File:Foobar.jpg">
9607 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/89px-Foobar.jpg" height="10" width="89">
9614 Parsoid-specific image handling - simple image with border and size spec
9618 [[Image:Foobar.jpg|50px|border|caption]]
9621 <span class="mw-image-border" typeof="mw:Image" data-mw="{"caption":"caption"}">
9622 <a href="File:Foobar.jpg">
9623 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
9630 Parsoid-specific image handling - thumbnail with halign, valign, and caption
9634 [[Image:Foobar.jpg|thumb|left|baseline|caption content]]
9636 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
9637 <a href="File:Foobar.jpg">
9638 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="21" width="180" />
9640 <figcaption>caption content</figcaption>
9645 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
9649 [[Image:Foobar.jpg|thumb|50x50px|right|middle|caption]]
9651 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
9652 <a href="File:Foobar.jpg">
9653 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
9655 <figcaption>caption</figcaption>
9660 Parsoid-specific image handling - framed image with specific size and caption
9664 [[Image:Foobar.jpg|500x50px|frame|caption]]
9666 <figure typeof="mw:Image/Frame">
9667 <a href="File:Foobar.jpg">
9668 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9670 <figcaption>caption</figcaption>
9675 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
9679 [[Image:Foobar.jpg|500x50px|frame|left|baseline|caption]]
9681 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
9682 <a href="File:Foobar.jpg">
9683 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9685 <figcaption>caption</figcaption>
9690 Parsoid-specific image handling - frameless image with specific size, border, and caption
9694 [[Image:Foobar.jpg|frameless|500x50px|border|caption]]
9697 <span class="mw-image-border" typeof="mw:Image/Frameless" data-mw="{"caption":"caption"}">
9698 <a href="File:Foobar.jpg">
9699 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9705 #Parsoid-specific image handling - simple image with a formatted caption
9709 #[[Image:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
9712 #<span typeof="mw:Image">
9713 #<a class="mw-default-size" href="Image:Foobar.jpg">
9714 #<img alt="Foobar.jpg" class="mw-default-size" src="http://example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
9725 Subpage test/subpage
9733 subpage title=[[Subpage test]]
9737 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
9742 Subpage noslash link
9744 subpage title=[[Subpage test]]
9748 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
9752 # TODO: make this PHP-parser compatible!
9754 Relative subpage noslash link
9756 parsoid=wt2wt,wt2html,html2html
9757 subpage title=[[Subpage test/1/2/3/4]]
9763 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
9764 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
9767 # TODO: make this PHP-parser compatible!
9769 Parsoid: dot-slash prefixed wikilinks
9771 parsoid=wt2wt,wt2html,html2html
9779 <p><a rel="mw:WikiLink" href="./Foo">foo</a></p>
9780 <p><a rel="mw:WikiLink" href="./Bar">bar</a></p>
9781 <p><a rel="mw:WikiLink" href="./Baz/">baz/</a></p>
9789 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
9794 BUG 561: {{/Subpage}}
9796 subpage title=[[Page]]
9800 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
9808 Category:MediaWiki User's Guide
9816 [[:Category:MediaWiki User's Guide]]
9818 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
9827 [[Category:MediaWiki User's Guide]]
9829 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9833 PAGESINCATEGORY invalid title fatal (r33546 fix)
9835 {{PAGESINCATEGORY:<bogus>}}
9842 Category with different sort key
9846 [[Category:MediaWiki User's Guide|Foo]]
9848 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9852 Category with identical sort key
9856 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
9858 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9862 Category with empty sort key
9867 [[Category:MediaWiki User's Guide|]]
9869 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
9873 Category with empty sort key and parentheses
9878 [[Category:Foo (bar)|]]
9880 [[Category:Foo (bar)|Foo]]
9884 Category with link tail
9889 123[[Category:Foo]]456
9891 123[[Category:Foo]]456
9895 Category with template
9900 [[Category:{{echo|Foo}}]]
9902 [[Category:{{echo|Foo}}]]
9906 Category with template in sort key
9911 [[Category:Foo|{{echo|Bar}}]]
9913 [[Category:Foo|{{echo|Bar}}]]
9917 Category with template in sort key and title
9922 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
9924 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
9928 Category / paragraph interactions
9930 Foo [[Category:Baz]] Bar
9932 Foo [[Category:Baz]]
9940 [[Category:Baz]] Bar
9953 {{echo|[[Category:Baz]]}}
9968 Parsoid: Serialize link to category page with colon escape
9974 [[:Category:Foo|Bar]]
9977 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
9978 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
9983 Parsoid: Link prefix/suffixes aren't applied to category links
9985 parsoid=wt2html,wt2wt,html2html
9990 <p>x<link rel="mw:WikiLink/Category" href="Category:Foo">y</p>
9994 Parsoid: Serialize link to file page with colon escape
10000 [[:File:Foo.png|Bar]]
10003 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
10004 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
10009 Parsoid: Serialize a genuine category link without colon escape
10014 [[Category:Foo|Bar]]
10016 <link rel="mw:WikiLink/Category" href="Category:Foo">
10017 <link rel="mw:WikiLink/Category" href="Category:Foo#Bar">
10021 ### Inter-language links
10024 Inter-language links
10030 [[zh:食品]]
10032 es:Alimento fr:Nourriture zh:食品
10036 Duplicate interlanguage links (bug 24502)
10052 Basic section headings
10059 ===Smaller headline===
10062 <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>
10065 <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>
10068 <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>
10074 Section headings with TOC
10077 === Subheadline 1 ===
10078 ===== Skipping a level =====
10079 ====== Skipping a level ======
10083 ===Another headline===
10085 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10087 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
10089 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
10091 <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>
10093 <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>
10100 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
10102 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
10108 <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>
10109 <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>
10110 <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>
10111 <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>
10112 <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>
10115 <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>
10119 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
10121 Handling of sections up to level 6 and beyond
10124 == Level 2 Heading==
10125 === Level 3 Heading===
10126 ==== Level 4 Heading====
10127 ===== Level 5 Heading=====
10128 ====== Level 6 Heading======
10129 ======= Level 7 Heading=======
10130 ======== Level 8 Heading========
10131 ========= Level 9 Heading=========
10132 ========== Level 10 Heading==========
10134 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10136 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
10138 <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>
10140 <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>
10142 <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>
10144 <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>
10146 <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>
10147 <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>
10148 <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>
10149 <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>
10150 <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>
10164 <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>
10165 <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>
10166 <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>
10167 <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>
10168 <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>
10169 <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>
10170 <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>
10171 <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>
10172 <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>
10173 <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>
10178 TOC regression (bug 9764)
10182 ==== title 1.1.1 ====
10187 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10189 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10191 <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>
10193 <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>
10196 <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>
10199 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
10201 <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>
10207 <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>
10208 <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>
10209 <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>
10210 <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>
10211 <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>
10212 <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>
10217 TOC with wgMaxTocLevel=3 (bug 6204)
10223 ==== title 1.1.1 ====
10228 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10230 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10232 <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>
10233 <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>
10236 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
10238 <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>
10244 <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>
10245 <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>
10246 <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>
10247 <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>
10248 <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>
10249 <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>
10254 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
10260 ====Section 1.1.1====
10261 ====Section 1.1.1.1====
10264 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10266 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
10268 <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>
10271 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
10275 <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>
10276 <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>
10277 <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>
10278 <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>
10279 <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>
10285 Resolving duplicate section names
10290 <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>
10291 <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>
10296 Resolving duplicate section names with differing case (bug 10721)
10301 <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>
10302 <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>
10314 Template with sections, __NOTOC__
10321 <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>
10322 <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>
10323 <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>
10324 <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>
10329 __NOEDITSECTION__ keyword
10335 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
10336 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
10341 Link inside a section heading
10343 ==Section with a [[Main Page|link]] in it==
10345 <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>
10350 TOC regression (bug 12077)
10357 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10359 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10361 <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>
10364 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
10368 <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>
10369 <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>
10370 <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>
10375 BUG 1219 URL next to image (good)
10377 http://example.com [[Image:foobar.jpg]]
10379 <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>
10384 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
10387 The line above must have a trailing space!
10390 But just in case it doesn't...
10392 <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>
10393 <p>The line above must have a trailing space!
10395 <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>
10396 <p>But just in case it doesn't...
10401 Header with special characters (bug 25462)
10403 The tooltips shall not show entities to the user (ie. be double escaped)
10420 <p>The tooltips shall not show entities to the user (ie. be double escaped)
10422 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10424 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
10425 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
10426 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
10427 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
10428 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
10432 <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>
10435 <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>
10438 <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>
10441 <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>
10444 <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>
10450 Headers with excess '=' characters
10451 (Are similar tests necessary beyond the 1st level?)
10455 =''italic'' heading==
10456 ==''italic'' heading=
10458 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10460 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
10461 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
10462 <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>
10463 <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>
10467 <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>
10468 <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>
10469 <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>
10470 <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>
10475 HTML headers vs TOC (bug 23393)
10476 (__NOEDITSECTION__ for clearer output, doesn't matter here)
10488 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10490 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
10492 <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>
10493 <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>
10496 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
10498 <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>
10499 <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>
10505 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
10506 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
10507 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
10508 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
10509 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
10510 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
10515 BUG 1219 URL next to image (broken)
10517 http://example.com[[Image:foobar.jpg]]
10519 <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>
10524 Bug 1186 news: in the middle of text
10526 http://en.wikinews.org/wiki/Wikinews:Workplace
10528 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
10534 Namespaced link must have a title
10543 Namespaced link must have a title (bad fragment version)
10545 [[Project:#fragment]]
10547 <p>[[Project:#fragment]]
10553 ### HTML tags and HTML attributes
10557 div with no attributes
10559 <div>HTML rocks</div>
10561 <div>HTML rocks</div>
10566 div with double-quoted attribute
10568 <div id="rock">HTML rocks</div>
10570 <div id="rock">HTML rocks</div>
10575 div with single-quoted attribute
10577 <div id='rock'>HTML rocks</div>
10579 <div id="rock">HTML rocks</div>
10584 div with unquoted attribute
10586 <div id=rock>HTML rocks</div>
10588 <div id="rock">HTML rocks</div>
10593 div with illegal double attributes
10595 <div id="a" id="b">HTML rocks</div>
10597 <div id="b">HTML rocks</div>
10601 # FIXME: produce empty string instead of "class" in the PHP parser, following
10604 div with empty attribute value, space before equals
10608 <div class =>HTML rocks</div>
10610 <div class="">HTML rocks</div>
10614 # The PHP parser escapes the opening brace to { for some reason, so
10615 # disabled this test for it.
10617 div with braces in attribute value
10621 <div title="{}">Foo</div>
10623 <div title="{}">Foo</div>
10626 # This it very inconsistent in the PHP parser: it returns
10627 # class="class" if there is a space between the name and the equal sign (see
10628 # 'div with empty attribute value, space before equals'), but strips the
10629 # attribute completely if the space is missing. We hope that not much content
10630 # depends on this, so are implementing the behavior below in Parsoid for
10631 # consistencies' sake. Disabled for the PHP parser.
10632 # FIXME: fix this behavior in the PHP parser?
10634 div with empty attribute value, no space before equals
10638 <div class=>HTML rocks</div>
10640 <div class="">HTML rocks</div>
10645 HTML multiple attributes correction
10647 <p class="error" class="awesome">Awesome!</p>
10649 <p class="awesome">Awesome!</p>
10654 Table multiple attributes correction
10657 !+ class="error" class="awesome"| status
10662 <th class="awesome"> status
10670 <DIV ID="x">HTML ROCKS</DIV>
10672 <div id="x">HTML ROCKS</div>
10677 Non-ASCII pseudo-tags are rendered as text
10686 Pseudo-tag with URL 'name' renders as url link
10688 <http://example.com/>
10690 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
10695 text with amp in the middle of nowhere
10699 <p>Remember AT&T?
10704 text with character entity: eacute
10706 I always thought é was a cute letter.
10708 <p>I always thought é was a cute letter.
10713 text with entity-escaped character entity-like string: eacute
10715 I always thought &eacute; was a cute letter.
10717 <p>I always thought &eacute; was a cute letter.
10722 text with undefined character entity: xacute
10724 I always thought &xacute; was a cute letter.
10726 <p>I always thought &xacute; was a cute letter.
10732 ### Nesting tests (see bug 41545, 50604, 51081)
10735 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
10736 # Note that html2wt is considerably more difficult if we use <b> in
10737 # the test case, instead of <big>
10739 Ensure that HTML adoption agency algorithm is properly implemented.
10741 <big>X<big>Y</big>Z</big>
10743 <p><big>X<big>Y</big>Z</big>
10747 # This was bug 41545 in the PHP parser.
10751 <kbd>X<kbd>Y</kbd>Z</kbd>
10753 <p><kbd>X<kbd>Y</kbd>Z</kbd>
10757 # The following cases were bug 51081 in the PHP parser.
10758 # Note that there are some other nestable tags (b, i, etc) which are
10759 # not covered; see bug 51081 for discussion.
10763 <em>X<em>Y</em>Z</em>
10765 <p><em>X<em>Y</em>Z</em>
10770 Nesting of <strong>
10772 <strong>X<strong>Y</strong>Z</strong>
10774 <p><strong>X<strong>Y</strong>Z</strong>
10783 <p><q>X<q>Y</q>Z</q>
10790 <ruby>X<ruby>Y</ruby>Z</ruby>
10792 <p><ruby>X<ruby>Y</ruby>Z</ruby>
10799 <bdo>X<bdo>Y</bdo>Z</bdo>
10801 <p><bdo>X<bdo>Y</bdo>Z</bdo>
10813 [[Media:Foobar.jpg]]
10815 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
10820 Media link with text
10822 [[Media:Foobar.jpg|A neat file to look at]]
10824 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
10828 # FIXME: this is still bad HTML tag nesting
10830 Media link with nasty text
10831 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
10833 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
10835 <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>
10840 Media link to nonexistent file (bug 1702)
10842 [[Media:No such.jpg]]
10844 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
10849 Image link to nonexistent file (bug 1850 - good)
10851 [[Image:No such.jpg]]
10853 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
10858 :Image link to nonexistent file (bug 1850 - bad)
10860 [[:Image:No such.jpg]]
10862 <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>
10869 Character reference normalization in link text (bug 1938)
10871 [[Main Page|this&that]]
10873 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
10880 Test for unicode normalization
10882 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
10886 (bug 19451) Links should refer to the normalized form.
10894 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10895 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10896 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10897 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10898 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10903 Empty attribute crash test (bug 2067)
10905 <font color="">foo</font>
10907 <p><font color="">foo</font>
10912 Empty attribute crash test single-quotes (bug 2067)
10914 <font color=''>foo</font>
10916 <p><font color="">foo</font>
10921 Attribute test: equals, then nothing
10923 <font color=>foo</font>
10925 <p><font>foo</font>
10930 Attribute test: unquoted value
10932 <font color=x>foo</font>
10934 <p><font color="x">foo</font>
10939 Attribute test: unquoted but illegal value (hash)
10941 <font color=#x>foo</font>
10943 <p><font color="#x">foo</font>
10948 Attribute test: no value
10950 <font color>foo</font>
10952 <p><font color="color">foo</font>
10957 Bug 2095: link with three closing brackets
10961 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
10966 Bug 2095: link with pipe and three closing brackets
10968 [[Main Page|link]]]
10970 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
10975 Bug 2095: link with pipe and three closing brackets, version 2
10977 [[Main Page|[http://example.com/]]]
10979 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
10989 Template:Dangerous attribute
10991 " onmouseover="alert(document.cookie)
10995 Template:Dangerous style attribute
10997 border-size: expression(alert(document.cookie))
11003 <div style="float: right; {{{1}}}">Magic div</div>
11007 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
11009 <div title="{{test}}"></div>
11011 <div title="This is a test template"></div>
11016 Bug 2304: HTML attribute safety (dangerous template; 2309)
11018 <div title="{{dangerous attribute}}"></div>
11020 <div title=""></div>
11025 Bug 2304: HTML attribute safety (dangerous style template; 2309)
11027 <div style="{{dangerous style attribute}}"></div>
11029 <div style="/* insecure input */"></div>
11034 Bug 2304: HTML attribute safety (safe parameter; 2309)
11036 {{div style|width: 200px}}
11038 <div style="float: right; width: 200px">Magic div</div>
11043 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
11045 {{div style|width: expression(alert(document.cookie))}}
11047 <div style="/* insecure input */">Magic div</div>
11052 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
11054 {{div style|"><script>alert(document.cookie)</script>}}
11056 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
11061 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
11063 {{div style|" ><script>alert(document.cookie)</script>}}
11065 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
11070 Bug 2304: HTML attribute safety (link)
11072 <div title="[[Main Page]]"></div>
11074 <div title="[[Main Page]]"></div>
11079 Bug 2304: HTML attribute safety (italics)
11081 <div title="''foobar''"></div>
11083 <div title="''foobar''"></div>
11088 Bug 2304: HTML attribute safety (bold)
11090 <div title="'''foobar'''"></div>
11092 <div title="'''foobar'''"></div>
11098 Bug 2304: HTML attribute safety (ISBN)
11100 <div title="ISBN 1234567890"></div>
11102 <div title="ISBN 1234567890"></div>
11107 Bug 2304: HTML attribute safety (RFC)
11109 <div title="RFC 1234"></div>
11111 <div title="RFC 1234"></div>
11116 Bug 2304: HTML attribute safety (PMID)
11118 <div title="PMID 1234567890"></div>
11120 <div title="PMID 1234567890"></div>
11125 Bug 2304: HTML attribute safety (web link)
11127 <div title="http://example.com/"></div>
11129 <div title="http://example.com/"></div>
11134 Bug 2304: HTML attribute safety (named web link)
11136 <div title="[http://example.com/ link]"></div>
11138 <div title="[http://example.com/ link]"></div>
11143 Bug 3244: HTML attribute safety (extension; safe)
11145 <div style="<nowiki>background:blue</nowiki>"></div>
11147 <div style="background:blue"></div>
11152 Bug 3244: HTML attribute safety (extension; unsafe)
11154 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
11156 <div style="/* insecure input */"></div>
11160 # More MSIE fun discovered by Tom Gilder
11163 MSIE CSS safety test: spurious slash
11165 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
11167 <div style="/* insecure input */">evil</div>
11172 MSIE CSS safety test: hex code
11174 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
11176 <div style="/* insecure input */">evil</div>
11181 MSIE CSS safety test: comment in url
11183 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
11185 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
11190 MSIE CSS safety test: comment in expression
11192 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
11194 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
11200 Table attribute legitimate extension
11203 !+ style="<nowiki>color:blue</nowiki>"| status
11208 <th style="color:blue"> status
11214 Table attribute safety
11217 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
11222 <th style="/* insecure input */"> status
11228 CSS line continuation 1
11230 <div style="background-image: u\ rl(test.jpg);"></div>
11232 <div style="/* insecure input */"></div>
11237 CSS line continuation 2
11239 <div style="background-image: u\ rl(test.jpg); "></div>
11241 <div style="/* insecure input */"></div>
11252 Expansion of multi-line templates in attribute values (bug 6255)
11254 <div style="background: {{identity|#00FF00}}">-</div>
11256 <div style="background: #00FF00">-</div>
11262 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
11264 <div style="background:
11267 <div style="background: #00FF00">-</div>
11272 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
11274 <div style="background: #00FF00">-</div>
11276 <div style="background: #00FF00">-</div>
11281 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
11284 Parser hook: empty input
11297 Parser hook: empty input using terminated empty elements
11310 Parser hook: empty input using terminated empty elements (space before)
11323 Parser hook: basic input
11337 Parser hook: case insensitive
11351 Parser hook: case insensitive, redux
11364 Parser hook: nested tags
11368 <tag><tag></tag></tag>
11379 Parser hook: basic arguments
11381 <tag width=200 height = "100" depth = '50' square></tag>
11389 'square' => 'square',
11396 Parser hook: argument containing a forward slash (bug 5344)
11398 <tag filename='/tmp/bla'></tag>
11403 'filename' => '/tmp/bla',
11410 Parser hook: empty input using terminated empty elements (bug 2374)
11423 # </tag> should be output literally since there is no matching tag that begins it
11425 Parser hook: basic arguments using terminated empty elements (bug 2374)
11427 <tag width=200 height = "100" depth = '50' square/>
11437 'square' => 'square',
11446 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
11450 Parser hook: static parser hook not inside a comment
11452 <statictag>hello, world</statictag>
11453 <statictag action=flush/>
11461 Parser hook: static parser hook inside a comment
11463 <!-- <statictag>hello, world</statictag> -->
11464 <statictag action=flush/>
11470 # Nested template calls; this case was broken by Parser.php rev 1.506,
11474 Template:One-parameter
11476 (My parameter is: {{{1}}})
11480 Template:Map-one-parameter
11482 {{{{{1}}}|{{{2}}}}}
11486 Nested template calls
11488 {{Map-one-parameter|One-parameter|param}}
11490 <p>(My parameter is: param)
11499 Sanitizer: Closing of open tags
11501 <s></s><table></table>
11503 <s></s><table></table>
11508 Sanitizer: Closing of open but not closed tags
11517 Sanitizer: Closing of closed but not open tags
11526 Sanitizer: Closing of closed but not open table tags
11528 Table not started</td></tr></table>
11530 <p>Table not started</td></tr></table>
11535 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
11537 <span id="æ: v">byte</span>[[#æ: v|backlink]]
11539 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
11544 Sanitizer: Validating the contents of the id attribute (bug 4515)
11550 Something, but definitely not <br id="9" />...
11554 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
11558 <br id="foo" /><br id="foo" />
11560 Something need to be done. foo-2 ?
11564 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
11567 <meta itemprop="hello" content="world">
11568 <meta http-equiv="refresh" content="5">
11569 <meta itemprop="hello" http-equiv="refresh" content="5">
11570 <link itemprop="hello" href="{{SERVER}}">
11571 <link rel="stylesheet" href="{{SERVER}}">
11572 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
11575 <div itemscope="itemscope">
11576 <p> <meta itemprop="hello" content="world" />
11577 <meta http-equiv="refresh" content="5">
11578 <meta itemprop="hello" content="5" />
11580 <link itemprop="hello" href="http://example.org" />
11581 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
11582 <link itemprop="hello" href="http://example.org" />
11588 Language converter: output gets cut off unexpectedly (bug 5757)
11592 this bit is safe: }-
11594 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
11596 then we get cut off here: }-
11598 all additional text is vanished
11600 <p>this bit is safe: }-
11601 </p><p>but if we add a conversion instance: xxx
11602 </p><p>then we get cut off here: }-
11603 </p><p>all additional text is vanished
11608 Self closed html pairs (bug 5487)
11611 <center><font id="bug" />Centered text</center>
11612 <div><font id="bug2" />In div text</div>
11614 <center><font id="bug" />Centered text</center>
11615 <div><font id="bug2" />In div text</div>
11624 Punctuation: nbsp before exclamation
11628 <p>C'est grave !
11633 Punctuation: CSS !important (bug 11874)
11635 <div style="width:50% !important">important</div>
11637 <div style="width:50% !important">important</div>
11642 Punctuation: CSS ! important (bug 11874; with space after)
11644 <div style="width:50% ! important">important</div>
11646 <div style="width:50% ! important">important</div>
11652 HTML bullet list, closed tags (bug 5497)
11667 HTML bullet list, unclosed tags (bug 5497)
11684 HTML ordered list, closed tags (bug 5497)
11699 HTML ordered list, unclosed tags (bug 5497)
11716 HTML nested bullet list, closed tags (bug 5497)
11741 HTML nested bullet list, open tags (bug 5497)
11766 HTML nested ordered list, closed tags (bug 5497)
11791 HTML nested ordered list, open tags (bug 5497)
11816 HTML ordered list item with parameters oddity
11818 <ol><li id="fragment">One</li></ol>
11820 <ol><li id="fragment">One</li></ol>
11825 bug 5918: autonumbering
11827 [http://first/] [http://second] [ftp://ftp]
11831 [mailto:enclosed@mail.tld With target]
11833 [mailto:enclosed@mail.tld]
11835 mailto:inline@mail.tld
11837 <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>
11838 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
11839 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
11840 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
11841 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
11847 # Security and HTML correctness
11848 # From Nick Jenkins' fuzz testing
11852 Fuzz testing: Parser13
11867 Fuzz testing: Parser14
11872 <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>
11873 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11875 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
11883 Fuzz testing: Parser14-table
11888 <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>
11889 <table style="__TOC__">
11895 # Known to produce bogus xml (extra </td>)
11897 Fuzz testing: Parser16
11917 Fuzz testing: Parser21
11920 ! irc://{{ftp://a" onmouseover="alert('hello world');"
11925 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
11935 Fuzz testing: Parser22
11937 http://===r:::https://b
11941 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
11949 # Known to produce bad XML for now
11951 Fuzz testing: Parser24
11958 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
11959 <br style="onmouseover='alert(document.cookie);' " />
11961 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
11966 <u class="|">}}}} >
11967 <br style="onmouseover='alert(document.cookie);'" />
11969 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
11978 # Note: the current result listed for this is not what the original one was,
11979 # but the original bug was JavaScript injection, which is fixed in any case.
11980 # It's not clear that the original result listed was any more correct than the
11981 # current one. Original result:
11984 # <li class="||">
11985 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
11987 Fuzz testing: Parser25 (bug 6055)
11993 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
11995 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
12000 Fuzz testing: URL adjacent extension (with space, clean)
12003 http://example.com <nowiki>junk</nowiki>
12005 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
12010 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
12013 http://example.com<nowiki>junk</nowiki>
12015 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
12020 Fuzz testing: URL adjacent extension (no space, dirty; pre)
12023 http://example.com<pre>junk</pre>
12025 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
12030 Fuzz testing: image with bogus manual thumbnail
12032 [[Image:foobar.jpg|thumbnail= ]]
12034 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
12039 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
12041 <pre dir=" "></pre>
12043 <pre dir=" "></pre>
12048 Parsing optional HTML elements (Bug 6171)
12053 <td> Some tabular data</td>
12054 <td> More tabular data ...
12055 <td> And yet som tabular data</td>
12061 <td> Some tabular data</td>
12062 <td> More tabular data ...
12063 </td><td> And yet som tabular data</td>
12070 Correct handling of <td>, <tr> (Bug 6171)
12075 <td> Some tabular data</td>
12076 <td> More tabular data ...</td>
12077 <td> And yet som tabular data</td>
12083 <td> Some tabular data</td>
12084 <td> More tabular data ...</td>
12085 <td> And yet som tabular data</td>
12093 Parsing crashing regression (fr:JavaScript)
12097 <p></body></x>
12102 Inline wiki vs wiki block nesting
12108 <p><b>Bold paragraph</b>
12109 </p><p>New wiki paragraph
12114 Inline HTML vs wiki block nesting
12122 <p><b>Bold paragraph</b>
12123 </p><p>New wiki paragraph
12127 # Original result was this:
12128 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
12130 # While that might be marginally more intuitive, maybe, the six-apostrophe
12131 # construct is clearly pathological and the result stated here (which is what
12132 # the parser actually does) is about as reasonable as anything.
12134 Mixing markup for italics and bold
12137 '''bold''''''bold''bolditalics'''''
12139 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
12147 Article for special page transclusion test
12151 Special page transclusion
12154 {{Special:Prefixindex/Xyzzyx}}
12156 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
12161 Special page transclusion twice (bug 5021)
12164 {{Special:Prefixindex/Xyzzyx}}
12165 {{Special:Prefixindex/Xyzzyx}}
12167 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
12168 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
12173 Transclusion of default MediaWiki message
12175 {{MediaWiki:Mainpage}}
12182 Transclusion of nonexistent MediaWiki message
12184 {{MediaWiki:Mainpagexxx}}
12186 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
12191 Transclusion of MediaWiki message with underscore
12193 {{MediaWiki:history_short}}
12200 Transclusion of MediaWiki message with space
12202 {{MediaWiki:history short}}
12209 Invalid header with following text
12219 Section extraction test (section 0)
12239 Section extraction test (section 1)
12261 Section extraction test (section 2)
12282 Section extraction test (section 3)
12302 Section extraction test (section 4)
12326 Section extraction test (section 5)
12346 Section extraction test (section 6)
12367 Section extraction test (section 7)
12387 Section extraction test (section 8)
12407 Section extraction test (section 9)
12428 Section extraction test (section 10)
12448 Section extraction test (nonexistent section 11)
12467 Section extraction test with bogus heading (section 1)
12472 ==bogus== not a legal section
12476 ==bogus== not a legal section
12480 Section extraction test with bogus heading (section 2)
12485 ==bogus== not a legal section
12492 Section extraction test with comment after heading (section 1)
12504 Section extraction test with comment after heading (section 2)
12516 Section extraction test with bogus <nowiki> heading (section 1)
12521 ==bogus== <nowiki>not a legal section</nowiki>
12525 ==bogus== <nowiki>not a legal section</nowiki>
12529 Section extraction test with bogus <nowiki> heading (section 2)
12534 ==bogus== <nowiki>not a legal section</nowiki>
12541 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
12542 # instead of respecting commented sections
12544 Section extraction prefixed by comment (section 1)
12555 Section extraction prefixed by comment (section 2)
12566 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
12567 # instead of respecting HTML-style headings
12569 Section extraction, mixed wiki and html (section 1)
12585 Section extraction, mixed wiki and html (section 2)
12601 # Formerly testing for bug 3342
12603 Section extraction, heading surrounded by <noinclude>
12607 <noinclude>==unmarked==</noinclude>
12613 # Test behavior of bug 19910
12615 Sectiion with all-equals
12620 The line above must have a trailing space
12623 But just in case it doesn't...
12627 But just in case it doesn't...
12631 Section replacement test (section 0)
12662 Section replacement test (section 1)
12691 Section replacement test (section 2)
12721 Section replacement test (section 3)
12752 Section replacement test (section 4)
12779 Section replacement test (section 5)
12810 Section replacement test (section 6)
12840 Section replacement test (section 7)
12871 Section replacement test (section 8)
12902 Section replacement test (section 9)
12931 Section replacement test (section 10)
12961 Section replacement test with initial whitespace (bug 13728)
12965 Preformatted initial line
12969 Preformatted initial line
12976 Section extraction, heading followed by pre with 20 spaces (bug 6398)
12988 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
13001 Section extraction, <pre> around bogus header (bug 10309)
13018 Section replacement, <pre> around bogus header (bug 10309)
13020 noxml replace=2,"xxx"
13041 Handling of 
 in URLs
13045 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
13052 5 quotes, code coverage +1 line (php)
13059 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
13061 5 quotes, code coverage +1 line (parsoid)
13067 <p><b><i></i></b></p>
13071 Special:Search page linking.
13075 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
13082 title=[[Parser test]]
13087 * {{FULLPAGENAMEE}}
13089 * {{BASEPAGENAMEE}}
13093 * {{ROOTPAGENAMEE}}
13095 * {{TALKPAGENAMEE}}
13096 * {{SUBJECTPAGENAME}}
13097 * {{SUBJECTPAGENAMEE}}
13100 * {{NAMESPACENUMBER}}
13104 * {{SUBJECTSPACEE}}
13105 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
13107 <ul><li> Parser test
13108 </li><li> Parser_test
13109 </li><li> Parser test
13110 </li><li> Parser_test
13111 </li><li> Parser test
13112 </li><li> Parser_test
13113 </li><li> Parser test
13114 </li><li> Parser_test
13115 </li><li> Parser test
13116 </li><li> Parser_test
13117 </li><li> Talk:Parser test
13118 </li><li> Talk:Parser_test
13119 </li><li> Parser test
13120 </li><li> Parser_test
13128 </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>
13132 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
13142 image4 |300px| centre
13143 image5.svg| http://///////
13148 <ul class="gallery mw-gallery-traditional">
13149 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13150 <div class="thumb" style="height: 150px;">Image1.png</div>
13151 <div class="gallerytext">
13154 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13155 <div class="thumb" style="height: 150px;">Image2.gif</div>
13156 <div class="gallerytext">
13161 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13162 <div class="thumb" style="height: 150px;">Image3</div>
13163 <div class="gallerytext">
13166 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13167 <div class="thumb" style="height: 150px;">Image4</div>
13168 <div class="gallerytext">
13173 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13174 <div class="thumb" style="height: 150px;">Image5.svg</div>
13175 <div class="gallerytext">
13176 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
13180 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13181 <div class="thumb" style="height: 150px;">* image6</div>
13182 <div class="gallerytext">
13190 Gallery (with options)
13192 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
13193 File:Nonexistant.jpg|caption
13194 File:Nonexistant.jpg
13195 image:foobar.jpg|some '''caption''' [[Main Page]]
13197 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
13200 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
13201 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
13202 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13203 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
13204 <div class="gallerytext">
13209 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13210 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
13211 <div class="gallerytext">
13214 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13215 <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>
13216 <div class="gallerytext">
13217 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13221 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13222 <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>
13223 <div class="gallerytext">
13226 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
13227 <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>
13228 <div class="gallerytext">
13238 Gallery with wikitext inside caption
13241 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
13242 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
13245 <ul class="gallery mw-gallery-traditional">
13246 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13247 <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>
13248 <div class="gallerytext">
13249 <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>
13253 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13254 <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>
13255 <div class="gallerytext">
13256 <p>This is a test template
13265 gallery (with showfilename option)
13267 <gallery showfilename>
13268 File:Nonexistant.jpg|caption
13269 File:Nonexistant.jpg
13270 image:foobar.jpg|some '''caption''' [[Main Page]]
13274 <ul class="gallery mw-gallery-traditional">
13275 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13276 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13277 <div class="gallerytext">
13278 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
13283 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13284 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13285 <div class="gallerytext">
13286 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
13290 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13291 <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>
13292 <div class="gallerytext">
13293 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
13294 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13298 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13299 <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>
13300 <div class="gallerytext">
13301 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
13310 Gallery (with namespace-less filenames)
13313 File:Nonexistant.jpg
13319 <ul class="gallery mw-gallery-traditional">
13320 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13321 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13322 <div class="gallerytext">
13325 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13326 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
13327 <div class="gallerytext">
13330 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13331 <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>
13332 <div class="gallerytext">
13335 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13336 <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>
13337 <div class="gallerytext">
13345 HTML Hex character encoding (spells the word "JavaScript")
13347 JavaScript
13349 <p>JavaScript
13354 HTML Hex character encoding bogus encoding (bug 26437 regression check)
13358 <p>&#xsee;&#XSEE;
13363 HTML Hex character encoding mixed case
13372 __FORCETOC__ override
13384 ISBN 978-0-1234-56 789
13386 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
13391 ISBN followed by 5 spaces
13402 ISBN ISBN 1234567890
13404 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
13409 Bug 22905: <abbr> followed by ISBN followed by </a>
13411 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
13413 <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>
13422 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
13427 Double RFC with a wiki link
13431 <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>
13440 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
13445 Centre-aligned image
13447 [[Image:foobar.jpg|centre]]
13449 <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>
13456 [[Image:foobar.jpg|none]]
13458 <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>
13463 Width + Height sized image (using px) (height is ignored)
13465 [[Image:foobar.jpg|640x480px]]
13467 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
13472 Width-sized image (using px, no following whitespace)
13474 [[Image:foobar.jpg|640px]]
13476 <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>
13481 Width-sized image (using px, with following whitespace - test regression from r39467)
13483 [[Image:foobar.jpg|640px ]]
13485 <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>
13490 Width-sized image (using px, with preceding whitespace - test regression from r39467)
13492 [[Image:foobar.jpg| 640px]]
13494 <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>
13499 Another italics / bold test
13507 # Note the results may be incorrect, as parserTest output included this:
13508 # XML error: Mismatched tag at byte 6120:
13509 # ...<dd> </dt></dl> </dd...
13517 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
13528 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
13530 Images with the "|" character in the comment
13532 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
13534 <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>
13539 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
13541 <html><script>alert(1);</script></html>
13543 <p><html><script>alert(1);</script></html>
13548 HTML with raw HTML ($wgRawHtml==true)
13552 <html><script>alert(1);</script></html>
13554 <p><script>alert(1);</script>
13559 Parents of subpages, one level up
13561 subpage title=[[Subpage test/L1/L2/L3]]
13565 <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>
13571 Parents of subpages, one level up, not named
13573 subpage title=[[Subpage test/L1/L2/L3]]
13577 <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>
13584 Parents of subpages, two levels up
13586 subpage title=[[Subpage test/L1/L2/L3]]
13592 <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
13593 </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>
13598 Parents of subpages, two levels up, without trailing slash or name.
13600 subpage title=[[Subpage test/L1/L2/L3]]
13609 Parents of subpages, two levels up, with lots of extra trailing slashes.
13611 subpage title=[[Subpage test/L1/L2/L3]]
13615 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
13620 Subpage test/L1/L2/L3Sibling
13626 Transclusion of a sibling page (one level up)
13628 subpage title=[[Subpage test/L1/L2/L3]]
13637 Transclusion of a child page
13639 subpage title=[[Subpage test/L1/L2]]
13648 Non-transclusion because of too many up levels
13650 subpage title=[[Subpage test/L1/L2/L3]]
13652 {{../../../../More than parent}}
13654 <p>{{../../../../More than parent}}
13659 Definition list code coverage
13665 <dl><dt> title  </dt><dd> def
13666 </dd><dt> title </dt><dd> def
13667 </dd><dt>title</dt><dd> def
13673 Don't fall for the self-closing div
13675 <div>hello world</div/>
13677 <div>hello world</div>
13686 <p>[[:Template:Msg]]
13695 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
13699 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
13701 Always escape literal '>' in output, not just after '<'
13715 <p>This is a test template
13716 This is a test template
13728 Inclusion of !userCanEdit() content
13732 <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>
13738 Out-of-order TOC heading levels
13747 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13749 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
13751 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
13752 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
13755 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
13757 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
13758 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
13764 <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>
13765 <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>
13766 <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>
13767 <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>
13768 <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>
13769 <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>
13775 ISBN with a dummy number
13785 ISBN with space-delimited number
13789 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
13795 ISBN with multiple spaces, no number
13814 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
13815 </p><p>ISBN 12345678901
13821 ISBN with trailing year (bug 8110)
13823 ISBN 1-234-56789-0 - 2006
13825 ISBN 1 234 56789 0 - 2006
13827 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
13828 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
13836 {{anchorencode:foo bar©#%n}}
13838 <p>foo_bar.C2.A9.23.25n
13843 anchorencode trims spaces
13845 {{anchorencode: __pretty__please__}}
13852 anchorencode deals with links
13854 {{anchorencode: [[hello|world]] [[hi]]}}
13861 anchorencode deals with templates
13863 {{anchorencode: {{Foo}} }}
13870 anchorencode encodes like the TOC generator: (bug 18431)
13872 === _ +:.3A%3A&&]] ===
13873 {{anchorencode: _ +:.3A%3A&&]] }}
13876 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
13877 <p>.2B:.3A.253A.26.26.5D.5D
13882 Bug 6200: blockquotes and paragraph formatting
13903 Bug 8293: Use of center tag ruins paragraph formatting
13924 Parsing of overlapping (improperly nested) inline html tags (PHP parser)
13928 <span><s>x</span></s>
13930 <p><span><s>x</span></s></span>
13935 Parsing of overlapping (improperly nested) inline html tags (Parsoid)
13939 <span><s>x</span></s>
13941 <p><span><s>x</s></span><s></s>
13946 ### Language variants related tests
13949 Self-link in language variants
13951 title=[[Dunav]] language=sr
13953 Both [[Dunav]] and [[Дунав]] are names for this river.
13955 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
13966 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
13968 title=[[Duna]] language=sr
13970 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
13972 <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.
13977 Link to pages in language variants
13981 Main Page can be written as [[Маин Паге]]
13983 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
13989 Multiple links to pages in language variants
13993 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
13995 <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>.
14001 Simple template in language variants
14007 <p>This is a test template
14013 Template with explicit namespace in language variants
14019 <p>This is a test template
14025 Basic test for template parameter in language variants
14029 {{парамтест|param=foo}}
14031 <p>This is a test template with parameter foo
14037 Simple category in language variants
14041 [[Category:МедиаWики Усер'с Гуиде]]
14043 <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>
14060 Don't convert blue categorylinks to another variant (bug 33210)
14064 [[A]][[Category:分类]]
14066 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
14071 Stripping -{}- tags (language variants)
14075 Latin proverb: -{Ne nuntium necare}-
14077 <p>Latin proverb: Ne nuntium necare
14083 Prevent conversion with -{}- tags (language variants)
14085 language=sr variant=sr-ec
14087 Latinski: -{Ne nuntium necare}-
14089 <p>Латински: Ne nuntium necare
14095 Prevent conversion of text with -{}- tags (language variants)
14097 language=sr variant=sr-ec
14099 Latinski: -{Ne nuntium necare}-
14101 <p>Латински: Ne nuntium necare
14107 Prevent conversion of links with -{}- tags (language variants)
14109 language=sr variant=sr-ec
14113 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
14119 -{}- tags within headlines (within html for parserConvert())
14121 language=sr variant=sr-ec
14125 <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>
14131 Explicit definition of language variant alternatives
14133 language=zh variant=zh-tw
14135 -{zh:China;zh-tw:Taiwan}-, not China
14137 <p>Taiwan, not China
14143 Conversion around HTML tags
14145 language=sr variant=sr-ec
14147 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
14148 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
14151 <span title="ЛаCтин">ски</span>
14157 Explicit session-wise language variant mapping (A flag and - flag)
14159 language=zh variant=zh-tw
14161 Taiwan is not China.
14162 But -{A|zh:China;zh-tw:Taiwan}- is China,
14163 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
14164 and -{China}- is China.
14166 <p>Taiwan is not China.
14167 But Taiwan is Taiwan,
14168 (This should be stripped!)
14169 and China is China.
14174 Explicit session-wise language variant mapping (H flag for hide)
14176 language=zh variant=zh-tw
14178 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
14181 <p>(This should be stripped!)
14187 Adding explicit conversion rule for title (T flag)
14189 language=zh variant=zh-tw showtitle
14191 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
14194 <p>Should be stripped!
14199 Testing that changing the language variant here in the tests actually works
14201 language=zh variant=zh showtitle
14203 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
14206 <p>Should be stripped!
14211 Recursive conversion of alt and title attrs shouldn't clear converter state
14213 language=zh variant=zh-cn showtitle
14215 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
14216 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
14220 Should be stripped<span title="Exclamation">!</span>
14225 Bug 24072: more test on conversion rule for title
14227 language=zh variant=zh-tw showtitle
14229 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
14230 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
14233 <p>This should be stripped!
14234 This won't take interferes with the title rule.
14239 Partly disable title conversion if variant == main language code
14241 language=zh variant=zh title=[[ZH]] showtitle
14243 -{T|zh-cn:CN;zh-tw:TW}-
14251 Partly disable title conversion if variant == main language code, more
14253 language=zh variant=zh title=[[ZH]] showtitle
14263 Raw output of variant escape tags (R flag)
14265 language=zh variant=zh-tw
14267 Raw: -{R|zh:China;zh-tw:Taiwan}-
14269 <p>Raw: zh:China;zh-tw:Taiwan
14274 Nested using of manual convert syntax
14276 language=zh variant=zh-hk
14278 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
14280 <p>Nested: Hello Hong Kong!
14285 Proper conversion of text in external links
14287 language=sr variant=sr-ec
14289 http://www.google.com
14290 gopher://www.google.com
14291 [http://www.google.com http://www.google.com]
14292 [gopher://www.google.com gopher://www.google.com]
14293 [https://www.google.com irc://www.google.com]
14294 [ftp://www.google.com www.google.com/ftp://dir]
14295 [//www.google.com www.google.com]
14297 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
14298 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
14299 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
14300 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
14301 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
14302 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
14303 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
14308 Do not convert roman numbers to language variants
14310 language=sr variant=sr-ec
14314 <p>Фридрих IV је цар.
14319 Unclosed language converter markup "-{"
14330 Don't convert raw rule "-{R|=>}-" to "=>"
14341 Bug 529: Uncovered bullet
14351 # Plain MediaWiki does not remove empty lists, but tidy actually does.
14352 # Templates in Wikipedia rely on this behavior, as tidy has always been
14353 # enabled there. These tests are normally run *without* tidy, so specify the
14354 # full output here.
14355 # To test realistic parsing behavior, apply a tidy-like transformation to both
14356 # the expected output and your parser's output.
14358 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
14360 ******* Foo {{bullet}}
14362 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
14375 Bug 529: Uncovered table already at line-start
14398 Bug 529: Uncovered bullet in parser function result
14400 * Foo {{lc:{{bullet}} }}
14409 Bug 5678: Double-parsed template argument
14411 {{lc:{{{1}}}|hello}}
14418 Bug 5678: Double-parsed template invocation
14420 {{lc:{{paramtest {{!}} param = hello }} }}
14422 <p>{{paramtest | param = hello }}
14427 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
14430 title=[[Main Page]]
14432 {{PRVNÍVELKÉ:ěščř}}
14433 {{prvnívelké:ěščř}}
14453 Morwen/13: Unclosed link followed by heading
14460 <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>
14465 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
14472 <h1><span class="mw-headline" id="heading">heading</span></h1>
14477 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
14484 <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>
14499 Paragraphs inside divs (no extra line breaks)
14511 Paragraphs inside divs (extra line break on open)
14526 Paragraphs inside divs (extra line break on close)
14541 Paragraphs inside divs (extra line break on open and close)
14558 Nesting tags, paragraphs on lines which begin with <div>
14562 <div></div><strong>A
14571 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
14573 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
14575 <blockquote>Line one
14577 Line two</blockquote>
14579 <blockquote>Line one
14580 Line two</blockquote>
14585 Bug 6200: paragraphs inside blockquotes (extra line break on open)
14590 Line two</blockquote>
14595 Line two</blockquote>
14600 Bug 6200: paragraphs inside blockquotes (extra line break on close)
14602 <blockquote>Line one
14607 <blockquote>Line one
14615 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
14632 Paragraphs inside blockquotes/divs (no extra line breaks)
14634 <blockquote><div>Line one
14636 Line two</div></blockquote>
14638 <blockquote><div>Line one
14639 Line two</div></blockquote>
14644 Paragraphs inside blockquotes/divs (extra line break on open)
14649 Line two</div></blockquote>
14654 Line two</div></blockquote>
14659 Paragraphs inside blockquotes/divs (extra line break on close)
14661 <blockquote><div>Line one
14664 </div></blockquote>
14666 <blockquote><div>Line one
14669 </div></blockquote>
14674 Paragraphs inside blockquotes/divs (extra line break on open and close)
14680 </div></blockquote>
14686 </div></blockquote>
14691 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
14693 wgLinkHolderBatchSize=0
14699 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
14700 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
14701 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
14706 Free external link invading image caption
14708 [[Image:Foobar.jpg|thumb|http://x|hello]]
14710 <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>
14715 Bug 15196: localised external link numbers
14719 [http://en.wikipedia.org/]
14721 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
14726 Multibyte character in padleft
14728 {{padleft:-Hello|7|Æ}}
14735 Multibyte character in padright
14737 {{padright:Hello-|7|Æ}}
14744 formatdate parser function
14746 {{#formatdate:2009-03-24}}
14748 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
14753 formatdate parser function, with default format
14755 {{#formatdate:2009-03-24|mdy}}
14757 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
14762 Spacing of numbers in formatted dates
14764 {{#formatdate:January 15}}
14766 <p><span class="mw-formatted-date" title="01-15">January 15</span>
14771 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
14773 language=nl title=[[MediaWiki:Common.css]]
14775 {{#formatdate:2009-03-24|dmy}}
14777 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
14790 Edit comment with link
14794 I like the [[Main Page]] a lot
14796 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
14800 Edit comment with link and link text
14804 I like the [[Main Page|best pages]] a lot
14806 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
14810 Edit comment with link and link text with suffix
14814 I like the [[Main Page|best page]]s a lot
14816 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
14820 Edit comment with section link (non-local, eg in history list)
14822 comment title=[[Main Page]]
14824 /* External links */ removed bogus entries
14826 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
14830 Edit comment with section link and text before it (non-local, eg in history list)
14832 comment title=[[Main Page]]
14834 pre-comment text /* External links */ removed bogus entries
14836 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>
14840 Edit comment with section link (local, eg in diff view)
14842 comment local title=[[Main Page]]
14844 /* External links */ removed bogus entries
14846 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
14850 Edit comment with subpage link (bug 14080)
14854 title=[[Subpage test]]
14856 Poked at a [[/subpage]] here...
14858 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
14862 Edit comment with subpage link and link text (bug 14080)
14866 title=[[Subpage test]]
14868 Poked at a [[/subpage|neat little page]] here...
14870 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
14874 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
14877 title=[[Subpage test]]
14879 Poked at a [[/subpage]] here...
14881 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
14885 Edit comment with bare anchor link (local, as on diff)
14889 title=[[Main Page]]
14893 <a href="#section">#section</a>
14897 Edit comment with bare anchor link (non-local, as on history)
14900 title=[[Main Page]]
14904 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
14908 Anchor starting with underscore
14912 <p><a href="#_ref">One</a>
14917 Id starting with underscore
14919 <div id="_ref"></div>
14921 <div id="_ref"></div>
14926 Space normalisation on autocomment (bug 22784)
14929 title=[[Main Page]]
14931 /* __hello__world__ */
14933 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
14937 percent-encoding and + signs in comments (Bug 26410)
14941 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
14943 <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>
14947 Bad images - basic functionality
14956 Bad images - bug 16039: text after bad image disappears
14970 Verify that displaytitle works (bug #22501) no displaytitle
14974 wgAllowDisplayTitle=true
14975 wgRestrictDisplayTitle=false
14977 this is not the the title
14980 <p>this is not the the title
14985 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
14990 wgAllowDisplayTitle=true
14991 wgRestrictDisplayTitle=false
14993 this is not the the title
14994 {{DISPLAYTITLE:whatever}}
14997 <p>this is not the the title
15002 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
15007 wgAllowDisplayTitle=true
15008 wgRestrictDisplayTitle=true
15010 this is not the the title
15011 {{DISPLAYTITLE:whatever}}
15014 <p>this is not the the title
15019 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
15024 wgAllowDisplayTitle=true
15025 wgRestrictDisplayTitle=true
15027 this is not the the title
15028 {{DISPLAYTITLE:screen}}
15031 <p>this is not the the title
15036 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
15041 wgAllowDisplayTitle=false
15043 this is not the the title
15044 {{DISPLAYTITLE:screen}}
15047 <p>this is not the the title
15048 <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>
15053 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
15058 wgAllowDisplayTitle=false
15060 this is not the the title
15063 <p>this is not the the title
15068 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
15073 wgAllowDisplayTitle=true
15074 wgRestrictDisplayTitle=true
15076 this is not the the title
15077 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
15079 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
15080 <p>this is not the the title
15085 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
15090 wgAllowDisplayTitle=true
15091 wgRestrictDisplayTitle=true
15093 this is not the the title
15094 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
15096 <span style="color: red;">s</span>creen
15097 <p>this is not the the title
15102 preload: check <noinclude> and <includeonly>
15106 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
15112 preload: check <onlyinclude>
15116 Goodbye <onlyinclude>Hello world</onlyinclude>
15122 preload: can pass tags through if we want to
15126 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
15128 <includeonly>Hello world</includeonly>
15132 preload: check that it doesn't try to do tricks
15136 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
15138 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
15142 Play a bit with r67090 and bug 3158
15146 <div style="width:50% !important"> </div>
15147 <div style="width:50% !important"> </div>
15148 <div style="width:50% !important"> </div>
15149 <div style="border : solid;"> </div>
15151 <div style="width:50% !important"> </div>
15152 <div style="width:50% !important"> </div>
15153 <div style="width:50% !important"> </div>
15154 <div style="border : solid;"> </div>
15159 HTML5 data attributes
15161 <span data-foo="bar">Baz</span>
15162 <p data-abc-def_hij="">Quuz</p>
15164 <p><span data-foo="bar">Baz</span>
15166 <p data-abc-def_hij="">Quuz</p>
15171 percent-encoding and + signs in internal links (Bug 26410)
15173 [[User:+%]] [[Page+title%]]
15174 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
15175 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
15176 [[%33%45]] [[%33%45+]]
15178 <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>
15179 <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>
15180 <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>
15181 <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>
15186 Special characters in embedded file links (bug 27679)
15188 [[File:Contains & ampersand.jpg]]
15189 [[File:Does not exist.jpg|Title with & ampersand]]
15191 <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>
15192 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
15198 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
15200 Text's been normalized?
15202 <p>Text's been normalized?
15207 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
15209 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
15211 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
15216 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
15218 [http://www.example.org/ ideograms]
15220 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
15225 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
15227 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
15229 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
15253 Bug 31098 Template which includes system messages which includes the template
15257 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
15258 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
15263 Bug31490 Turkish: ucfirst 'blah'
15274 Bug31490 Turkish: ucfirst 'ix'
15285 Bug31490 Turkish: lcfirst 'BLAH'
15296 Bug31490 Turkish: ucfırst (with a dotless i)
15302 <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>
15307 Bug31490 ucfırst (with a dotless i) with English language
15313 <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>
15318 Bug 26375: TOC with italics
15320 title=[[Main Page]]
15323 == ''Lost'' episodes ==
15325 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15327 <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>
15331 <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>
15336 Bug 26375: TOC with bold
15338 title=[[Main Page]]
15341 == '''should be bold''' then normal text ==
15343 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15345 <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>
15349 <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>
15354 Bug 33845: Headings become cursive in TOC when they contain an image
15356 title=[[Main Page]]
15359 == Image [[Image:foobar.jpg]] ==
15361 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15363 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
15367 <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>
15372 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
15374 title=[[Main Page]]
15377 == <blockquote>Quote</blockquote> ==
15379 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15381 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
15385 <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>
15390 Unclosed tags in TOC
15392 title=[[Main Page]]
15396 <small>Hanc marginis exiguitas non caperet.</small>
15399 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15401 <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>
15405 <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>
15406 <p><small>Hanc marginis exiguitas non caperet.</small>
15412 Multiple tags in TOC
15415 == <i>Foo</i> <b>Bar</b> ==
15417 == <i>Foo</i> <blockquote>Bar</blockquote> ==
15419 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15421 <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>
15422 <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>
15426 <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>
15427 <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>
15432 Tags with parameters in TOC
15435 == <sup class="in-h2">Hello</sup> ==
15437 == <sup class="a > b">Evilbye</sup> ==
15439 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15441 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
15442 <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>
15446 <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>
15447 <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>
15452 span tags with directionality in TOC
15455 == <span dir="ltr">C++</span> ==
15457 == <span dir="rtl">זבנג!</span> ==
15459 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
15461 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
15463 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
15465 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15467 <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>
15468 <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>
15469 <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>
15470 <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>
15471 <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>
15475 <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>
15476 <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>
15477 <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>
15478 <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>
15479 <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>
15486 == {{int:headline_sample}} ==
15490 Bug 32057: Title needed when expanding <h> nodes.
15492 title=[[Main Page]]
15496 <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>
15501 Strip marker in urlencode
15503 {{urlencode:x<nowiki/>y}}
15504 {{urlencode:x<nowiki/>y|wiki}}
15505 {{urlencode:x<nowiki/>y|path}}
15532 Strip marker in formatNum
15534 {{formatnum:1<nowiki/>2}}
15535 {{formatnum:1<nowiki/>2|R}}
15543 Check noCommafy in formatNum
15547 {{formatnum:123456.78}}
15548 {{formatnum:123456.78|NOSEP}}
15556 Strip marker in grammar
15560 {{grammar:elative|foo<nowiki/>bar}}
15567 Strip marker in padleft
15569 {{padleft:|2|x<nowiki/>y}}
15576 Strip marker in padright
15578 {{padright:|2|x<nowiki/>y}}
15585 Strip marker in anchorencode
15587 {{anchorencode:x<nowiki/>y}}
15594 nowiki inside link inside heading (bug 18295)
15596 ==[[foo|x<nowiki>y</nowiki>z]]==
15598 <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>
15603 new support for bdi element (bug 31817)
15605 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
15607 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
15612 Ignore pipe between table row attributes
15616 |- id=foo | style='color: red'
15624 <tr id="foo" style="color: red">
15631 Gallery override link with WikiLink (bug 34852)
15634 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
15637 <ul class="gallery mw-gallery-traditional">
15638 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15639 <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>
15640 <div class="gallerytext">
15650 Gallery override link with absolute external link (bug 34852)
15653 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
15656 <ul class="gallery mw-gallery-traditional">
15657 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15658 <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>
15659 <div class="gallerytext">
15669 Gallery override link with malicious javascript (bug 34852)
15672 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
15675 <ul class="gallery mw-gallery-traditional">
15676 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15677 <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>
15678 <div class="gallerytext">
15688 Gallery with invalid title as link (bug 43964)
15691 File:foobar.jpg|link=<
15694 <ul class="gallery mw-gallery-traditional">
15695 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15696 <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>
15697 <div class="gallerytext">
15705 Language parser function
15714 Padleft and padright as substr
15716 {{padleft:|3|abcde}}
15717 {{padright:|3|abcde}}
15725 Special parser function
15727 {{#special:RandomPage}}
15728 {{#special:BaDtItLe}}
15729 {{#special:Foobar}}
15738 Bug 34939 - Case insensitive link parsing ([HttP://])
15740 [HttP://MediaWiki.Org/]
15742 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
15747 Bug 34939 - Case insensitive link parsing ([HttP:// title])
15749 [HttP://MediaWiki.Org/ MediaWiki]
15751 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
15756 Bug 34939 - Case insensitive link parsing (HttP://)
15758 HttP://MediaWiki.Org/
15760 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
15779 <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>
15780 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15781 <h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15782 <h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15783 <h2><span class="mw-headline" id="Section_5">Section 5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 5">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15789 ### Parsoids-specific tests
15790 ### Parsoid-PHP parser incompatibilities
15793 1. SOL-sensitive wikitext tokens as template-args
15795 parsoid=wt2html,wt2wt
15801 <span about="#mwt1" typeof="mw:Transclusion">
15802 </span><ul about="#mwt1"><li>a</li></ul>
15803 <span about="#mwt2" typeof="mw:Transclusion">
15804 </span><ol about="#mwt2"><li>a</li></ol>
15805 <span about="#mwt3" typeof="mw:Transclusion">
15806 </span><dl about="#mwt3"><dd>a</dd></dl>
15809 #### ----------------------------------------------------------------
15810 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
15811 #### tags. Parsoid's output for these tags differs from that of the
15813 #### ----------------------------------------------------------------
15816 Ref: 1. ref-location should be replaced with an index span
15821 B <ref name="x">foo</ref>
15824 <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>
15825 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>
15826 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>
15830 Ref: 2. ref-tags with identical names should all get the same index
15834 A <ref name="x">foo</ref>
15837 <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>
15838 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>
15842 Ref: 3. spaces in ref-names should be ignored
15846 A <ref name="x">foo</ref>
15847 B <ref name=" x " />
15850 <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>
15851 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>
15852 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>
15856 Ref: 4. 'constructor' should be accepted as a valid ref-name
15857 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
15861 A <ref name="constructor">foo</ref>
15863 <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>
15867 Ref: 5. body should accept generic wikitext
15872 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
15877 <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>
15879 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'>
15880 <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>
15885 Ref: 6. indent-pres should not be output in ref-body
15897 <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>
15899 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
15900 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
15907 Ref: 7. No p-wrapping in ref-body
15926 <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>
15928 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15929 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
15943 Ref: 8. transclusion wikitext has lower precedence
15947 A <ref> foo {{echo|</ref> B C}}
15951 <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>
15953 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15954 <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>
15958 Ref: 9. unclosed comments should not leak out of ref-body
15962 A <ref> foo <!--</ref> B C
15966 <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>
15968 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15969 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li></ol>
15973 Ref: 10. Unclosed HTML tags should not leak out of ref-body
15977 A <ref> <b> foo </ref> B C
15981 <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>
15983 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
15984 <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>
15988 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
15995 <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
15996 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>
16000 Ref: 12. ref-tags act as trailing newline migration barrier
16004 <!--the newline at the end of this line moves out of the p-tag-->a
16006 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
16011 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
16014 <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>
16015 <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>
16022 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
16030 <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
16031 <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>
16035 Ref: 14. A nested ref-tag should be emitted as plain text
16039 <ref>foo <ref>bar</ref> baz</ref>
16043 <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>
16045 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw="{"name":"references","attrs":{}}">
16046 <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>
16050 Ref: 15. ref-tags with identical names should get identical indexes
16054 A1 <ref name="a">foo</ref> A2 <ref name="a" />
16055 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
16059 <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>
16060 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>
16062 <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>
16066 References: 1. references tag without any refs should be handled properly
16072 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
16076 References: 2. references tag with group only outputs references from that group
16080 A <ref group="a">foo</ref>
16081 B <ref group="b">bar</ref>
16083 <references group='a' />
16085 <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>
16086 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>
16088 <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>
16092 References: 3. ref list should be cleared after processing references
16104 <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>
16106 <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>
16108 <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>
16110 <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>
16114 References: 4. only referenced group should be cleared after processing references
16118 A <ref group="a">afoo</ref>
16121 <references group="a"/>
16127 <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>
16128 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>
16130 <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>
16132 <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>
16134 <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>
16138 References: 5. ref tags in references should be processed while ignoring all other content
16143 B <ref name="b">bar</ref>
16146 <ref name="a">foo</ref>
16147 This should just get lost.
16150 <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>
16151 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>
16153 <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>
16157 References: 6. <references /> from a transclusion
16161 {{echo|<references />}}
16163 <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>
16167 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
16171 A <ref>foo bar for a</ref>
16177 <ref name="b">foo</ref>
16180 <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>
16181 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>
16183 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
16184 <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>
16185 <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>
16187 <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":{}}'>
16188 <li about="#cite_note-b-1" id="cite_note-b-1"><span rel="mw:referencedBy">↑</span> foo</li></ol>
16191 #### ----------------------------------------------------------------
16192 #### The following section of tests are primarily to test
16193 #### wikitext escaping capabilities of Parsoid. Given that
16194 #### escaping can be done any number of ways, the wikitext (input)
16195 #### is always adjusted to reflect how Parsoid adds nowiki
16198 #### We are marking several tests as parsoid-only since the
16199 #### HTML in the result section is different from what the
16200 #### PHP parser generates for it.
16201 #### ----------------------------------------------------------------
16204 #### --------------- Headings ---------------
16206 #### 1. Nested inside html <h1>=foo=</h1>
16207 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
16208 #### 3. Nested inside html with wikitext split by html tags
16209 #### 4. No escape needed
16210 #### 5. Empty headings <h1></h1>
16211 #### 6. Heading chars in SOL context
16212 #### ----------------------------------------
16214 Headings: 0. Unnested
16218 <nowiki>=foo=</nowiki>
16220 <nowiki> =foo= </nowiki>
16222 <nowiki>=foo=</nowiki>
16224 =foo''a''<nowiki>=</nowiki>
16226 <p><span typeof="mw:Nowiki">=foo=</span></p>
16228 <p><span typeof="mw:Nowiki"> =foo= </span>
16230 <span typeof="mw:Nowiki">=foo=</span></p>
16232 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
16236 Headings: 1. Nested inside html
16240 =<nowiki>=foo=</nowiki>=
16242 ==<nowiki>=foo=</nowiki>==
16244 ===<nowiki>=foo=</nowiki>===
16246 ====<nowiki>=foo=</nowiki>====
16248 =====<nowiki>=foo=</nowiki>=====
16250 ======<nowiki>=foo=</nowiki>======
16252 <h1><span typeof="mw:Nowiki">=foo=</span></h1>
16253 <h2><span typeof="mw:Nowiki">=foo=</span></h2>
16254 <h3><span typeof="mw:Nowiki">=foo=</span></h3>
16255 <h4><span typeof="mw:Nowiki">=foo=</span></h4>
16256 <h5><span typeof="mw:Nowiki">=foo=</span></h5>
16257 <h6><span typeof="mw:Nowiki">=foo=</span></h6>
16261 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
16266 <nowiki>*</nowiki>bar
16272 <nowiki>=bar=</nowiki>
16280 Headings: 3. Nested inside html with wikitext split by html tags
16284 =='''bold'''<nowiki>foo=</nowiki>=
16286 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
16290 Headings: 4a. No escaping needed (testing just h1 and h2)
16308 =<nowiki>=</nowiki>=
16316 <h1><i>=</i>foo=</h1>
16317 <h1><span typeof="mw:Nowiki">=</span></h1>
16321 Headings: 4b. No escaping needed (inside p-tags)
16336 Headings: 5. Empty headings
16348 =====<nowiki/>=====
16350 ======<nowiki/>======
16361 Headings: 6a. Heading chars in SOL context (with trailing spaces)
16365 <nowiki>=a=</nowiki>
16367 <nowiki>=a=</nowiki>
16369 <nowiki>=a=</nowiki>
16371 <nowiki>=a=</nowiki>
16380 Headings: 6b. Heading chars in SOL context (with trailing newlines)
16408 Headings: 6c. Heading chars in SOL context (leading newline break)
16413 <nowiki>=b=</nowiki>
16420 Headings: 6d. Heading chars in SOL context (with interspersed comments)
16424 <!--c0--><nowiki>=a=</nowiki>
16426 <nowiki>=a=</nowiki> <!--c2--> <!--c3-->
16428 <p><!--c0-->=a=</p>
16429 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
16433 Headings: 6d. Heading chars in SOL context (No escaping needed)
16442 #### --------------- Lists ---------------
16443 #### 0. Outside nests (*foo, etc.)
16444 #### 1. Nested inside html <ul><li>*foo</li></ul>
16445 #### 2. Inside definition lists
16446 #### 3. Only bullets at start should be escaped
16447 #### 4. No escapes needed
16448 #### 5. No unnecessary escapes
16449 #### 6. Escape bullets in SOL position
16450 #### 7. Escape bullets in a multi-line context
16451 #### ----------------------------------------
16454 Lists: 0. Outside nests
16456 <nowiki>*</nowiki>foo
16458 <nowiki>#</nowiki>foo
16466 Lists: 1. Nested inside html
16468 *<nowiki>*foo</nowiki>
16470 *<nowiki>#foo</nowiki>
16472 *<nowiki>:foo</nowiki>
16474 *<nowiki>;foo</nowiki>
16476 #<nowiki>*foo</nowiki>
16478 #<nowiki>#foo</nowiki>
16480 #<nowiki>:foo</nowiki>
16482 #<nowiki>;foo</nowiki>
16504 Lists: 2. Inside definition lists
16506 ;<nowiki>;foo</nowiki>
16508 ;<nowiki>:foo</nowiki>
16510 ;<nowiki>:foo</nowiki>
16513 :<nowiki>:foo</nowiki>
16528 Lists: 3. Only bullets at start of text should be escaped
16530 *<nowiki>*foo*bar</nowiki>
16532 *<nowiki>*foo</nowiki>''it''*bar
16536 <ul><li>*foo<i>it</i>*bar
16542 Lists: 4. No escapes needed
16554 <ul><li><i>foo</i>*bar
16556 <ul><li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
16561 Lists: 5. No unnecessary escapes
16563 * bar <span><nowiki>[[foo]]</nowiki></span>
16565 *=bar <span><nowiki>[[foo]]</nowiki></span>
16567 *[[bar <span><nowiki>[[foo]]</nowiki></span>
16569 *]]bar <span><nowiki>[[foo]]</nowiki></span>
16571 *=bar <span>foo]]</span>=
16575 <ul><li> bar <span>[[foo]]</span>
16577 <ul><li>=bar <span>[[foo]]</span>
16579 <ul><li>[[bar <span>[[foo]]</span>
16581 <ul><li>]]bar <span>[[foo]]</span>
16583 <ul><li>=bar <span>foo]]</span>=
16585 <ul><li> <s></s>: a
16591 Lists: 6. Escape bullets in SOL position
16595 <!--cmt--><nowiki>*foo</nowiki>
16597 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
16601 Lists: 7. Escape bullets in a multi-line context
16604 <nowiki>*</nowiki>b
16611 #### --------------- HRs ---------------
16612 #### 1. Single line
16613 #### -----------------------------------
16616 HRs: 1. Single line
16620 ----<nowiki>----</nowiki>
16624 <hr><span typeof="mw:Nowiki">----</span>
16629 #### --------------- Tables ---------------
16630 #### 1a. Simple example
16631 #### 1b. No escaping needed (!foo)
16632 #### 1c. No escaping needed (|foo)
16633 #### 1d. No escaping needed (|}foo)
16635 #### 2a. Nested in td (<td>foo|bar</td>)
16636 #### 2b. Nested in td (<td>foo||bar</td>)
16637 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
16639 #### 3a. Nested in th (<th>foo!bar</th>)
16640 #### 3b. Nested in th (<th>foo!!bar</th>)
16641 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
16645 #### 4c. No escaping needed
16646 #### --------------------------------------
16649 Tables: 1a. Simple example
16660 Tables: 1b. No escaping needed
16669 Tables: 1c. No escaping needed
16678 Tables: 1d. No escaping needed
16687 Tables: 2a. Nested in td
16692 |<nowiki>foo|bar</nowiki>
16696 <td><span typeof="mw:Nowiki">foo|bar</span></td></tr></tbody></table>
16700 Tables: 2b. Nested in td
16705 |<nowiki>foo||bar</nowiki>
16706 |''it''<nowiki>foo||bar</nowiki>
16710 <td><span typeof="mw:Nowiki">foo||bar</span></td>
16711 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
16715 Tables: 2c. Nested in td -- no escaping needed
16723 <table><tbody><tr><td>foo!!bar
16724 </td></tr></tbody></table>
16729 Tables: 3a. Nested in th
16737 <table><tbody><tr><th>foo!bar
16738 </th></tr></tbody></table>
16743 Tables: 3b. Nested in th
16748 !<nowiki>foo!!bar</nowiki>
16752 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
16757 Tables: 3c. Nested in th -- no escaping needed
16762 !<nowiki>foo||bar</nowiki>
16766 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
16770 Tables: 4a. Escape -
16777 |<nowiki>-bar</nowiki>
16781 <tr><th>-bar</th></tr>
16783 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
16787 Tables: 4b. Escape +
16794 |<nowiki>+bar</nowiki>
16798 <tr><th>+bar</th></tr>
16800 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
16804 Tables: 4c. No escaping needed
16822 <tr><td>foo-bar</td><td>foo+bar</td></tr>
16823 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
16831 ### SSS FIXME: Disabled right now because accurate html2wt
16832 ### on this snippet requires data-parsoid flags that we've
16833 ### stripped out of these tests. We should scheme how we
16834 ### we want to handle these kind of tests that require
16835 ### data-parsoid flags for accurate html2wt serialization
16838 Tables: 4d. No escaping needed
16856 #### --------------- Links ----------------
16857 #### 1. Quote marks in link text
16858 #### 2. Wikilinks: Escapes needed
16859 #### 3. Wikilinks: No escapes needed
16860 #### 4. Extlinks: Escapes needed
16861 #### 5. Extlinks: No escapes needed
16862 #### --------------------------------------
16864 Links 1. Quote marks in link text
16868 [[Foo|Foo<nowiki>''boo''</nowiki>]]
16870 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
16874 Links 2. WikiLinks: Escapes needed
16878 [[Foo|<nowiki>[Foobar]</nowiki>]]
16879 [[Foo|<nowiki>Foobar]</nowiki>]]
16880 [[Foo|x [Foobar] x]]
16881 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
16882 [[Foo|<nowiki>[[Bar]]</nowiki>]]
16883 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
16884 [[Foo|<nowiki>|Bar</nowiki>]]
16885 [[Foo|<nowiki>]]bar</nowiki>]]
16886 [[Foo|<nowiki>[[bar</nowiki>]]
16887 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
16889 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
16890 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
16891 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
16892 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
16893 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
16894 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
16895 <a href="Foo" rel="mw:WikiLink">|Bar</a>
16896 <a href="Foo" rel="mw:WikiLink">]]bar</a>
16897 <a href="Foo" rel="mw:WikiLink">[[bar</a>
16898 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
16902 Links 3. WikiLinks: No escapes needed
16909 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
16910 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
16914 Links 4. ExtLinks: Escapes needed
16918 [http://google.com <nowiki>[google]</nowiki>]
16919 [http://google.com <nowiki>google]</nowiki>]
16921 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
16922 <a href="http://google.com" rel="mw:ExtLink">google]</a>
16926 Links 5. ExtLinks: No escapes needed
16930 [http://google.com [google]
16932 <a href="http://google.com" rel="mw:ExtLink">[google</a>
16935 #### --------------- Quotes ---------------
16936 #### 1. Quotes inside <b> and <i>
16937 #### 2. Link fragments separated by <i> and <b> tags
16938 #### 3. Link fragments inside <i> and <b>
16939 #### 4. No escaping needed
16940 #### --------------------------------------
16942 1. Quotes inside <b> and <i>
16944 parsoid=html2wt,wt2wt
16946 ''<nowiki>'foo'</nowiki>''
16947 ''<nowiki>''foo''</nowiki>''
16948 ''<nowiki>'''foo'''</nowiki>''
16950 '''<nowiki>'foo'</nowiki>'''
16951 '''<nowiki>''foo''</nowiki>'''
16952 '''<nowiki>'''foo'''</nowiki>'''
16953 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
16954 '''foo'''<nowiki/>'s
16957 '<nowiki/>''foo''<nowiki/>'
16959 '''foo'''<nowiki/>'
16960 '<nowiki/>'''foo'''<nowiki/>'
16969 <b>foo'<i>bar'</i>baz</b>
16980 2. Link fragments separated by <i> and <b> tags
16982 [[''foo''<nowiki>hello]]</nowiki>
16984 [['''foo'''<nowiki>hello]]</nowiki>
16986 <p>[[<i>foo</i>hello]]
16987 </p><p>[[<b>foo</b>hello]]
16992 3. Link fragments inside <i> and <b>
16993 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
16994 this is one of the shortcomings of this format)
16996 ''[[foo''<nowiki>]]</nowiki>
16998 '''[[foo'''<nowiki>]]</nowiki>
17001 </p><p><b>[[foo</b>]]
17006 4. No escaping needed
17008 '<span>''bar''</span>'
17009 '<span>'''bar'''</span>'
17011 <p>'<span><i>bar</i></span>'
17012 '<span><b>bar</b></span>'
17016 #### ----------- Paragraphs ---------------
17017 #### 1. No unnecessary escapes
17018 #### --------------------------------------
17021 1. No unnecessary escapes
17023 bar <span><nowiki>[[foo]]</nowiki></span>
17025 =bar <span><nowiki>[[foo]]</nowiki></span>
17027 [[bar <span><nowiki>[[foo]]</nowiki></span>
17029 ]]bar <span><nowiki>[[foo]]</nowiki></span>
17031 =bar <span>foo]]</span><nowiki>=</nowiki>
17033 <p>bar <span>[[foo]]</span>
17034 </p><p>=bar <span>[[foo]]</span>
17035 </p><p>[[bar <span>[[foo]]</span>
17036 </p><p>]]bar <span>[[foo]]</span>
17037 </p><p>=bar <span>foo]]</span>=
17041 #### ----------------------- PRE --------------------------
17042 #### 1. Leading whitespace in SOL context should be escaped
17043 #### ------------------------------------------------------
17045 1. Leading whitespace in SOL context should be escaped
17049 <nowiki> </nowiki>a
17051 <nowiki> </nowiki> a
17053 <nowiki> </nowiki>a(tab)
17055 <nowiki> </nowiki> a
17057 <nowiki> </nowiki> a
17060 <nowiki> </nowiki>b
17063 <nowiki> </nowiki>b
17066 <nowiki> </nowiki> b
17072 <p><!--cmt--> a</p>
17081 #### --------------- Behavior Switches --------------------
17083 1. Valid behavior switches should be escaped
17087 <nowiki>__TOC__</nowiki>
17093 2. Invalid behavior switches should not be escaped
17104 #### --------------- HTML tags ---------------
17107 #### 3. multi-line html tag
17108 #### -----------------------------------------
17114 <a href="http://google.com">google</a>
17116 <a href="http://google.com">google</a>
17122 <nowiki><div>foo</div>
17123 <div style="color:red">foo</div></nowiki>
17125 <p><div>foo</div>
17126 <div style="color:red">foo</div>
17131 3. multi-line html tag
17146 <nowiki><ref>foo</ref></nowiki>
17148 <p><ref>foo</ref>
17152 #### --------------- Others ---------------
17156 <nowiki>foo</nowiki>
17158 <p><nowiki>foo</nowiki>
17162 ## The quote-char in the input is necessary for triggering the bug
17164 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
17166 parsoid=wt2wt,html2wt
17175 Tag-like HTML structures are passed through as text
17197 </p><p>1<d e>f
17202 # This was a bug in the PHP parser (see bug 17663 and its dups,
17203 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
17205 Tag names followed by punctuation should not be recognized as tags
17209 <p><s.ome> text
17214 HTML tag with necessary entities in attributes
17216 <span title="&amp;">foo</span>
17218 <p><span title="&amp;">foo</span>
17223 HTML tag with 'unnecessary' entity encoding in attributes
17225 <span title="&">foo</span>
17227 <p><span title="&">foo</span>
17232 HTML tag with broken attribute value quoting
17234 <span title="Hello world>Foo</span>
17236 <p><span>Foo</span>
17241 Parsoid-only: HTML tag with broken attribute value quoting
17245 <span title="Hello world>Foo</span>
17247 <p><span title="Hello world">Foo</span>
17252 Table with broken attribute value quoting
17255 | title="Hello world|Foo
17266 Table with broken attribute value quoting on consecutive lines
17269 | title="Hello world|Foo
17270 | style="color:red|Bar
17283 Parsoid-only: Table with broken attribute value quoting on consecutive lines
17288 | title="Hello world|Foo
17289 | style="color:red|Bar
17294 <td title="Hello world">Foo
17295 </td><td style="color: red">Bar
17296 </td></tr></tbody></table>
17301 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
17311 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
17321 Accept empty td cell attribute
17324 | align="center" | foo || |
17329 <td align="center"> foo </td>
17336 Non-empty attributes in th-cells
17339 ! Foo !! style="color: red" | Bar
17345 <th style="color: red"> Bar
17351 Accept empty attributes in th-cells
17366 Empty table rows go away
17387 ### Parsoid-centric tests for testing RTing of inter-element separators
17388 ### Edge cases not tested by existing parser tests and specific to
17389 ### Parsoid-specific serialization strategies.
17393 RT-ed inter-element separators should be valid separators
17406 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
17407 (Parsoid-only since PHP parser relies on Tidy for correct output)
17423 Empty TD followed by TD with tpl-generated attribute
17428 |{{echo|style='color:red'}}|foo
17442 Indented table with an empty td
17461 Empty TR followed by a template-generated TR
17462 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
17468 {{echo|<tr><td>foo</td></tr>}}
17474 <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}}]}'>
17479 ## PHP and parsoid output differ for this, and since this is primarily
17480 ## for testing Parsoid's serializer, marking this Parsoid only
17482 Empty TR followed by mixed-ws-comment line should RT correctly
17498 <!--c--> </tr><!--d-->
17504 Multi-line image caption generated by templates with/without trailing newlines
17508 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
17509 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
17511 <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>
17512 <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>
17516 ## PHP emits broken html for this, and since this is primarily
17517 ## a Parsoid serializer test, marking this Parsoid only
17519 Improperly nested inline or quotes tags with whitespace in between
17523 <span> <s>x</span> </s>
17526 <p><span> <s>x</s></span><s> </s>
17527 <b> <i>x</i></b><i> </i>
17532 Encapsulate protected attributes from wt
17536 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
17538 <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>
17542 ## Currently the p-wrapper is fragile in how adds / removes transformations.
17543 ## Having nested or stray pre tags results in the attempt to add duplicates,
17544 ## causing an assertion fail. This test tries to prevent that situation.
17546 Ensure ParagraphWrapper can deal with stray closing pre tags
17556 Ensure fostered text content is wrapped in spans
17560 <table>hi</table><table>ho</table>
17569 Encapsulation properly handles null DSR information from foster box
17571 parsoid=wt2html,wt2wt
17573 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
17575 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
17578 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
17582 <td>bar</td></tr></tbody></table>
17586 1. Encapsulate foster-parented transclusion content
17588 parsoid=wt2wt,wt2html
17590 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
17592 <span typeof="mw:Transclusion" data-mw="{"parts":["
17593 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
17595 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
17599 <td>bar</td></tr></tbody></table>
17603 2. Encapsulate foster-parented transclusion content
17605 parsoid=wt2wt,wt2html
17607 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
17609 <div typeof="mw:Transclusion" data-mw="{"parts":["
17611 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
17613 <td>bar</td></tr></table>"]}">foo</div>
17617 <td>bar</td></tr></tbody></table>
17621 3. Encapsulate foster-parented transclusion content
17623 parsoid=wt2wt,wt2html
17625 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
17627 <div typeof="mw:Transclusion" data-mw="{"parts":["
17630 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
17632 <td>"}},"i":0}},"bar</td></tr></table>"]}">
17637 <td>bar</td></tr></tbody></table>
17641 4. Encapsulate foster-parented transclusion content
17643 parsoid=wt2wt,wt2html
17645 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
17647 <div typeof="mw:Transclusion" data-mw="{"parts":["
17650 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
17652 <td>"}},"i":0}},"bar</td></tr></table>"]}">
17657 <td>bar</td></tr></tbody></table>
17661 5. Encapsulate foster-parented transclusion content
17663 parsoid=wt2wt,wt2html
17665 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
17667 <span typeof="mw:Transclusion" data-mw="{"parts":["
17672 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
17678 <p>foo</p></div></td></tr></tbody></table>
17682 6. Encapsulate foster-parented transclusion content
17684 parsoid=wt2wt,wt2html
17686 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
17688 <span typeof="mw:Transclusion" data-mw="{"parts":["
17693 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
17699 <p>foo</p></div></td></tr></tbody></table>
17704 7. Encapsulate foster-parented transclusion content
17706 parsoid=wt2wt,wt2html
17708 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
17710 <p typeof="mw:Transclusion" data-mw="{"parts":["
17711 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
17712 <p>foo</p>"}},"i":0}},"
17713 <td>bar</td></table>"]}">foo</p>
17717 <td>bar</td></tr></tbody></table>
17721 8. Encapsulate foster-parented transclusion content
17723 parsoid=wt2wt,wt2html
17726 }}{|{{echo|style='color:red'}}
17731 <p typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}">a</p><span typeof="mw:Transclusion" data-mw="{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}">{{{1}}}</span>
17735 <td>b</td></tr></tbody></table>
17738 # -----------------------------------------------------------------
17739 # The following section of tests are primarily to spec requirements
17740 # around serialization of new/edited content.
17742 # All these tests are marked Parsoid html2wt and html2html only
17743 # ----------------------------------------------------------------
17746 Image: Modifying size of an image
17750 [[Image:Wiki.png|230x230px]]
17752 <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>
17756 Image: New block level image should have \n before and after
17761 [[File:Wiki.png|right|thumb|150x150px]]
17764 <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>
17767 # Wacky -- the leading newline in input is required because
17768 # that is what the serializer emits. To be fixed. Not fixing
17769 # the test because this test is required to test serialization of
17770 # new content and preferred whitespace style.
17772 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
17780 <li><p>foo</p></li>
17784 # Wacky -- the leading newline in input is required because
17785 # that is what the serializer emits. To be fixed. Not fixing
17786 # the test because this test is required to test serialization of
17787 # new content and preferred whitespace style.
17789 Lists: Add space after bullets
17796 * <span> baz</span>
17801 <li><span> baz</span></li>
17806 Parsoid: Serialize positional parameters with = in them as named parameter
17812 {{echo|1 = f=oo|2 = bar}}
17814 <!--Orig params with data-parsoid has heuristics for handling = chars-->
17815 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
17816 {{echo|<nowiki>f=oo</nowiki>|bar}}
17818 <p about="#mwt1" typeof="mw:Transclusion"
17819 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
17821 <p about="#mwt1" typeof="mw:Transclusion"
17822 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
17824 <!--Orig params with data-parsoid has heuristics for handling = chars-->
17825 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
17826 <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>
17830 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
17846 <div>a<p>b</p></div>
17854 #-----------------------------
17855 # I/B quote minimization tests
17856 #-----------------------------
17859 1. I/B quote minimization: wikitext-only tags should be combined
17879 <p><i>A</i><i>B</i></p>
17880 <p><b>A</b><b>B</b></p>
17881 <p><i>A</i><b><i>B</i></b></p>
17882 <p><b>A</b><i><b>B</b></i></p>
17883 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
17884 <p><i><b>A</b></i><i><b>B</b></i></p>
17885 <p><i><b>A</b></i><b><i>B</i></b></p>
17886 <p><b><i>A</i></b><i><b>B</b></i></p>
17890 2. I/B quote minimization: wikitext and html tags should not be combined
17896 ''A'''''<i>B</i>'''
17898 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
17899 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
17903 3. I/B quote minimization: templated content stops minimization
17907 ''A''{{echo|''B''}}
17909 ''A''{{echo|'''''B'''''}}
17911 <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>
17912 <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>
17916 4. I/B quote minimization: new content should be mimimized with adjacent old content
17926 <p><i>A</i><i data-parsoid='{}'>B</i></p>
17927 <p><b data-parsoid='{}'>A</b><b>B</b></p>
17928 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
17931 # -----------------------------------------------------------------
17932 # End of section for Parsoid-only html2wt tests for serialization
17934 # -----------------------------------------------------------------
17941 Try for 100% code coverage