1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well formdness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-only test (not run by PHP parser)
25 # php php-only test (not run by the parsoid parser)
26 # showtitle make the first line the title
27 # comment run through Linker::formatComment() instead of main parser
28 # local format section links in edit comment text as local links
30 # You can also set the following parser properties via test options:
31 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
32 # wgLinkHolderBatchSize, wgRawHtml
34 # For testing purposes, temporary articles can created:
35 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
36 # where '/' denotes a newline.
38 # This is the standard article assumed to exist.
63 MediaWiki:bad image list
65 * [[File:Bad.jpg]] except [[Nasty page]]
99 Template:echo_with_span
105 Template:echo_with_div
117 Template:table_attribs
120 |</noinclude>style="color: red"| Foo
126 {{table_attribs}} || Bar || Baz
130 Template:image_attribs
133 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
161 This is a simple paragraph.
163 <p>This is a simple paragraph.
168 Paragraphs with extra newline spacing
191 Paragraphs with newline spacing with comment lines in between
199 <!--foo--><!--More than 1 comment, still stripped-->
203 <!--foo--> <!----> <!-- bar -->
264 Paragraphs with newline spacing with non-empty white-space lines in between
291 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
299 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
338 Extra newlines: More paragraphs with indented comment
353 Extra newlines followed by heading
368 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
369 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
372 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
377 Extra newlines between heading and content are swallowed
385 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
386 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
393 http://fr.wikipedia.org/wiki/🍺
394 <!-- EasterEgg we love beer, better be able be able to link to it -->
396 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
416 * plain''italic''plain
417 * plain''italic''plain''italic''plain
418 * plain'''bold'''plain
419 * plain'''bold'''plain'''bold'''plain
420 * plain''italic''plain'''bold'''plain
421 * plain'''bold'''plain''italic''plain
422 * plain''italic'''bold-italic'''italic''plain
423 * plain'''bold''bold-italic''bold'''plain
424 * plain'''''bold-italic'''italic''plain
425 * plain'''''bold-italic''bold'''plain
426 * plain''italic'''bold-italic'''''plain
427 * plain'''bold''bold-italic'''''plain
428 * plain l'''italic''plain
429 * plain l''''bold''' plain
432 </li><li> plain<i>italic</i>plain
433 </li><li> plain<i>italic</i>plain<i>italic</i>plain
434 </li><li> plain<b>bold</b>plain
435 </li><li> plain<b>bold</b>plain<b>bold</b>plain
436 </li><li> plain<i>italic</i>plain<b>bold</b>plain
437 </li><li> plain<b>bold</b>plain<i>italic</i>plain
438 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
439 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
440 </li><li> plain<i><b>bold-italic</b>italic</i>plain
441 </li><li> plain<b><i>bold-italic</i>bold</b>plain
442 </li><li> plain<i>italic<b>bold-italic</b></i>plain
443 </li><li> plain<b>bold<i>bold-italic</i></b>plain
444 </li><li> plain l'<i>italic</i>plain
445 </li><li> plain l'<b>bold</b> plain
450 # this example taken from the simple/Moon article
452 Italics and possessives
454 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
456 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
461 ### 2-quote opening sequence tests
464 Italics and bold: 2-quote opening sequence: (2,2)
474 Italics and bold: 2-quote opening sequence: (2,3)
484 Italics and bold: 2-quote opening sequence: (2,4)
494 Italics and bold: 2-quote opening sequence: (2,5) (php)
503 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
505 Italics and bold: 2-quote opening sequence: (2,5) (parsoid)
517 ### 3-quote opening sequence tests
521 Italics and bold: 3-quote opening sequence: (3,2)
531 Italics and bold: 3-quote opening sequence: (3,3)
541 Italics and bold: 3-quote opening sequence: (3,4)
551 Italics and bold: 3-quote opening sequence: (3,5) (php)
560 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
562 Italics and bold: 3-quote opening sequence: (3,5) (parsoid)
574 ### 4-quote opening sequence tests
578 Italics and bold: 4-quote opening sequence: (4,2)
588 Italics and bold: 4-quote opening sequence: (4,3)
598 Italics and bold: 4-quote opening sequence: (4,4)
608 Italics and bold: 4-quote opening sequence: (4,5) (php)
617 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
619 Italics and bold: 4-quote opening sequence: (4,5) (parsoid)
625 <p>'<b>foo<i></i></b>
631 ### 5-quote opening sequence tests
635 Italics and bold: 5-quote opening sequence: (5,2) (php)
644 # Parsoid reverses the nesting order, compared to the PHP parser
646 Italics and bold: 5-quote opening sequence: (5,2) (parsoid)
658 Italics and bold: 5-quote opening sequence: (5,3)
668 Italics and bold: 5-quote opening sequence: (5,4)
672 <p><i><b>foo'</b></i>
678 Italics and bold: 5-quote opening sequence: (5,5)
687 ### multiple quote sequences in a line
690 Italics and bold: multiple quote sequences: (2,4,2)
694 <p><i>foo'<b>bar</b></i>
700 Italics and bold: multiple quote sequences: (2,4,3)
704 <p><i>foo'<b>bar</b></i>
710 Italics and bold: multiple quote sequences: (2,4,4)
714 <p><i>foo'<b>bar'</b></i>
720 Italics and bold: multiple quote sequences: (3,4,2) (php)
729 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
731 Italics and bold: multiple quote sequences: (3,4,2) (parsoid)
737 <p><b>foo'</b>bar<i></i>
743 Italics and bold: multiple quote sequences: (3,4,3) (php)
752 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
754 Italics and bold: multiple quote sequences: (3,4,3) (parsoid)
760 <p><b>foo'</b>bar<b></b>
765 ### other quote tests
768 Italics and bold: other quote tests: (2,3,5)
770 ''this is about '''foo's family'''''
772 <p><i>this is about <b>foo's family</b></i>
778 Italics and bold: other quote tests: (2,(3,3),2)
780 ''this is about '''foo's''' family''
782 <p><i>this is about <b>foo's</b> family</i>
788 Italics and bold: other quote tests: (3,2,3,2)
790 '''this is about ''foo'''s family''
792 <p><b>this is about <i>foo</i></b><i>s family</i>
797 # The Parsoid team believes the PHP parser's output on this test is wrong.
798 # It only checks for convert-to-bold-on-single-character-word when the word
799 # matches with a bold tag ("'''") that is *odd* in the list of quote tokens.
800 # This means that the bold token in position 2 (0-indexed) gets converted by
801 # parsoid, but doesn't get changed by the PHP parser.
803 Italics and bold: other quote tests: (3,2,3,3) (php)
807 '''this is about ''foo'''s family'''
809 <p>'<i>this is about </i>foo<b>s family</b>
812 # This is the output the Parsoid team believes to be correct.
814 Italics and bold: other quote tests: (3,2,3,3) (parsoid)
818 '''this is about ''foo'''s family'''
820 <p><b>this is about <i>foo'</i>s family</b>
826 Italics and bold: other quote tests: (3,(2,2),3)
828 '''this is about ''foo's'' family'''
830 <p><b>this is about <i>foo's</i> family</b>
836 Italicized possessive
838 The ''[[Main Page]]'''s talk page.
840 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
845 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
846 (Requires tidy for PHP parser output to be fixed up)
848 parsoid=wt2html,wt2wt
856 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
857 <td><i>a</i></td><td><i>b</i></td></tr>
866 Non-html5 tags should be accepted
868 <center>''foo''</center>
871 <strike>''foo''</strike>
874 <center><i>foo</i></center>
875 <p><big><i>foo</i></big>
876 <font><i>foo</i></font>
877 <strike><i>foo</i></strike>
883 <wbr> is valid wikitext (bug 52468)
891 # <strike> is HTML4, <s> is HTML4/5.
893 <s> or <strike> for strikethrough
895 <strike>strike</strike>
899 <p><strike>strike</strike>
905 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
907 <b→> doesn't work! </b>
909 <bä> doesn't work! </b>
911 <boo> works fine </b>
919 <p><b→> doesn't work! </b>
920 </p><p><bä> doesn't work! </b>
921 </p><p><boo> works fine </b>
922 </p><p><s.foo>foo</s>
923 </p><p><s.foo>s.foo</s.foo>
924 </p><p><sub-ID#1>
929 ### Special characters
933 Bare pipe character (bug 52363)
942 Bare pipe character from a template (bug 52363)
951 ### <nowiki> test cases
955 <nowiki> unordered list
957 <nowiki>* This is not an unordered list item.</nowiki>
959 <p>* This is not an unordered list item.
966 <nowiki>Lorem ipsum dolor
987 :There is not nowiki.
988 :There is <nowiki>nowiki</nowiki>.
990 #There is not nowiki.
991 #There is <nowiki>nowiki</nowiki>.
993 *There is not nowiki.
994 *There is <nowiki>nowiki</nowiki>.
996 <dl><dd>There is not nowiki.
997 </dd><dd>There is nowiki.
999 <ol><li>There is not nowiki.
1000 </li><li>There is nowiki.
1002 <ul><li>There is not nowiki.
1003 </li><li>There is nowiki.
1009 Entities inside <nowiki>
1011 <nowiki><</nowiki>
1018 Entities inside template parameters
1024 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}'>–</span>
1032 Comments and Indent-Pre
1034 <!-- comment 1 --> asdf
1036 <!-- comment 1 --> asdf
1039 <!-- comment 1 --> asdf
1040 <!-- comment 2 -->xyz
1042 <!-- comment 1 --> asdf
1043 <!-- comment 2 --> xyz
1099 asdf<!-- comment 1 -->jkl
1109 <!-- foo --> b <!-- bar -->
1123 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1129 Comment semantics and delimiters
1131 <!-- --><!----><!-----><!------>
1137 Comment semantics and delimiters, redux
1139 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1140 -- foo -- funky huh? ... -->
1146 Comment semantics and delimiters: directors cut
1148 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1149 everything starting with < followed by !-- until the first -- and > we see,
1150 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1158 Comment semantics: nesting
1160 <!--<!-- no, we're not going to do anything fancy here -->-->
1167 Comment semantics: unclosed comment at end
1169 <!--This comment will run out to the end of the document
1175 Comment in template title
1184 Comment on its own line post-expand
1196 Comment on its own line post-expand with non-significant whitespace
1208 ### paragraph wrapping tests
1222 Block tag on one line
1234 Block tag on both lines
1246 Multiple lines without block tags
1264 Empty lines between lines with block tags
1294 ### Preformatted text
1303 And a [[Main Page|link]]
1309 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1314 Ident preformatting with inline content
1325 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1342 Regression with preformatted in <center>
1356 Bug 6200: Preformatted in <blockquote>
1370 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1387 Bug 15491: <ins>/<del> in blockquote
1390 Foo <del>bar</del> <ins>baz</ins> quux
1394 <p>Foo <del>bar</del> <ins>baz</ins> quux
1400 # Note that the p-wrapping is newline sensitive, which could be
1401 # considered a bug: tidy will wrap only the 'Foo' in the example
1402 # below in a <p> tag. (see comment 23-25 of bug #6200)
1404 Bug 15491: <ins>/<del> in blockquote (2)
1406 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1409 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1415 <pre> with attributes (bug 3202)
1417 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1419 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1424 <pre> with width attribute (bug 3202)
1426 <pre width="8">Narrow screen goodies</pre>
1428 <pre width="8">Narrow screen goodies</pre>
1433 <pre> with forbidden attribute (bug 3202)
1435 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1437 <pre width="8">Narrow screen goodies</pre>
1442 Entities inside <pre>
1451 <pre> with forbidden attribute values (bug 3202)
1453 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1455 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1460 <nowiki> inside <pre> (bug 13238)
1468 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1476 <pre><nowiki>Foo</nowiki></pre>
1481 <nowiki> and <pre> preference (first one wins)
1512 </pre> inside nowiki
1514 <nowiki></pre></nowiki>
1521 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1529 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1539 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1551 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1572 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1576 {{echo| foo}}{{echo| bar}}
1581 {{echo|<!--cmt--> foo}}
1583 <!--cmt-->{{echo| foo}}
1585 {{echo|{{echo| }}bar}}
1603 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1640 Templates: Single-line variant of parameter whitespace stripping test
1646 {{echo|{{echo| a}}}}
1648 {{echo|1={{echo| a}}}}
1661 Templates: Strip whitespace from named parameters, but not positional ones
1689 Templates: Dont strip whitespace from whitespace/comment-only arguments
1693 {{echo| <!--cmt--> }}
1700 Templates: Parsoid parameter escaping test 1
1704 {{echo|[foo]|{{echo|[bar]}}}}
1706 <p about="#mwt1" typeof="mw:Transclusion"
1707 data-mw="{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}">[foo]</p>
1711 Parsoid: Pipes in external links in template parameter
1715 {{echo|[{{echo|http://example.com}} link]}}
1717 <p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw="{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}">link</a></p>
1721 Parsoid: pipe in transclusion parameter
1725 {{echo|http://foo.com/a|b}}
1727 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1728 typeof="mw:Transclusion"
1729 data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a|b"}},"i":0}'>http://foo.com/a|b</a></p>
1733 Parsoid: Pipe in external link target and content in template parameter
1735 parsoid=html2wt,wt2wt
1737 {{echo|[http://foo.com/a|b a|b]}}
1739 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1740 typeof="mw:Transclusion"
1741 data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},
1742 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}'>a|b</a></p>
1746 Templates: Dont escape already nowiki-escaped text in template parameters
1748 parsoid=html2wt,wt2wt
1750 {{echo|foo<nowiki>|</nowiki>bar}}
1751 {{echo|<nowiki><div></nowiki>}}
1752 {{echo|<nowiki></nowiki>}}
1754 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"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>
1755 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"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>
1756 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}'></span>
1761 ### Parsoid-centric tests for testing RT edge cases for pre
1765 1a. Indent-Pre and Comments
1778 1b. Indent-Pre and Comments
1791 1c. Indent-Pre and Comments
1804 1d. Indent-Pre and Comments
1805 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
1818 2a. Indent-Pre and tables
1839 2b. Indent-Pre and tables
1855 2c. Indent-Pre and tables (bug 42252)
1872 3a. Indent-Pre and block tags (single-line html)
1880 <pre><span> foo </span>
1885 3b. Indent-Pre and block tags (pre-content on separate line)
1938 4. Multiple spaces at start-of-line
1957 5. White-space in indent-pre
1958 NOTE: the white-space char on 2nd line is significant
1971 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
1994 7a. Indent-pre and category links
1996 parsoid=wt2html,wt2wt
1998 [[Category:foo]] <!-- No pre-wrapping -->
1999 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2001 <span typeof="mw:Transclusion"> </span>
2005 7b. Indent-pre and category links
2007 parsoid=wt2html,wt2wt
2010 [[Category:foo]] {{echo|b}}
2012 <pre> a <span typeof="mw:Transclusion">b</span>
2017 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2021 HTML-pre: 1. embedded newlines
2057 HTML-pre: 2: indented text
2070 HTML-pre: 3: other wikitext
2091 ### Definition lists
2098 <dl><dt> name </dt><dd> Definition
2104 Definition list for indentation only
2108 <dl><dd> Indented text
2114 Definition list with no space
2118 <dl><dt>name</dt><dd>Definition
2124 Definition list with URL link
2126 ; http://example.com/ : definition
2128 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt><dd> definition
2134 Definition list with bracketed URL link
2136 ;[http://www.example.com/ Example]:Something about it
2138 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt><dd>Something about it
2144 Definition list with wikilink containing colon
2146 ; [[Help:FAQ]]: The least-read page on Wikipedia
2148 <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
2153 # At Brion's and JeLuF's insistence... :)
2155 Definition list with news link containing colon
2157 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2159 <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!
2165 Malformed definition list with colon
2167 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2169 <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
2175 Definition lists: colon in external link text
2177 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2179 <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
2185 Definition lists: colon in HTML attribute
2187 ;<b style="display: inline">bold</b>
2189 <dl><dt><b style="display: inline">bold</b>
2195 Definition lists: self-closed tag
2197 ;one<br/>two : two-line fun
2199 <dl><dt>one<br />two </dt><dd> two-line fun
2205 Bug 11748: Literal closing tags
2209 <dd>test test test test test</dd>
2211 <dd>test test test test test</dd>
2216 <dd>test test test test test</dd>
2218 <dd>test test test test test</dd>
2224 Definition and unordered list using wiki syntax nested in unordered list using html tags.
2227 ; term : description
2233 <dl><dt> term </dt><dd> description
2244 Definition list with empty definition and following paragraph
2249 <dl><dt> term</dt><dd>
2256 Nested definition lists using html syntax
2273 Definition Lists: No nesting: Multiple dd's
2287 Definition Lists: Indentation: Regular
2303 Definition Lists: Indentation: Missing 1st level
2317 Definition Lists: Indentation: Multi-level indent
2321 <dl><dd><dl><dd><dl><dd>i3
2329 Definition Lists: Hacky use to indent tables
2336 should be left alone
2338 <dl><dd><dl><dd><table>
2343 </td></tr></table></dd></dl></dd></dl>
2345 should be left alone
2348 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
2349 ## as an empty dt item. It also ignores all but the last ";" when followed
2350 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
2351 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
2354 ## Ex: ";;t2 ::d2" is transformed into:
2366 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
2367 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
2378 ## All Parsoid only definition list tests have this difference.
2380 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
2381 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
2384 Table / list interaction: indented table with lists in table contents
2406 </td></tr></table></dd></dl>
2411 Table / list interaction: lists nested in tables nested in indented lists
2436 </td></tr></table></dd></dl>
2444 Definition Lists: Nesting: Multi-level (Parsoid only)
2474 Definition Lists: Nesting: Test 2 (Parsoid only)
2494 Definition Lists: Nesting: Test 3 (Parsoid only)
2522 Definition Lists: Nesting: Test 4
2527 <dl><dd><dl><dd><dl><dt>t3
2536 ## The Parsoid team believes the following three test exposes a
2537 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
2538 ## wrong to close the <dl> after the <dt> containing the <ul>.)
2540 Definition Lists: Mixed Lists: Test 1 (php)
2548 <dl><dd><dl><dt><ul><li> foo
2558 Definition Lists: Mixed Lists: Test 1 (parsoid)
2566 <dl><dd><dl><dt><ul><li> foo
2567 </li></ul></dt><dd><ul><li> bar
2568 </li></ul></dd><dt> baz</dt></dl></dd></dl>
2572 Definition Lists: Mixed Lists: Test 2
2586 Definition Lists: Mixed Lists: Test 3
2591 <ul><li><dl><dd><dl><dd><dl><dd> d1
2602 Definition Lists: Mixed Lists: Test 4
2607 <ul><li><dl><dt>d1 </dt><dd>d2
2608 </dd><dt>d3 </dt><dd>d4
2616 Definition Lists: Mixed Lists: Test 5
2631 Definition Lists: Mixed Lists: Test 6
2636 <ol><li><ul><li><dl><dd>d1
2648 Definition Lists: Mixed Lists: Test 7
2662 Definition Lists: Mixed Lists: Test 8
2678 Definition Lists: Mixed Lists: Test 9
2682 <ul><li><dl><dt>foo </dt><dd>bar
2690 Definition Lists: Mixed Lists: Test 10
2694 <ul><li><ol><li><dl><dt>foo </dt><dd>bar
2701 # The Parsoid team disagrees with the PHP parser's seemingly-random
2702 # rules regarding dd/dt on the next two tests. Parsoid is more
2703 # consistent, and recognizes the shared nesting and keeps the
2704 # still-open tags around until the nesting is complete.
2707 Definition Lists: Mixed Lists: Test 11 (php)
2714 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt><dd><ul><li><dl><dt><dl><dt>bar
2719 <dl><dt>boo </dt><dd>baz
2728 Definition Lists: Mixed Lists: Test 11 (parsoid)
2750 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2751 <dd data-parsoid='{"stx":"row"}'>bar</dd></dl></dt></dl></li></ul></dt>
2752 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2753 <dd data-parsoid='{"stx":"row"}'>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
2758 Definition Lists: Weird Ones: Test 1 (php)
2762 *#;*::;; foo : bar (who uses this?)
2764 <ul><li><ol><li><dl><dt> foo </dt><dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)
2776 Definition Lists: Weird Ones: Test 1 (parsoid)
2780 *#;*::;; foo : bar (who uses this?)
2797 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2798 <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>
2805 External links: non-bracketed
2807 Non-bracketed: http://example.com
2809 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2814 External links: numbered
2816 Numbered: [http://example.com]
2817 Numbered: [http://example.net]
2818 Numbered: [http://example.com]
2820 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
2821 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
2822 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
2827 External links: specified text
2829 Specified text: [http://example.com link]
2831 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
2836 External links: trail
2838 Linktrails should not work for external links: [http://example.com link]s
2840 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
2845 External links: dollar sign in URL
2847 http://example.com/1$2345
2849 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
2854 External links: dollar sign in URL (named)
2856 [http://example.com/1$2345]
2858 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
2863 External links: open square bracket forbidden in URL (bug 4377)
2865 http://example.com/1[2345
2867 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
2872 External links: open square bracket forbidden in URL (named) (bug 4377)
2874 [http://example.com/1[2345]
2876 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
2881 External links: nowiki in URL link text (bug 6230)
2883 [http://example.com/ <nowiki>''example site''</nowiki>]
2885 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
2890 External links: newline forbidden in text (bug 6230 regression check)
2892 [http://example.com/ first
2895 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
2901 External links: Pipe char between url and text
2903 [http://example.com | link]
2905 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
2910 External links: protocol-relative URL in brackets
2912 [//example.com/ Test]
2914 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
2919 External links: protocol-relative URL in brackets without text
2923 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
2928 External links: protocol-relative URL in free text is left alone
2932 <p>//example.com/Foo
2937 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
2939 foo//example.com/Foo
2941 <p>foo//example.com/Foo
2948 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2950 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2955 External image from https
2957 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2959 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2964 External image (when not allowed)
2966 wgAllowExternalImages=0
2968 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2970 <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>
2975 Link to non-http image, no img tag
2977 Link to non-http image, no img tag: ftp://example.com/test.jpg
2979 <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>
2984 External links: terminating separator
2986 Terminating separator: http://example.com/thing,
2988 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
2993 External links: intervening separator
2995 Intervening separator: http://example.com/1,2,3
2997 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
3002 External links: old bug with URL in query
3004 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
3006 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
3011 External links: old URL-in-URL bug, mixed protocols
3013 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
3015 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
3020 External links: URL in text
3022 URL in text: [http://example.com http://example.com]
3024 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3029 External links: Clickable images
3031 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
3033 <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>
3038 External links: raw ampersand
3040 Old & use: http://x&y
3042 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3047 External links: encoded ampersand
3049 Old & use: http://x&y
3051 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3056 External links: encoded equals (bug 6102)
3058 http://example.com/?foo=bar
3060 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
3065 External links: [raw ampersand]
3067 Old & use: [http://x&y]
3069 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3074 External links: [encoded ampersand]
3076 Old & use: [http://x&y]
3078 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3083 External links: [encoded equals] (bug 6102)
3085 [http://example.com/?foo=bar]
3087 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3092 External links: [IDN ignored character reference in hostname; strip it right off]
3094 [http://e‌xample.com/]
3096 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
3100 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
3101 # Where an external link could easily circumvent the sanitization of the text of
3102 # a link like this (where an IDN-ignore character is in the URL somewhere), this
3103 # test demands a higher standard. That's a bit strange.
3107 # http://example.com -> [http://example.com|http://example.com]
3108 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
3110 # The first example is sanitized, but the second is not. Any security benefits
3111 # from this production are trivial to circumvent. Either remove this test and
3112 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
3113 # the test accordingly.
3118 External links: IDN ignored character reference in hostname; strip it right off
3120 http://e‌xample.com/
3122 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
3127 External links: www.jpeg.org (bug 554)
3131 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
3136 External links: URL within URL (original bug 2)
3138 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
3140 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
3145 BUG 361: URL inside bracketed URL
3147 [http://www.example.com/foo http://www.example.com/bar]
3149 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
3154 BUG 361: URL within URL, not bracketed
3156 http://www.example.com/foo?=http://www.example.com/bar
3158 <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>
3163 BUG 289: ">"-token in URL-tail
3165 http://www.example.com/<hello>
3167 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
3172 BUG 289: literal ">"-token in URL-tail
3174 http://www.example.com/<b>html</b>
3176 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
3181 BUG 289: ">"-token in bracketed URL
3183 [http://www.example.com/<hello> stuff]
3185 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
3190 BUG 289: literal ">"-token in bracketed URL
3192 [http://www.example.com/<b>html</b> stuff]
3194 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
3199 BUG 289: literal double quote at end of URL
3201 http://www.example.com/"hello"
3203 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
3208 BUG 289: literal double quote in bracketed URL
3210 [http://www.example.com/"hello" stuff]
3212 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
3217 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
3219 [http://www.example.com test]
3221 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
3226 External links: link text with spaces
3228 [http://www.example.com a b c]
3229 [http://www.example.com ''a'' ''b'']
3231 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
3232 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
3237 External links: wiki links within external link (Bug 3695)
3239 [http://example.com [[wikilink]] embedded in ext link]
3241 <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>
3246 BUG 787: Links with one slash after the url protocol are invalid
3250 [http:/example.com title]
3252 <p>http:/example.com
3253 </p><p>[http:/example.com title]
3258 Bracketed external links with template-generated invalid target
3260 [{{echo|http:/example.com}} title]
3262 <p>[http:/example.com title]
3267 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
3269 ''[http://example.com text'']
3270 [http://example.com '''text]'''
3271 ''Something [http://example.com in italic'']
3272 ''Something [http://example.com mixed''''', even bold]'''
3273 '''''Now [http://example.com both''''']
3275 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
3276 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
3277 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
3278 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
3279 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
3285 Bug 4781: %26 in URL
3287 http://www.example.com/?title=AT%26T
3289 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
3293 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
3294 # % is actually legal in HTML5. Any change in output would need testing though.
3296 Bug 4781, 5267: %25 in URL
3298 http://www.example.com/?title=100%25_Bran
3300 <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>
3305 Bug 4781, 5267: %28, %29 in URL
3307 http://www.example.com/?title=Ben-Hur_%281959_film%29
3309 <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>
3315 Bug 4781: %26 in autonumber URL
3317 [http://www.example.com/?title=AT%26T]
3319 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
3324 Bug 4781, 5267: %26 in autonumber URL
3326 [http://www.example.com/?title=100%25_Bran]
3328 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
3333 Bug 4781, 5267: %28, %29 in autonumber URL
3335 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
3337 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
3343 Bug 4781: %26 in bracketed URL
3345 [http://www.example.com/?title=AT%26T link]
3347 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
3352 Bug 4781, 5267: %26 in bracketed URL
3354 [http://www.example.com/?title=100%25_Bran link]
3356 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
3361 Bug 4781, 5267: %28, %29 in bracketed URL
3363 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
3365 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
3370 External link containing double-single-quotes in text '' (bug 4598 sanity check)
3372 Some [http://example.com/ pretty ''italics'' and stuff]!
3374 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
3379 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
3381 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
3383 <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>
3388 External link containing double-single-quotes with no space separating the url from text in italics
3390 [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]].]
3392 <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>
3397 External link with comments in link text
3399 [http://www.google.com Google <!-- comment -->]
3401 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
3406 URL-encoding in URL functions (single parameter)
3408 {{localurl:Some page|amp=&}}
3410 <p>/index.php?title=Some_page&amp=&
3415 URL-encoding in URL functions (multiple parameters)
3417 {{localurl:Some page|q=?&=&}}
3419 <p>/index.php?title=Some_page&q=?&amp=&
3426 http://example.com/index.php?foozoid%5B%5D=bar
3428 http://example.com/index.php?foozoid[]=bar
3430 <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>
3431 </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>
3436 IPv6 urls (bug 21261)
3440 http://[2404:130:0:1000::187:2]/index.php
3442 <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>
3447 Non-extlinks in brackets
3456 [{{echo|foo}} ''bar'']
3457 [{{echo|foo}}l's] errand
3458 [{{echo|foo}}l's errand]
3460 [url=http://example.com]
3473 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
3478 Parsoid: Percent encoding in external links
3482 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
3484 <p><a rel="mw:ExtLink"
3485 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
3489 Parsoid: use url link syntax for links where the content is equal the link
3496 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
3506 Normal text. '''Bold text.''' Normal text. ''Italic text.''
3508 Normal text. '''''Bold italic text.''''' Normal text.
3510 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
3511 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
3517 Unclosed and unmatched quotes (php)
3521 '''''Bold italic text '''with bold deactivated''' in between.'''''
3523 '''''Bold italic text ''with italic deactivated'' in between.'''''
3527 ..spanning two paragraphs (should not work).'''
3529 '''Bold tag left open
3531 ''Italic tag left open
3535 <!-- Unmatching number of opening, closing tags: -->
3536 '''This year''''s election ''should'' beat '''last year''''s.
3538 ''Tom'''s car is bigger than ''Susan'''s.
3540 Plain ''italic'''s plain
3542 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3543 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
3544 </p><p><b>Bold text..</b>
3545 </p><p>..spanning two paragraphs (should not work).
3546 </p><p><b>Bold tag left open</b>
3547 </p><p><i>Italic tag left open</i>
3549 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3550 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3551 </p><p>Plain <i>italic'</i>s plain
3554 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
3555 # parser strips. The wikitext contains just the first half of the bold
3556 # quote pair. (There's also a case where Parsoid nests <b> and <i>
3557 # differently than the PHP parser.)
3559 Unclosed and unmatched quotes (parsoid)
3563 '''''Bold italic text '''with bold deactivated''' in between.'''''
3565 '''''Bold italic text ''with italic deactivated'' in between.'''''
3569 ..spanning two paragraphs (should not work).'''
3571 '''Bold tag left open
3573 ''Italic tag left open
3577 <!-- Unmatching number of opening, closing tags: -->
3578 '''This year''''s election ''should'' beat '''last year''''s.
3580 ''Tom'''s car is bigger than ''Susan'''s.
3582 Plain ''italic'''s plain
3584 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3585 </p><p><i><b>Bold italic text </b></i><b>with italic deactivated<i> in between.</i></b>
3586 </p><p><b>Bold text..</b>
3587 </p><p>..spanning two paragraphs (should not work).<b></b>
3588 </p><p><b>Bold tag left open</b>
3589 </p><p><i>Italic tag left open</i>
3591 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3592 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3593 </p><p>Plain <i>italic'</i>s plain
3600 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
3603 # This should not produce <table></table> as <table><tr><td></td></tr></table>
3604 # is the bare minimum required by the spec, see:
3605 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
3607 A table with no data. (php)
3614 # Parsoid team replies: empty table tags are legal in HTML5
3616 A table with no data. (parsoid)
3625 # A table with nothing but a caption is invalid XHTML, we might want to render
3626 # this as <p>caption</p>
3628 A table with nothing but a caption (php)
3638 </caption><tr><td></td></tr></table>
3641 # Parsoid team replies: table with only a caption is legal in HTML5
3643 A table with nothing but a caption (parsoid)
3651 <table><caption> caption</caption></table>
3655 A table with caption with default-spaced attributes and a table row
3658 |+ style="color: red;" | caption1
3664 <caption style="color: red;"> caption1
3673 A table with captions with non-default spaced attributes and a table row
3676 |+style="color: red;"|caption2
3677 |+ style="color: red;"| caption3
3683 <caption style="color: red;">caption2
3685 <caption style="color: red;"> caption3
3694 Table td-cell syntax variations
3698 | foo bar foo || baz
3699 | style='color:red;' | baz
3700 | style='color:red;' || baz
3707 <td> foo bar foo </td>
3710 <td style="color:red;"> baz
3712 <td> style='color:red;' </td>
3740 Simple table but with multiple dashes for row wikitext
3758 Multiplication table
3760 {| border="1" cellpadding="2"
3761 |+Multiplication table
3763 ! × !! 1 !! 2 !! 3
3781 <table border="1" cellpadding="2">
3782 <caption>Multiplication table
3829 Accept "||" in table headings
3844 Accept "||" in indented table headings
3854 </th></tr></table></dd></dl>
3859 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
3876 Accept "| !" at start of line in tables (ignore !-attribute)
3880 | !style="color:red" | bar
3892 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 +/-
3896 |style='color:red;'|+1
3897 |style='color:blue;'|-1
3909 <td style="color:red;">+1
3911 <td style="color:blue;">-1
3935 |rowspan=2| Cell 2, row 1 (and 2)
3946 <td rowspan="2"> Cell 2, row 1 (and 2)
3964 {| bgcolor=#ABCDEF border=2
3969 |the original table again
3977 <table bgcolor="#ABCDEF" border="2">
3985 <td>the original table again
3991 Invalid attributes in table cell (bug 1830)
4006 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
4009 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
4013 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
4014 <td>]" onmouseover="alert(document.cookie)">test
4023 Indented table markup mixed with indented pre content (proposed in bug 6200)
4028 Text that should be rendered preformatted
4036 <pre>Text that should be rendered preformatted
4045 Template-generated table cell attributes and cell content
4053 <td style="color: red"> Foo
4059 Template-generated table cell attributes and cell content (2)
4062 |align=center {{table_attribs}}
4067 <td align="center" style="color: red"> Foo
4073 Template-generated table cell attributes and cell content (3)
4076 |align=center {{table_cells}}
4081 <td align="center" style="color: red"> Foo </td>
4089 Table with row followed by newlines and table heading
4107 Table with empty line following the start tag
4124 # FIXME: Preserve the attribute properly (with an empty string as value) in
4125 # the PHP parser. Parsoid implements the behavior below.
4127 Table attributes with empty value
4139 </td></tr></tbody></table>
4144 Wikitext table with a lot of comments
4167 Wikitext table with double-line table cell
4184 Table cell with a single comment
4200 # The expected HTML structure in this test is debatable. The PHP parser does
4201 # not parse this kind of table at all. The main focus for Parsoid is on
4202 # round-tripping, so this output is ok for now. TODO: revisit!
4204 Wikitext table with html-syntax row (Parsoid)
4216 <td>foo</td></tr></tbody></table>
4220 Implicit <td> after a |-
4221 (PHP parser relies on Tidy to add the missing <td> tags)
4223 parsoid=wt2html,wt2wt
4236 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
4237 (PHP parser relies on Tidy to add the missing <td> tags)
4239 parsoid=wt2html,wt2wt
4251 <tr><td><pre>a</pre></td></tr>
4252 <tr><td> b</td></tr>
4258 Lists should be recognized in an implicit <td> context
4259 (PHP parser relies on Tidy to add the missing <td> tags)
4261 parsoid=wt2html,wt2wt
4270 <td><ul><li>a</li></ul></td>
4279 Plain link, capitalized
4283 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
4288 Plain link, uncapitalized
4292 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
4299 [[Main Page|The Main Page]]
4301 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4306 Piped link with comment in link text
4308 [[Main Page|The Main<!--front--> Page]]
4310 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4319 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
4324 Broken link with fragment
4326 [[Zigzagzogzagzig#zug]]
4328 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
4333 Special page link with fragment
4335 [[Special:Version#anchor]]
4337 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
4342 Nonexistent special page link with fragment
4344 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
4346 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
4353 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
4355 <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>
4362 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
4364 <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>!!!
4375 Bug 43661: Piped links with identical prefixes
4377 [[prefixed article|prefixed articles with spaces]]
4379 [[prefixed article|prefixed articlesaoeu]]
4381 [[Main Page|Main Page test]]
4383 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
4384 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
4385 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
4391 Link with HTML entity in suffix / tail
4393 [[Main Page]]", [[Main Page]]a
4395 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
4400 Link with 3 brackets
4409 Piped link with 3 brackets
4411 [[[main page|the main page]]]
4413 <p>[[[main page|the main page]]]
4418 Link with multiple pipes
4420 [[Main Page|The|Main|Page]]
4422 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
4429 [[Talk:Parser testing]], [[Meta:Disclaimers]]
4431 <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>
4436 Piped link to namespace
4438 [[Meta:Disclaimers|The disclaimers]]
4440 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
4447 [[Usually caused by a typo (oops}]]
4449 <p>[[Usually caused by a typo (oops}]]
4454 Link containing % (not as a hex sequence)
4458 <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>
4463 Link containing % as a single hex sequence interpreted to char
4467 <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>
4472 Link containing % as a double hex sequence interpreted to hex sequence
4476 <p>[[7%2525 Solution]]
4481 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
4482 Example for such a section: == < ==
4484 [[%23%3c]][[%23%3e]]
4486 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
4491 Link containing "<#" and ">#" as a hex sequences
4493 [[%3c%23]][[%3e%23]]
4495 <p>[[%3c%23]][[%3e%23]]
4500 Link containing an equals sign
4502 [[Special:BookSources/isbn=4-00-026157-6]]
4504 <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>
4511 Just a test of an article title containing a tilde.
4514 # note that links containing signatures, like [[Foo~~~~]], are
4515 # massaged by the pre-save transform (PST) and so the tildes are never
4516 # seen by the parser.
4518 Link containing a tilde
4522 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
4527 Link containing double-single-quotes '' (bug 4598)
4529 [[Lista d''e paise d''o munno]]
4531 <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>
4536 Link containing double-single-quotes '' in text (bug 4598 sanity check)
4538 Some [[Link|pretty ''italics'' and stuff]]!
4540 <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>!
4545 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
4547 ''Some [[Link|pretty ''italics'' and stuff]]!
4549 <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>
4554 Link with double quotes in title part (literal) and alternate part (interpreted)
4556 [[File:Denys Savchenko ''Pentecoste''.jpg]]
4560 [[''Pentecoste''|Pentecoste]]
4562 [[''Pentecoste''|''Pentecoste'']]
4564 <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>
4565 </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>
4566 </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>
4567 </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>
4572 Broken image links with HTML captions (bug 39700)
4574 [[File:Nonexistent|<script></script>]]
4575 [[File:Nonexistent|100px|<script></script>]]
4576 [[File:Nonexistent|<]]
4577 [[File:Nonexistent|a<i>b</i>c]]
4579 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4580 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4581 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
4582 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
4589 [[http://www.example.com]]
4591 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
4596 Plain link to URL with link text
4598 [[http://www.example.com Link text]]
4600 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
4605 Plain link to protocol-relative URL
4607 [[//www.example.com]]
4609 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
4614 Plain link to protocol-relative URL with link text
4616 [[//www.example.com Link text]]
4618 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
4623 Plain link to page with question mark in title
4629 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
4630 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
4635 # I'm fairly sure the expected result here is wrong.
4636 # We want these to be URL links, not pseudo-pages with URLs for titles....
4637 # However the current output is also pretty screwy.
4640 # I'm changing it to match the current output--it arguably makes more
4641 # sense in the light of the test above. Old expected result was:
4642 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
4644 # But I think this test is bordering on "garbage in, garbage out" anyway.
4649 Piped link to URL: [[http://www.example.com|an example URL]]
4651 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
4656 BUG 2: [[page|http://url/]] should link to page, not http://url/
4658 [[Main Page|http://url/]]
4660 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
4665 BUG 337: Escaped self-links should be bold
4669 [[Bug462]] [[Bug462]]
4671 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
4676 Self-link to section should not be bold
4680 [[Main Page#section]]
4682 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
4693 Self-link to numeric title
4699 <p><strong class="selflink">0</strong>
4704 Link to numeric-equivalent title
4710 <p><a href="/wiki/00" title="00">00</a>
4715 <nowiki> inside a link
4717 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
4719 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
4724 Non-breaking spaces in title
4726 [[ Main Page ]]
4728 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
4733 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
4739 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
4744 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
4750 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
4755 Internal link with en linktrail: no apostrophes (bug 27473)
4761 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
4766 Internal link with ca linktrail with apostrophes (bug 27473)
4772 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
4777 Internal link with kaa linktrail with apostrophes (bug 27473)
4783 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
4794 Internal link with is link prefix
4798 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
4800 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
4811 Internal link with is link trail and link prefix
4815 [[mótmælendatrú|xxx]]ar
4817 mótmælenda[[söfnuður]]
4818 mótmælenda[[söfnuður|söfnuðir]]
4819 mótmælenda[[söfnuður|söfnuðir]]xxx
4821 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
4822 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
4823 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
4824 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
4825 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
4830 Parsoid link trail escaping
4832 parsoid=html2wt,html2html
4836 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
4840 Parsoid link prefix escaping
4843 parsoid=html2wt,html2html
4845 Aðrir mótmælenda<nowiki/>[[söfnuður]]
4847 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
4851 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
4859 [http://wp.org ''foo'']
4861 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
4862 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
4863 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
4864 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
4869 ### Interwiki links (see maintenance/interwiki.sql)
4873 Inline interwiki link
4875 [[MeatBall:SoftSecurity]]
4877 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
4882 Inline interwiki link with empty title (bug 2372)
4886 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
4891 Interwiki link encoding conversion (bug 1636)
4893 *[[Wikipedia:ro:Olteniţa]]
4894 *[[Wikipedia:ro:Olteniţa]]
4896 <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>
4897 </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>
4903 Interwiki link with fragment (bug 2130)
4905 [[MeatBall:SoftSecurity#foo]]
4907 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
4922 Double interlanguage link
4933 Interlanguage link, with prefix links
4945 Double interlanguage link, with prefix links (bug 8897)
4958 Parsoid-specific test: Wikilinks with should RT properly
4964 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
4969 Parsoid: handle constructor well
4977 <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>
4980 <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>
4984 ## Redirects, Parsoid-only
4987 Simple redirect to page
4991 #REDIRECT [[Main Page]]
4993 <link rel="mw:PageProp/redirect" href="./Main_Page">
4997 Optional colon in #REDIRECT
4999 # the colon is archaic syntax. we support it for wt2html, but we
5000 # don't care that it roundtrips back to the modern syntax.
5001 parsoid=wt2html,html2html
5003 #REDIRECT:[[Main Page]]
5005 <link rel="mw:PageProp/redirect" href="./Main_Page">
5009 Whitespace in #REDIRECT with optional colon
5011 # the colon and gratuitous whitespace is archaic syntax. we support
5012 # it for wt2html, but we don't care that it roundtrips back to the
5013 # modern syntax (without extra whitespace)
5014 parsoid=wt2html,html2html
5021 <link rel="mw:PageProp/redirect" href="./Main_Page">
5025 Piped link in #REDIRECT
5027 # content after piped link is ignored. we support this syntax,
5028 # but don't care that the piped link is lost when we roundtrip this.
5031 #REDIRECT [[Main Page|bar]]
5033 <link rel="mw:PageProp/redirect" href="./Main_Page">
5037 Redirect to category
5041 #REDIRECT [[Category:Foo]]
5043 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
5047 Redirect to category with URL encoding
5051 #REDIRECT [[Category%3AFoo]]
5053 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
5057 Redirect to category page
5059 parsoid=wt2html,html2html
5061 #REDIRECT [[:Category:Foo]]
5063 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
5067 Redirect to image page (1)
5071 #REDIRECT [[File:Wiki.png]]
5073 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5077 Redirect to image page (2)
5081 #REDIRECT [[Image:Wiki.png]]
5083 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5087 Redirect to language
5091 #REDIRECT [[en:File:Wiki.png]]
5093 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5097 Redirect to interwiki
5101 #REDIRECT [[meatball:File:Wiki.png]]
5103 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5107 Non-English #REDIRECT
5112 #TILVÍSUN [[Main Page]]
5114 <link rel="mw:PageProp/redirect" href="./Main_Page">
5131 Broken br tag sanitization
5141 # TODO: Fix html2html mode (bug 51055)!
5143 Parsoid: Broken br tag recognition
5153 Incorrecly removing closing slashes from correctly formed XHTML
5155 <br style="clear:both;" />
5157 <p><br style="clear:both;" />
5162 Failing to transform badly formed HTML into correct XHTML
5164 <br style="clear: left;">
5165 <br style="clear: right;">
5166 <br style="clear: both;">
5168 <p><br style="clear: left;" />
5169 <br style="clear: right;" />
5170 <br style="clear: both;" />
5175 Handling html with a div self-closing tag
5184 <p><div title />
5188 <p><div title=bar />
5189 <div title=bar/>
5191 <div title="bar/"></div>
5197 Handling html with a br self-closing tag
5206 <p><br title="title" />
5207 <br title="title" />
5216 Horizontal ruler (should it add that extra space?)
5230 Horizontal ruler -- 4+ dashes render hr
5239 Horizontal ruler -- eats additional dashes on the same line
5248 Horizontal ruler -- does not collapse dashes on consecutive lines
5259 Horizontal ruler -- <4 dashes render as plain text
5268 Horizontal ruler -- Supports content following dashes on same line
5277 ### Block-level elements
5300 <ol><li>Numbered list
5317 ***#Number on level 4
5319 **#Number on level 3
5320 **#Number on level 3
5324 #** Level 3, but ordered
5327 <ol><li> with numbers
5329 <ul><li> and bullets
5331 <ol><li> and numbers
5333 </li><li>bullets again
5334 <ul><li>bullet level 2
5335 <ul><li>bullet level 3
5336 <ol><li>Number on level 4
5339 </li><li>bullet level 2
5340 <ol><li>Number on level 3
5341 </li><li>Number on level 3
5344 <ol><li>number level 2
5347 <ul><li><ul><li> Level 3
5351 <ol><li><ul><li><ul><li> Level 3, but ordered
5385 Nested lists 3 (first element empty)
5398 Nested lists 4 (first element empty)
5411 Nested lists 5 (both elements empty)
5424 Nested lists 6 (both elements empty)
5437 Nested lists 7 (skip initial nesting levels)
5441 <ul><li><ul><li><ul><li> foo
5449 Nested lists 8 (multiple nesting transitions)
5457 <ul><li><ul><li> bar
5467 1. Lists with start-of-line-transparent tokens before bullets: Comments
5481 2. Lists with start-of-line-transparent tokens before bullets: Template close
5493 List items are not parsed correctly following a <pre> block (bug 785)
5499 <ul><li> <pre>foo</pre>
5500 </li><li> <pre>bar</pre>
5507 List items from template
5518 * notSOL{{inner list}}
5537 List interrupted by empty line or heading
5547 <ul><li><ul><li> bar
5550 <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>
5551 <ul><li> Another list item
5557 Multiple list tags generated by templates
5572 Single-comment whitespace lines dont break lists, and so do multi-comment whitespace lines
5575 <!--This line will NOT split the list-->
5577 <!--This line will NOT split the list either-->
5579 <!--foo--> <!----> <!--This line NOT split the list either-->
5592 (Cannot test this with PHP parser since it relies on Tidy for the hack)
5594 parsoid=wt2html,wt2wt
5598 * {{echo|<li>templated li-hack}}
5599 * <!--foo--> <li> unsupported li-hack with preceding comments
5602 <li><li>not a li-hack
5608 <li about="#mwt1" typeof="mw:Transclusion" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>templated li-hack"}}}'>templated li-hack</li>
5609 <li> <!--foo--> </li><li> li-hack with preceding comments</li></ul>
5612 <li></li><li>not a li-hack
5618 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
5629 <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>
5633 Parsoid: Test of whitespace serialization with Templated bullets
5640 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}'> Bar</li>
5644 # ------------------------------------------------------------------------
5645 # The next set of tests are about Parsoid's ability to handle badly nested
5646 # tags (parse, minimize scope of fixup, and roundtrip back)
5647 # ------------------------------------------------------------------------
5650 Unbalanced closing block tags break a list
5651 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5661 </li></ul></div><div>
5667 Unbalanced closing non-block tags don't break a list
5668 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5678 <ul><li>a<span></span>
5684 Unclosed formatting tags that straddle lists are closed and reopened
5685 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5693 </li><li> <s> b </s>
5698 List embedded in a non-block tag
5699 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
5707 <p><small></small></p>
5713 <p><small></small></p>
5720 # Note that the current date is hard-coded as
5721 # 1970-01-01T00:02:03Z (a Thursday)
5722 # when running parser tests. The timezone is also fixed to GMT, so
5723 # local date will be identical to current date.
5726 Magic Word: {{CURRENTDAY}}
5735 Magic Word: {{CURRENTDAY2}}
5744 Magic Word: {{CURRENTDAYNAME}}
5753 Magic Word: {{CURRENTDOW}}
5762 Magic Word: {{CURRENTMONTH}}
5771 Magic Word: {{CURRENTMONTH1}}
5780 Magic Word: {{CURRENTMONTHABBREV}}
5782 {{CURRENTMONTHABBREV}}
5789 Magic Word: {{CURRENTMONTHNAME}}
5791 {{CURRENTMONTHNAME}}
5798 Magic Word: {{CURRENTMONTHNAMEGEN}}
5800 {{CURRENTMONTHNAMEGEN}}
5807 Magic Word: {{CURRENTTIME}}
5816 Magic Word: {{CURRENTHOUR}}
5825 Magic Word: {{CURRENTWEEK}} (@bug 4594)
5834 Magic Word: {{CURRENTYEAR}}
5843 Magic Word: {{CURRENTTIMESTAMP}}
5845 {{CURRENTTIMESTAMP}}
5852 Magic Words LOCAL (UTC)
5856 * {{LOCALMONTHNAME}}
5857 * {{LOCALMONTHNAMEGEN}}
5858 * {{LOCALMONTHABBREV}}
5867 * {{LOCALTIMESTAMP}}
5882 </li><li> 19700101000203
5888 Magic Word: {{FULLPAGENAME}}
5890 title=[[User:Ævar Arnfjörð Bjarmason]]
5894 <p>User:Ævar Arnfjörð Bjarmason
5899 Magic Word: {{FULLPAGENAMEE}}
5901 title=[[User:Ævar Arnfjörð Bjarmason]]
5905 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
5910 Magic Word: {{TALKSPACE}}
5912 title=[[User:Ævar Arnfjörð Bjarmason]]
5921 Magic Word: {{TALKSPACE}}, same namespace
5923 title=[[User talk:Ævar Arnfjörð Bjarmason]]
5932 Magic Word: {{TALKSPACE}}, main namespace
5934 title=[[Parser Test]]
5943 Magic Word: {{TALKSPACEE}}
5945 title=[[User:Ævar Arnfjörð Bjarmason]]
5954 Magic Word: {{SUBJECTSPACE}}
5956 title=[[User talk:Ævar Arnfjörð Bjarmason]]
5965 Magic Word: {{SUBJECTSPACE}}, same namespace
5967 title=[[User:Ævar Arnfjörð Bjarmason]]
5976 Magic Word: {{SUBJECTSPACE}}, main namespace
5978 title=[[Parser Test]]
5986 Magic Word: {{SUBJECTSPACEE}}
5988 title=[[User talk:Ævar Arnfjörð Bjarmason]]
5997 Magic Word: {{NAMESPACE}}
5999 title=[[User:Ævar Arnfjörð Bjarmason]]
6008 Magic Word: {{NAMESPACEE}}
6010 title=[[User:Ævar Arnfjörð Bjarmason]]
6019 Magic Word: {{NAMESPACENUMBER}}
6021 title=[[User:Ævar Arnfjörð Bjarmason]]
6030 Magic Word: {{SUBPAGENAME}}
6032 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
6041 Magic Word: {{SUBPAGENAMEE}}
6043 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
6052 Magic Word: {{ROOTPAGENAME}}
6054 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
6058 <p>Ævar Arnfjörð Bjarmason
6063 Magic Word: {{ROOTPAGENAMEE}}
6065 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
6069 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6074 Magic Word: {{BASEPAGENAME}}
6076 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
6080 <p>Ævar Arnfjörð Bjarmason
6085 Magic Word: {{BASEPAGENAMEE}}
6087 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
6091 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6096 Magic Word: {{TALKPAGENAME}}
6098 title=[[User:Ævar Arnfjörð Bjarmason]]
6102 <p>User talk:Ævar Arnfjörð Bjarmason
6107 Magic Word: {{TALKPAGENAMEE}}
6109 title=[[User:Ævar Arnfjörð Bjarmason]]
6113 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6118 Magic Word: {{SUBJECTPAGENAME}}
6120 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6124 <p>User:Ævar Arnfjörð Bjarmason
6129 Magic Word: {{SUBJECTPAGENAMEE}}
6131 title=[[User talk:Ævar Arnfjörð Bjarmason]]
6133 {{SUBJECTPAGENAMEE}}
6135 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6140 Magic Word: {{NUMBEROFFILES}}
6149 Magic Word: {{PAGENAME}}
6151 title=[[User:Ævar Arnfjörð Bjarmason]]
6155 <p>Ævar Arnfjörð Bjarmason
6160 Magic Word: {{PAGENAME}} with metacharacters
6162 title=[['foo & bar = baz']]
6166 <p><i>'foo & bar = baz'</i>
6171 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
6173 title=[[*RFC 1234 http://example.com/]]
6177 <p>*RFC 1234 http://example.com/
6182 Magic Word: {{PAGENAMEE}}
6184 title=[[User:Ævar Arnfjörð Bjarmason]]
6188 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6193 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
6195 title=[[*RFC 1234 http://example.com/]]
6199 <p>*RFC_1234_http://example.com/
6204 Magic Word: {{REVISIONID}}
6213 Magic Word: {{SCRIPTPATH}}
6222 Magic Word: {{STYLEPATH}}
6231 Magic Word: {{SERVER}}
6235 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
6240 Magic Word: {{SERVERNAME}}
6249 Magic Word: {{SITENAME}}
6258 Case-sensitive magic words, when cased differently, should just be template transclusions
6265 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
6266 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
6267 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
6268 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
6273 Case-insensitive magic words should still work with weird casing.
6283 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
6288 Namespace 1 {{ns:1}}
6297 Namespace 1 {{ns:01}}
6306 Namespace 0 {{ns:0}} (bug 4783)
6314 Namespace 0 {{ns:00}} (bug 4783)
6322 Namespace -1 {{ns:-1}}
6331 Namespace User {{ns:User}}
6340 Namespace User talk {{ns:User_talk}}
6349 Namespace User talk {{ns:uSeR tAlK}}
6358 Namespace File {{ns:File}}
6367 Namespace File {{ns:Image}}
6376 Namespace (lang=de) Benutzer {{ns:User}}
6387 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
6393 <p>Benutzer Diskussion
6401 {{urlencode:hi world?!}}
6402 {{urlencode:hi world?!|WIKI}}
6403 {{urlencode:hi world?!|PATH}}
6404 {{urlencode:hi world?!|QUERY}}
6417 Magic links: internal link to RFC (bug 479)
6421 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
6426 Magic links: RFC (bug 479)
6430 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
6435 Magic links: ISBN (bug 1937)
6439 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
6444 Magic links: PMID incorrectly converts space to underscore
6448 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
6457 Nonexistent template
6459 {{thistemplatedoesnotexist}}
6461 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
6466 Template with invalid target containing tags
6468 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
6470 <p>{{a<b>b</b>|foo|a=b|a = b}}
6475 Template with invalid target containing unclosed tag
6477 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
6479 <p>{{a<b>|foo|a=b|a = b}}</b>
6486 This is a test template
6494 <p>This is a test template
6499 Template with explicit namespace
6503 <p>This is a test template
6511 This is a test template with parameter {{{param}}}
6517 {{paramtest|param=foo}}
6519 <p>This is a test template with parameter foo
6524 Template:paramtestnum
6530 Template unnamed parameter
6532 {{paramtestnum|Main Page|the main page}}
6534 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
6539 Template:templatesimple
6545 Template:templateredirect
6547 #redirect [[Template:templatesimple]]
6551 Template:templateasargtestnum
6557 Template:templateasargtest
6559 {{template{{{templ}}}}}
6563 Template:templateasargtest2
6569 Template with template name as unnamed argument
6571 {{templateasargtestnum|templatesimple}}
6578 Template with template name as argument
6580 {{templateasargtest|templ=simple}}
6587 Template with template name as argument (2)
6589 {{templateasargtest2|templ=templatesimple}}
6596 Template:templateasargtestdefault
6598 {{{{{templ|templatesimple}}}}}
6608 Template with default value
6610 {{templateasargtestdefault}}
6617 Template with default value (value set)
6619 {{templateasargtestdefault|templ=templa}}
6628 {{templateredirect}}
6635 Template with argument in separate line
6637 {{ templateasargtest |
6645 Template with complex template as argument
6648 param ={{ templateasargtest |
6651 <p>This is a test template with parameter (test)
6656 Template with thumb image (with link in description)
6659 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
6661 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>
6666 Template:complextemplate
6668 {{{1}}} {{paramtest|
6669 param ={{{param}}}}}
6673 Template with complex arguments
6676 param ={{ templateasargtest |
6677 templ = simple }}|[[Template:complextemplate|link]]}}
6679 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
6684 BUG 553: link with two variables in a piped link
6687 |[[{{{1}}}|{{{2}}}]]
6692 <td>[[{{{1}}}|{{{2}}}]]
6698 Magic variable as template parameter
6700 {{paramtest|param={{SITENAME}}}}
6702 <p>This is a test template with parameter MediaWiki
6709 [[{{{param}}}|link]]
6713 Template parameter as link source
6715 {{linktest|param=Main Page}}
6717 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
6722 Template-generated attribute string (k='v')
6724 <span {{attr_str|id|v1}}>bar</span>
6726 <p><span id="v1">bar</span>
6733 including another template, {{paramtest|param={{{arg}}}}}
6737 Template passing argument to another template
6739 {{paramtest2|arg='hmm'}}
6741 <p>including another template, This is a test template with parameter 'hmm'
6752 Template as link source
6756 [[{{linktest2}}|Main Page]]
6758 [[{{linktest2}}]]Page
6760 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6761 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6762 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
6780 Template infinite loop
6784 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
6789 Template from main namespace
6808 BUG 529: Template with table, not included at beginning of line
6827 BUG 523: Template shouldn't eat newline (or add an extra one before table)
6847 BUG 41: Template parameters shown as broken links
6856 Template with targets containing wikilinks
6860 {{[[{{echo|foo}}]]}}
6862 {{{{echo|[[foo}}]]}}
6864 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
6865 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
6873 ''None'' of '''this''' should be
6875 but rather passed unmodified
6879 # hmm, fix this or just deprecate msgnw and document its behavior?
6885 {{msgnw:MSGNW test}}
6887 <p>''None'' of '''this''' should be
6889 but rather passed unmodified
6897 {{int:youhavenewmessages|lots of money|not!}}
6899 <p>You have lots of money (not!).
6906 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
6910 <includeonly> and <noinclude> being included
6921 <onlyinclude>Foo</onlyinclude>bar
6925 <onlyinclude> being included
6937 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
6941 <onlyinclude> and <includeonly> being included
6950 <includeonly> and <noinclude> on a page
6952 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
6959 Un-closed <noinclude>
6966 <onlyinclude> on a page
6968 <onlyinclude>Foo</onlyinclude>bar
6975 Un-closed <onlyinclude>
6982 Self-closed noinclude, includeonly, onlyinclude tags
6993 Unbalanced includeonly and noinclude tags
6997 |b</noinclude></noinclude>
6998 |c</noinclude></includeonly>
6999 |d</includeonly></includeonly>
7008 <td>c</includeonly>
7010 <td>d</includeonly></includeonly>
7016 Template:Includeonly section
7019 ==Includeonly section==
7025 Bug 6563: Edit link generation for section shown by <includeonly>
7027 {{includeonly section}}
7029 <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>
7030 <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>
7034 # Uses same input as the contents of [[Template:Includeonly section]]
7036 Bug 6563: Section extraction for section shown by <includeonly>
7041 ==Includeonly section==
7049 Bug 6563: Edit link generation for section suppressed by <includeonly>
7052 ==Includeonly section==
7056 <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>
7061 Bug 6563: Section extraction for section suppressed by <includeonly>
7066 ==Includeonly section==
7074 Un-closed <includeonly>
7080 # TODO: test with DOM fragment reuse!
7082 Parsoid: DOM fragment reuse
7084 parsoid=wt2wt,wt2html
7086 a{{echo|b<table></table>c}}d
7098 a<span typeof="mw:Transclusion">b</span>
7099 <table></table><span>c</span>d
7100 <p typeof="mw:Transclusion">ab</p>
7103 <p typeof="mw:Transclusion">a</p>
7109 ### <includeonly> and <noinclude> in attributes
7112 0. includeonly around the entire attribute
7114 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
7116 <p><span id="v2">bar</span>
7121 1. includeonly in html attr key
7123 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
7125 <p><span id="foo">bar</span>
7130 2. includeonly in html attr value
7132 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
7133 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
7135 <p><span id="v1">bar</span>
7136 <span id="v1">bar</span>
7141 3. includeonly in part of an attr value
7143 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
7145 <p><span style="color:red;">bar</span>
7150 ### Testing parsing of templates where a template arg
7151 ### has the same name as the template itself.
7161 Templates: Template Name/Arg clash: 1. Use of positional param
7170 Templates: Template Name/Arg clash: 2. Use of named param
7179 Templates: Template Name/Arg clash: 3. Use of named param with empty input
7188 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
7192 Templates: 1. Simple use
7201 Templates: 2. Inside a block tag
7203 <div>{{echo|Foo}}</div>
7210 Templates: P-wrapping: 1a. Templates on consecutive lines
7221 Templates: P-wrapping: 1b. Templates on consecutive lines
7235 Templates: P-wrapping: 1c. Templates on consecutive lines
7238 {{echo|bar}} <div>baz</div>
7247 Templates: P-wrapping: 1d. Template preceded by comment-only line
7249 parsoid=wt2html,wt2wt
7255 <p typeof="mw:Transclusion">Bar
7260 Templates: Inline Text: 1. Multiple tmeplate uses
7262 {{echo|Foo}}bar{{echo|baz}}
7269 Templates: Inline Text: 2. Back-to-back template uses
7271 {{echo|Foo}}{{echo|bar}}
7278 Templates: Block Tags: 1. Multiple template uses
7280 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
7282 <div>Foo</div><div>bar</div><div>baz</div>
7287 Templates: Block Tags: 2. Back-to-back template uses
7289 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
7291 <div>Foo</div><div>bar</div>
7296 Templates: Links: 1. Simple example
7298 {{echo|[[Foo|bar]]}}
7300 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7305 Templates: Links: 2. Generation of link href
7307 [[{{echo|Foo}}|bar]]
7309 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7314 Templates: Links: 3. Generation of part of a link href
7316 [[Fo{{echo|o}}|bar]]
7320 [[Foo{{echo|bar}}baz]]
7322 [[Foo{{echo|bar}}|bar]]
7324 [[:Foo{{echo|bar}}]]
7326 [[:Foo{{echo|bar}}|bar]]
7328 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7329 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7330 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
7331 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
7332 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7333 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
7338 Templates: Links: 4. Multiple templates generating link href
7340 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
7342 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
7347 Templates: Links: 5. Generation of link text
7349 [[Foo|{{echo|bar}}]]
7351 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7356 Templates: Links: 5. Nested templates (only outermost template should be marked)
7358 {{echo|[[{{echo|Foo}}|bar]]}}
7360 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
7365 Templates: HTML Tag: 1. Generation of HTML attr. key
7367 <div {{echo|style}}="color:red;">foo</div>
7369 <div style="color:red;">foo</div>
7374 Templates: HTML Tag: 2. Generation of HTML attr. value
7376 <div style={{echo|'color:red;'}}>foo</div>
7378 <div style="color:red;">foo</div>
7383 Templates: HTML Tag: 3. Generation of HTML attr key and value
7385 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
7387 <div style="color:red;">foo</div>
7392 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
7394 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
7396 <div title="This is a long title with just one piece templated">foo</div>
7401 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
7403 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
7405 <div title="This is a long title with just one piece templated">foo</div>
7410 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
7412 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
7414 <div title="This is a long title with just one piece templated">foo</div>
7419 Templates: HTML Tag: 7. Generation of partial attribute key string
7421 <div st{{echo|yle}}="color:red;">foo</div>
7423 <div style="color:red;">foo</div>
7428 Templates: HTML Tables: 1. Generating start of a HTML table
7430 {{echo|<table><tr><td>foo</td>}}</tr></table>
7432 <table><tr><td>foo</td></tr></table>
7437 Templates: HTML Tables: 2a. Generating middle of a HTML table
7439 <table><tr>{{echo|<td>foo</td>}}</tr></table>
7441 <table><tr><td>foo</td></tr></table>
7446 Templates: HTML Tables: 2b. Generating middle of a HTML table
7448 <table>{{echo|<tr><td>foo</td></tr>}}</table>
7450 <table><tr><td>foo</td></tr></table>
7455 Templates: HTML Tables: 3. Generating end of a HTML table
7457 <table><tr>{{echo|<td>foo</td></tr></table>}}
7459 <table><tr><td>foo</td></tr></table>
7464 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
7466 {{echo|<table>}}<tr><td>foo</td></tr></table>
7468 <table><tr><td>foo</td></tr></table>
7473 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
7475 <table>{{echo|<tr>}}<td>foo</td></tr></table>
7477 <table><tr><td>foo</td></tr></table>
7482 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
7484 <table><tr>{{echo|<td>}}foo</td></tr></table>
7486 <table><tr><td>foo</td></tr></table>
7491 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
7493 <table><tr><td>foo{{echo|</td>}}</tr></table>
7495 <table><tr><td>foo</td></tr></table>
7500 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
7502 <table><tr><td>foo</td>{{echo|</tr>}}</table>
7504 <table><tr><td>foo</td></tr></table>
7509 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
7511 <table><tr><td>foo</td></tr>{{echo|</table>}}
7513 <table><tr><td>foo</td></tr></table>
7518 Templates: HTML Tables: 5. Proper fostering of categories from inside
7520 parsoid=wt2html,wt2wt
7522 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
7523 <!--Two categories (Bug 50330)-->
7524 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
7526 <link rel="mw:WikiLink/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
7527 <!--Two categories (Bug 50330)-->
7528 <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>
7532 Templates: Wiki Tables: 1a. Fostering of entire template content
7540 <tr><td></td></tr></table>
7545 Templates: Wiki Tables: 1b. Fostering of entire template content
7558 <tr><td></td></tr></table>
7563 Templates: Wiki Tables: 2. Fostering of partial template content
7573 <tr><td></td></tr></table>
7578 Templates: Wiki Tables: 3. td-content via multiple templates
7581 {{echo|{{pipe}}a}}{{echo|b}}
7592 Templates: Wiki Tables: 4. Templated tags, no content
7598 <tr><td></td></tr></table>
7603 Templates: Wiki Tables: 5. Templated tags, regular td-tags
7617 Templates: Wiki Tables: 6. Templated tags, templated td-tags
7631 Templates: Lists: Multi-line list-items via templates
7633 *{{echo|a {{nonexistent|
7635 *{{echo|b {{nonexistent|
7638 <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>
7639 </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>
7645 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
7647 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
7649 <p><i>ab</i>c<i>d</i>e
7654 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
7655 (PHP parser generates misnested html)
7657 parsoid=wt2html,wt2wt
7659 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
7661 <p><span typeof="mw:Transclusion"><i>a</i></span><i typeof="mw:Transclusion"><span>b</span></i><span>c</span><i>d</i><span>e</span></p>
7665 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
7666 (PHP parser generates misnested html)
7668 parsoid=wt2html,wt2wt
7670 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
7672 <div typeof="mw:Transclusion"><i>a</i></div>
7673 <div typeof="mw:Transclusion"><i>b</i>c<i>d</i></div>
7674 <div typeof="mw:Transclusion">e</div>
7678 Templates: Ugly nesting: 4. Divs opened/closed across templates
7680 a<div>b{{echo|c</div>d}}e
7687 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
7693 |{{echo|foo</table>}}
7697 <table typeof="mw:Transclusion">
7700 <td>foo</td></tr></tbody></table><span>bar</span>
7704 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
7714 <td>1. {{echo|foo </table>}}</td>
7716 <td>2. {{echo|baz </table>}}</td>
7729 <table about="#mwt1" typeof="mw:Transclusion">
7734 <td >1. foo </td></tr></tbody></table></td>
7736 <td >2. baz </td></tr></tbody></table><span about="#mwt1">
7737 </span><span about="#mwt1">
7739 abc</span><span about="#mwt1">
7740 </span><span about="#mwt1">
7741 </span><span about="#mwt1">
7742 </span><span about="#mwt1">
7743 </span><span about="#mwt1">
7745 xyz</span><span about="#mwt1">
7746 </span><span about="#mwt1">
7751 Templates: Ugly templates: 3. newline-only template parameter
7760 # This looks like a bug: a single newline triggers p/br for some reason.
7762 Templates: Ugly templates: 4. newline-only template parameter inconsistency
7773 Parser Functions: 1. Simple example
7782 Parser Functions: 2. Nested use (only outermost should be marked up)
7791 ### Pre-save transform tests
7794 pre-save transform: subst:
7800 This is a test template
7804 pre-save transform: normal template
7814 pre-save transform: nonexistent template
7818 {{thistemplatedoesnotexist}}
7820 {{thistemplatedoesnotexist}}
7825 pre-save transform: subst magic variables
7834 # This is bug 89, which I fixed. -- wtm
7836 pre-save transform: subst: templates with parameters
7840 {{subst:paramtest|param="something else"}}
7842 This is a test template with parameter "something else"
7848 <nowiki>'''not wiki'''</nowiki>
7852 pre-save transform: nowiki in subst (bug 1188)
7856 {{subst:nowikitest}}
7858 <nowiki>'''not wiki'''</nowiki>
7863 Template:commenttest
7865 This template has <!-- a comment --> in it.
7869 pre-save transform: comment in subst (bug 1936)
7873 {{subst:commenttest}}
7875 This template has <!-- a comment --> in it.
7879 pre-save transform: unclosed tag
7883 <nowiki>'''not wiki'''
7885 <nowiki>'''not wiki'''
7889 pre-save transform: mixed tag case
7893 <NOwiki>'''not wiki'''</noWIKI>
7895 <NOwiki>'''not wiki'''</noWIKI>
7899 pre-save transform: unclosed comment in <nowiki>
7903 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
7905 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
7908 # Leading @ in this template definition works around a limitation
7909 # in parsoid's parserTests which otherwise strips the <span> from the
7910 # result (confusing it for a template wrapper)
7914 @<span onmouseover="alert('crap')">Oh no</span>
7918 (confirming safety of fix for subst bug 1936)
7920 {{Template:dangerous}}
7922 <p>@<span>Oh no</span>
7927 pre-save transform: comment containing gallery (bug 5024)
7931 <!-- <gallery>data</gallery> -->
7933 <!-- <gallery>data</gallery> -->
7937 pre-save transform: comment containing extension
7941 <!-- <tag>data</tag> -->
7943 <!-- <tag>data</tag> -->
7947 pre-save transform: comment containing nowiki
7951 <!-- <nowiki>data</nowiki> -->
7953 <!-- <nowiki>data</nowiki> -->
7957 pre-save transform: <noinclude> in subst (bug 3298)
7967 pre-save transform: <onlyinclude> in subst (bug 3298)
7979 {{<includeonly>subst:</includeonly>Includes}}
7983 Template:SafeSubstTest
7985 {{<includeonly>safesubst:</includeonly>Includes}}
7989 bug 22297: safesubst: works during PST
7993 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
7999 bug 22297: safesubst: works during normal parse
8008 subst: does not work during normal parse
8012 <p>{{subst:Includes}}
8017 pre-save transform: context links ("pipe trick")
8021 [[Article (context)|]]
8024 [[Bar:Article (context)|]]
8025 [[:Bar:Article (context)|]]
8027 [[|Article (context)]]
8031 [[Article (context)|Article]]
8032 [[Bar:Article|Article]]
8033 [[:Bar:Article|Article]]
8034 [[Bar:Article (context)|Article]]
8035 [[:Bar:Article (context)|Article]]
8037 [[Article (context)]]
8038 [[Bar:X (Y) Z|X (Y) Z]]
8039 [[:Bar:X (Y) Z|X (Y) Z]]
8043 pre-save transform: context links ("pipe trick") with interwiki prefix
8047 [[interwiki:Article|]]
8048 [[:interwiki:Article|]]
8049 [[interwiki:Bar:Article|]]
8050 [[:interwiki:Bar:Article|]]
8052 [[interwiki:Article|Article]]
8053 [[:interwiki:Article|Article]]
8054 [[interwiki:Bar:Article|Bar:Article]]
8055 [[:interwiki:Bar:Article|Bar:Article]]
8059 pre-save transform: context links ("pipe trick") with parens in title
8061 pst title=[[Somearticle (context)]]
8065 [[Article (context)|Article]]
8069 pre-save transform: context links ("pipe trick") with comma in title
8071 pst title=[[Someplace, Somewhere]]
8074 [[Otherplace, Elsewhere|]]
8075 [[Otherplace, Elsewhere, Anywhere|]]
8077 [[Otherplace, Somewhere|Otherplace]]
8078 [[Otherplace, Elsewhere|Otherplace]]
8079 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
8083 pre-save transform: context links ("pipe trick") with parens and comma
8085 pst title=[[Someplace (IGNORED), Somewhere]]
8088 [[Otherplace (place), Elsewhere|]]
8090 [[Otherplace, Somewhere|Otherplace]]
8091 [[Otherplace (place), Elsewhere|Otherplace]]
8095 pre-save transform: context links ("pipe trick") with comma and parens
8097 pst title=[[Who, me? (context)]]
8100 [[Me, Myself, and I (1937 song)|]]
8102 [[Yes, you. (context)|Yes, you.]]
8103 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
8107 pre-save transform: context links ("pipe trick") with namespace
8109 pst title=[[Ns:Somearticle]]
8113 [[Ns:Article|Article]]
8117 pre-save transform: context links ("pipe trick") with namespace and parens
8119 pst title=[[Ns:Somearticle (context)]]
8123 [[Ns:Article (context)|Article]]
8127 pre-save transform: context links ("pipe trick") with namespace and comma
8129 pst title=[[Ns:Somearticle, Context, Whatever]]
8133 [[Ns:Article, Context, Whatever|Article]]
8137 pre-save transform: context links ("pipe trick") with namespace, comma and parens
8139 pst title=[[Ns:Somearticle, Context (context)]]
8143 [[Ns:Article (context)|Article]]
8147 pre-save transform: context links ("pipe trick") with namespace, parens and comma
8149 pst title=[[Ns:Somearticle (IGNORED), Context]]
8153 [[Ns:Article, Context|Article]]
8157 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
8161 [[Article(context)|]]
8162 [[Bar:Article(context)|]]
8163 [[:Bar:Article(context)|]]
8164 [[|Article(context)]]
8168 [[Article(context)|Article]]
8169 [[Bar:Article(context)|Article]]
8170 [[:Bar:Article(context)|Article]]
8171 [[Article(context)]]
8173 [[:Bar:X(Y)Z|X(Y)Z]]
8177 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
8181 [[Article (context)|]]
8182 [[Bar:Article (context)|]]
8183 [[:Bar:Article (context)|]]
8184 [[|Article (context)]]
8188 [[Article (context)|Article]]
8189 [[Bar:Article (context)|Article]]
8190 [[:Bar:Article (context)|Article]]
8191 [[Article (context)]]
8192 [[Bar:X (Y) Z|X (Y) Z]]
8193 [[:Bar:X (Y) Z|X (Y) Z]]
8197 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
8201 [[Article(context)|]]
8202 [[Bar:Article(context)|]]
8203 [[:Bar:Article(context)|]]
8204 [[|Article(context)]]
8208 [[Article(context)|Article]]
8209 [[Bar:Article(context)|Article]]
8210 [[:Bar:Article(context)|Article]]
8211 [[Article(context)]]
8213 [[:Bar:X(Y)Z|X(Y)Z]]
8217 pre-save transform: context links ("pipe trick") with commas (bug 21660)
8221 [[Article (context), context|]]
8222 [[Article (context),context|]]
8223 [[Bar:Article (context), context|]]
8224 [[Bar:Article (context),context|]]
8225 [[:Bar:Article (context), context|]]
8226 [[:Bar:Article (context),context|]]
8228 [[Article (context), context|Article]]
8229 [[Article (context),context|Article]]
8230 [[Bar:Article (context), context|Article]]
8231 [[Bar:Article (context),context|Article]]
8232 [[:Bar:Article (context), context|Article]]
8233 [[:Bar:Article (context),context|Article]]
8237 pre-save transform: trim trailing empty lines
8241 Empty lines are trimmed
8247 Empty lines are trimmed
8251 pre-save transform: Signature expansion
8256 * <noinclude>~~~</noinclude>
8257 * <includeonly>~~~</includeonly>
8258 * <onlyinclude>~~~</onlyinclude>
8260 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
8261 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
8262 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
8263 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
8268 pre-save transform: Signature expansion in nowiki tags (bug 93)
8274 <nowiki>~~~~</nowiki>
8276 <includeonly><nowiki>~~~~</nowiki></includeonly>
8278 <noinclude><nowiki>~~~~</nowiki></noinclude>
8280 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
8282 {{subst:Foo}} shall be converted to FOO
8284 As well as inside noinclude/onlyinclude
8285 <noinclude>{{subst:Foo}}</noinclude>
8286 <onlyinclude>{{subst:Foo}}</onlyinclude>
8288 But not inside includeonly
8289 <includeonly>{{subst:Foo}}</includeonly>
8293 <nowiki>~~~~</nowiki>
8295 <includeonly><nowiki>~~~~</nowiki></includeonly>
8297 <noinclude><nowiki>~~~~</nowiki></noinclude>
8299 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
8301 FOO shall be converted to FOO
8303 As well as inside noinclude/onlyinclude
8304 <noinclude>FOO</noinclude>
8305 <onlyinclude>FOO</onlyinclude>
8307 But not inside includeonly
8308 <includeonly>{{subst:Foo}}</includeonly>
8312 Parsoid: Recognize nowiki with trailing space in tags
8316 <nowiki ><div>[[foo]]</nowiki >
8324 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
8331 Parsoid: Recognize nowiki with odd capitalization
8335 <noWikI ><div>[[foo]]</Nowiki >
8337 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
8342 Parsoid: Escape nowiki with trailing space in tags
8346 <nowiki > foo </nowiki >
8352 <p><nowiki > foo </nowiki ></p>
8353 <p>a<nowiki />b</p>
8354 <p>c<nowiki/ >d</p>
8358 Parsoid: Escape weird noWikI capitalizations
8362 <noWikI > foo </NoWikI >
8364 <p><noWikI > foo </NoWikI ></p>
8368 ### Message transform tests
8371 message transform: magic variables
8381 message transform: should not transform wiki markup
8391 message transform: <noinclude> in transcluded template (bug 4926)
8401 message transform: <onlyinclude> in transcluded template (bug 4926)
8411 {{#special:}} page name, known
8415 {{#special:Recentchanges}}
8417 Special:RecentChanges
8421 {{#special:}} page name with subpage, known
8425 {{#special:Recentchanges/param}}
8427 Special:RecentChanges/param
8431 {{#special:}} page name, unknown
8435 {{#special:foobar nonexistent}}
8437 Special:Foobar nonexistent
8441 {{#speciale:}} page name, known
8445 {{#speciale:Recentchanges}}
8447 Special:RecentChanges
8451 {{#speciale:}} page name with subpage, known
8455 {{#speciale:Recentchanges/param}}
8457 Special:RecentChanges/param
8461 {{#speciale:}} page name, unknown
8465 {{#speciale:foobar nonexistent}}
8467 Special:Foobar_nonexistent
8473 ### For Parsoid-specific tests, see
8474 #### http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
8481 [[Image:foobar.jpg]]
8483 <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>
8488 Simple image (parsoid)
8492 [[Image:foobar.jpg]]
8494 <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>
8499 Simple image (using File: namespace, now canonical) (php)
8505 <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>
8510 Simple image (using File: namespace, now canonical) (parsoid)
8516 <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>
8521 Right-aligned image (php)
8525 [[Image:foobar.jpg|right]]
8527 <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>
8532 Right-aligned image (parsoid)
8536 [[File:Foobar.jpg|right]]
8538 <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>
8542 Image with caption (php)
8546 [[File:Foobar.jpg|right|Caption text]]
8548 <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>
8553 Image with caption (parsoid)
8557 [[File:Foobar.jpg|right|Caption text]]
8559 <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>
8563 Image with empty attribute (php)
8567 [[File:Foobar.jpg|right||Caption text]]
8569 <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>
8574 Image with empty attribute (parsoid)
8578 [[File:Foobar.jpg|right||Caption text]]
8580 <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>
8584 Image with attributes from template (php)
8588 [[File:Foobar.jpg|{{image_attribs}}]]
8590 <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>
8595 Image with attributes from template (parsoid)
8599 [[File:Foobar.jpg|{{image_attribs}}]]
8601 <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>
8605 Image with link tails (php)
8609 123[[File:Foobar.jpg]]456
8610 123[[File:Foobar.jpg|right]]456
8611 123[[File:Foobar.jpg|thumb]]456
8613 <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
8615 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
8616 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
8621 Image with link tails (parsoid)
8625 123[[File:Foobar.jpg]]456
8626 123[[File:Foobar.jpg|right]]456
8627 123[[File:Foobar.jpg|thumb]]456
8629 <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>
8630 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
8631 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
8635 Image with multiple captions -- only last one is accepted (php)
8639 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8641 <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>
8646 Image with multiple captions -- only last one is accepted (parsoid)
8650 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8652 <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>
8656 Image with width attribute at different positions (php)
8660 [[File:Foobar.jpg|200px|right|Caption]]
8661 [[File:Foobar.jpg|right|200px|Caption]]
8662 [[File:Foobar.jpg|right|Caption|200px]]
8664 <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>
8665 <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>
8666 <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>
8671 Image with width attribute at different positions (parsoid)
8675 [[File:Foobar.jpg|200px|right|Caption]]
8676 [[File:Foobar.jpg|right|200px|Caption]]
8677 [[File:Foobar.jpg|right|Caption|200px]]
8679 <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>
8680 <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>
8681 <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>
8685 Image with link parameter, wiki target (php)
8689 [[File:Foobar.jpg|link=Main Page]]
8691 <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>
8696 Image with link parameter, wiki target (parsoid)
8700 [[File:Foobar.jpg|link=Main Page]]
8702 <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>
8706 Image with link parameter, URL target (php)
8710 [[File:Foobar.jpg|link=http://example.com/]]
8712 <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>
8716 # parsoid bug 49293 (part 1)
8718 Image with link parameter, URL target (parsoid)
8722 [[File:Foobar.jpg|link=http://example.com/]]
8724 <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>
8728 Image with link parameter, protocol-less URL target (php)
8732 [[File:Foobar.jpg|link=//example.com/]]
8734 <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>
8738 # parsoid bug 49293 (part 2)
8740 Image with link parameter, protocol-less URL target (parsoid)
8744 [[File:Foobar.jpg|link=//example.com/]]
8746 <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>
8750 Image with link parameter, wgExternalLinkTarget
8752 [[Image:foobar.jpg|link=http://example.com/]]
8754 wgExternalLinkTarget='foobar'
8756 <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>
8761 Image with link parameter, wgNoFollowLinks set to false
8763 [[Image:foobar.jpg|link=http://example.com/]]
8765 wgNoFollowLinks=false
8767 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8772 Image with link parameter, wgNoFollowDomainExceptions
8774 [[Image:foobar.jpg|link=http://example.com/]]
8776 wgNoFollowDomainExceptions='example.com'
8778 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8783 Image with link parameter, wgExternalLinkTarget, unnamed parameter
8785 [[Image:foobar.jpg|link=http://example.com/|Title]]
8787 wgExternalLinkTarget='foobar'
8789 <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>
8794 Image with empty link parameter (php)
8798 [[File:Foobar.jpg|link=]]
8800 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
8805 Image with empty link parameter (parsoid)
8809 [[File:Foobar.jpg|link=]]
8811 <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>
8815 Image with link parameter (wiki target) and unnamed parameter (php)
8819 [[File:Foobar.jpg|link=Main Page|Title]]
8821 <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>
8826 Image with link parameter (wiki target) and unnamed parameter (parsoid)
8830 [[File:Foobar.jpg|link=Main Page|Title]]
8832 <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>
8836 Image with link parameter (URL target) and unnamed parameter (php)
8840 [[File:Foobar.jpg|link=http://example.com/|Title]]
8842 <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>
8847 Image with link parameter (URL target) and unnamed parameter (parsoid)
8851 [[File:Foobar.jpg|link=http://example.com/|Title]]
8853 <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>
8857 Thumbnail image with link parameter
8861 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
8863 <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>
8868 Manually-specified thumbnail image
8872 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
8874 <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>
8879 Manually-specified thumbnail image with explicit link to wiki page
8883 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
8885 <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>
8890 Manually-specified thumbnail image with explicit link to url
8894 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
8896 <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>
8901 Manually-specified thumbnail image with explicit no link
8905 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
8907 <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>
8912 Manually-specified thumbnail image with explicit link and alt text
8916 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
8918 <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>
8923 Image with frame and link
8925 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
8927 <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>
8932 Image with frame and link and explicit alt
8934 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
8936 <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>
8941 Image with wiki markup in implicit alt
8943 [[Image:Foobar.jpg|testing '''bold''' in alt]]
8945 <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>
8950 Image with wiki markup in explicit alt
8952 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
8954 <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>
8959 Link to image page- image page normally doesn't exists, hence edit link
8960 Add test with existing image page
8961 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
8965 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
8970 bug 18784 Link to non-existent image page with caption should use caption as link text
8972 [[:Image:test|caption]]
8974 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
8979 Frameless image caption with a free URL
8981 [[Image:foobar.jpg|http://example.com]]
8983 <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>
8988 Thumbnail image caption with a free URL
8990 [[Image:foobar.jpg|thumb|http://example.com]]
8992 <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>
8997 Thumbnail image caption with a free URL and explicit alt
8999 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
9001 <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>
9006 SVG thumbnails with no language set
9009 [[File:Foobar.svg|thumb|width=200]]
9011 <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>
9016 SVG thumbnails with language de
9019 [[File:Foobar.svg|thumb|width=200|lang=de]]
9021 <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>
9026 SVG thumbnails with invalid language code
9029 [[File:Foobar.svg|thumb|width=200|lang=invalid.language.code]]
9031 <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>
9036 BUG 1887: A ISBN with a thumbnail
9038 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
9040 <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>
9045 BUG 1887: A RFC with a thumbnail
9047 [[Image:foobar.jpg|thumb|This is RFC 12354]]
9049 <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>
9054 BUG 1887: A mailto link with a thumbnail
9056 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
9058 <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>
9062 # Pending resolution to bug 368
9064 BUG 648: Frameless image caption with a link
9066 [[Image:foobar.jpg|text with a [[link]] in it]]
9068 <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>
9073 BUG 648: Frameless image caption with a link (suffix)
9075 [[Image:foobar.jpg|text with a [[link]]foo in it]]
9077 <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>
9082 BUG 648: Frameless image caption with an interwiki link
9084 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
9086 <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>
9091 BUG 648: Frameless image caption with a piped interwiki link
9093 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
9095 <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>
9100 Escape HTML special chars in image alt text
9102 [[Image:foobar.jpg|& < > "]]
9104 <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>
9109 BUG 499: Alt text should have Ӓ, not &1234;
9111 [[Image:foobar.jpg|♀]]
9113 <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>
9118 Broken image caption with link
9120 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
9122 <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.
9127 Image caption containing another image
9129 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
9131 <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>
9136 Image caption containing a newline
9138 [[Image:Foobar.jpg|This
9141 <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>
9146 Parsoid: Image caption containing leading space
9147 (The leading space should not trigger nowiki escaping in wt2wt mode)
9149 [[Image:Foobar.jpg|thumb| bar]]
9151 <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>
9156 Bug 3090: External links other than http: in image captions
9158 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
9160 <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>
9167 [[Image:foobar.jpg|a|class=b]]
9169 <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>
9174 Localized image handling (1).
9178 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
9180 <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>
9185 Localized image handling (2).
9189 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
9191 <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>
9196 "border", "frameless" and "class" attributes on an image.
9198 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
9200 <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>
9207 #REDIRECT [[File:Barfoo.jpg]]
9213 [[Image:Barfoo.jpg]]
9215 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
9220 Missing image with uploads disabled
9224 [[Image:Foobaz.jpg]]
9226 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
9230 # Parsoid-specific testing for images
9231 # http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
9232 # Currently imperfect due to a flaw in the Parsoid testrunner
9234 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
9238 Parsoid-specific image handling - simple image with size and middle alignment
9242 [[Image:Foobar.jpg|50px|middle]]
9245 <span class="mw-valign-middle" typeof="mw:Image">
9246 <a href="File:Foobar.jpg">
9247 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
9254 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
9258 [[Image:Foobar.jpg|500x10px|baseline|caption]]
9261 <span class="mw-valign-baseline" typeof="mw:Image" data-mw="{"caption":"caption"}">
9262 <a href="File:Foobar.jpg">
9263 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/89px-Foobar.jpg" height="10" width="89">
9270 Parsoid-specific image handling - simple image with border and size spec
9274 [[Image:Foobar.jpg|50px|border|caption]]
9277 <span class="mw-image-border" typeof="mw:Image" data-mw="{"caption":"caption"}">
9278 <a href="File:Foobar.jpg">
9279 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
9286 Parsoid-specific image handling - thumbnail with halign, valign, and caption
9290 [[Image:Foobar.jpg|thumb|left|baseline|caption content]]
9292 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
9293 <a href="File:Foobar.jpg">
9294 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="21" width="180" />
9296 <figcaption>caption content</figcaption>
9301 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
9305 [[Image:Foobar.jpg|thumb|50x50px|right|middle|caption]]
9307 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
9308 <a href="File:Foobar.jpg">
9309 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
9311 <figcaption>caption</figcaption>
9316 Parsoid-specific image handling - framed image with specific size and caption
9320 [[Image:Foobar.jpg|500x50px|frame|caption]]
9322 <figure typeof="mw:Image/Frame">
9323 <a href="File:Foobar.jpg">
9324 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9326 <figcaption>caption</figcaption>
9331 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
9335 [[Image:Foobar.jpg|500x50px|frame|left|baseline|caption]]
9337 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
9338 <a href="File:Foobar.jpg">
9339 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9341 <figcaption>caption</figcaption>
9346 Parsoid-specific image handling - frameless image with specific size, border, and caption
9350 [[Image:Foobar.jpg|frameless|500x50px|border|caption]]
9353 <span class="mw-image-border" typeof="mw:Image/Frameless" data-mw="{"caption":"caption"}">
9354 <a href="File:Foobar.jpg">
9355 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
9361 #Parsoid-specific image handling - simple image with a formatted caption
9365 #[[Image:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
9368 #<span typeof="mw:Image">
9369 #<a class="mw-default-size" href="Image:Foobar.jpg">
9370 #<img alt="Foobar.jpg" class="mw-default-size" src="http://example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
9381 Subpage test/subpage
9389 subpage title=[[Subpage test]]
9393 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
9398 Subpage noslash link
9400 subpage title=[[Subpage test]]
9404 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
9408 # TODO: make this PHP-parser compatible!
9410 Relative subpage noslash link
9412 parsoid=wt2wt,wt2html,html2html
9413 subpage title=[[Subpage test/1/2/3/4]]
9419 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
9420 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
9423 # TODO: make this PHP-parser compatible!
9425 Parsoid: dot-slash prefixed wikilinks
9427 parsoid=wt2wt,wt2html,html2html
9435 <p><a rel="mw:WikiLink" href="./Foo">foo</a></p>
9436 <p><a rel="mw:WikiLink" href="./Bar">bar</a></p>
9437 <p><a rel="mw:WikiLink" href="./Baz/">baz/</a></p>
9445 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
9450 BUG 561: {{/Subpage}}
9452 subpage title=[[Page]]
9456 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
9464 Category:MediaWiki User's Guide
9472 [[:Category:MediaWiki User's Guide]]
9474 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
9483 [[Category:MediaWiki User's Guide]]
9485 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9489 PAGESINCATEGORY invalid title fatal (r33546 fix)
9491 {{PAGESINCATEGORY:<bogus>}}
9498 Category with different sort key
9502 [[Category:MediaWiki User's Guide|Foo]]
9504 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9508 Category with identical sort key
9512 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
9514 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
9518 Category with empty sort key
9523 [[Category:MediaWiki User's Guide|]]
9525 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
9529 Category with empty sort key and parentheses
9534 [[Category:Foo (bar)|]]
9536 [[Category:Foo (bar)|Foo]]
9540 Category with link tail
9545 123[[Category:Foo]]456
9547 123[[Category:Foo]]456
9551 Category with template
9556 [[Category:{{echo|Foo}}]]
9558 [[Category:{{echo|Foo}}]]
9562 Category with template in sort key
9567 [[Category:Foo|{{echo|Bar}}]]
9569 [[Category:Foo|{{echo|Bar}}]]
9573 Category with template in sort key and title
9578 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
9580 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
9584 Category / paragraph interactions
9586 Foo [[Category:Baz]] Bar
9588 Foo [[Category:Baz]]
9596 [[Category:Baz]] Bar
9609 {{echo|[[Category:Baz]]}}
9624 Parsoid: Serialize link to category page with colon escape
9630 [[:Category:Foo|Bar]]
9633 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
9634 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
9639 Parsoid: Link prefix/suffixes aren't applied to category links
9641 parsoid=wt2html,wt2wt,html2html
9646 <p>x<link rel="mw:WikiLink/Category" href="Category:Foo">y</p>
9650 Parsoid: Serialize link to file page with colon escape
9656 [[:File:Foo.png|Bar]]
9659 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
9660 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
9665 Parsoid: Serialize a genuine category link without colon escape
9670 [[Category:Foo|Bar]]
9672 <link rel="mw:WikiLink/Category" href="Category:Foo">
9673 <link rel="mw:WikiLink/Category" href="Category:Foo#Bar">
9677 ### Inter-language links
9680 Inter-language links
9686 [[zh:食品]]
9688 es:Alimento fr:Nourriture zh:食品
9692 Duplicate interlanguage links (bug 24502)
9708 Basic section headings
9715 ===Smaller headline===
9718 <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>
9721 <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>
9724 <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>
9730 Section headings with TOC
9733 === Subheadline 1 ===
9734 ===== Skipping a level =====
9735 ====== Skipping a level ======
9739 ===Another headline===
9741 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9743 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
9745 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
9747 <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>
9749 <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>
9756 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
9758 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
9763 <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>
9764 <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>
9765 <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>
9766 <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>
9767 <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>
9770 <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>
9774 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
9776 Handling of sections up to level 6 and beyond
9779 == Level 2 Heading==
9780 === Level 3 Heading===
9781 ==== Level 4 Heading====
9782 ===== Level 5 Heading=====
9783 ====== Level 6 Heading======
9784 ======= Level 7 Heading=======
9785 ======== Level 8 Heading========
9786 ========= Level 9 Heading=========
9787 ========== Level 10 Heading==========
9789 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9791 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
9793 <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>
9795 <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>
9797 <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>
9799 <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>
9801 <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>
9802 <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>
9803 <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>
9804 <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>
9805 <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>
9818 <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>
9819 <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>
9820 <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>
9821 <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>
9822 <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>
9823 <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>
9824 <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>
9825 <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>
9826 <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>
9827 <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>
9832 TOC regression (bug 9764)
9836 ==== title 1.1.1 ====
9841 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9843 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9845 <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>
9847 <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>
9850 <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>
9853 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
9855 <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>
9860 <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>
9861 <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>
9862 <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>
9863 <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>
9864 <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>
9865 <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>
9870 TOC with wgMaxTocLevel=3 (bug 6204)
9876 ==== title 1.1.1 ====
9881 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9883 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9885 <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>
9886 <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>
9889 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
9891 <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>
9896 <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>
9897 <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>
9898 <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>
9899 <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>
9900 <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>
9901 <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>
9906 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
9912 ====Section 1.1.1====
9913 ====Section 1.1.1.1====
9916 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9918 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
9920 <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>
9923 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
9926 <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>
9927 <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>
9928 <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>
9929 <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>
9930 <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>
9936 Resolving duplicate section names
9941 <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>
9942 <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>
9947 Resolving duplicate section names with differing case (bug 10721)
9952 <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>
9953 <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>
9965 Template with sections, __NOTOC__
9972 <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>
9973 <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>
9974 <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>
9975 <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>
9980 __NOEDITSECTION__ keyword
9986 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
9987 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
9992 Link inside a section heading
9994 ==Section with a [[Main Page|link]] in it==
9996 <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>
10001 TOC regression (bug 12077)
10008 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10010 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
10012 <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>
10015 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
10018 <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>
10019 <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>
10020 <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>
10025 BUG 1219 URL next to image (good)
10027 http://example.com [[Image:foobar.jpg]]
10029 <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>
10034 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
10037 The line above must have a trailing space!
10040 But just in case it doesn't...
10042 <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>
10043 <p>The line above must have a trailing space!
10045 <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>
10046 <p>But just in case it doesn't...
10051 Header with special characters (bug 25462)
10053 The tooltips shall not show entities to the user (ie. be double escaped)
10070 <p>The tooltips shall not show entities to the user (ie. be double escaped)
10072 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10074 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
10075 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
10076 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
10077 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
10078 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
10081 <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>
10084 <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>
10087 <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>
10090 <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>
10093 <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>
10099 Headers with excess '=' characters
10100 (Are similar tests necessary beyond the 1st level?)
10104 =''italic'' heading==
10105 ==''italic'' heading=
10107 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10109 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
10110 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
10111 <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>
10112 <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>
10115 <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>
10116 <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>
10117 <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>
10118 <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>
10123 HTML headers vs TOC (bug 23393)
10124 (__NOEDITSECTION__ for clearer output, doesn't matter here)
10136 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10138 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
10140 <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>
10141 <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>
10144 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
10146 <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>
10147 <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>
10152 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
10153 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
10154 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
10155 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
10156 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
10157 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
10162 BUG 1219 URL next to image (broken)
10164 http://example.com[[Image:foobar.jpg]]
10166 <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>
10171 Bug 1186 news: in the middle of text
10173 http://en.wikinews.org/wiki/Wikinews:Workplace
10175 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
10181 Namespaced link must have a title
10190 Namespaced link must have a title (bad fragment version)
10192 [[Project:#fragment]]
10194 <p>[[Project:#fragment]]
10200 ### HTML tags and HTML attributes
10204 div with no attributes
10206 <div>HTML rocks</div>
10208 <div>HTML rocks</div>
10213 div with double-quoted attribute
10215 <div id="rock">HTML rocks</div>
10217 <div id="rock">HTML rocks</div>
10222 div with single-quoted attribute
10224 <div id='rock'>HTML rocks</div>
10226 <div id="rock">HTML rocks</div>
10231 div with unquoted attribute
10233 <div id=rock>HTML rocks</div>
10235 <div id="rock">HTML rocks</div>
10240 div with illegal double attributes
10242 <div id="a" id="b">HTML rocks</div>
10244 <div id="b">HTML rocks</div>
10248 # FIXME: produce empty string instead of "class" in the PHP parser, following
10251 div with empty attribute value, space before equals
10255 <div class =>HTML rocks</div>
10257 <div class="">HTML rocks</div>
10261 # The PHP parser escapes the opening brace to { for some reason, so
10262 # disabled this test for it.
10264 div with braces in attribute value
10268 <div title="{}">Foo</div>
10270 <div title="{}">Foo</div>
10273 # This it very inconsistent in the PHP parser: it returns
10274 # class="class" if there is a space between the name and the equal sign (see
10275 # 'div with empty attribute value, space before equals'), but strips the
10276 # attribute completely if the space is missing. We hope that not much content
10277 # depends on this, so are implementing the behavior below in Parsoid for
10278 # consistencies' sake. Disabled for the PHP parser.
10279 # FIXME: fix this behavior in the PHP parser?
10281 div with empty attribute value, no space before equals
10285 <div class=>HTML rocks</div>
10287 <div class="">HTML rocks</div>
10292 HTML multiple attributes correction
10294 <p class="error" class="awesome">Awesome!</p>
10296 <p class="awesome">Awesome!</p>
10301 Table multiple attributes correction
10304 !+ class="error" class="awesome"| status
10309 <th class="awesome"> status
10317 <DIV ID="x">HTML ROCKS</DIV>
10319 <div id="x">HTML ROCKS</div>
10324 Non-ASCII pseudo-tags are rendered as text
10333 Pseudo-tag with URL 'name' renders as url link
10335 <http://example.com/>
10337 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
10342 text with amp in the middle of nowhere
10346 <p>Remember AT&T?
10351 text with character entity: eacute
10353 I always thought é was a cute letter.
10355 <p>I always thought é was a cute letter.
10360 text with entity-escaped character entity-like string: eacute
10362 I always thought &eacute; was a cute letter.
10364 <p>I always thought &eacute; was a cute letter.
10369 text with undefined character entity: xacute
10371 I always thought &xacute; was a cute letter.
10373 <p>I always thought &xacute; was a cute letter.
10379 ### Nesting tests (see bug 41545, 50604, 51081)
10382 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
10383 # Note that html2wt is considerably more difficult if we use <b> in
10384 # the test case, instead of <big>
10386 Ensure that HTML adoption agency algorithm is properly implemented.
10388 <big>X<big>Y</big>Z</big>
10390 <p><big>X<big>Y</big>Z</big>
10394 # This was bug 41545 in the PHP parser.
10398 <kbd>X<kbd>Y</kbd>Z</kbd>
10400 <p><kbd>X<kbd>Y</kbd>Z</kbd>
10404 # The following cases were bug 51081 in the PHP parser.
10405 # Note that there are some other nestable tags (b, i, etc) which are
10406 # not covered; see bug 51081 for discussion.
10410 <em>X<em>Y</em>Z</em>
10412 <p><em>X<em>Y</em>Z</em>
10417 Nesting of <strong>
10419 <strong>X<strong>Y</strong>Z</strong>
10421 <p><strong>X<strong>Y</strong>Z</strong>
10430 <p><q>X<q>Y</q>Z</q>
10437 <ruby>X<ruby>Y</ruby>Z</ruby>
10439 <p><ruby>X<ruby>Y</ruby>Z</ruby>
10446 <bdo>X<bdo>Y</bdo>Z</bdo>
10448 <p><bdo>X<bdo>Y</bdo>Z</bdo>
10460 [[Media:Foobar.jpg]]
10462 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
10467 Media link with text
10469 [[Media:Foobar.jpg|A neat file to look at]]
10471 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
10475 # FIXME: this is still bad HTML tag nesting
10477 Media link with nasty text
10478 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
10480 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
10482 <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>
10487 Media link to nonexistent file (bug 1702)
10489 [[Media:No such.jpg]]
10491 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
10496 Image link to nonexistent file (bug 1850 - good)
10498 [[Image:No such.jpg]]
10500 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
10505 :Image link to nonexistent file (bug 1850 - bad)
10507 [[:Image:No such.jpg]]
10509 <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>
10516 Character reference normalization in link text (bug 1938)
10518 [[Main Page|this&that]]
10520 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
10527 Test for unicode normalization
10529 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
10533 (bug 19451) Links should refer to the normalized form.
10541 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10542 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10543 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10544 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10545 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
10550 Empty attribute crash test (bug 2067)
10552 <font color="">foo</font>
10554 <p><font color="">foo</font>
10559 Empty attribute crash test single-quotes (bug 2067)
10561 <font color=''>foo</font>
10563 <p><font color="">foo</font>
10568 Attribute test: equals, then nothing
10570 <font color=>foo</font>
10572 <p><font>foo</font>
10577 Attribute test: unquoted value
10579 <font color=x>foo</font>
10581 <p><font color="x">foo</font>
10586 Attribute test: unquoted but illegal value (hash)
10588 <font color=#x>foo</font>
10590 <p><font color="#x">foo</font>
10595 Attribute test: no value
10597 <font color>foo</font>
10599 <p><font color="color">foo</font>
10604 Bug 2095: link with three closing brackets
10608 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
10613 Bug 2095: link with pipe and three closing brackets
10615 [[Main Page|link]]]
10617 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
10622 Bug 2095: link with pipe and three closing brackets, version 2
10624 [[Main Page|[http://example.com/]]]
10626 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
10636 Template:Dangerous attribute
10638 " onmouseover="alert(document.cookie)
10642 Template:Dangerous style attribute
10644 border-size: expression(alert(document.cookie))
10650 <div style="float: right; {{{1}}}">Magic div</div>
10654 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
10656 <div title="{{test}}"></div>
10658 <div title="This is a test template"></div>
10663 Bug 2304: HTML attribute safety (dangerous template; 2309)
10665 <div title="{{dangerous attribute}}"></div>
10667 <div title=""></div>
10672 Bug 2304: HTML attribute safety (dangerous style template; 2309)
10674 <div style="{{dangerous style attribute}}"></div>
10676 <div style="/* insecure input */"></div>
10681 Bug 2304: HTML attribute safety (safe parameter; 2309)
10683 {{div style|width: 200px}}
10685 <div style="float: right; width: 200px">Magic div</div>
10690 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
10692 {{div style|width: expression(alert(document.cookie))}}
10694 <div style="/* insecure input */">Magic div</div>
10699 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
10701 {{div style|"><script>alert(document.cookie)</script>}}
10703 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
10708 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
10710 {{div style|" ><script>alert(document.cookie)</script>}}
10712 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
10717 Bug 2304: HTML attribute safety (link)
10719 <div title="[[Main Page]]"></div>
10721 <div title="[[Main Page]]"></div>
10726 Bug 2304: HTML attribute safety (italics)
10728 <div title="''foobar''"></div>
10730 <div title="''foobar''"></div>
10735 Bug 2304: HTML attribute safety (bold)
10737 <div title="'''foobar'''"></div>
10739 <div title="'''foobar'''"></div>
10745 Bug 2304: HTML attribute safety (ISBN)
10747 <div title="ISBN 1234567890"></div>
10749 <div title="ISBN 1234567890"></div>
10754 Bug 2304: HTML attribute safety (RFC)
10756 <div title="RFC 1234"></div>
10758 <div title="RFC 1234"></div>
10763 Bug 2304: HTML attribute safety (PMID)
10765 <div title="PMID 1234567890"></div>
10767 <div title="PMID 1234567890"></div>
10772 Bug 2304: HTML attribute safety (web link)
10774 <div title="http://example.com/"></div>
10776 <div title="http://example.com/"></div>
10781 Bug 2304: HTML attribute safety (named web link)
10783 <div title="[http://example.com/ link]"></div>
10785 <div title="[http://example.com/ link]"></div>
10790 Bug 3244: HTML attribute safety (extension; safe)
10792 <div style="<nowiki>background:blue</nowiki>"></div>
10794 <div style="background:blue"></div>
10799 Bug 3244: HTML attribute safety (extension; unsafe)
10801 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
10803 <div style="/* insecure input */"></div>
10807 # More MSIE fun discovered by Tom Gilder
10810 MSIE CSS safety test: spurious slash
10812 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
10814 <div style="/* insecure input */">evil</div>
10819 MSIE CSS safety test: hex code
10821 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
10823 <div style="/* insecure input */">evil</div>
10828 MSIE CSS safety test: comment in url
10830 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
10832 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
10837 MSIE CSS safety test: comment in expression
10839 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
10841 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
10847 Table attribute legitimate extension
10850 !+ style="<nowiki>color:blue</nowiki>"| status
10855 <th style="color:blue"> status
10861 Table attribute safety
10864 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
10869 <th style="/* insecure input */"> status
10875 CSS line continuation 1
10877 <div style="background-image: u\ rl(test.jpg);"></div>
10879 <div style="/* insecure input */"></div>
10884 CSS line continuation 2
10886 <div style="background-image: u\ rl(test.jpg); "></div>
10888 <div style="/* insecure input */"></div>
10899 Expansion of multi-line templates in attribute values (bug 6255)
10901 <div style="background: {{identity|#00FF00}}">-</div>
10903 <div style="background: #00FF00">-</div>
10909 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
10911 <div style="background:
10914 <div style="background: #00FF00">-</div>
10919 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
10921 <div style="background: #00FF00">-</div>
10923 <div style="background: #00FF00">-</div>
10928 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
10931 Parser hook: empty input
10944 Parser hook: empty input using terminated empty elements
10957 Parser hook: empty input using terminated empty elements (space before)
10970 Parser hook: basic input
10984 Parser hook: case insensitive
10998 Parser hook: case insensitive, redux
11011 Parser hook: nested tags
11015 <tag><tag></tag></tag>
11026 Parser hook: basic arguments
11028 <tag width=200 height = "100" depth = '50' square></tag>
11036 'square' => 'square',
11043 Parser hook: argument containing a forward slash (bug 5344)
11045 <tag filename='/tmp/bla'></tag>
11050 'filename' => '/tmp/bla',
11057 Parser hook: empty input using terminated empty elements (bug 2374)
11070 # </tag> should be output literally since there is no matching tag that begins it
11072 Parser hook: basic arguments using terminated empty elements (bug 2374)
11074 <tag width=200 height = "100" depth = '50' square/>
11084 'square' => 'square',
11093 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
11097 Parser hook: static parser hook not inside a comment
11099 <statictag>hello, world</statictag>
11100 <statictag action=flush/>
11108 Parser hook: static parser hook inside a comment
11110 <!-- <statictag>hello, world</statictag> -->
11111 <statictag action=flush/>
11117 # Nested template calls; this case was broken by Parser.php rev 1.506,
11121 Template:One-parameter
11123 (My parameter is: {{{1}}})
11127 Template:Map-one-parameter
11129 {{{{{1}}}|{{{2}}}}}
11133 Nested template calls
11135 {{Map-one-parameter|One-parameter|param}}
11137 <p>(My parameter is: param)
11146 Sanitizer: Closing of open tags
11148 <s></s><table></table>
11150 <s></s><table></table>
11155 Sanitizer: Closing of open but not closed tags
11164 Sanitizer: Closing of closed but not open tags
11173 Sanitizer: Closing of closed but not open table tags
11175 Table not started</td></tr></table>
11177 <p>Table not started</td></tr></table>
11182 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
11184 <span id="æ: v">byte</span>[[#æ: v|backlink]]
11186 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
11191 Sanitizer: Validating the contents of the id attribute (bug 4515)
11197 Something, but definitely not <br id="9" />...
11201 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
11205 <br id="foo" /><br id="foo" />
11207 Something need to be done. foo-2 ?
11211 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
11214 <meta itemprop="hello" content="world">
11215 <meta http-equiv="refresh" content="5">
11216 <meta itemprop="hello" http-equiv="refresh" content="5">
11217 <link itemprop="hello" href="{{SERVER}}">
11218 <link rel="stylesheet" href="{{SERVER}}">
11219 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
11222 <div itemscope="itemscope">
11223 <p> <meta itemprop="hello" content="world" />
11224 <meta http-equiv="refresh" content="5">
11225 <meta itemprop="hello" content="5" />
11227 <link itemprop="hello" href="http://example.org" />
11228 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
11229 <link itemprop="hello" href="http://example.org" />
11235 Language converter: output gets cut off unexpectedly (bug 5757)
11239 this bit is safe: }-
11241 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
11243 then we get cut off here: }-
11245 all additional text is vanished
11247 <p>this bit is safe: }-
11248 </p><p>but if we add a conversion instance: xxx
11249 </p><p>then we get cut off here: }-
11250 </p><p>all additional text is vanished
11255 Self closed html pairs (bug 5487)
11258 <center><font id="bug" />Centered text</center>
11259 <div><font id="bug2" />In div text</div>
11261 <center><font id="bug" />Centered text</center>
11262 <div><font id="bug2" />In div text</div>
11271 Punctuation: nbsp before exclamation
11275 <p>C'est grave !
11280 Punctuation: CSS !important (bug 11874)
11282 <div style="width:50% !important">important</div>
11284 <div style="width:50% !important">important</div>
11289 Punctuation: CSS ! important (bug 11874; with space after)
11291 <div style="width:50% ! important">important</div>
11293 <div style="width:50% ! important">important</div>
11299 HTML bullet list, closed tags (bug 5497)
11314 HTML bullet list, unclosed tags (bug 5497)
11331 HTML ordered list, closed tags (bug 5497)
11346 HTML ordered list, unclosed tags (bug 5497)
11363 HTML nested bullet list, closed tags (bug 5497)
11388 HTML nested bullet list, open tags (bug 5497)
11413 HTML nested ordered list, closed tags (bug 5497)
11438 HTML nested ordered list, open tags (bug 5497)
11463 HTML ordered list item with parameters oddity
11465 <ol><li id="fragment">One</li></ol>
11467 <ol><li id="fragment">One</li></ol>
11472 bug 5918: autonumbering
11474 [http://first/] [http://second] [ftp://ftp]
11478 [mailto:enclosed@mail.tld With target]
11480 [mailto:enclosed@mail.tld]
11482 mailto:inline@mail.tld
11484 <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>
11485 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
11486 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
11487 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
11488 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
11494 # Security and HTML correctness
11495 # From Nick Jenkins' fuzz testing
11499 Fuzz testing: Parser13
11514 Fuzz testing: Parser14
11519 <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>
11520 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11522 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
11529 Fuzz testing: Parser14-table
11534 <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>
11535 <table style="__TOC__">
11541 # Known to produce bogus xml (extra </td>)
11543 Fuzz testing: Parser16
11563 Fuzz testing: Parser21
11566 ! irc://{{ftp://a" onmouseover="alert('hello world');"
11571 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
11581 Fuzz testing: Parser22
11583 http://===r:::https://b
11587 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
11595 # Known to produce bad XML for now
11597 Fuzz testing: Parser24
11604 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
11605 <br style="onmouseover='alert(document.cookie);' " />
11607 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
11612 <u class="|">}}}} >
11613 <br style="onmouseover='alert(document.cookie);'" />
11615 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
11624 # Note: the current result listed for this is not what the original one was,
11625 # but the original bug was JavaScript injection, which is fixed in any case.
11626 # It's not clear that the original result listed was any more correct than the
11627 # current one. Original result:
11630 # <li class="||">
11631 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
11633 Fuzz testing: Parser25 (bug 6055)
11639 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
11641 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
11646 Fuzz testing: URL adjacent extension (with space, clean)
11649 http://example.com <nowiki>junk</nowiki>
11651 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
11656 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
11659 http://example.com<nowiki>junk</nowiki>
11661 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
11666 Fuzz testing: URL adjacent extension (no space, dirty; pre)
11669 http://example.com<pre>junk</pre>
11671 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
11676 Fuzz testing: image with bogus manual thumbnail
11678 [[Image:foobar.jpg|thumbnail= ]]
11680 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
11685 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
11687 <pre dir=" "></pre>
11689 <pre dir=" "></pre>
11694 Parsing optional HTML elements (Bug 6171)
11699 <td> Some tabular data</td>
11700 <td> More tabular data ...
11701 <td> And yet som tabular data</td>
11707 <td> Some tabular data</td>
11708 <td> More tabular data ...
11709 </td><td> And yet som tabular data</td>
11716 Correct handling of <td>, <tr> (Bug 6171)
11721 <td> Some tabular data</td>
11722 <td> More tabular data ...</td>
11723 <td> And yet som tabular data</td>
11729 <td> Some tabular data</td>
11730 <td> More tabular data ...</td>
11731 <td> And yet som tabular data</td>
11739 Parsing crashing regression (fr:JavaScript)
11743 <p></body></x>
11748 Inline wiki vs wiki block nesting
11754 <p><b>Bold paragraph</b>
11755 </p><p>New wiki paragraph
11760 Inline HTML vs wiki block nesting
11768 <p><b>Bold paragraph</b>
11769 </p><p>New wiki paragraph
11773 # Original result was this:
11774 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
11776 # While that might be marginally more intuitive, maybe, the six-apostrophe
11777 # construct is clearly pathological and the result stated here (which is what
11778 # the parser actually does) is about as reasonable as anything.
11780 Mixing markup for italics and bold
11783 '''bold''''''bold''bolditalics'''''
11785 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
11793 Article for special page transclusion test
11797 Special page transclusion
11800 {{Special:Prefixindex/Xyzzyx}}
11802 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11807 Special page transclusion twice (bug 5021)
11810 {{Special:Prefixindex/Xyzzyx}}
11811 {{Special:Prefixindex/Xyzzyx}}
11813 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11814 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11819 Transclusion of default MediaWiki message
11821 {{MediaWiki:Mainpage}}
11828 Transclusion of nonexistent MediaWiki message
11830 {{MediaWiki:Mainpagexxx}}
11832 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
11837 Transclusion of MediaWiki message with underscore
11839 {{MediaWiki:history_short}}
11846 Transclusion of MediaWiki message with space
11848 {{MediaWiki:history short}}
11855 Invalid header with following text
11865 Section extraction test (section 0)
11885 Section extraction test (section 1)
11907 Section extraction test (section 2)
11928 Section extraction test (section 3)
11948 Section extraction test (section 4)
11972 Section extraction test (section 5)
11992 Section extraction test (section 6)
12013 Section extraction test (section 7)
12033 Section extraction test (section 8)
12053 Section extraction test (section 9)
12074 Section extraction test (section 10)
12094 Section extraction test (nonexistent section 11)
12113 Section extraction test with bogus heading (section 1)
12118 ==bogus== not a legal section
12122 ==bogus== not a legal section
12126 Section extraction test with bogus heading (section 2)
12131 ==bogus== not a legal section
12138 Section extraction test with comment after heading (section 1)
12150 Section extraction test with comment after heading (section 2)
12162 Section extraction test with bogus <nowiki> heading (section 1)
12167 ==bogus== <nowiki>not a legal section</nowiki>
12171 ==bogus== <nowiki>not a legal section</nowiki>
12175 Section extraction test with bogus <nowiki> heading (section 2)
12180 ==bogus== <nowiki>not a legal section</nowiki>
12187 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
12188 # instead of respecting commented sections
12190 Section extraction prefixed by comment (section 1)
12201 Section extraction prefixed by comment (section 2)
12212 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
12213 # instead of respecting HTML-style headings
12215 Section extraction, mixed wiki and html (section 1)
12231 Section extraction, mixed wiki and html (section 2)
12247 # Formerly testing for bug 3342
12249 Section extraction, heading surrounded by <noinclude>
12253 <noinclude>==unmarked==</noinclude>
12259 # Test behavior of bug 19910
12261 Sectiion with all-equals
12266 The line above must have a trailing space
12269 But just in case it doesn't...
12273 But just in case it doesn't...
12277 Section replacement test (section 0)
12308 Section replacement test (section 1)
12337 Section replacement test (section 2)
12367 Section replacement test (section 3)
12398 Section replacement test (section 4)
12425 Section replacement test (section 5)
12456 Section replacement test (section 6)
12486 Section replacement test (section 7)
12517 Section replacement test (section 8)
12548 Section replacement test (section 9)
12577 Section replacement test (section 10)
12607 Section replacement test with initial whitespace (bug 13728)
12611 Preformatted initial line
12615 Preformatted initial line
12622 Section extraction, heading followed by pre with 20 spaces (bug 6398)
12634 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
12647 Section extraction, <pre> around bogus header (bug 10309)
12664 Section replacement, <pre> around bogus header (bug 10309)
12666 noxml replace=2,"xxx"
12687 Handling of 
 in URLs
12691 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
12698 5 quotes, code coverage +1 line (php)
12705 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
12707 5 quotes, code coverage +1 line (parsoid)
12713 <p><i><b></b></i></p>
12717 Special:Search page linking.
12721 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
12728 title=[[Parser test]]
12733 * {{FULLPAGENAMEE}}
12735 * {{BASEPAGENAMEE}}
12739 * {{ROOTPAGENAMEE}}
12741 * {{TALKPAGENAMEE}}
12742 * {{SUBJECTPAGENAME}}
12743 * {{SUBJECTPAGENAMEE}}
12746 * {{NAMESPACENUMBER}}
12750 * {{SUBJECTSPACEE}}
12751 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
12753 <ul><li> Parser test
12754 </li><li> Parser_test
12755 </li><li> Parser test
12756 </li><li> Parser_test
12757 </li><li> Parser test
12758 </li><li> Parser_test
12759 </li><li> Parser test
12760 </li><li> Parser_test
12761 </li><li> Parser test
12762 </li><li> Parser_test
12763 </li><li> Talk:Parser test
12764 </li><li> Talk:Parser_test
12765 </li><li> Parser test
12766 </li><li> Parser_test
12774 </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>
12778 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
12788 image4 |300px| centre
12789 image5.svg| http://///////
12794 <ul class="gallery">
12795 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12796 <div style="height: 150px;">Image1.png</div>
12797 <div class="gallerytext">
12800 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12801 <div style="height: 150px;">Image2.gif</div>
12802 <div class="gallerytext">
12807 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12808 <div style="height: 150px;">Image3</div>
12809 <div class="gallerytext">
12812 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12813 <div style="height: 150px;">Image4</div>
12814 <div class="gallerytext">
12819 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12820 <div style="height: 150px;">Image5.svg</div>
12821 <div class="gallerytext">
12822 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
12826 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12827 <div style="height: 150px;">* image6</div>
12828 <div class="gallerytext">
12836 Gallery (with options)
12838 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
12839 File:Nonexistant.jpg|caption
12840 File:Nonexistant.jpg
12841 image:foobar.jpg|some '''caption''' [[Main Page]]
12843 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
12846 <ul class="gallery" style="max-width: 226px;_width: 226px;">
12847 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
12848 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12849 <div style="height: 70px;">Nonexistant.jpg</div>
12850 <div class="gallerytext">
12855 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12856 <div style="height: 70px;">Nonexistant.jpg</div>
12857 <div class="gallerytext">
12860 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12861 <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>
12862 <div class="gallerytext">
12863 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
12867 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12868 <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>
12869 <div class="gallerytext">
12872 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12873 <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>
12874 <div class="gallerytext">
12884 Gallery with wikitext inside caption
12887 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
12888 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
12891 <ul class="gallery">
12892 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12893 <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>
12894 <div class="gallerytext">
12895 <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>
12899 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12900 <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>
12901 <div class="gallerytext">
12902 <p>This is a test template
12911 gallery (with showfilename option)
12913 <gallery showfilename>
12914 File:Nonexistant.jpg|caption
12915 File:Nonexistant.jpg
12916 image:foobar.jpg|some '''caption''' [[Main Page]]
12920 <ul class="gallery">
12921 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12922 <div style="height: 150px;">Nonexistant.jpg</div>
12923 <div class="gallerytext">
12924 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
12929 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12930 <div style="height: 150px;">Nonexistant.jpg</div>
12931 <div class="gallerytext">
12932 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
12936 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12937 <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>
12938 <div class="gallerytext">
12939 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
12940 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
12944 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12945 <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>
12946 <div class="gallerytext">
12947 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
12956 Gallery (with namespace-less filenames)
12959 File:Nonexistant.jpg
12965 <ul class="gallery">
12966 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12967 <div style="height: 150px;">Nonexistant.jpg</div>
12968 <div class="gallerytext">
12971 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12972 <div style="height: 150px;">Nonexistant.jpg</div>
12973 <div class="gallerytext">
12976 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12977 <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>
12978 <div class="gallerytext">
12981 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12982 <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>
12983 <div class="gallerytext">
12991 HTML Hex character encoding (spells the word "JavaScript")
12993 JavaScript
12995 <p>JavaScript
13000 HTML Hex character encoding bogus encoding (bug 26437 regression check)
13004 <p>&#xsee;&#XSEE;
13009 HTML Hex character encoding mixed case
13018 __FORCETOC__ override
13030 ISBN 978-0-1234-56 789
13032 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
13037 ISBN followed by 5 spaces
13048 ISBN ISBN 1234567890
13050 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
13055 Bug 22905: <abbr> followed by ISBN followed by </a>
13057 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
13059 <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>
13068 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
13073 Double RFC with a wiki link
13077 <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>
13086 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
13091 Centre-aligned image
13093 [[Image:foobar.jpg|centre]]
13095 <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>
13102 [[Image:foobar.jpg|none]]
13104 <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>
13109 Width + Height sized image (using px) (height is ignored)
13111 [[Image:foobar.jpg|640x480px]]
13113 <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>
13118 Width-sized image (using px, no following whitespace)
13120 [[Image:foobar.jpg|640px]]
13122 <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>
13127 Width-sized image (using px, with following whitespace - test regression from r39467)
13129 [[Image:foobar.jpg|640px ]]
13131 <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>
13136 Width-sized image (using px, with preceding whitespace - test regression from r39467)
13138 [[Image:foobar.jpg| 640px]]
13140 <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>
13145 Another italics / bold test
13153 # Note the results may be incorrect, as parserTest output included this:
13154 # XML error: Mismatched tag at byte 6120:
13155 # ...<dd> </dt></dl> </dd...
13163 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
13174 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
13176 Images with the "|" character in the comment
13178 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
13180 <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>
13185 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
13187 <html><script>alert(1);</script></html>
13189 <p><html><script>alert(1);</script></html>
13194 HTML with raw HTML ($wgRawHtml==true)
13198 <html><script>alert(1);</script></html>
13200 <p><script>alert(1);</script>
13205 Parents of subpages, one level up
13207 subpage title=[[Subpage test/L1/L2/L3]]
13211 <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>
13217 Parents of subpages, one level up, not named
13219 subpage title=[[Subpage test/L1/L2/L3]]
13223 <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>
13230 Parents of subpages, two levels up
13232 subpage title=[[Subpage test/L1/L2/L3]]
13238 <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
13239 </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>
13244 Parents of subpages, two levels up, without trailing slash or name.
13246 subpage title=[[Subpage test/L1/L2/L3]]
13255 Parents of subpages, two levels up, with lots of extra trailing slashes.
13257 subpage title=[[Subpage test/L1/L2/L3]]
13261 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
13266 Subpage test/L1/L2/L3Sibling
13272 Transclusion of a sibling page (one level up)
13274 subpage title=[[Subpage test/L1/L2/L3]]
13283 Transclusion of a child page
13285 subpage title=[[Subpage test/L1/L2]]
13294 Non-transclusion because of too many up levels
13296 subpage title=[[Subpage test/L1/L2/L3]]
13298 {{../../../../More than parent}}
13300 <p>{{../../../../More than parent}}
13305 Definition list code coverage
13311 <dl><dt> title  </dt><dd> def
13312 </dd><dt> title </dt><dd> def
13313 </dd><dt>title</dt><dd> def
13319 Don't fall for the self-closing div
13321 <div>hello world</div/>
13323 <div>hello world</div>
13332 <p>[[:Template:Msg]]
13341 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
13345 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
13347 Always escape literal '>' in output, not just after '<'
13361 <p>This is a test template
13362 This is a test template
13374 Inclusion of !userCanEdit() content
13378 <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>
13384 Out-of-order TOC heading levels
13393 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13395 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
13397 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
13398 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
13401 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
13403 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
13404 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
13409 <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>
13410 <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>
13411 <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>
13412 <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>
13413 <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>
13414 <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>
13420 ISBN with a dummy number
13430 ISBN with space-delimited number
13434 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
13440 ISBN with multiple spaces, no number
13459 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
13460 </p><p>ISBN 12345678901
13466 ISBN with trailing year (bug 8110)
13468 ISBN 1-234-56789-0 - 2006
13470 ISBN 1 234 56789 0 - 2006
13472 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
13473 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
13481 {{anchorencode:foo bar©#%n}}
13483 <p>foo_bar.C2.A9.23.25n
13488 anchorencode trims spaces
13490 {{anchorencode: __pretty__please__}}
13497 anchorencode deals with links
13499 {{anchorencode: [[hello|world]] [[hi]]}}
13506 anchorencode deals with templates
13508 {{anchorencode: {{Foo}} }}
13515 anchorencode encodes like the TOC generator: (bug 18431)
13517 === _ +:.3A%3A&&]] ===
13518 {{anchorencode: _ +:.3A%3A&&]] }}
13521 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
13522 <p>.2B:.3A.253A.26.26.5D.5D
13527 Bug 6200: blockquotes and paragraph formatting
13548 Bug 8293: Use of center tag ruins paragraph formatting
13569 Parsing of overlapping (improperly nested) inline html tags (PHP parser)
13573 <span><s>x</span></s>
13575 <p><span><s>x</span></s></span>
13580 Parsing of overlapping (improperly nested) inline html tags (Parsoid)
13584 <span><s>x</span></s>
13586 <p><span><s>x</s></span><s></s>
13591 ### Language variants related tests
13594 Self-link in language variants
13596 title=[[Dunav]] language=sr
13598 Both [[Dunav]] and [[Дунав]] are names for this river.
13600 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
13611 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
13613 title=[[Duna]] language=sr
13615 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
13617 <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.
13622 Link to pages in language variants
13626 Main Page can be written as [[Маин Паге]]
13628 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
13634 Multiple links to pages in language variants
13638 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
13640 <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>.
13646 Simple template in language variants
13652 <p>This is a test template
13658 Template with explicit namespace in language variants
13664 <p>This is a test template
13670 Basic test for template parameter in language variants
13674 {{парамтест|param=foo}}
13676 <p>This is a test template with parameter foo
13682 Simple category in language variants
13686 [[Category:МедиаWики Усер'с Гуиде]]
13688 <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>
13705 Don't convert blue categorylinks to another variant (bug 33210)
13709 [[A]][[Category:分类]]
13711 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
13716 Stripping -{}- tags (language variants)
13720 Latin proverb: -{Ne nuntium necare}-
13722 <p>Latin proverb: Ne nuntium necare
13728 Prevent conversion with -{}- tags (language variants)
13730 language=sr variant=sr-ec
13732 Latinski: -{Ne nuntium necare}-
13734 <p>Латински: Ne nuntium necare
13740 Prevent conversion of text with -{}- tags (language variants)
13742 language=sr variant=sr-ec
13744 Latinski: -{Ne nuntium necare}-
13746 <p>Латински: Ne nuntium necare
13752 Prevent conversion of links with -{}- tags (language variants)
13754 language=sr variant=sr-ec
13758 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13764 -{}- tags within headlines (within html for parserConvert())
13766 language=sr variant=sr-ec
13770 <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>
13776 Explicit definition of language variant alternatives
13778 language=zh variant=zh-tw
13780 -{zh:China;zh-tw:Taiwan}-, not China
13782 <p>Taiwan, not China
13788 Conversion around HTML tags
13790 language=sr variant=sr-ec
13792 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
13793 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
13796 <span title="ЛаCтин">ски</span>
13802 Explicit session-wise language variant mapping (A flag and - flag)
13804 language=zh variant=zh-tw
13806 Taiwan is not China.
13807 But -{A|zh:China;zh-tw:Taiwan}- is China,
13808 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
13809 and -{China}- is China.
13811 <p>Taiwan is not China.
13812 But Taiwan is Taiwan,
13813 (This should be stripped!)
13814 and China is China.
13819 Explicit session-wise language variant mapping (H flag for hide)
13821 language=zh variant=zh-tw
13823 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
13826 <p>(This should be stripped!)
13832 Adding explicit conversion rule for title (T flag)
13834 language=zh variant=zh-tw showtitle
13836 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13839 <p>Should be stripped!
13844 Testing that changing the language variant here in the tests actually works
13846 language=zh variant=zh showtitle
13848 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13851 <p>Should be stripped!
13856 Recursive conversion of alt and title attrs shouldn't clear converter state
13858 language=zh variant=zh-cn showtitle
13860 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
13861 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
13865 Should be stripped<span title="Exclamation">!</span>
13870 Bug 24072: more test on conversion rule for title
13872 language=zh variant=zh-tw showtitle
13874 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13875 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
13878 <p>This should be stripped!
13879 This won't take interferes with the title rule.
13884 Partly disable title conversion if variant == main language code
13886 language=zh variant=zh title=[[ZH]] showtitle
13888 -{T|zh-cn:CN;zh-tw:TW}-
13896 Partly disable title conversion if variant == main language code, more
13898 language=zh variant=zh title=[[ZH]] showtitle
13908 Raw output of variant escape tags (R flag)
13910 language=zh variant=zh-tw
13912 Raw: -{R|zh:China;zh-tw:Taiwan}-
13914 <p>Raw: zh:China;zh-tw:Taiwan
13919 Nested using of manual convert syntax
13921 language=zh variant=zh-hk
13923 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
13925 <p>Nested: Hello Hong Kong!
13930 Proper conversion of text in external links
13932 language=sr variant=sr-ec
13934 http://www.google.com
13935 gopher://www.google.com
13936 [http://www.google.com http://www.google.com]
13937 [gopher://www.google.com gopher://www.google.com]
13938 [https://www.google.com irc://www.google.com]
13939 [ftp://www.google.com www.google.com/ftp://dir]
13940 [//www.google.com www.google.com]
13942 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
13943 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
13944 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
13945 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
13946 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
13947 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
13948 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
13953 Do not convert roman numbers to language variants
13955 language=sr variant=sr-ec
13959 <p>Фридрих IV је цар.
13964 Unclosed language converter markup "-{"
13975 Don't convert raw rule "-{R|=>}-" to "=>"
13986 Bug 529: Uncovered bullet
13996 # Plain MediaWiki does not remove empty lists, but tidy actually does.
13997 # Templates in Wikipedia rely on this behavior, as tidy has always been
13998 # enabled there. These tests are normally run *without* tidy, so specify the
13999 # full output here.
14000 # To test realistic parsing behavior, apply a tidy-like transformation to both
14001 # the expected output and your parser's output.
14003 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
14005 ******* Foo {{bullet}}
14007 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
14020 Bug 529: Uncovered table already at line-start
14043 Bug 529: Uncovered bullet in parser function result
14045 * Foo {{lc:{{bullet}} }}
14054 Bug 5678: Double-parsed template argument
14056 {{lc:{{{1}}}|hello}}
14063 Bug 5678: Double-parsed template invocation
14065 {{lc:{{paramtest {{!}} param = hello }} }}
14067 <p>{{paramtest | param = hello }}
14072 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
14075 title=[[Main Page]]
14077 {{PRVNÍVELKÉ:ěščř}}
14078 {{prvnívelké:ěščř}}
14098 Morwen/13: Unclosed link followed by heading
14105 <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>
14110 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
14117 <h1><span class="mw-headline" id="heading">heading</span></h1>
14122 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
14129 <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>
14144 Paragraphs inside divs (no extra line breaks)
14156 Paragraphs inside divs (extra line break on open)
14171 Paragraphs inside divs (extra line break on close)
14186 Paragraphs inside divs (extra line break on open and close)
14203 Nesting tags, paragraphs on lines which begin with <div>
14207 <div></div><strong>A
14216 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
14218 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
14220 <blockquote>Line one
14222 Line two</blockquote>
14224 <blockquote>Line one
14225 Line two</blockquote>
14230 Bug 6200: paragraphs inside blockquotes (extra line break on open)
14235 Line two</blockquote>
14240 Line two</blockquote>
14245 Bug 6200: paragraphs inside blockquotes (extra line break on close)
14247 <blockquote>Line one
14252 <blockquote>Line one
14260 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
14277 Paragraphs inside blockquotes/divs (no extra line breaks)
14279 <blockquote><div>Line one
14281 Line two</div></blockquote>
14283 <blockquote><div>Line one
14284 Line two</div></blockquote>
14289 Paragraphs inside blockquotes/divs (extra line break on open)
14294 Line two</div></blockquote>
14299 Line two</div></blockquote>
14304 Paragraphs inside blockquotes/divs (extra line break on close)
14306 <blockquote><div>Line one
14309 </div></blockquote>
14311 <blockquote><div>Line one
14314 </div></blockquote>
14319 Paragraphs inside blockquotes/divs (extra line break on open and close)
14325 </div></blockquote>
14331 </div></blockquote>
14336 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
14338 wgLinkHolderBatchSize=0
14344 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
14345 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
14346 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
14351 Free external link invading image caption
14353 [[Image:Foobar.jpg|thumb|http://x|hello]]
14355 <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>
14360 Bug 15196: localised external link numbers
14364 [http://en.wikipedia.org/]
14366 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
14371 Multibyte character in padleft
14373 {{padleft:-Hello|7|Æ}}
14380 Multibyte character in padright
14382 {{padright:Hello-|7|Æ}}
14389 formatdate parser function
14391 {{#formatdate:2009-03-24}}
14393 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
14398 formatdate parser function, with default format
14400 {{#formatdate:2009-03-24|mdy}}
14402 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
14407 Spacing of numbers in formatted dates
14409 {{#formatdate:January 15}}
14411 <p><span class="mw-formatted-date" title="01-15">January 15</span>
14416 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
14418 language=nl title=[[MediaWiki:Common.css]]
14420 {{#formatdate:2009-03-24|dmy}}
14422 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
14435 Edit comment with link
14439 I like the [[Main Page]] a lot
14441 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
14445 Edit comment with link and link text
14449 I like the [[Main Page|best pages]] a lot
14451 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
14455 Edit comment with link and link text with suffix
14459 I like the [[Main Page|best page]]s a lot
14461 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
14465 Edit comment with section link (non-local, eg in history list)
14467 comment title=[[Main Page]]
14469 /* External links */ removed bogus entries
14471 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
14475 Edit comment with section link and text before it (non-local, eg in history list)
14477 comment title=[[Main Page]]
14479 pre-comment text /* External links */ removed bogus entries
14481 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>
14485 Edit comment with section link (local, eg in diff view)
14487 comment local title=[[Main Page]]
14489 /* External links */ removed bogus entries
14491 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
14495 Edit comment with subpage link (bug 14080)
14499 title=[[Subpage test]]
14501 Poked at a [[/subpage]] here...
14503 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
14507 Edit comment with subpage link and link text (bug 14080)
14511 title=[[Subpage test]]
14513 Poked at a [[/subpage|neat little page]] here...
14515 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
14519 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
14522 title=[[Subpage test]]
14524 Poked at a [[/subpage]] here...
14526 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
14530 Edit comment with bare anchor link (local, as on diff)
14534 title=[[Main Page]]
14538 <a href="#section">#section</a>
14542 Edit comment with bare anchor link (non-local, as on history)
14545 title=[[Main Page]]
14549 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
14553 Anchor starting with underscore
14557 <p><a href="#_ref">One</a>
14562 Id starting with underscore
14564 <div id="_ref"></div>
14566 <div id="_ref"></div>
14571 Space normalisation on autocomment (bug 22784)
14574 title=[[Main Page]]
14576 /* __hello__world__ */
14578 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
14582 percent-encoding and + signs in comments (Bug 26410)
14586 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
14588 <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>
14592 Bad images - basic functionality
14601 Bad images - bug 16039: text after bad image disappears
14615 Verify that displaytitle works (bug #22501) no displaytitle
14619 wgAllowDisplayTitle=true
14620 wgRestrictDisplayTitle=false
14622 this is not the the title
14625 <p>this is not the the title
14630 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
14635 wgAllowDisplayTitle=true
14636 wgRestrictDisplayTitle=false
14638 this is not the the title
14639 {{DISPLAYTITLE:whatever}}
14642 <p>this is not the the title
14647 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
14652 wgAllowDisplayTitle=true
14653 wgRestrictDisplayTitle=true
14655 this is not the the title
14656 {{DISPLAYTITLE:whatever}}
14659 <p>this is not the the title
14664 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
14669 wgAllowDisplayTitle=true
14670 wgRestrictDisplayTitle=true
14672 this is not the the title
14673 {{DISPLAYTITLE:screen}}
14676 <p>this is not the the title
14681 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
14686 wgAllowDisplayTitle=false
14688 this is not the the title
14689 {{DISPLAYTITLE:screen}}
14692 <p>this is not the the title
14693 <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>
14698 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
14703 wgAllowDisplayTitle=false
14705 this is not the the title
14708 <p>this is not the the title
14713 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
14718 wgAllowDisplayTitle=true
14719 wgRestrictDisplayTitle=true
14721 this is not the the title
14722 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
14724 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
14725 <p>this is not the the title
14730 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
14735 wgAllowDisplayTitle=true
14736 wgRestrictDisplayTitle=true
14738 this is not the the title
14739 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
14741 <span style="color: red;">s</span>creen
14742 <p>this is not the the title
14747 preload: check <noinclude> and <includeonly>
14751 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
14757 preload: check <onlyinclude>
14761 Goodbye <onlyinclude>Hello world</onlyinclude>
14767 preload: can pass tags through if we want to
14771 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
14773 <includeonly>Hello world</includeonly>
14777 preload: check that it doesn't try to do tricks
14781 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
14783 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
14787 Play a bit with r67090 and bug 3158
14791 <div style="width:50% !important"> </div>
14792 <div style="width:50% !important"> </div>
14793 <div style="width:50% !important"> </div>
14794 <div style="border : solid;"> </div>
14796 <div style="width:50% !important"> </div>
14797 <div style="width:50% !important"> </div>
14798 <div style="width:50% !important"> </div>
14799 <div style="border : solid;"> </div>
14804 HTML5 data attributes
14806 <span data-foo="bar">Baz</span>
14807 <p data-abc-def_hij="">Quuz</p>
14809 <p><span data-foo="bar">Baz</span>
14811 <p data-abc-def_hij="">Quuz</p>
14816 percent-encoding and + signs in internal links (Bug 26410)
14818 [[User:+%]] [[Page+title%]]
14819 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
14820 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
14821 [[%33%45]] [[%33%45+]]
14823 <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>
14824 <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>
14825 <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>
14826 <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>
14831 Special characters in embedded file links (bug 27679)
14833 [[File:Contains & ampersand.jpg]]
14834 [[File:Does not exist.jpg|Title with & ampersand]]
14836 <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>
14837 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
14843 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
14845 Text's been normalized?
14847 <p>Text's been normalized?
14852 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
14854 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
14856 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
14861 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
14863 [http://www.example.org/ ideograms]
14865 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
14870 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
14872 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
14874 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
14898 Bug 31098 Template which includes system messages which includes the template
14902 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
14903 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
14908 Bug31490 Turkish: ucfirst 'blah'
14919 Bug31490 Turkish: ucfirst 'ix'
14930 Bug31490 Turkish: lcfirst 'BLAH'
14941 Bug31490 Turkish: ucfırst (with a dotless i)
14947 <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>
14952 Bug31490 ucfırst (with a dotless i) with English language
14958 <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>
14963 Bug 26375: TOC with italics
14965 title=[[Main Page]]
14968 == ''Lost'' episodes ==
14970 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14972 <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>
14975 <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>
14980 Bug 26375: TOC with bold
14982 title=[[Main Page]]
14985 == '''should be bold''' then normal text ==
14987 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14989 <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>
14992 <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>
14997 Bug 33845: Headings become cursive in TOC when they contain an image
14999 title=[[Main Page]]
15002 == Image [[Image:foobar.jpg]] ==
15004 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15006 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
15009 <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>
15014 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
15016 title=[[Main Page]]
15019 == <blockquote>Quote</blockquote> ==
15021 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15023 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
15026 <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>
15031 Unclosed tags in TOC
15033 title=[[Main Page]]
15037 <small>Hanc marginis exiguitas non caperet.</small>
15040 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15042 <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>
15045 <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>
15046 <p><small>Hanc marginis exiguitas non caperet.</small>
15052 Multiple tags in TOC
15055 == <i>Foo</i> <b>Bar</b> ==
15057 == <i>Foo</i> <blockquote>Bar</blockquote> ==
15059 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15061 <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>
15062 <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>
15065 <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>
15066 <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>
15071 Tags with parameters in TOC
15074 == <sup class="in-h2">Hello</sup> ==
15076 == <sup class="a > b">Evilbye</sup> ==
15078 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15080 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
15081 <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>
15084 <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>
15085 <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>
15090 span tags with directionality in TOC
15093 == <span dir="ltr">C++</span> ==
15095 == <span dir="rtl">זבנג!</span> ==
15097 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
15099 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
15101 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
15103 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15105 <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>
15106 <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>
15107 <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>
15108 <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>
15109 <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>
15112 <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>
15113 <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>
15114 <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>
15115 <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>
15116 <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>
15123 == {{int:headline_sample}} ==
15127 Bug 32057: Title needed when expanding <h> nodes.
15129 title=[[Main Page]]
15133 <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>
15138 Strip marker in urlencode
15140 {{urlencode:x<nowiki/>y}}
15141 {{urlencode:x<nowiki/>y|wiki}}
15142 {{urlencode:x<nowiki/>y|path}}
15169 Strip marker in formatNum
15171 {{formatnum:1<nowiki/>2}}
15172 {{formatnum:1<nowiki/>2|R}}
15180 Check noCommafy in formatNum
15184 {{formatnum:123456.78}}
15185 {{formatnum:123456.78|NOSEP}}
15193 Strip marker in grammar
15197 {{grammar:elative|foo<nowiki/>bar}}
15204 Strip marker in padleft
15206 {{padleft:|2|x<nowiki/>y}}
15213 Strip marker in padright
15215 {{padright:|2|x<nowiki/>y}}
15222 Strip marker in anchorencode
15224 {{anchorencode:x<nowiki/>y}}
15231 nowiki inside link inside heading (bug 18295)
15233 ==[[foo|x<nowiki>y</nowiki>z]]==
15235 <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>
15240 new support for bdi element (bug 31817)
15242 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
15244 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
15249 Ignore pipe between table row attributes
15253 |- id=foo | style='color: red'
15261 <tr id="foo" style="color: red">
15268 Gallery override link with WikiLink (bug 34852)
15271 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
15274 <ul class="gallery">
15275 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15276 <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>
15277 <div class="gallerytext">
15287 Gallery override link with absolute external link (bug 34852)
15290 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
15293 <ul class="gallery">
15294 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15295 <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>
15296 <div class="gallerytext">
15306 Gallery override link with malicious javascript (bug 34852)
15309 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
15312 <ul class="gallery">
15313 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15314 <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>
15315 <div class="gallerytext">
15325 Gallery with invalid title as link (bug 43964)
15328 File:foobar.jpg|link=<
15331 <ul class="gallery">
15332 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15333 <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>
15334 <div class="gallerytext">
15342 Language parser function
15351 Padleft and padright as substr
15353 {{padleft:|3|abcde}}
15354 {{padright:|3|abcde}}
15362 Special parser function
15364 {{#special:RandomPage}}
15365 {{#special:BaDtItLe}}
15366 {{#special:Foobar}}
15375 Bug 34939 - Case insensitive link parsing ([HttP://])
15377 [HttP://MediaWiki.Org/]
15379 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
15384 Bug 34939 - Case insensitive link parsing ([HttP:// title])
15386 [HttP://MediaWiki.Org/ MediaWiki]
15388 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
15393 Bug 34939 - Case insensitive link parsing (HttP://)
15395 HttP://MediaWiki.Org/
15397 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
15403 ### Parsoids-specific tests
15404 ### Parsoid-PHP parser incompatibilities
15407 1. SOL-sensitive wikitext tokens as template-args
15409 parsoid=wt2html,wt2wt
15415 <span about="#mwt1" typeof="mw:Transclusion">
15416 </span><ul about="#mwt1"><li>a</li></ul>
15417 <span about="#mwt2" typeof="mw:Transclusion">
15418 </span><ol about="#mwt2"><li>a</li></ol>
15419 <span about="#mwt3" typeof="mw:Transclusion">
15420 </span><dl about="#mwt3"><dd>a</dd></dl>
15423 #### ----------------------------------------------------------------
15424 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
15425 #### tags. Parsoid's output for these tags differs from that of the
15427 #### ----------------------------------------------------------------
15430 Ref: 1. ref-location should be replaced with an index span
15435 B <ref name="x">foo</ref>
15438 <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>
15439 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>
15440 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>
15444 Ref: 2. ref-tags with identical names should all get the same index
15448 A <ref name="x">foo</ref>
15451 <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>
15452 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>
15456 Ref: 3. spaces in ref-names should be ignored
15460 A <ref name="x">foo</ref>
15461 B <ref name=" x " />
15464 <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>
15465 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>
15466 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>
15470 Ref: 4. 'constructor' should be accepted as a valid ref-name
15471 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
15475 A <ref name="constructor">foo</ref>
15477 <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>
15481 Ref: 5. body should accept generic wikitext
15486 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
15491 <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;a&quot;:{&quot;href&quot;:&quot;./Bolded_link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;bolded link&quot;},&quot;stx&quot;:&quot;simple&quot;,&quot;dsr&quot;:[22,37,2,2]}\">bolded link</a></b> and this is a <span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-mw=\"{&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;}}}\" data-parsoid=\"{&quot;src&quot;:&quot;{{echo|transclusion}}&quot;,&quot;dsr&quot;:[55,76,null,null]}\">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>
15493 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
15494 <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='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}}}'>transclusion</span>
15499 Ref: 6. indent-pres should not be output in ref-body
15511 <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>
15513 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
15514 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
15521 Ref: 6. No p-wrapping in ref-body
15540 <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>
15542 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
15543 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
15557 Ref: 8. transclusion wikitext has lower precedence
15561 A <ref> foo {{echo|</ref> B C}}
15565 <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,2,null]}\">{{</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>
15567 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
15568 <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>
15572 Ref: 9. unclosed comments should not leak out of ref-body
15576 A <ref> foo <!--</ref> B C
15580 <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>
15582 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
15583 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li></ol>
15587 Ref: 10. Unclosed HTML tags should not leak out of ref-body
15591 A <ref> <b> foo </ref> B C
15595 <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>
15597 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
15598 <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>
15602 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
15609 <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
15610 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>
15614 Ref: 12. ref-tags act as trailing newline migration barrier
15618 <!--the newline at the end of this line moves out of the p-tag-->a
15620 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
15625 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
15628 <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>
15629 <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>
15636 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
15644 <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
15645 <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>
15649 Ref: 14. A nested ref-tag should be emitted as plain text
15653 <ref>foo <ref>bar</ref> baz</ref>
15657 <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>
15659 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw="{"name":"references","attrs":{}}">
15660 <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>
15664 Ref: 15. ref-tags with identical names should get identical indexes
15668 A1 <ref name="a">foo</ref> A2 <ref name="a" />
15669 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
15673 <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>
15674 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>
15676 <ol about="#mwt10" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references"><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>
15680 References: 1. references tag without any refs should be handled properly
15686 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references"></ol>
15690 References: 2. references tag with group only outputs references from that group
15694 A <ref group="a">foo</ref>
15695 B <ref group="b">bar</ref>
15697 <references group='a' />
15699 <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>
15700 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>
15702 <ol about="#mwt6" class="references" data-mw='{"name":"references","attrs":{"group":"a"}}' typeof="mw:Extension/references"><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
15706 References: 3. ref list should be cleared after processing references
15718 <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>
15720 <ol about="#mwt4" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references"><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
15722 <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>
15724 <ol about="#mwt8" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references"><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> bar</li></ol>
15728 References: 4. only referenced group should be cleared after processing references
15732 A <ref group="a">afoo</ref>
15735 <references group="a"/>
15741 <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>
15742 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>
15744 <ol about="#mwt6" class="references" data-mw='{"name":"references","attrs":{"group":"a"}}' typeof="mw:Extension/references"><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> afoo</li></ol>
15746 <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>
15748 <ol about="#mwt10" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references"><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>
15752 References: 5. ref tags in references should be processed while ignoring all other content
15757 B <ref name="b">bar</ref>
15760 <ref name="a">foo</ref>
15761 This should just get lost.
15764 <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>
15765 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>
15767 <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":"<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>"},"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>
15771 References: 6. <references /> from a transclusion
15775 {{echo|<references />}}
15777 <ol class="references" about="#mwt2" typeof="mw:Transclusion" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}'></ol>
15781 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
15785 A <ref>foo bar for a</ref>
15791 <ref name="b">foo</ref>
15794 <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>
15795 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>
15797 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo bar for a</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> </li></ol>
15799 <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":{}}'><li about="#cite_note-b-1" id="cite_note-b-1"><span rel="mw:referencedBy">↑</span> foo</li></ol>
15803 #### ----------------------------------------------------------------
15804 #### The following section of tests are primarily to test
15805 #### wikitext escaping capabilities of Parsoid. Given that
15806 #### escaping can be done any number of ways, the wikitext (input)
15807 #### is always adjusted to reflect how Parsoid adds nowiki
15810 #### We are marking several tests as parsoid-only since the
15811 #### HTML in the result section is different from what the
15812 #### PHP parser generates for it.
15813 #### ----------------------------------------------------------------
15816 #### --------------- Headings ---------------
15818 #### 1. Nested inside html <h1>=foo=</h1>
15819 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
15820 #### 3. Nested inside html with wikitext split by html tags
15821 #### 4. No escape needed
15822 #### 5. Empty headings <h1></h1>
15823 #### 6. Heading chars in SOL context
15824 #### ----------------------------------------
15826 Headings: 0. Unnested
15830 <nowiki>=foo=</nowiki>
15832 <nowiki> =foo= </nowiki>
15834 <nowiki>=foo=</nowiki>
15836 =foo''a''<nowiki>=</nowiki>
15838 <p><span typeof="mw:Nowiki">=foo=</span></p>
15840 <p><span typeof="mw:Nowiki"> =foo= </span>
15842 <span typeof="mw:Nowiki">=foo=</span></p>
15844 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
15848 Headings: 1. Nested inside html
15852 =<nowiki>=foo=</nowiki>=
15854 ==<nowiki>=foo=</nowiki>==
15856 ===<nowiki>=foo=</nowiki>===
15858 ====<nowiki>=foo=</nowiki>====
15860 =====<nowiki>=foo=</nowiki>=====
15862 ======<nowiki>=foo=</nowiki>======
15864 <h1><span typeof="mw:Nowiki">=foo=</span></h1>
15865 <h2><span typeof="mw:Nowiki">=foo=</span></h2>
15866 <h3><span typeof="mw:Nowiki">=foo=</span></h3>
15867 <h4><span typeof="mw:Nowiki">=foo=</span></h4>
15868 <h5><span typeof="mw:Nowiki">=foo=</span></h5>
15869 <h6><span typeof="mw:Nowiki">=foo=</span></h6>
15873 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
15878 <nowiki>*</nowiki>bar
15884 <nowiki>=bar=</nowiki>
15892 Headings: 3. Nested inside html with wikitext split by html tags
15896 =='''bold'''<nowiki>foo=</nowiki>=
15898 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
15902 Headings: 4a. No escaping needed (testing just h1 and h2)
15920 =<nowiki>=</nowiki>=
15928 <h1><i>=</i>foo=</h1>
15929 <h1><span typeof="mw:Nowiki">=</span></h1>
15933 Headings: 4b. No escaping needed (inside p-tags)
15948 Headings: 5. Empty headings
15960 =====<nowiki/>=====
15962 ======<nowiki/>======
15973 Headings: 6a. Heading chars in SOL context (with trailing spaces)
15977 <nowiki>=a=</nowiki>
15979 <nowiki>=a=</nowiki>
15981 <nowiki>=a=</nowiki>
15983 <nowiki>=a=</nowiki>
15992 Headings: 6b. Heading chars in SOL context (with trailing newlines)
16020 Headings: 6c. Heading chars in SOL context (leading newline break)
16025 <nowiki>=b=</nowiki>
16032 Headings: 6d. Heading chars in SOL context (with interspersed comments)
16036 <!--c0--><nowiki>=a=</nowiki>
16038 <nowiki>=a=</nowiki> <!--c2--> <!--c3-->
16040 <p><!--c0-->=a=</p>
16041 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
16045 Headings: 6d. Heading chars in SOL context (No escaping needed)
16054 #### --------------- Lists ---------------
16055 #### 0. Outside nests (*foo, etc.)
16056 #### 1. Nested inside html <ul><li>*foo</li></ul>
16057 #### 2. Inside definition lists
16058 #### 3. Only bullets at start should be escaped
16059 #### 4. No escapes needed
16060 #### 5. No unnecessary escapes
16061 #### 6. Escape bullets in SOL position
16062 #### 7. Escape bullets in a multi-line context
16063 #### ----------------------------------------
16066 Lists: 0. Outside nests
16068 <nowiki>*</nowiki>foo
16070 <nowiki>#</nowiki>foo
16078 Lists: 1. Nested inside html
16080 *<nowiki>*foo</nowiki>
16082 *<nowiki>#foo</nowiki>
16084 *<nowiki>:foo</nowiki>
16086 *<nowiki>;foo</nowiki>
16088 #<nowiki>*foo</nowiki>
16090 #<nowiki>#foo</nowiki>
16092 #<nowiki>:foo</nowiki>
16094 #<nowiki>;foo</nowiki>
16116 Lists: 2. Inside definition lists
16118 ;<nowiki>;foo</nowiki>
16120 ;<nowiki>:foo</nowiki>
16122 ;<nowiki>:foo</nowiki>
16125 :<nowiki>:foo</nowiki>
16140 Lists: 3. Only bullets at start of text should be escaped
16142 *<nowiki>*foo*bar</nowiki>
16144 *<nowiki>*foo</nowiki>''it''*bar
16148 <ul><li>*foo<i>it</i>*bar
16154 Lists: 4. No escapes needed
16166 <ul><li><i>foo</i>*bar
16168 <ul><li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
16173 Lists: 5. No unnecessary escapes
16175 * bar <span><nowiki>[[foo]]</nowiki></span>
16177 *=bar <span><nowiki>[[foo]]</nowiki></span>
16179 *[[bar <span><nowiki>[[foo]]</nowiki></span>
16181 *]]bar <span><nowiki>[[foo]]</nowiki></span>
16183 *=bar <span>foo]]</span>=
16187 <ul><li> bar <span>[[foo]]</span>
16189 <ul><li>=bar <span>[[foo]]</span>
16191 <ul><li>[[bar <span>[[foo]]</span>
16193 <ul><li>]]bar <span>[[foo]]</span>
16195 <ul><li>=bar <span>foo]]</span>=
16197 <ul><li> <s></s>: a
16203 Lists: 6. Escape bullets in SOL position
16207 <!--cmt--><nowiki>*foo</nowiki>
16209 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
16213 Lists: 7. Escape bullets in a multi-line context
16216 <nowiki>*</nowiki>b
16223 #### --------------- HRs ---------------
16224 #### 1. Single line
16225 #### -----------------------------------
16228 HRs: 1. Single line
16232 ----<nowiki>----</nowiki>
16236 <hr><span typeof="mw:Nowiki">----</span>
16241 #### --------------- Tables ---------------
16242 #### 1a. Simple example
16243 #### 1b. No escaping needed (!foo)
16244 #### 1c. No escaping needed (|foo)
16245 #### 1d. No escaping needed (|}foo)
16247 #### 2a. Nested in td (<td>foo|bar</td>)
16248 #### 2b. Nested in td (<td>foo||bar</td>)
16249 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
16251 #### 3a. Nested in th (<th>foo!bar</th>)
16252 #### 3b. Nested in th (<th>foo!!bar</th>)
16253 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
16257 #### 4c. No escaping needed
16258 #### --------------------------------------
16261 Tables: 1a. Simple example
16272 Tables: 1b. No escaping needed
16281 Tables: 1c. No escaping needed
16290 Tables: 1d. No escaping needed
16299 Tables: 2a. Nested in td
16304 |<nowiki>foo|bar</nowiki>
16308 <td><span typeof="mw:Nowiki">foo|bar</span></td></tr></tbody></table>
16312 Tables: 2b. Nested in td
16317 |<nowiki>foo||bar</nowiki>
16318 |''it''<nowiki>foo||bar</nowiki>
16322 <td><span typeof="mw:Nowiki">foo||bar</span></td>
16323 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
16327 Tables: 2c. Nested in td -- no escaping needed
16335 <table><tbody><tr><td>foo!!bar
16336 </td></tr></tbody></table>
16341 Tables: 3a. Nested in th
16349 <table><tbody><tr><th>foo!bar
16350 </th></tr></tbody></table>
16355 Tables: 3b. Nested in th
16360 !<nowiki>foo!!bar</nowiki>
16364 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
16369 Tables: 3c. Nested in th -- no escaping needed
16374 !<nowiki>foo||bar</nowiki>
16378 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
16382 Tables: 4a. Escape -
16390 |<nowiki>-bar</nowiki>
16394 <tr><th>-bar</th></tr>
16396 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
16400 Tables: 4b. Escape +
16408 |<nowiki>+bar</nowiki>
16412 <tr><th>+bar</th></tr>
16414 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
16418 Tables: 4c. No escaping needed
16437 <tr><td>foo-bar</td><td>foo+bar</td></tr>
16438 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
16446 ### SSS FIXME: Disabled right now because accurate html2wt
16447 ### on this snippet requires data-parsoid flags that we've
16448 ### stripped out of these tests. We should scheme how we
16449 ### we want to handle these kind of tests that require
16450 ### data-parsoid flags for accurate html2wt serialization
16453 Tables: 4d. No escaping needed
16471 #### --------------- Links ----------------
16472 #### 1. Quote marks in link text
16473 #### 2. Wikilinks: Escapes needed
16474 #### 3. Wikilinks: No escapes needed
16475 #### 4. Extlinks: Escapes needed
16476 #### 5. Extlinks: No escapes needed
16477 #### --------------------------------------
16479 Links 1. Quote marks in link text
16483 [[Foo|Foo<nowiki>''boo''</nowiki>]]
16485 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
16489 Links 2. WikiLinks: Escapes needed
16493 [[Foo|<nowiki>[Foobar]</nowiki>]]
16494 [[Foo|<nowiki>Foobar]</nowiki>]]
16495 [[Foo|x [Foobar] x]]
16496 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
16497 [[Foo|<nowiki>[[Bar]]</nowiki>]]
16498 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
16499 [[Foo|<nowiki>|Bar</nowiki>]]
16500 [[Foo|<nowiki>]]bar</nowiki>]]
16501 [[Foo|<nowiki>[[bar</nowiki>]]
16502 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
16504 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
16505 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
16506 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
16507 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
16508 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
16509 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
16510 <a href="Foo" rel="mw:WikiLink">|Bar</a>
16511 <a href="Foo" rel="mw:WikiLink">]]bar</a>
16512 <a href="Foo" rel="mw:WikiLink">[[bar</a>
16513 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
16517 Links 3. WikiLinks: No escapes needed
16524 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
16525 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
16529 Links 4. ExtLinks: Escapes needed
16533 [http://google.com <nowiki>[google]</nowiki>]
16534 [http://google.com <nowiki>google]</nowiki>]
16536 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
16537 <a href="http://google.com" rel="mw:ExtLink">google]</a>
16541 Links 5. ExtLinks: No escapes needed
16545 [http://google.com [google]
16547 <a href="http://google.com" rel="mw:ExtLink">[google</a>
16550 #### --------------- Quotes ---------------
16551 #### 1. Quotes inside <b> and <i>
16552 #### 2. Link fragments separated by <i> and <b> tags
16553 #### 3. Link fragments inside <i> and <b>
16554 #### 4. No escaping needed
16555 #### --------------------------------------
16557 1. Quotes inside <b> and <i>
16559 parsoid=html2wt,wt2wt
16561 ''<nowiki>'foo'</nowiki>''
16562 ''<nowiki>''foo''</nowiki>''
16563 ''<nowiki>'''foo'''</nowiki>''
16565 '''<nowiki>'foo'</nowiki>'''
16566 '''<nowiki>''foo''</nowiki>'''
16567 '''<nowiki>'''foo'''</nowiki>'''
16568 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
16569 '''foo'''<nowiki/>'s
16572 '<nowiki/>''foo''<nowiki/>'
16574 '''foo'''<nowiki/>'
16575 '<nowiki/>'''foo'''<nowiki/>'
16584 <b>foo'<i>bar'</i>baz</b>
16595 2. Link fragments separated by <i> and <b> tags
16597 [[''foo''<nowiki>hello]]</nowiki>
16599 [['''foo'''<nowiki>hello]]</nowiki>
16601 <p>[[<i>foo</i>hello]]
16602 </p><p>[[<b>foo</b>hello]]
16607 3. Link fragments inside <i> and <b>
16608 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
16609 this is one of the shortcomings of this format)
16611 ''[[foo''<nowiki>]]</nowiki>
16613 '''[[foo'''<nowiki>]]</nowiki>
16616 </p><p><b>[[foo</b>]]
16621 4. No escaping needed
16623 '<span>''bar''</span>'
16624 '<span>'''bar'''</span>'
16626 <p>'<span><i>bar</i></span>'
16627 '<span><b>bar</b></span>'
16631 #### ----------- Paragraphs ---------------
16632 #### 1. No unnecessary escapes
16633 #### --------------------------------------
16636 1. No unnecessary escapes
16638 bar <span><nowiki>[[foo]]</nowiki></span>
16640 =bar <span><nowiki>[[foo]]</nowiki></span>
16642 [[bar <span><nowiki>[[foo]]</nowiki></span>
16644 ]]bar <span><nowiki>[[foo]]</nowiki></span>
16646 =bar <span>foo]]</span><nowiki>=</nowiki>
16648 <p>bar <span>[[foo]]</span>
16649 </p><p>=bar <span>[[foo]]</span>
16650 </p><p>[[bar <span>[[foo]]</span>
16651 </p><p>]]bar <span>[[foo]]</span>
16652 </p><p>=bar <span>foo]]</span>=
16656 #### ----------------------- PRE --------------------------
16657 #### 1. Leading whitespace in SOL context should be escaped
16658 #### ------------------------------------------------------
16660 1. Leading whitespace in SOL context should be escaped
16664 <nowiki> </nowiki>a
16666 <nowiki> </nowiki> a
16668 <nowiki> </nowiki>a(tab)
16670 <nowiki> </nowiki> a
16672 <nowiki> </nowiki> a
16675 <nowiki> </nowiki>b
16678 <nowiki> </nowiki>b
16681 <nowiki> </nowiki> b
16687 <p><!--cmt--> a</p>
16696 #### --------------- HTML tags ---------------
16699 #### 3. multi-line html tag
16700 #### -----------------------------------------
16706 <a href="http://google.com">google</a>
16708 <a href="http://google.com">google</a>
16714 <nowiki><div>foo</div>
16715 <div style="color:red">foo</div></nowiki>
16717 <p><div>foo</div>
16718 <div style="color:red">foo</div>
16723 3. multi-line html tag
16738 <nowiki><ref>foo</ref></nowiki>
16740 <p><ref>foo</ref>
16744 #### --------------- Others ---------------
16748 <nowiki>foo</nowiki>
16750 <p><nowiki>foo</nowiki>
16754 ## The quote-char in the input is necessary for triggering the bug
16756 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
16758 parsoid=wt2wt,html2wt
16767 Tag-like HTML structures are passed through as text
16789 </p><p>1<d e>f
16794 # This was a bug in the PHP parser (see bug 17663 and its dups,
16795 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
16797 Tag names followed by punctuation should not be recognized as tags
16801 <p><s.ome> text
16806 HTML tag with necessary entities in attributes
16808 <span title="&amp;">foo</span>
16810 <p><span title="&amp;">foo</span>
16815 HTML tag with 'unnecessary' entity encoding in attributes
16817 <span title="&">foo</span>
16819 <p><span title="&">foo</span>
16824 HTML tag with broken attribute value quoting
16826 <span title="Hello world>Foo</span>
16828 <p><span>Foo</span>
16833 Parsoid-only: HTML tag with broken attribute value quoting
16837 <span title="Hello world>Foo</span>
16839 <p><span title="Hello world">Foo</span>
16844 Table with broken attribute value quoting
16847 | title="Hello world|Foo
16858 Table with broken attribute value quoting on consecutive lines
16861 | title="Hello world|Foo
16862 | style="color:red|Bar
16875 Parsoid-only: Table with broken attribute value quoting on consecutive lines
16880 | title="Hello world|Foo
16881 | style="color:red|Bar
16886 <td title="Hello world">Foo
16887 </td><td style="color: red">Bar
16888 </td></tr></tbody></table>
16893 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
16903 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
16913 Accept empty td cell attribute
16916 | align="center" | foo || |
16921 <td align="center"> foo </td>
16928 Non-empty attributes in th-cells
16931 ! Foo !! style="color: red" | Bar
16937 <th style="color: red"> Bar
16943 Accept empty attributes in th-cells
16958 Empty table rows go away
16979 ### Parsoid-centric tests for testing RTing of inter-element separators
16980 ### Edge cases not tested by existing parser tests and specific to
16981 ### Parsoid-specific serialization strategies.
16985 RT-ed inter-element separators should be valid separators
16998 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
16999 (Parsoid-only since PHP parser relies on Tidy for correct output)
17015 Empty TD followed by TD with tpl-generated attribute
17020 |{{echo|style='color:red'}}|foo
17034 Indented table with an empty td
17053 Empty TR followed by a template-generated TR
17054 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
17056 parsoid=wt2html,wt2wt
17060 {{echo|<tr><td>foo</td></tr>}}
17066 <tr typeof="mw:Transclusion">
17067 <td>foo</td></tr></tbody></table>
17070 ## PHP and parsoid output differ for this, and since this is primarily
17071 ## for testing Parsoid's serializer, marking this Parsoid only
17073 Empty TR followed by mixed-ws-comment line should RT correctly
17087 <td> <!--c--></td></tr>
17089 <td><!--c--> <!--d--></td></tr>
17095 Multi-line image caption generated by templates with/without trailing newlines
17099 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
17100 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
17102 <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>
17103 <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>
17107 ## PHP emits broken html for this, and since this is primarily
17108 ## a Parsoid serializer test, marking this Parsoid only
17110 Improperly nested inline or quotes tags with whitespace in between
17114 <span> <s>x</span> </s>
17117 <p><span> <s>x</s></span><s> </s>
17118 <b> <i>x</i></b><i> </i>
17123 Encapsulate protected attributes from wt
17127 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
17129 <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>
17133 # -----------------------------------------------------------------
17134 # The following section of tests are primarily to spec requirements
17135 # around serialization of new/edited content.
17137 # All these tests are marked Parsoid html2wt and html2html only
17138 # ----------------------------------------------------------------
17141 Image: Modifying size of an image
17145 [[Image:Wiki.png|230x230px]]
17147 <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>
17151 Image: New block level image should have \n before and after
17156 [[File:Wiki.png|right|thumb|150x150px]]
17159 <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>
17162 # Wacky -- the leading newline in input is required because
17163 # that is what the serializer emits. To be fixed. Not fixing
17164 # the test because this test is required to test serialization of
17165 # new content and preferred whitespace style.
17167 Lists: Add space after bullets
17174 * <span> baz</span>
17179 <li><span> baz</span></li>
17184 Parsoid: Serialize positional parameters with = in them as named parameter
17190 <p about="#mwt1" typeof="mw:Transclusion"
17191 data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}'
17195 # -----------------------------------------------------------------
17196 # End of section for Parsoid-only html2wt tests for serialization
17198 # -----------------------------------------------------------------
17205 Try for 100% code coverage