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>
155 This is a simple paragraph.
157 <p>This is a simple paragraph.
162 Paragraphs with extra newline spacing
185 Paragraphs with newline spacing with comment lines in between
193 <!--foo--><!--More than 1 comment disables stripping of this line!-->
250 Paragraphs with newline spacing with non-empty white-space lines in between
277 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
285 <!--foo--><!--More than 1 comment disables stripping of this line!-->
324 Extra newlines: More paragraphs with indented comment
339 Extra newlines followed by heading
354 <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>
355 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
358 <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>
363 Extra newlines between heading and content are swallowed
371 <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>
372 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
379 http://fr.wikipedia.org/wiki/🍺
380 <!-- EasterEgg we love beer, better be able be able to link to it -->
382 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
402 * plain''italic''plain
403 * plain''italic''plain''italic''plain
404 * plain'''bold'''plain
405 * plain'''bold'''plain'''bold'''plain
406 * plain''italic''plain'''bold'''plain
407 * plain'''bold'''plain''italic''plain
408 * plain''italic'''bold-italic'''italic''plain
409 * plain'''bold''bold-italic''bold'''plain
410 * plain'''''bold-italic'''italic''plain
411 * plain'''''bold-italic''bold'''plain
412 * plain''italic'''bold-italic'''''plain
413 * plain'''bold''bold-italic'''''plain
414 * plain l'''italic''plain
415 * plain l''''bold''' plain
418 </li><li> plain<i>italic</i>plain
419 </li><li> plain<i>italic</i>plain<i>italic</i>plain
420 </li><li> plain<b>bold</b>plain
421 </li><li> plain<b>bold</b>plain<b>bold</b>plain
422 </li><li> plain<i>italic</i>plain<b>bold</b>plain
423 </li><li> plain<b>bold</b>plain<i>italic</i>plain
424 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
425 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
426 </li><li> plain<i><b>bold-italic</b>italic</i>plain
427 </li><li> plain<b><i>bold-italic</i>bold</b>plain
428 </li><li> plain<i>italic<b>bold-italic</b></i>plain
429 </li><li> plain<b>bold<i>bold-italic</i></b>plain
430 </li><li> plain l'<i>italic</i>plain
431 </li><li> plain l'<b>bold</b> plain
436 # this example taken from the simple/Moon article
438 Italics and possessives
440 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
442 <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
447 ### 2-quote opening sequence tests
450 Italics and bold: 2-quote opening sequence: (2,2)
460 Italics and bold: 2-quote opening sequence: (2,3)
470 Italics and bold: 2-quote opening sequence: (2,4)
480 Italics and bold: 2-quote opening sequence: (2,5) (php)
489 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
491 Italics and bold: 2-quote opening sequence: (2,5) (parsoid)
503 ### 3-quote opening sequence tests
507 Italics and bold: 3-quote opening sequence: (3,2)
517 Italics and bold: 3-quote opening sequence: (3,3)
527 Italics and bold: 3-quote opening sequence: (3,4)
537 Italics and bold: 3-quote opening sequence: (3,5) (php)
546 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
548 Italics and bold: 3-quote opening sequence: (3,5) (parsoid)
560 ### 4-quote opening sequence tests
564 Italics and bold: 4-quote opening sequence: (4,2)
574 Italics and bold: 4-quote opening sequence: (4,3)
584 Italics and bold: 4-quote opening sequence: (4,4)
594 Italics and bold: 4-quote opening sequence: (4,5) (php)
603 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
605 Italics and bold: 4-quote opening sequence: (4,5) (parsoid)
611 <p>'<b>foo<i></i></b>
617 ### 5-quote opening sequence tests
621 Italics and bold: 5-quote opening sequence: (5,2) (php)
630 # Parsoid reverses the nesting order, compared to the PHP parser
632 Italics and bold: 5-quote opening sequence: (5,2) (parsoid)
644 Italics and bold: 5-quote opening sequence: (5,3)
654 Italics and bold: 5-quote opening sequence: (5,4)
658 <p><i><b>foo'</b></i>
664 Italics and bold: 5-quote opening sequence: (5,5)
673 ### multiple quote sequences in a line
676 Italics and bold: multiple quote sequences: (2,4,2)
680 <p><i>foo'<b>bar</b></i>
686 Italics and bold: multiple quote sequences: (2,4,3)
690 <p><i>foo'<b>bar</b></i>
696 Italics and bold: multiple quote sequences: (2,4,4)
700 <p><i>foo'<b>bar'</b></i>
706 Italics and bold: multiple quote sequences: (3,4,2) (php)
715 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
717 Italics and bold: multiple quote sequences: (3,4,2) (parsoid)
723 <p><b>foo'</b>bar<i></i>
729 Italics and bold: multiple quote sequences: (3,4,3) (php)
738 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
740 Italics and bold: multiple quote sequences: (3,4,3) (parsoid)
746 <p><b>foo'</b>bar<b></b>
751 ### other quote tests
754 Italics and bold: other quote tests: (2,3,5)
756 ''this is about '''foo's family'''''
758 <p><i>this is about <b>foo's family</b></i>
764 Italics and bold: other quote tests: (2,(3,3),2)
766 ''this is about '''foo's''' family''
768 <p><i>this is about <b>foo's</b> family</i>
774 Italics and bold: other quote tests: (3,2,3,2)
776 '''this is about ''foo'''s family''
778 <p><b>this is about <i>foo</i></b><i>s family</i>
783 # The Parsoid team believes the PHP parser's output on this test is wrong.
784 # It only checks for convert-to-bold-on-single-character-word when the word
785 # matches with a bold tag ("'''") that is *odd* in the list of quote tokens.
786 # This means that the bold token in position 2 (0-indexed) gets converted by
787 # parsoid, but doesn't get changed by the PHP parser.
789 Italics and bold: other quote tests: (3,2,3,3) (php)
793 '''this is about ''foo'''s family'''
795 <p>'<i>this is about </i>foo<b>s family</b>
798 # This is the output the Parsoid team believes to be correct.
800 Italics and bold: other quote tests: (3,2,3,3) (parsoid)
804 '''this is about ''foo'''s family'''
806 <p><b>this is about <i>foo'</i>s family</b>
812 Italics and bold: other quote tests: (3,(2,2),3)
814 '''this is about ''foo's'' family'''
816 <p><b>this is about <i>foo's</i> family</b>
822 Italicized possessive
824 The ''[[Main Page]]'''s talk page.
826 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
831 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
832 (Requires tidy for PHP parser output to be fixed up)
834 parsoid=wt2html,wt2wt
842 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
843 <td><i>a</i></td><td><i>b</i></td></tr>
852 Non-html5 tags should be accepted
854 <center>''foo''</center>
857 <strike>''foo''</strike>
860 <center><i>foo</i></center>
861 <p><big><i>foo</i></big>
862 <font><i>foo</i></font>
863 <strike><i>foo</i></strike>
869 <wbr> isn't (yet) valid wikitext (bug 52468)
878 ### Special characters
882 Bare pipe character (bug 52363)
891 Bare pipe character from a template (bug 52363)
900 ### <nowiki> test cases
904 <nowiki> unordered list
906 <nowiki>* This is not an unordered list item.</nowiki>
908 <p>* This is not an unordered list item.
915 <nowiki>Lorem ipsum dolor
936 :There is not nowiki.
937 :There is <nowiki>nowiki</nowiki>.
939 #There is not nowiki.
940 #There is <nowiki>nowiki</nowiki>.
942 *There is not nowiki.
943 *There is <nowiki>nowiki</nowiki>.
945 <dl><dd>There is not nowiki.
946 </dd><dd>There is nowiki.
948 <ol><li>There is not nowiki.
949 </li><li>There is nowiki.
951 <ul><li>There is not nowiki.
952 </li><li>There is nowiki.
958 Entities inside <nowiki>
960 <nowiki><</nowiki>
967 Entities inside template parameters
973 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}'>–</span>
981 Comments and Indent-Pre
983 <!-- comment 1 --> asdf
985 <!-- comment 1 --> asdf
988 <!-- comment 1 --> asdf
989 <!-- comment 2 -->xyz
991 <!-- comment 1 --> asdf
992 <!-- comment 2 --> xyz
1048 asdf<!-- comment 1 -->jkl
1058 <!-- foo --> b <!-- bar -->
1072 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1078 Comment semantics and delimiters
1080 <!-- --><!----><!-----><!------>
1086 Comment semantics and delimiters, redux
1088 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1089 -- foo -- funky huh? ... -->
1095 Comment semantics and delimiters: directors cut
1097 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1098 everything starting with < followed by !-- until the first -- and > we see,
1099 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1107 Comment semantics: nesting
1109 <!--<!-- no, we're not going to do anything fancy here -->-->
1116 Comment semantics: unclosed comment at end
1118 <!--This comment will run out to the end of the document
1124 Comment in template title
1133 Comment on its own line post-expand
1145 Comment on its own line post-expand with non-significant whitespace
1157 ### paragraph wrapping tests
1171 Block tag on one line
1183 Block tag on both lines
1195 Multiple lines without block tags
1213 Empty lines between lines with block tags
1243 ### Preformatted text
1252 And a [[Main Page|link]]
1258 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1263 Ident preformatting with inline content
1274 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1291 Regression with preformatted in <center>
1304 # Expected output in the following test is not really expected (there should be
1305 # <pre> in the output) -- it's only testing for well-formedness.
1307 Bug 6200: Preformatted in <blockquote>
1320 <pre> with attributes (bug 3202)
1322 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1324 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1329 <pre> with width attribute (bug 3202)
1331 <pre width="8">Narrow screen goodies</pre>
1333 <pre width="8">Narrow screen goodies</pre>
1338 <pre> with forbidden attribute (bug 3202)
1340 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1342 <pre width="8">Narrow screen goodies</pre>
1347 Entities inside <pre>
1356 <pre> with forbidden attribute values (bug 3202)
1358 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1360 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1365 <nowiki> inside <pre> (bug 13238)
1373 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1381 <pre><nowiki>Foo</nowiki></pre>
1386 <nowiki> and <pre> preference (first one wins)
1417 </pre> inside nowiki
1419 <nowiki></pre></nowiki>
1426 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1434 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1444 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1456 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1477 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1481 {{echo| foo}}{{echo| bar}}
1486 {{echo|<!--cmt--> foo}}
1488 <!--cmt-->{{echo| foo}}
1490 {{echo|{{echo| }}bar}}
1508 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1545 Templates: Single-line variant of parameter whitespace stripping test
1551 {{echo|{{echo| a}}}}
1553 {{echo|1={{echo| a}}}}
1566 Templates: Strip whitespace from named parameters, but not positional ones
1594 Templates: Dont strip whitespace from whitespace/comment-only arguments
1598 {{echo| <!--cmt--> }}
1605 Templates: Parsoid parameter escaping test 1
1609 {{echo|[foo]|{{echo|[bar]}}}}
1611 <p about="#mwt1" typeof="mw:Transclusion"
1612 data-mw="{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}">[foo]</p>
1616 Parsoid: Pipes in external links in template parameter
1620 {{echo|[{{echo|http://example.com}} link]}}
1622 <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>
1626 Parsoid: pipe in transclusion parameter
1630 {{echo|http://foo.com/a|b}}
1632 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1633 typeof="mw:Transclusion"
1634 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>
1638 Parsoid: Pipe in external link target and content in template parameter
1640 parsoid=html2wt,wt2wt
1642 {{echo|[http://foo.com/a|b a|b]}}
1644 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1645 typeof="mw:Transclusion"
1646 data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},
1647 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}'>a|b</a></p>
1651 Templates: Dont escape already nowiki-escaped text in template parameters
1653 parsoid=html2wt,wt2wt
1655 {{echo|foo<nowiki>|</nowiki>bar}}
1656 {{echo|<nowiki><div></nowiki>}}
1657 {{echo|<nowiki></nowiki>}}
1659 <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>
1660 <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>
1661 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}'></span>
1666 ### Parsoid-centric tests for testing RT edge cases for pre
1670 1a. Indent-Pre and Comments
1683 1b. Indent-Pre and Comments
1696 1c. Indent-Pre and Comments
1709 2a. Indent-Pre and tables
1730 2b. Indent-Pre and tables
1746 2c. Indent-Pre and tables (bug 42252)
1763 3a. Indent-Pre and block tags (single-line html)
1771 <pre><span> foo </span>
1776 3b. Indent-Pre and block tags (pre-content on separate line)
1828 4. Multiple spaces at start-of-line
1847 5. White-space in indent-pre
1848 NOTE: the white-space char on 2nd line is significant
1861 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
1865 HTML-pre: 1. embedded newlines
1901 HTML-pre: 2: indented text
1914 HTML-pre: 3: other wikitext
1935 ### Definition lists
1942 <dl><dt> name </dt><dd> Definition
1948 Definition list for indentation only
1952 <dl><dd> Indented text
1958 Definition list with no space
1962 <dl><dt>name</dt><dd>Definition
1968 Definition list with URL link
1970 ; http://example.com/ : definition
1972 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt><dd> definition
1978 Definition list with bracketed URL link
1980 ;[http://www.example.com/ Example]:Something about it
1982 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt><dd>Something about it
1988 Definition list with wikilink containing colon
1990 ; [[Help:FAQ]]: The least-read page on Wikipedia
1992 <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
1997 # At Brion's and JeLuF's insistence... :)
1999 Definition list with news link containing colon
2001 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2003 <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!
2009 Malformed definition list with colon
2011 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2013 <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
2019 Definition lists: colon in external link text
2021 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2023 <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
2029 Definition lists: colon in HTML attribute
2031 ;<b style="display: inline">bold</b>
2033 <dl><dt><b style="display: inline">bold</b>
2039 Definition lists: self-closed tag
2041 ;one<br/>two : two-line fun
2043 <dl><dt>one<br />two </dt><dd> two-line fun
2049 Bug 11748: Literal closing tags
2053 <dd>test test test test test</dd>
2055 <dd>test test test test test</dd>
2060 <dd>test test test test test</dd>
2062 <dd>test test test test test</dd>
2068 Definition and unordered list using wiki syntax nested in unordered list using html tags.
2071 ; term : description
2077 <dl><dt> term </dt><dd> description
2088 Definition list with empty definition and following paragraph
2093 <dl><dt> term</dt><dd>
2100 Nested definition lists using html syntax
2117 Definition Lists: No nesting: Multiple dd's
2131 Definition Lists: Indentation: Regular
2147 Definition Lists: Indentation: Missing 1st level
2161 Definition Lists: Indentation: Multi-level indent
2165 <dl><dd><dl><dd><dl><dd>i3
2173 Definition Lists: Hacky use to indent tables
2180 should be left alone
2182 <dl><dd><dl><dd><table>
2187 </td></tr></table></dd></dl></dd></dl>
2189 should be left alone
2192 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
2193 ## as an empty dt item. It also ignores all but the last ";" when followed
2194 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
2195 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
2198 ## Ex: ";;t2 ::d2" is transformed into:
2210 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
2211 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
2222 ## All Parsoid only definition list tests have this difference.
2224 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
2225 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
2228 Table / list interaction: indented table with lists in table contents
2250 </td></tr></table></dd></dl>
2255 Table / list interaction: lists nested in tables nested in indented lists
2280 </td></tr></table></dd></dl>
2288 Definition Lists: Nesting: Multi-level (Parsoid only)
2318 Definition Lists: Nesting: Test 2 (Parsoid only)
2338 Definition Lists: Nesting: Test 3 (Parsoid only)
2366 Definition Lists: Nesting: Test 4
2371 <dl><dd><dl><dd><dl><dt>t3
2380 ## The Parsoid team believes the following three test exposes a
2381 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
2382 ## wrong to close the <dl> after the <dt> containing the <ul>.)
2384 Definition Lists: Mixed Lists: Test 1 (php)
2392 <dl><dd><dl><dt><ul><li> foo
2402 Definition Lists: Mixed Lists: Test 1 (parsoid)
2410 <dl><dd><dl><dt><ul><li> foo
2411 </li></ul></dt><dd><ul><li> bar
2412 </li></ul></dd><dt> baz</dt></dl></dd></dl>
2416 Definition Lists: Mixed Lists: Test 2
2430 Definition Lists: Mixed Lists: Test 3
2435 <ul><li><dl><dd><dl><dd><dl><dd> d1
2446 Definition Lists: Mixed Lists: Test 4
2451 <ul><li><dl><dt>d1 </dt><dd>d2
2452 </dd><dt>d3 </dt><dd>d4
2460 Definition Lists: Mixed Lists: Test 5
2475 Definition Lists: Mixed Lists: Test 6
2480 <ol><li><ul><li><dl><dd>d1
2492 Definition Lists: Mixed Lists: Test 7
2506 Definition Lists: Mixed Lists: Test 8
2522 Definition Lists: Mixed Lists: Test 9
2526 <ul><li><dl><dt>foo </dt><dd>bar
2534 Definition Lists: Mixed Lists: Test 10
2538 <ul><li><ol><li><dl><dt>foo </dt><dd>bar
2545 # The Parsoid team disagrees with the PHP parser's seemingly-random
2546 # rules regarding dd/dt on the next two tests. Parsoid is more
2547 # consistent, and recognizes the shared nesting and keeps the
2548 # still-open tags around until the nesting is complete.
2551 Definition Lists: Mixed Lists: Test 11 (php)
2558 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt><dd><ul><li><dl><dt><dl><dt>bar
2563 <dl><dt>boo </dt><dd>baz
2572 Definition Lists: Mixed Lists: Test 11 (parsoid)
2594 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2595 <dd data-parsoid='{"stx":"row"}'>bar</dd></dl></dt></dl></li></ul></dt>
2596 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2597 <dd data-parsoid='{"stx":"row"}'>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
2602 Definition Lists: Weird Ones: Test 1 (php)
2606 *#;*::;; foo : bar (who uses this?)
2608 <ul><li><ol><li><dl><dt> foo </dt><dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)
2620 Definition Lists: Weird Ones: Test 1 (parsoid)
2624 *#;*::;; foo : bar (who uses this?)
2641 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2642 <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>
2649 External links: non-bracketed
2651 Non-bracketed: http://example.com
2653 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2658 External links: numbered
2660 Numbered: [http://example.com]
2661 Numbered: [http://example.net]
2662 Numbered: [http://example.com]
2664 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
2665 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
2666 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
2671 External links: specified text
2673 Specified text: [http://example.com link]
2675 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
2680 External links: trail
2682 Linktrails should not work for external links: [http://example.com link]s
2684 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
2689 External links: dollar sign in URL
2691 http://example.com/1$2345
2693 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
2698 External links: dollar sign in URL (named)
2700 [http://example.com/1$2345]
2702 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
2707 External links: open square bracket forbidden in URL (bug 4377)
2709 http://example.com/1[2345
2711 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
2716 External links: open square bracket forbidden in URL (named) (bug 4377)
2718 [http://example.com/1[2345]
2720 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
2725 External links: nowiki in URL link text (bug 6230)
2727 [http://example.com/ <nowiki>''example site''</nowiki>]
2729 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
2734 External links: newline forbidden in text (bug 6230 regression check)
2736 [http://example.com/ first
2739 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
2745 External links: Pipe char between url and text
2747 [http://example.com | link]
2749 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
2754 External links: protocol-relative URL in brackets
2756 [//example.com/ Test]
2758 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
2763 External links: protocol-relative URL in brackets without text
2767 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
2772 External links: protocol-relative URL in free text is left alone
2776 <p>//example.com/Foo
2781 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
2783 foo//example.com/Foo
2785 <p>foo//example.com/Foo
2792 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2794 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2799 External image from https
2801 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2803 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2808 External image (when not allowed)
2810 wgAllowExternalImages=0
2812 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2814 <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>
2819 Link to non-http image, no img tag
2821 Link to non-http image, no img tag: ftp://example.com/test.jpg
2823 <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>
2828 External links: terminating separator
2830 Terminating separator: http://example.com/thing,
2832 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
2837 External links: intervening separator
2839 Intervening separator: http://example.com/1,2,3
2841 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
2846 External links: old bug with URL in query
2848 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
2850 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
2855 External links: old URL-in-URL bug, mixed protocols
2857 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
2859 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
2864 External links: URL in text
2866 URL in text: [http://example.com http://example.com]
2868 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2873 External links: Clickable images
2875 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
2877 <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>
2882 External links: raw ampersand
2884 Old & use: http://x&y
2886 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2891 External links: encoded ampersand
2893 Old & use: http://x&y
2895 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2900 External links: encoded equals (bug 6102)
2902 http://example.com/?foo=bar
2904 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
2909 External links: [raw ampersand]
2911 Old & use: [http://x&y]
2913 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2918 External links: [encoded ampersand]
2920 Old & use: [http://x&y]
2922 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2927 External links: [encoded equals] (bug 6102)
2929 [http://example.com/?foo=bar]
2931 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
2936 External links: [IDN ignored character reference in hostname; strip it right off]
2938 [http://e‌xample.com/]
2940 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
2944 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
2945 # Where an external link could easily circumvent the sanitization of the text of
2946 # a link like this (where an IDN-ignore character is in the URL somewhere), this
2947 # test demands a higher standard. That's a bit strange.
2951 # http://example.com -> [http://example.com|http://example.com]
2952 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
2954 # The first example is sanitized, but the second is not. Any security benefits
2955 # from this production are trivial to circumvent. Either remove this test and
2956 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
2957 # the test accordingly.
2962 External links: IDN ignored character reference in hostname; strip it right off
2964 http://e‌xample.com/
2966 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
2971 External links: www.jpeg.org (bug 554)
2975 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
2980 External links: URL within URL (original bug 2)
2982 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
2984 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
2989 BUG 361: URL inside bracketed URL
2991 [http://www.example.com/foo http://www.example.com/bar]
2993 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
2998 BUG 361: URL within URL, not bracketed
3000 http://www.example.com/foo?=http://www.example.com/bar
3002 <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>
3007 BUG 289: ">"-token in URL-tail
3009 http://www.example.com/<hello>
3011 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
3016 BUG 289: literal ">"-token in URL-tail
3018 http://www.example.com/<b>html</b>
3020 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
3025 BUG 289: ">"-token in bracketed URL
3027 [http://www.example.com/<hello> stuff]
3029 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
3034 BUG 289: literal ">"-token in bracketed URL
3036 [http://www.example.com/<b>html</b> stuff]
3038 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
3043 BUG 289: literal double quote at end of URL
3045 http://www.example.com/"hello"
3047 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
3052 BUG 289: literal double quote in bracketed URL
3054 [http://www.example.com/"hello" stuff]
3056 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
3061 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
3063 [http://www.example.com test]
3065 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
3070 External links: link text with spaces
3072 [http://www.example.com a b c]
3073 [http://www.example.com ''a'' ''b'']
3075 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
3076 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
3081 External links: wiki links within external link (Bug 3695)
3083 [http://example.com [[wikilink]] embedded in ext link]
3085 <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>
3090 BUG 787: Links with one slash after the url protocol are invalid
3094 [http:/example.com title]
3096 <p>http:/example.com
3097 </p><p>[http:/example.com title]
3102 Bracketed external links with template-generated invalid target
3104 [{{echo|http:/example.com}} title]
3106 <p>[http:/example.com title]
3111 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
3113 ''[http://example.com text'']
3114 [http://example.com '''text]'''
3115 ''Something [http://example.com in italic'']
3116 ''Something [http://example.com mixed''''', even bold]'''
3117 '''''Now [http://example.com both''''']
3119 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
3120 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
3121 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
3122 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
3123 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
3129 Bug 4781: %26 in URL
3131 http://www.example.com/?title=AT%26T
3133 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
3137 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
3138 # % is actually legal in HTML5. Any change in output would need testing though.
3140 Bug 4781, 5267: %25 in URL
3142 http://www.example.com/?title=100%25_Bran
3144 <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>
3149 Bug 4781, 5267: %28, %29 in URL
3151 http://www.example.com/?title=Ben-Hur_%281959_film%29
3153 <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>
3159 Bug 4781: %26 in autonumber URL
3161 [http://www.example.com/?title=AT%26T]
3163 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
3168 Bug 4781, 5267: %26 in autonumber URL
3170 [http://www.example.com/?title=100%25_Bran]
3172 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
3177 Bug 4781, 5267: %28, %29 in autonumber URL
3179 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
3181 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
3187 Bug 4781: %26 in bracketed URL
3189 [http://www.example.com/?title=AT%26T link]
3191 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
3196 Bug 4781, 5267: %26 in bracketed URL
3198 [http://www.example.com/?title=100%25_Bran link]
3200 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
3205 Bug 4781, 5267: %28, %29 in bracketed URL
3207 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
3209 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
3214 External link containing double-single-quotes in text '' (bug 4598 sanity check)
3216 Some [http://example.com/ pretty ''italics'' and stuff]!
3218 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
3223 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
3225 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
3227 <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>
3232 External link containing double-single-quotes with no space separating the url from text in italics
3234 [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]].]
3236 <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>
3241 External link with comments in link text
3243 [http://www.google.com Google <!-- comment -->]
3245 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
3250 URL-encoding in URL functions (single parameter)
3252 {{localurl:Some page|amp=&}}
3254 <p>/index.php?title=Some_page&amp=&
3259 URL-encoding in URL functions (multiple parameters)
3261 {{localurl:Some page|q=?&=&}}
3263 <p>/index.php?title=Some_page&q=?&amp=&
3270 http://example.com/index.php?foozoid%5B%5D=bar
3272 http://example.com/index.php?foozoid[]=bar
3274 <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>
3275 </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>
3280 IPv6 urls (bug 21261)
3284 http://[2404:130:0:1000::187:2]/index.php
3286 <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>
3291 Non-extlinks in brackets
3300 [{{echo|foo}} ''bar'']
3301 [{{echo|foo}}l's] errand
3302 [{{echo|foo}}l's errand]
3304 [url=http://example.com]
3317 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
3322 Parsoid: Percent encoding in external links
3326 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
3328 <p><a rel="mw:ExtLink"
3329 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
3333 Parsoid: use url link syntax for links where the content is equal the link
3340 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
3350 Normal text. '''Bold text.''' Normal text. ''Italic text.''
3352 Normal text. '''''Bold italic text.''''' Normal text.
3354 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
3355 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
3361 Unclosed and unmatched quotes (php)
3365 '''''Bold italic text '''with bold deactivated''' in between.'''''
3367 '''''Bold italic text ''with italic deactivated'' in between.'''''
3371 ..spanning two paragraphs (should not work).'''
3373 '''Bold tag left open
3375 ''Italic tag left open
3379 <!-- Unmatching number of opening, closing tags: -->
3380 '''This year''''s election ''should'' beat '''last year''''s.
3382 ''Tom'''s car is bigger than ''Susan'''s.
3384 Plain ''italic'''s plain
3386 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3387 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
3388 </p><p><b>Bold text..</b>
3389 </p><p>..spanning two paragraphs (should not work).
3390 </p><p><b>Bold tag left open</b>
3391 </p><p><i>Italic tag left open</i>
3393 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3394 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3395 </p><p>Plain <i>italic'</i>s plain
3398 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
3399 # parser strips. The wikitext contains just the first half of the bold
3400 # quote pair. (There's also a case where Parsoid nests <b> and <i>
3401 # differently than the PHP parser.)
3403 Unclosed and unmatched quotes (parsoid)
3407 '''''Bold italic text '''with bold deactivated''' in between.'''''
3409 '''''Bold italic text ''with italic deactivated'' in between.'''''
3413 ..spanning two paragraphs (should not work).'''
3415 '''Bold tag left open
3417 ''Italic tag left open
3421 <!-- Unmatching number of opening, closing tags: -->
3422 '''This year''''s election ''should'' beat '''last year''''s.
3424 ''Tom'''s car is bigger than ''Susan'''s.
3426 Plain ''italic'''s plain
3428 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3429 </p><p><i><b>Bold italic text </b></i><b>with italic deactivated<i> in between.</i></b>
3430 </p><p><b>Bold text..</b>
3431 </p><p>..spanning two paragraphs (should not work).<b></b>
3432 </p><p><b>Bold tag left open</b>
3433 </p><p><i>Italic tag left open</i>
3435 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3436 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3437 </p><p>Plain <i>italic'</i>s plain
3444 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
3447 # This should not produce <table></table> as <table><tr><td></td></tr></table>
3448 # is the bare minimum required by the spec, see:
3449 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
3451 A table with no data. (php)
3458 # Parsoid team replies: empty table tags are legal in HTML5
3460 A table with no data. (parsoid)
3469 # A table with nothing but a caption is invalid XHTML, we might want to render
3470 # this as <p>caption</p>
3472 A table with nothing but a caption (php)
3482 </caption><tr><td></td></tr></table>
3485 # Parsoid team replies: table with only a caption is legal in HTML5
3487 A table with nothing but a caption (parsoid)
3495 <table><caption> caption</caption></table>
3499 A table with caption with default-spaced attributes and a table row
3502 |+ style="color: red;" | caption1
3508 <caption style="color: red;"> caption1
3517 A table with captions with non-default spaced attributes and a table row
3520 |+style="color: red;"|caption2
3521 |+ style="color: red;"| caption3
3527 <caption style="color: red;">caption2
3529 <caption style="color: red;"> caption3
3538 Table td-cell syntax variations
3542 | foo bar foo || baz
3543 | style='color:red;' | baz
3544 | style='color:red;' || baz
3551 <td> foo bar foo </td>
3554 <td style="color:red;"> baz
3556 <td> style='color:red;' </td>
3584 Simple table but with multiple dashes for row wikitext
3602 Multiplication table
3604 {| border="1" cellpadding="2"
3605 |+Multiplication table
3607 ! × !! 1 !! 2 !! 3
3625 <table border="1" cellpadding="2">
3626 <caption>Multiplication table
3673 Accept "||" in table headings
3688 Accept "||" in indented table headings
3698 </th></tr></table></dd></dl>
3703 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
3720 Accept "| !" at start of line in tables (ignore !-attribute)
3724 | !style="color:red" | bar
3736 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 +/-
3740 |style='color:red;'|+1
3741 |style='color:blue;'|-1
3753 <td style="color:red;">+1
3755 <td style="color:blue;">-1
3779 |rowspan=2| Cell 2, row 1 (and 2)
3790 <td rowspan="2"> Cell 2, row 1 (and 2)
3808 {| bgcolor=#ABCDEF border=2
3813 |the original table again
3821 <table bgcolor="#ABCDEF" border="2">
3829 <td>the original table again
3835 Invalid attributes in table cell (bug 1830)
3850 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
3853 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
3857 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
3858 <td>]" onmouseover="alert(document.cookie)">test
3867 Indented table markup mixed with indented pre content (proposed in bug 6200)
3872 Text that should be rendered preformatted
3880 <pre>Text that should be rendered preformatted
3889 Template-generated table cell attributes and cell content
3897 <td style="color: red"> Foo
3903 Template-generated table cell attributes and cell content (2)
3906 |align=center {{table_attribs}}
3911 <td align="center" style="color: red"> Foo
3917 Template-generated table cell attributes and cell content (3)
3920 |align=center {{table_cells}}
3925 <td align="center" style="color: red"> Foo </td>
3933 Table with row followed by newlines and table heading
3951 Table with empty line following the start tag
3968 # FIXME: Preserve the attribute properly (with an empty string as value) in
3969 # the PHP parser. Parsoid implements the behavior below.
3971 Table attributes with empty value
3983 </td></tr></tbody></table>
3988 Wikitext table with a lot of comments
4011 Wikitext table with double-line table cell
4028 Table cell with a single comment
4044 # The expected HTML structure in this test is debatable. The PHP parser does
4045 # not parse this kind of table at all. The main focus for Parsoid is on
4046 # round-tripping, so this output is ok for now. TODO: revisit!
4048 Wikitext table with html-syntax row (Parsoid)
4060 <td>foo</td></tr></tbody></table>
4064 Implicit <td> after a |-
4065 (PHP parser relies on Tidy to add the missing <td> tags)
4067 parsoid=wt2html,wt2wt
4080 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
4081 (PHP parser relies on Tidy to add the missing <td> tags)
4083 parsoid=wt2html,wt2wt
4095 <tr><td><pre>a</pre></td></tr>
4096 <tr><td> b</td></tr>
4102 Lists should be recognized in an implicit <td> context
4103 (PHP parser relies on Tidy to add the missing <td> tags)
4105 parsoid=wt2html,wt2wt
4114 <td><ul><li>a</li></ul></td>
4123 Plain link, capitalized
4127 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
4132 Plain link, uncapitalized
4136 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
4143 [[Main Page|The Main Page]]
4145 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4150 Piped link with comment in link text
4152 [[Main Page|The Main<!--front--> Page]]
4154 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4163 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
4168 Broken link with fragment
4170 [[Zigzagzogzagzig#zug]]
4172 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
4177 Special page link with fragment
4179 [[Special:Version#anchor]]
4181 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
4186 Nonexistent special page link with fragment
4188 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
4190 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
4197 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
4199 <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>
4206 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
4208 <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>!!!
4219 Bug 43661: Piped links with identical prefixes
4221 [[prefixed article|prefixed articles with spaces]]
4223 [[prefixed article|prefixed articlesaoeu]]
4225 [[Main Page|Main Page test]]
4227 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
4228 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
4229 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
4235 Link with HTML entity in suffix / tail
4237 [[Main Page]]", [[Main Page]]a
4239 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
4244 Link with 3 brackets
4253 Piped link with 3 brackets
4255 [[[main page|the main page]]]
4257 <p>[[[main page|the main page]]]
4262 Link with multiple pipes
4264 [[Main Page|The|Main|Page]]
4266 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
4273 [[Talk:Parser testing]], [[Meta:Disclaimers]]
4275 <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>
4280 Piped link to namespace
4282 [[Meta:Disclaimers|The disclaimers]]
4284 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
4291 [[Usually caused by a typo (oops}]]
4293 <p>[[Usually caused by a typo (oops}]]
4298 Link containing % (not as a hex sequence)
4302 <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>
4307 Link containing % as a single hex sequence interpreted to char
4311 <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>
4316 Link containing % as a double hex sequence interpreted to hex sequence
4320 <p>[[7%2525 Solution]]
4325 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
4326 Example for such a section: == < ==
4328 [[%23%3c]][[%23%3e]]
4330 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
4335 Link containing "<#" and ">#" as a hex sequences
4337 [[%3c%23]][[%3e%23]]
4339 <p>[[%3c%23]][[%3e%23]]
4344 Link containing an equals sign
4346 [[Special:BookSources/isbn=4-00-026157-6]]
4348 <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>
4355 Just a test of an article title containing a tilde.
4358 # note that links containing signatures, like [[Foo~~~~]], are
4359 # massaged by the pre-save transform (PST) and so the tildes are never
4360 # seen by the parser.
4362 Link containing a tilde
4366 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
4371 Link containing double-single-quotes '' (bug 4598)
4373 [[Lista d''e paise d''o munno]]
4375 <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>
4380 Link containing double-single-quotes '' in text (bug 4598 sanity check)
4382 Some [[Link|pretty ''italics'' and stuff]]!
4384 <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>!
4389 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
4391 ''Some [[Link|pretty ''italics'' and stuff]]!
4393 <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>
4398 Link with double quotes in title part (literal) and alternate part (interpreted)
4400 [[File:Denys Savchenko ''Pentecoste''.jpg]]
4404 [[''Pentecoste''|Pentecoste]]
4406 [[''Pentecoste''|''Pentecoste'']]
4408 <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>
4409 </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>
4410 </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>
4411 </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>
4416 Broken image links with HTML captions (bug 39700)
4418 [[File:Nonexistent|<script></script>]]
4419 [[File:Nonexistent|100px|<script></script>]]
4420 [[File:Nonexistent|<]]
4421 [[File:Nonexistent|a<i>b</i>c]]
4423 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4424 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4425 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
4426 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
4433 [[http://www.example.com]]
4435 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
4440 Plain link to URL with link text
4442 [[http://www.example.com Link text]]
4444 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
4449 Plain link to protocol-relative URL
4451 [[//www.example.com]]
4453 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
4458 Plain link to protocol-relative URL with link text
4460 [[//www.example.com Link text]]
4462 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
4467 Plain link to page with question mark in title
4473 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
4474 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
4479 # I'm fairly sure the expected result here is wrong.
4480 # We want these to be URL links, not pseudo-pages with URLs for titles....
4481 # However the current output is also pretty screwy.
4484 # I'm changing it to match the current output--it arguably makes more
4485 # sense in the light of the test above. Old expected result was:
4486 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
4488 # But I think this test is bordering on "garbage in, garbage out" anyway.
4493 Piped link to URL: [[http://www.example.com|an example URL]]
4495 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
4500 BUG 2: [[page|http://url/]] should link to page, not http://url/
4502 [[Main Page|http://url/]]
4504 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
4509 BUG 337: Escaped self-links should be bold
4513 [[Bug462]] [[Bug462]]
4515 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
4520 Self-link to section should not be bold
4524 [[Main Page#section]]
4526 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
4537 Self-link to numeric title
4543 <p><strong class="selflink">0</strong>
4548 Link to numeric-equivalent title
4554 <p><a href="/wiki/00" title="00">00</a>
4559 <nowiki> inside a link
4561 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
4563 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
4568 Non-breaking spaces in title
4570 [[ Main Page ]]
4572 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
4577 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
4583 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
4588 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
4594 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
4599 Internal link with en linktrail: no apostrophes (bug 27473)
4605 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
4610 Internal link with ca linktrail with apostrophes (bug 27473)
4616 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
4621 Internal link with kaa linktrail with apostrophes (bug 27473)
4627 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
4638 Internal link with is link prefix
4642 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
4644 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
4655 Internal link with is link trail and link prefix
4659 [[mótmælendatrú|xxx]]ar
4661 mótmælenda[[söfnuður]]
4662 mótmælenda[[söfnuður|söfnuðir]]
4663 mótmælenda[[söfnuður|söfnuðir]]xxx
4665 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
4666 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
4667 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
4668 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
4669 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
4674 Parsoid link trail escaping
4676 parsoid=html2wt,html2html
4680 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
4684 Parsoid link prefix escaping
4687 parsoid=html2wt,html2html
4689 Aðrir mótmælenda<nowiki/>[[söfnuður]]
4691 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
4695 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
4703 [http://wp.org ''foo'']
4705 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
4706 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
4707 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
4708 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
4713 ### Interwiki links (see maintenance/interwiki.sql)
4717 Inline interwiki link
4719 [[MeatBall:SoftSecurity]]
4721 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
4726 Inline interwiki link with empty title (bug 2372)
4730 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
4735 Interwiki link encoding conversion (bug 1636)
4737 *[[Wikipedia:ro:Olteniţa]]
4738 *[[Wikipedia:ro:Olteniţa]]
4740 <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>
4741 </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>
4747 Interwiki link with fragment (bug 2130)
4749 [[MeatBall:SoftSecurity#foo]]
4751 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
4766 Double interlanguage link
4777 Interlanguage link, with prefix links
4789 Double interlanguage link, with prefix links (bug 8897)
4802 Parsoid-specific test: Wikilinks with should RT properly
4808 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
4813 Parsoid: handle constructor well
4821 <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>
4824 <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>
4828 ## Redirects, Parsoid-only
4831 Simple redirect to page
4835 #REDIRECT [[Main Page]]
4837 <link rel="mw:PageProp/redirect" href="./Main_Page">
4841 Redirect to category
4845 #REDIRECT [[Category:Foo]]
4847 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
4851 Redirect to category page
4853 parsoid=wt2html,html2html
4855 #REDIRECT [[:Category:Foo]]
4857 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
4861 Redirect to image page
4865 #REDIRECT [[File:Wiki.png]]
4867 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
4871 Redirect to language
4875 #REDIRECT [[en:File:Wiki.png]]
4877 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
4881 Redirect to interwiki
4885 #REDIRECT [[meatball:File:Wiki.png]]
4887 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
4904 Broken br tag sanitization
4914 # TODO: Fix html2html mode (bug 51055)!
4916 Parsoid: Broken br tag recognition
4926 Incorrecly removing closing slashes from correctly formed XHTML
4928 <br style="clear:both;" />
4930 <p><br style="clear:both;" />
4935 Failing to transform badly formed HTML into correct XHTML
4937 <br style="clear: left;">
4938 <br style="clear: right;">
4939 <br style="clear: both;">
4941 <p><br style="clear: left;" />
4942 <br style="clear: right;" />
4943 <br style="clear: both;" />
4948 Handling html with a div self-closing tag
4957 <p><div title />
4961 <p><div title=bar />
4962 <div title=bar/>
4964 <div title="bar/"></div>
4970 Handling html with a br self-closing tag
4979 <p><br title="title" />
4980 <br title="title" />
4989 Horizontal ruler (should it add that extra space?)
5003 Horizontal ruler -- 4+ dashes render hr
5012 Horizontal ruler -- eats additional dashes on the same line
5021 Horizontal ruler -- does not collapse dashes on consecutive lines
5032 Horizontal ruler -- <4 dashes render as plain text
5041 Horizontal ruler -- Supports content following dashes on same line
5050 ### Block-level elements
5073 <ol><li>Numbered list
5090 ***#Number on level 4
5092 **#Number on level 3
5093 **#Number on level 3
5097 #** Level 3, but ordered
5100 <ol><li> with numbers
5102 <ul><li> and bullets
5104 <ol><li> and numbers
5106 </li><li>bullets again
5107 <ul><li>bullet level 2
5108 <ul><li>bullet level 3
5109 <ol><li>Number on level 4
5112 </li><li>bullet level 2
5113 <ol><li>Number on level 3
5114 </li><li>Number on level 3
5117 <ol><li>number level 2
5120 <ul><li><ul><li> Level 3
5124 <ol><li><ul><li><ul><li> Level 3, but ordered
5158 Nested lists 3 (first element empty)
5171 Nested lists 4 (first element empty)
5184 Nested lists 5 (both elements empty)
5197 Nested lists 6 (both elements empty)
5210 Nested lists 7 (skip initial nesting levels)
5214 <ul><li><ul><li><ul><li> foo
5222 Nested lists 8 (multiple nesting transitions)
5230 <ul><li><ul><li> bar
5240 1. Lists with start-of-line-transparent tokens before bullets: Comments
5254 2. Lists with start-of-line-transparent tokens before bullets: Template close
5266 List items are not parsed correctly following a <pre> block (bug 785)
5272 <ul><li> <pre>foo</pre>
5273 </li><li> <pre>bar</pre>
5280 List items from template
5291 * notSOL{{inner list}}
5310 List interrupted by empty line or heading
5320 <ul><li><ul><li> bar
5323 <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>
5324 <ul><li> Another list item
5330 Multiple list tags generated by templates
5345 Single-comment whitespace lines dont break lists, but multi-comment whitespace lines do
5348 <!--This line will NOT split the list-->
5350 <!--This line will NOT split the list either-->
5352 <!--foo--> <!--This line with more than 1 comment will split the list-->
5366 (Cannot test this with PHP parser since it relies on Tidy for the hack)
5368 parsoid=wt2html,wt2wt
5372 * {{echo|<li>templated li-hack}}
5373 * <!--foo--> <li> unsupported li-hack with preceding comments
5376 <li><li>not a li-hack
5382 <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>
5383 <li> <!--foo--> </li><li> li-hack with preceding comments</li></ul>
5386 <li></li><li>not a li-hack
5392 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
5403 <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>
5406 # ------------------------------------------------------------------------
5407 # The next set of tests are about Parsoid's ability to handle badly nested
5408 # tags (parse, minimize scope of fixup, and roundtrip back)
5409 # ------------------------------------------------------------------------
5412 Unbalanced closing block tags break a list
5413 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5423 </li></ul></div><div>
5429 Unbalanced closing non-block tags don't break a list
5430 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5440 <ul><li>a<span></span>
5446 Unclosed formatting tags that straddle lists are closed and reopened
5447 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5455 </li><li> <s> b </s>
5460 List embedded in a non-block tag
5461 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
5469 <p><small></small></p>
5475 <p><small></small></p>
5483 Magic Word: {{CURRENTDAY}}
5492 Magic Word: {{CURRENTDAY2}}
5501 Magic Word: {{CURRENTDAYNAME}}
5510 Magic Word: {{CURRENTDOW}}
5519 Magic Word: {{CURRENTMONTH}}
5528 Magic Word: {{CURRENTMONTHABBREV}}
5530 {{CURRENTMONTHABBREV}}
5537 Magic Word: {{CURRENTMONTHNAME}}
5539 {{CURRENTMONTHNAME}}
5546 Magic Word: {{CURRENTMONTHNAMEGEN}}
5548 {{CURRENTMONTHNAMEGEN}}
5555 Magic Word: {{CURRENTTIME}}
5564 Magic Word: {{CURRENTWEEK}} (@bug 4594)
5573 Magic Word: {{CURRENTYEAR}}
5582 Magic Word: {{FULLPAGENAME}}
5584 title=[[User:Ævar Arnfjörð Bjarmason]]
5588 <p>User:Ævar Arnfjörð Bjarmason
5593 Magic Word: {{FULLPAGENAMEE}}
5595 title=[[User:Ævar Arnfjörð Bjarmason]]
5599 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
5604 Magic Word: {{NAMESPACE}}
5606 title=[[User:Ævar Arnfjörð Bjarmason]]
5615 Magic Word: {{NAMESPACEE}}
5617 title=[[User:Ævar Arnfjörð Bjarmason]]
5626 Magic Word: {{NAMESPACENUMBER}}
5628 title=[[User:Ævar Arnfjörð Bjarmason]]
5637 Magic Word: {{NUMBEROFFILES}}
5646 Magic Word: {{PAGENAME}}
5648 title=[[User:Ævar Arnfjörð Bjarmason]]
5652 <p>Ævar Arnfjörð Bjarmason
5657 Magic Word: {{PAGENAME}} with metacharacters
5659 title=[['foo & bar = baz']]
5663 <p><i>'foo & bar = baz'</i>
5668 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
5670 title=[[*RFC 1234 http://example.com/]]
5674 <p>*RFC 1234 http://example.com/
5679 Magic Word: {{PAGENAMEE}}
5681 title=[[User:Ævar Arnfjörð Bjarmason]]
5685 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
5690 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
5692 title=[[*RFC 1234 http://example.com/]]
5696 <p>*RFC_1234_http://example.com/
5701 Magic Word: {{REVISIONID}}
5710 Magic Word: {{SCRIPTPATH}}
5719 Magic Word: {{SERVER}}
5723 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
5728 Magic Word: {{SERVERNAME}}
5737 Magic Word: {{SITENAME}}
5746 Case-sensitive magic words, when cased differently, should just be template transclusions
5753 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
5754 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
5755 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
5756 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
5761 Case-insensitive magic words should still work with weird casing.
5771 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
5776 Namespace 1 {{ns:1}}
5785 Namespace 1 {{ns:01}}
5794 Namespace 0 {{ns:0}} (bug 4783)
5802 Namespace 0 {{ns:00}} (bug 4783)
5810 Namespace -1 {{ns:-1}}
5819 Namespace User {{ns:User}}
5828 Namespace User talk {{ns:User_talk}}
5837 Namespace User talk {{ns:uSeR tAlK}}
5846 Namespace File {{ns:File}}
5855 Namespace File {{ns:Image}}
5864 Namespace (lang=de) Benutzer {{ns:User}}
5875 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
5881 <p>Benutzer Diskussion
5889 {{urlencode:hi world?!}}
5890 {{urlencode:hi world?!|WIKI}}
5891 {{urlencode:hi world?!|PATH}}
5892 {{urlencode:hi world?!|QUERY}}
5905 Magic links: internal link to RFC (bug 479)
5909 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
5914 Magic links: RFC (bug 479)
5918 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
5923 Magic links: ISBN (bug 1937)
5927 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
5932 Magic links: PMID incorrectly converts space to underscore
5936 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
5945 Nonexistent template
5947 {{thistemplatedoesnotexist}}
5949 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
5954 Template with invalid target containing tags
5956 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5958 <p>{{a<b>b</b>|foo|a=b|a = b}}
5963 Template with invalid target containing unclosed tag
5965 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5967 <p>{{a<b>|foo|a=b|a = b}}</b>
5974 This is a test template
5982 <p>This is a test template
5987 Template with explicit namespace
5991 <p>This is a test template
5999 This is a test template with parameter {{{param}}}
6005 {{paramtest|param=foo}}
6007 <p>This is a test template with parameter foo
6012 Template:paramtestnum
6018 Template unnamed parameter
6020 {{paramtestnum|Main Page|the main page}}
6022 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
6027 Template:templatesimple
6033 Template:templateredirect
6035 #redirect [[Template:templatesimple]]
6039 Template:templateasargtestnum
6045 Template:templateasargtest
6047 {{template{{{templ}}}}}
6051 Template:templateasargtest2
6057 Template with template name as unnamed argument
6059 {{templateasargtestnum|templatesimple}}
6066 Template with template name as argument
6068 {{templateasargtest|templ=simple}}
6075 Template with template name as argument (2)
6077 {{templateasargtest2|templ=templatesimple}}
6084 Template:templateasargtestdefault
6086 {{{{{templ|templatesimple}}}}}
6096 Template with default value
6098 {{templateasargtestdefault}}
6105 Template with default value (value set)
6107 {{templateasargtestdefault|templ=templa}}
6116 {{templateredirect}}
6123 Template with argument in separate line
6125 {{ templateasargtest |
6133 Template with complex template as argument
6136 param ={{ templateasargtest |
6139 <p>This is a test template with parameter (test)
6144 Template with thumb image (with link in description)
6147 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
6149 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>
6154 Template:complextemplate
6156 {{{1}}} {{paramtest|
6157 param ={{{param}}}}}
6161 Template with complex arguments
6164 param ={{ templateasargtest |
6165 templ = simple }}|[[Template:complextemplate|link]]}}
6167 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
6172 BUG 553: link with two variables in a piped link
6175 |[[{{{1}}}|{{{2}}}]]
6180 <td>[[{{{1}}}|{{{2}}}]]
6186 Magic variable as template parameter
6188 {{paramtest|param={{SITENAME}}}}
6190 <p>This is a test template with parameter MediaWiki
6197 [[{{{param}}}|link]]
6201 Template parameter as link source
6203 {{linktest|param=Main Page}}
6205 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
6210 Template-generated attribute string (k='v')
6212 <span {{attr_str|id|v1}}>bar</span>
6214 <p><span id="v1">bar</span>
6221 including another template, {{paramtest|param={{{arg}}}}}
6225 Template passing argument to another template
6227 {{paramtest2|arg='hmm'}}
6229 <p>including another template, This is a test template with parameter 'hmm'
6240 Template as link source
6244 [[{{linktest2}}|Main Page]]
6246 [[{{linktest2}}]]Page
6248 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6249 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6250 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
6268 Template infinite loop
6272 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
6277 Template from main namespace
6296 BUG 529: Template with table, not included at beginning of line
6315 BUG 523: Template shouldn't eat newline (or add an extra one before table)
6335 BUG 41: Template parameters shown as broken links
6344 Template with targets containing wikilinks
6348 {{[[{{echo|foo}}]]}}
6350 {{{{echo|[[foo}}]]}}
6352 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
6353 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
6361 ''None'' of '''this''' should be
6363 but rather passed unmodified
6367 # hmm, fix this or just deprecate msgnw and document its behavior?
6373 {{msgnw:MSGNW test}}
6375 <p>''None'' of '''this''' should be
6377 but rather passed unmodified
6385 {{int:youhavenewmessages|lots of money|not!}}
6387 <p>You have lots of money (not!).
6394 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
6398 <includeonly> and <noinclude> being included
6409 <onlyinclude>Foo</onlyinclude>bar
6413 <onlyinclude> being included
6425 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
6429 <onlyinclude> and <includeonly> being included
6438 <includeonly> and <noinclude> on a page
6440 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
6447 Un-closed <noinclude>
6454 <onlyinclude> on a page
6456 <onlyinclude>Foo</onlyinclude>bar
6463 Un-closed <onlyinclude>
6470 Self-closed noinclude, includeonly, onlyinclude tags
6481 Unbalanced includeonly and noinclude tags
6485 |b</noinclude></noinclude>
6486 |c</noinclude></includeonly>
6487 |d</includeonly></includeonly>
6496 <td>c</includeonly>
6498 <td>d</includeonly></includeonly>
6504 Template:Includeonly section
6507 ==Includeonly section==
6513 Bug 6563: Edit link generation for section shown by <includeonly>
6515 {{includeonly section}}
6517 <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>
6518 <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>
6522 # Uses same input as the contents of [[Template:Includeonly section]]
6524 Bug 6563: Section extraction for section shown by <includeonly>
6529 ==Includeonly section==
6537 Bug 6563: Edit link generation for section suppressed by <includeonly>
6540 ==Includeonly section==
6544 <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>
6549 Bug 6563: Section extraction for section suppressed by <includeonly>
6554 ==Includeonly section==
6562 Un-closed <includeonly>
6568 # TODO: test with DOM fragment reuse!
6570 Parsoid: DOM fragment reuse
6572 parsoid=wt2wt,wt2html
6574 a{{echo|b<table></table>c}}d
6586 a<span typeof="mw:Transclusion">b</span>
6587 <table></table><span>c</span>d
6588 <p typeof="mw:Transclusion">ab</p>
6591 <p typeof="mw:Transclusion">a</p>
6597 ### <includeonly> and <noinclude> in attributes
6600 0. includeonly around the entire attribute
6602 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
6604 <p><span id="v2">bar</span>
6609 1. includeonly in html attr key
6611 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
6613 <p><span id="foo">bar</span>
6618 2. includeonly in html attr value
6620 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
6621 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
6623 <p><span id="v1">bar</span>
6624 <span id="v1">bar</span>
6629 3. includeonly in part of an attr value
6631 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
6633 <p><span style="color:red;">bar</span>
6638 ### Testing parsing of templates where a template arg
6639 ### has the same name as the template itself.
6649 Templates: Template Name/Arg clash: 1. Use of positional param
6658 Templates: Template Name/Arg clash: 2. Use of named param
6667 Templates: Template Name/Arg clash: 3. Use of named param with empty input
6676 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
6680 Templates: 1. Simple use
6689 Templates: 2. Inside a block tag
6691 <div>{{echo|Foo}}</div>
6698 Templates: P-wrapping: 1a. Templates on consecutive lines
6709 Templates: P-wrapping: 1b. Templates on consecutive lines
6723 Templates: P-wrapping: 1c. Templates on consecutive lines
6726 {{echo|bar}} <div>baz</div>
6735 Templates: P-wrapping: 1d. Template preceded by comment-only line
6737 parsoid=wt2html,wt2wt
6743 <p typeof="mw:Transclusion">Bar
6748 Templates: Inline Text: 1. Multiple tmeplate uses
6750 {{echo|Foo}}bar{{echo|baz}}
6757 Templates: Inline Text: 2. Back-to-back template uses
6759 {{echo|Foo}}{{echo|bar}}
6766 Templates: Block Tags: 1. Multiple template uses
6768 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
6770 <div>Foo</div><div>bar</div><div>baz</div>
6775 Templates: Block Tags: 2. Back-to-back template uses
6777 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
6779 <div>Foo</div><div>bar</div>
6784 Templates: Links: 1. Simple example
6786 {{echo|[[Foo|bar]]}}
6788 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6793 Templates: Links: 2. Generation of link href
6795 [[{{echo|Foo}}|bar]]
6797 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6802 Templates: Links: 3. Generation of part of a link href
6804 [[Fo{{echo|o}}|bar]]
6808 [[Foo{{echo|bar}}baz]]
6810 [[Foo{{echo|bar}}|bar]]
6812 [[:Foo{{echo|bar}}]]
6814 [[:Foo{{echo|bar}}|bar]]
6816 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6817 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6818 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
6819 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
6820 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6821 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
6826 Templates: Links: 4. Multiple templates generating link href
6828 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
6830 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6835 Templates: Links: 5. Generation of link text
6837 [[Foo|{{echo|bar}}]]
6839 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6844 Templates: Links: 5. Nested templates (only outermost template should be marked)
6846 {{echo|[[{{echo|Foo}}|bar]]}}
6848 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6853 Templates: HTML Tag: 1. Generation of HTML attr. key
6855 <div {{echo|style}}="color:red;">foo</div>
6857 <div style="color:red;">foo</div>
6862 Templates: HTML Tag: 2. Generation of HTML attr. value
6864 <div style={{echo|'color:red;'}}>foo</div>
6866 <div style="color:red;">foo</div>
6871 Templates: HTML Tag: 3. Generation of HTML attr key and value
6873 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
6875 <div style="color:red;">foo</div>
6880 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
6882 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
6884 <div title="This is a long title with just one piece templated">foo</div>
6889 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
6891 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
6893 <div title="This is a long title with just one piece templated">foo</div>
6898 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
6900 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
6902 <div title="This is a long title with just one piece templated">foo</div>
6907 Templates: HTML Tag: 7. Generation of partial attribute key string
6909 <div st{{echo|yle}}="color:red;">foo</div>
6911 <div style="color:red;">foo</div>
6916 Templates: HTML Tables: 1. Generating start of a HTML table
6918 {{echo|<table><tr><td>foo</td>}}</tr></table>
6920 <table><tr><td>foo</td></tr></table>
6925 Templates: HTML Tables: 2a. Generating middle of a HTML table
6927 <table><tr>{{echo|<td>foo</td>}}</tr></table>
6929 <table><tr><td>foo</td></tr></table>
6934 Templates: HTML Tables: 2b. Generating middle of a HTML table
6936 <table>{{echo|<tr><td>foo</td></tr>}}</table>
6938 <table><tr><td>foo</td></tr></table>
6943 Templates: HTML Tables: 3. Generating end of a HTML table
6945 <table><tr>{{echo|<td>foo</td></tr></table>}}
6947 <table><tr><td>foo</td></tr></table>
6952 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
6954 {{echo|<table>}}<tr><td>foo</td></tr></table>
6956 <table><tr><td>foo</td></tr></table>
6961 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
6963 <table>{{echo|<tr>}}<td>foo</td></tr></table>
6965 <table><tr><td>foo</td></tr></table>
6970 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
6972 <table><tr>{{echo|<td>}}foo</td></tr></table>
6974 <table><tr><td>foo</td></tr></table>
6979 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
6981 <table><tr><td>foo{{echo|</td>}}</tr></table>
6983 <table><tr><td>foo</td></tr></table>
6988 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
6990 <table><tr><td>foo</td>{{echo|</tr>}}</table>
6992 <table><tr><td>foo</td></tr></table>
6997 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
6999 <table><tr><td>foo</td></tr>{{echo|</table>}}
7001 <table><tr><td>foo</td></tr></table>
7006 Templates: HTML Tables: 5. Proper fostering of categories from inside
7008 parsoid=wt2html,wt2wt
7010 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
7011 <!--Two categories (Bug 50330)-->
7012 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
7014 <link rel="mw:WikiLink/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
7015 <!--Two categories (Bug 50330)-->
7016 <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>
7020 Templates: Wiki Tables: 1a. Fostering of entire template content
7028 <tr><td></td></tr></table>
7033 Templates: Wiki Tables: 1b. Fostering of entire template content
7046 <tr><td></td></tr></table>
7051 Templates: Wiki Tables: 2. Fostering of partial template content
7061 <tr><td></td></tr></table>
7066 Templates: Wiki Tables: 3. td-content via multiple templates
7069 {{echo|{{pipe}}a}}{{echo|b}}
7080 Templates: Wiki Tables: 4. Templated tags, no content
7086 <tr><td></td></tr></table>
7091 Templates: Wiki Tables: 5. Templated tags, regular td-tags
7105 Templates: Wiki Tables: 6. Templated tags, templated td-tags
7119 Templates: Lists: Multi-line list-items via templates
7121 *{{echo|a {{nonexistent|
7123 *{{echo|b {{nonexistent|
7126 <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>
7127 </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>
7133 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
7135 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
7137 <p><i>ab</i>c<i>d</i>e
7142 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
7143 (PHP parser generates misnested html)
7145 parsoid=wt2html,wt2wt
7147 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
7149 <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>
7153 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
7154 (PHP parser generates misnested html)
7156 parsoid=wt2html,wt2wt
7158 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
7160 <div typeof="mw:Transclusion"><i>a</i></div>
7161 <div typeof="mw:Transclusion"><i>b</i>c<i>d</i></div>
7162 <div typeof="mw:Transclusion">e</div>
7166 Templates: Ugly nesting: 4. Divs opened/closed across templates
7168 a<div>b{{echo|c</div>d}}e
7175 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
7181 |{{echo|foo</table>}}
7185 <table typeof="mw:Transclusion">
7188 <td>foo</td></tr></tbody></table><span>bar</span>
7192 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
7202 <td>1. {{echo|foo </table>}}</td>
7204 <td>2. {{echo|baz </table>}}</td>
7217 <table about="#mwt1" typeof="mw:Transclusion">
7222 <td >1. foo </td></tr></tbody></table></td>
7224 <td >2. baz </td></tr></tbody></table><span about="#mwt1">
7225 </span><span about="#mwt1">
7227 abc</span><span about="#mwt1">
7228 </span><span about="#mwt1">
7229 </span><span about="#mwt1">
7230 </span><span about="#mwt1">
7231 </span><span about="#mwt1">
7233 xyz</span><span about="#mwt1">
7234 </span><span about="#mwt1">
7239 Templates: Ugly templates: 3. newline-only template parameter
7248 # This looks like a bug: a single newline triggers p/br for some reason.
7250 Templates: Ugly templates: 4. newline-only template parameter inconsistency
7261 Parser Functions: 1. Simple example
7270 Parser Functions: 2. Nested use (only outermost should be marked up)
7279 ### Pre-save transform tests
7282 pre-save transform: subst:
7288 This is a test template
7292 pre-save transform: normal template
7302 pre-save transform: nonexistent template
7306 {{thistemplatedoesnotexist}}
7308 {{thistemplatedoesnotexist}}
7313 pre-save transform: subst magic variables
7322 # This is bug 89, which I fixed. -- wtm
7324 pre-save transform: subst: templates with parameters
7328 {{subst:paramtest|param="something else"}}
7330 This is a test template with parameter "something else"
7336 <nowiki>'''not wiki'''</nowiki>
7340 pre-save transform: nowiki in subst (bug 1188)
7344 {{subst:nowikitest}}
7346 <nowiki>'''not wiki'''</nowiki>
7351 Template:commenttest
7353 This template has <!-- a comment --> in it.
7357 pre-save transform: comment in subst (bug 1936)
7361 {{subst:commenttest}}
7363 This template has <!-- a comment --> in it.
7367 pre-save transform: unclosed tag
7371 <nowiki>'''not wiki'''
7373 <nowiki>'''not wiki'''
7377 pre-save transform: mixed tag case
7381 <NOwiki>'''not wiki'''</noWIKI>
7383 <NOwiki>'''not wiki'''</noWIKI>
7387 pre-save transform: unclosed comment in <nowiki>
7391 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
7393 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
7396 # Leading @ in this template definition works around a limitation
7397 # in parsoid's parserTests which otherwise strips the <span> from the
7398 # result (confusing it for a template wrapper)
7402 @<span onmouseover="alert('crap')">Oh no</span>
7406 (confirming safety of fix for subst bug 1936)
7408 {{Template:dangerous}}
7410 <p>@<span>Oh no</span>
7415 pre-save transform: comment containing gallery (bug 5024)
7419 <!-- <gallery>data</gallery> -->
7421 <!-- <gallery>data</gallery> -->
7425 pre-save transform: comment containing extension
7429 <!-- <tag>data</tag> -->
7431 <!-- <tag>data</tag> -->
7435 pre-save transform: comment containing nowiki
7439 <!-- <nowiki>data</nowiki> -->
7441 <!-- <nowiki>data</nowiki> -->
7445 pre-save transform: <noinclude> in subst (bug 3298)
7455 pre-save transform: <onlyinclude> in subst (bug 3298)
7467 {{<includeonly>subst:</includeonly>Includes}}
7471 Template:SafeSubstTest
7473 {{<includeonly>safesubst:</includeonly>Includes}}
7477 bug 22297: safesubst: works during PST
7481 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
7487 bug 22297: safesubst: works during normal parse
7496 subst: does not work during normal parse
7500 <p>{{subst:Includes}}
7505 pre-save transform: context links ("pipe trick")
7509 [[Article (context)|]]
7512 [[Bar:Article (context)|]]
7513 [[:Bar:Article (context)|]]
7515 [[|Article (context)]]
7519 [[Article (context)|Article]]
7520 [[Bar:Article|Article]]
7521 [[:Bar:Article|Article]]
7522 [[Bar:Article (context)|Article]]
7523 [[:Bar:Article (context)|Article]]
7525 [[Article (context)]]
7526 [[Bar:X (Y) Z|X (Y) Z]]
7527 [[:Bar:X (Y) Z|X (Y) Z]]
7531 pre-save transform: context links ("pipe trick") with interwiki prefix
7535 [[interwiki:Article|]]
7536 [[:interwiki:Article|]]
7537 [[interwiki:Bar:Article|]]
7538 [[:interwiki:Bar:Article|]]
7540 [[interwiki:Article|Article]]
7541 [[:interwiki:Article|Article]]
7542 [[interwiki:Bar:Article|Bar:Article]]
7543 [[:interwiki:Bar:Article|Bar:Article]]
7547 pre-save transform: context links ("pipe trick") with parens in title
7549 pst title=[[Somearticle (context)]]
7553 [[Article (context)|Article]]
7557 pre-save transform: context links ("pipe trick") with comma in title
7559 pst title=[[Someplace, Somewhere]]
7562 [[Otherplace, Elsewhere|]]
7563 [[Otherplace, Elsewhere, Anywhere|]]
7565 [[Otherplace, Somewhere|Otherplace]]
7566 [[Otherplace, Elsewhere|Otherplace]]
7567 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
7571 pre-save transform: context links ("pipe trick") with parens and comma
7573 pst title=[[Someplace (IGNORED), Somewhere]]
7576 [[Otherplace (place), Elsewhere|]]
7578 [[Otherplace, Somewhere|Otherplace]]
7579 [[Otherplace (place), Elsewhere|Otherplace]]
7583 pre-save transform: context links ("pipe trick") with comma and parens
7585 pst title=[[Who, me? (context)]]
7588 [[Me, Myself, and I (1937 song)|]]
7590 [[Yes, you. (context)|Yes, you.]]
7591 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
7595 pre-save transform: context links ("pipe trick") with namespace
7597 pst title=[[Ns:Somearticle]]
7601 [[Ns:Article|Article]]
7605 pre-save transform: context links ("pipe trick") with namespace and parens
7607 pst title=[[Ns:Somearticle (context)]]
7611 [[Ns:Article (context)|Article]]
7615 pre-save transform: context links ("pipe trick") with namespace and comma
7617 pst title=[[Ns:Somearticle, Context, Whatever]]
7621 [[Ns:Article, Context, Whatever|Article]]
7625 pre-save transform: context links ("pipe trick") with namespace, comma and parens
7627 pst title=[[Ns:Somearticle, Context (context)]]
7631 [[Ns:Article (context)|Article]]
7635 pre-save transform: context links ("pipe trick") with namespace, parens and comma
7637 pst title=[[Ns:Somearticle (IGNORED), Context]]
7641 [[Ns:Article, Context|Article]]
7645 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
7649 [[Article(context)|]]
7650 [[Bar:Article(context)|]]
7651 [[:Bar:Article(context)|]]
7652 [[|Article(context)]]
7656 [[Article(context)|Article]]
7657 [[Bar:Article(context)|Article]]
7658 [[:Bar:Article(context)|Article]]
7659 [[Article(context)]]
7661 [[:Bar:X(Y)Z|X(Y)Z]]
7665 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
7669 [[Article (context)|]]
7670 [[Bar:Article (context)|]]
7671 [[:Bar:Article (context)|]]
7672 [[|Article (context)]]
7676 [[Article (context)|Article]]
7677 [[Bar:Article (context)|Article]]
7678 [[:Bar:Article (context)|Article]]
7679 [[Article (context)]]
7680 [[Bar:X (Y) Z|X (Y) Z]]
7681 [[:Bar:X (Y) Z|X (Y) Z]]
7685 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
7689 [[Article(context)|]]
7690 [[Bar:Article(context)|]]
7691 [[:Bar:Article(context)|]]
7692 [[|Article(context)]]
7696 [[Article(context)|Article]]
7697 [[Bar:Article(context)|Article]]
7698 [[:Bar:Article(context)|Article]]
7699 [[Article(context)]]
7701 [[:Bar:X(Y)Z|X(Y)Z]]
7705 pre-save transform: context links ("pipe trick") with commas (bug 21660)
7709 [[Article (context), context|]]
7710 [[Article (context),context|]]
7711 [[Bar:Article (context), context|]]
7712 [[Bar:Article (context),context|]]
7713 [[:Bar:Article (context), context|]]
7714 [[:Bar:Article (context),context|]]
7716 [[Article (context), context|Article]]
7717 [[Article (context),context|Article]]
7718 [[Bar:Article (context), context|Article]]
7719 [[Bar:Article (context),context|Article]]
7720 [[:Bar:Article (context), context|Article]]
7721 [[:Bar:Article (context),context|Article]]
7725 pre-save transform: trim trailing empty lines
7729 Empty lines are trimmed
7735 Empty lines are trimmed
7739 pre-save transform: Signature expansion
7744 * <noinclude>~~~</noinclude>
7745 * <includeonly>~~~</includeonly>
7746 * <onlyinclude>~~~</onlyinclude>
7748 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
7749 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
7750 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
7751 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
7756 pre-save transform: Signature expansion in nowiki tags (bug 93)
7762 <nowiki>~~~~</nowiki>
7764 <includeonly><nowiki>~~~~</nowiki></includeonly>
7766 <noinclude><nowiki>~~~~</nowiki></noinclude>
7768 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
7770 {{subst:Foo}} shall be converted to FOO
7772 As well as inside noinclude/onlyinclude
7773 <noinclude>{{subst:Foo}}</noinclude>
7774 <onlyinclude>{{subst:Foo}}</onlyinclude>
7776 But not inside includeonly
7777 <includeonly>{{subst:Foo}}</includeonly>
7781 <nowiki>~~~~</nowiki>
7783 <includeonly><nowiki>~~~~</nowiki></includeonly>
7785 <noinclude><nowiki>~~~~</nowiki></noinclude>
7787 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
7789 FOO shall be converted to FOO
7791 As well as inside noinclude/onlyinclude
7792 <noinclude>FOO</noinclude>
7793 <onlyinclude>FOO</onlyinclude>
7795 But not inside includeonly
7796 <includeonly>{{subst:Foo}}</includeonly>
7800 Parsoid: Recognize nowiki with trailing space in tags
7804 <nowiki ><div>[[foo]]</nowiki >
7812 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
7819 Parsoid: Recognize nowiki with odd capitalization
7823 <noWikI ><div>[[foo]]</Nowiki >
7825 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
7830 Parsoid: Escape nowiki with trailing space in tags
7834 <nowiki > foo </nowiki >
7840 <p><nowiki > foo </nowiki ></p>
7841 <p>a<nowiki />b</p>
7842 <p>c<nowiki/ >d</p>
7846 Parsoid: Escape weird noWikI capitalizations
7850 <noWikI > foo </NoWikI >
7852 <p><noWikI > foo </NoWikI ></p>
7856 ### Message transform tests
7859 message transform: magic variables
7869 message transform: should not transform wiki markup
7879 message transform: <noinclude> in transcluded template (bug 4926)
7889 message transform: <onlyinclude> in transcluded template (bug 4926)
7899 {{#special:}} page name, known
7903 {{#special:Recentchanges}}
7905 Special:RecentChanges
7909 {{#special:}} page name with subpage, known
7913 {{#special:Recentchanges/param}}
7915 Special:RecentChanges/param
7919 {{#special:}} page name, unknown
7923 {{#special:foobar nonexistent}}
7925 Special:Foobar nonexistent
7929 {{#speciale:}} page name, known
7933 {{#speciale:Recentchanges}}
7935 Special:RecentChanges
7939 {{#speciale:}} page name with subpage, known
7943 {{#speciale:Recentchanges/param}}
7945 Special:RecentChanges/param
7949 {{#speciale:}} page name, unknown
7953 {{#speciale:foobar nonexistent}}
7955 Special:Foobar_nonexistent
7964 [[Image:foobar.jpg]]
7966 <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>
7973 [[Image:foobar.jpg|right]]
7975 <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>
7980 Simple image (using File: namespace, now canonical)
7984 <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>
7991 [[Image:foobar.jpg|right|Caption text]]
7993 <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>
7998 Image with empty attribute
8000 [[Image:foobar.jpg|right||Caption text]]
8002 <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>
8007 Image with attributes from template.
8009 [[Image:foobar.jpg|{{image_attribs}}]]
8011 <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>
8016 Image with link tails
8018 123[[Image:foobar.jpg]]456
8019 123[[Image:foobar.jpg|right]]456
8020 123[[Image:foobar.jpg|thumb]]456
8022 <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
8024 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
8025 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
8030 Image with multiple captions -- only last one is accepted
8032 [[Image:foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8034 <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>
8039 Image with width attribute at different positions
8041 [[Image:foobar.jpg|200px|right|Caption]]
8042 [[Image:foobar.jpg|right|200px|Caption]]
8043 [[Image:foobar.jpg|right|Caption|200px]]
8045 <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>
8046 <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>
8047 <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>
8052 Image with link parameter, wiki target
8054 [[Image:foobar.jpg|link=Target page]]
8056 <p><a href="/wiki/Target_page" title="Target page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8061 Image with link parameter, URL target
8063 [[Image:foobar.jpg|link=http://example.com/]]
8065 <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>
8070 Image with link parameter, wgExternalLinkTarget
8072 [[Image:foobar.jpg|link=http://example.com/]]
8074 wgExternalLinkTarget='foobar'
8076 <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>
8081 Image with link parameter, wgNoFollowLinks set to false
8083 [[Image:foobar.jpg|link=http://example.com/]]
8085 wgNoFollowLinks=false
8087 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8092 Image with link parameter, wgNoFollowDomainExceptions
8094 [[Image:foobar.jpg|link=http://example.com/]]
8096 wgNoFollowDomainExceptions='example.com'
8098 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8103 Image with link parameter, wgExternalLinkTarget, unnamed parameter
8105 [[Image:foobar.jpg|link=http://example.com/|Title]]
8107 wgExternalLinkTarget='foobar'
8109 <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>
8114 Image with empty link parameter
8116 [[Image:foobar.jpg|link=]]
8118 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
8123 Image with link parameter (wiki target) and unnamed parameter
8125 [[Image:foobar.jpg|link=Target page|Title]]
8127 <p><a href="/wiki/Target_page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8132 Image with link parameter (URL target) and unnamed parameter
8134 [[Image:foobar.jpg|link=http://example.com/|Title]]
8136 <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>
8141 Thumbnail image with link parameter
8145 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
8147 <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>
8152 Manually-specified thumbnail image
8156 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
8158 <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>
8163 Manually-specified thumbnail image with explicit link to wiki page
8167 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
8169 <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>
8174 Manually-specified thumbnail image with explicit link to url
8178 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
8180 <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>
8185 Manually-specified thumbnail image with explicit no link
8189 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
8191 <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>
8196 Manually-specified thumbnail image with explicit link and alt text
8200 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
8202 <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>
8207 Image with frame and link
8209 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
8211 <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>
8216 Image with frame and link and explicit alt
8218 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
8220 <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>
8225 Image with wiki markup in implicit alt
8227 [[Image:Foobar.jpg|testing '''bold''' in alt]]
8229 <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>
8234 Image with wiki markup in explicit alt
8236 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
8238 <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>
8243 Link to image page- image page normally doesn't exists, hence edit link
8244 Add test with existing image page
8245 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
8249 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
8254 bug 18784 Link to non-existent image page with caption should use caption as link text
8256 [[:Image:test|caption]]
8258 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
8263 Frameless image caption with a free URL
8265 [[Image:foobar.jpg|http://example.com]]
8267 <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>
8272 Thumbnail image caption with a free URL
8274 [[Image:foobar.jpg|thumb|http://example.com]]
8276 <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>
8281 Thumbnail image caption with a free URL and explicit alt
8283 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
8285 <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>
8290 SVG thumbnails with no language set
8293 [[File:Foobar.svg|thumb|width=200]]
8295 <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>
8300 SVG thumbnails with language de
8303 [[File:Foobar.svg|thumb|width=200|lang=de]]
8305 <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>
8310 SVG thumbnails with invalid language code
8313 [[File:Foobar.svg|thumb|width=200|lang=invalid.language.code]]
8315 <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>
8320 BUG 1887: A ISBN with a thumbnail
8322 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
8324 <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>
8329 BUG 1887: A RFC with a thumbnail
8331 [[Image:foobar.jpg|thumb|This is RFC 12354]]
8333 <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>
8338 BUG 1887: A mailto link with a thumbnail
8340 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
8342 <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>
8346 # Pending resolution to bug 368
8348 BUG 648: Frameless image caption with a link
8350 [[Image:foobar.jpg|text with a [[link]] in it]]
8352 <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>
8357 BUG 648: Frameless image caption with a link (suffix)
8359 [[Image:foobar.jpg|text with a [[link]]foo in it]]
8361 <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>
8366 BUG 648: Frameless image caption with an interwiki link
8368 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
8370 <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>
8375 BUG 648: Frameless image caption with a piped interwiki link
8377 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
8379 <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>
8384 Escape HTML special chars in image alt text
8386 [[Image:foobar.jpg|& < > "]]
8388 <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>
8393 BUG 499: Alt text should have Ӓ, not &1234;
8395 [[Image:foobar.jpg|♀]]
8397 <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>
8402 Broken image caption with link
8404 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
8406 <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.
8411 Image caption containing another image
8413 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
8415 <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>
8420 Image caption containing a newline
8422 [[Image:Foobar.jpg|This
8425 <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>
8430 Parsoid: Image caption containing leading space
8431 (The leading space should not trigger nowiki escaping in wt2wt mode)
8433 [[Image:Foobar.jpg|thumb| bar]]
8435 <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>
8440 Bug 3090: External links other than http: in image captions
8442 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
8444 <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>
8451 [[Image:foobar.jpg|a|class=b]]
8453 <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>
8458 Localized image handling (1).
8462 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
8464 <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>
8469 Localized image handling (2).
8473 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
8475 <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>
8480 "border", "frameless" and "class" attributes on an image.
8482 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
8484 <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>
8491 #REDIRECT [[File:Barfoo.jpg]]
8497 [[Image:Barfoo.jpg]]
8499 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
8504 Missing image with uploads disabled
8508 [[Image:Foobaz.jpg]]
8510 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
8514 # Parsoid-specific testing for images
8515 # http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
8516 # Currently imperfect due to a flaw in the Parsoid testrunner
8520 Parsoid-specific image handling - simple image
8524 [[Image:Foobar.jpg]]
8527 <span class="mw-default-size" typeof="mw:Image">
8528 <a href="File:Foobar.jpg">
8529 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8536 Parsoid-specific image handling - simple image without link
8540 [[Image:Foobar.jpg|link=]]
8543 <span class="mw-default-size" typeof="mw:Image">
8545 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8552 Parsoid-specific image handling - simple image with specific link
8556 [[Image:Foobar.jpg|link=Main Page]]
8559 <span class="mw-default-size" typeof="mw:Image">
8560 <a href="Main_Page">
8561 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8568 Parsoid-specific image handling - simple image with size and middle alignment
8572 [[Image:Foobar.jpg|50px|middle]]
8575 <span class="mw-valign-middle" typeof="mw:Image">
8576 <a href="File:Foobar.jpg">
8577 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
8584 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
8588 [[Image:Foobar.jpg|500x10px|baseline|caption]]
8591 <span class="mw-valign-baseline" typeof="mw:Image" data-mw="{"caption":"caption"}">
8592 <a href="File:Foobar.jpg">
8593 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/89px-Foobar.jpg" height="10" width="89">
8600 Parsoid-specific image handling - simple image with border and size spec
8604 [[Image:Foobar.jpg|50px|border|caption]]
8607 <span class="mw-image-border" typeof="mw:Image" data-mw="{"caption":"caption"}">
8608 <a href="File:Foobar.jpg">
8609 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
8616 Parsoid-specific image handling - thumbnail with halign, valign, and caption
8620 [[Image:Foobar.jpg|thumb|left|baseline|caption content]]
8622 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
8623 <a href="File:Foobar.jpg">
8624 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/180px-Foobar.jpg" height="21" width="180" />
8626 <figcaption>caption content</figcaption>
8631 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
8635 [[Image:Foobar.jpg|thumb|50x50px|right|middle|caption]]
8637 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
8638 <a href="File:Foobar.jpg">
8639 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
8641 <figcaption>caption</figcaption>
8646 Parsoid-specific image handling - framed image with specific size and caption
8650 [[Image:Foobar.jpg|500x50px|frame|caption]]
8652 <figure typeof="mw:Image/Frame">
8653 <a href="File:Foobar.jpg">
8654 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
8656 <figcaption>caption</figcaption>
8661 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
8665 [[Image:Foobar.jpg|500x50px|frame|left|baseline|caption]]
8667 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
8668 <a href="File:Foobar.jpg">
8669 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
8671 <figcaption>caption</figcaption>
8676 Parsoid-specific image handling - frameless image with specific size, border, and caption
8680 [[Image:Foobar.jpg|frameless|500x50px|border|caption]]
8683 <span class="mw-image-border" typeof="mw:Image/Frameless" data-mw="{"caption":"caption"}">
8684 <a href="File:Foobar.jpg">
8685 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
8691 #Parsoid-specific image handling - simple image with a formatted caption
8695 #[[Image:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
8698 #<span typeof="mw:Image">
8699 #<a class="mw-default-size" href="Image:Foobar.jpg">
8700 #<img alt="Foobar.jpg" class="mw-default-size" src="http://upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8711 Subpage test/subpage
8719 subpage title=[[Subpage test]]
8723 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
8728 Subpage noslash link
8730 subpage title=[[Subpage test]]
8734 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
8738 # TODO: make this PHP-parser compatible!
8740 Relative subpage noslash link
8742 parsoid=wt2wt,wt2html,html2html
8743 subpage title=[[Subpage test/1/2/3/4]]
8749 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
8750 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
8753 # TODO: make this PHP-parser compatible!
8755 Parsoid: dot-slash prefixed wikilinks
8757 parsoid=wt2wt,wt2html,html2html
8765 <p><a rel="mw:WikiLink" href="./Foo">foo</a></p>
8766 <p><a rel="mw:WikiLink" href="./Bar">bar</a></p>
8767 <p><a rel="mw:WikiLink" href="./Baz/">baz/</a></p>
8775 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
8780 BUG 561: {{/Subpage}}
8782 subpage title=[[Page]]
8786 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
8794 Category:MediaWiki User's Guide
8802 [[:Category:MediaWiki User's Guide]]
8804 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
8813 [[Category:MediaWiki User's Guide]]
8815 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
8819 PAGESINCATEGORY invalid title fatal (r33546 fix)
8821 {{PAGESINCATEGORY:<bogus>}}
8828 Category with different sort key
8832 [[Category:MediaWiki User's Guide|Foo]]
8834 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
8838 Category with identical sort key
8842 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
8844 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
8848 Category with empty sort key
8853 [[Category:MediaWiki User's Guide|]]
8855 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
8859 Category with empty sort key and parentheses
8864 [[Category:Foo (bar)|]]
8866 [[Category:Foo (bar)|Foo]]
8870 Category with link tail
8875 123[[Category:Foo]]456
8877 123[[Category:Foo]]456
8881 Category with template
8886 [[Category:{{echo|Foo}}]]
8888 [[Category:{{echo|Foo}}]]
8892 Category with template in sort key
8897 [[Category:Foo|{{echo|Bar}}]]
8899 [[Category:Foo|{{echo|Bar}}]]
8903 Category with template in sort key and title
8908 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
8910 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
8914 Category / paragraph interactions
8916 Foo [[Category:Baz]] Bar
8918 Foo [[Category:Baz]]
8926 [[Category:Baz]] Bar
8939 {{echo|[[Category:Baz]]}}
8954 Parsoid: Serialize link to category page with colon escape
8960 [[:Category:Foo|Bar]]
8963 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
8964 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
8969 Parsoid: Link prefix/suffixes aren't applied to category links
8971 parsoid=wt2html,wt2wt,html2html
8976 <p>x<link rel="mw:WikiLink/Category" href="Category:Foo">y</p>
8980 Parsoid: Serialize link to file page with colon escape
8986 [[:File:Foo.png|Bar]]
8989 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
8990 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
8995 Parsoid: Serialize a genuine category link without colon escape
9000 [[Category:Foo|Bar]]
9002 <link rel="mw:WikiLink/Category" href="Category:Foo">
9003 <link rel="mw:WikiLink/Category" href="Category:Foo#Bar">
9007 ### Inter-language links
9010 Inter-language links
9016 [[zh:食品]]
9018 es:Alimento fr:Nourriture zh:食品
9022 Duplicate interlanguage links (bug 24502)
9038 Basic section headings
9045 ===Smaller headline===
9048 <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>
9051 <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>
9054 <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>
9060 Section headings with TOC
9063 === Subheadline 1 ===
9064 ===== Skipping a level =====
9065 ====== Skipping a level ======
9069 ===Another headline===
9071 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9073 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
9075 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
9077 <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>
9079 <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>
9086 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
9088 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
9093 <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>
9094 <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>
9095 <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>
9096 <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>
9097 <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>
9100 <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>
9104 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
9106 Handling of sections up to level 6 and beyond
9109 == Level 2 Heading==
9110 === Level 3 Heading===
9111 ==== Level 4 Heading====
9112 ===== Level 5 Heading=====
9113 ====== Level 6 Heading======
9114 ======= Level 7 Heading=======
9115 ======== Level 8 Heading========
9116 ========= Level 9 Heading=========
9117 ========== Level 10 Heading==========
9119 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9121 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
9123 <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>
9125 <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>
9127 <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>
9129 <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>
9131 <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>
9132 <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>
9133 <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>
9134 <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>
9135 <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>
9148 <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>
9149 <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>
9150 <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>
9151 <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>
9152 <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>
9153 <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>
9154 <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>
9155 <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>
9156 <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>
9157 <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>
9162 TOC regression (bug 9764)
9166 ==== title 1.1.1 ====
9171 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9173 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9175 <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>
9177 <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>
9180 <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>
9183 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
9185 <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>
9190 <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>
9191 <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>
9192 <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>
9193 <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>
9194 <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>
9195 <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>
9200 TOC with wgMaxTocLevel=3 (bug 6204)
9206 ==== title 1.1.1 ====
9211 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9213 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9215 <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>
9216 <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>
9219 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
9221 <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>
9226 <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>
9227 <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>
9228 <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>
9229 <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>
9230 <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>
9231 <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>
9236 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
9242 ====Section 1.1.1====
9243 ====Section 1.1.1.1====
9246 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9248 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
9250 <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>
9253 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
9256 <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>
9257 <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>
9258 <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>
9259 <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>
9260 <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>
9266 Resolving duplicate section names
9271 <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>
9272 <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>
9277 Resolving duplicate section names with differing case (bug 10721)
9282 <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>
9283 <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>
9295 Template with sections, __NOTOC__
9302 <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>
9303 <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>
9304 <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>
9305 <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>
9310 __NOEDITSECTION__ keyword
9316 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
9317 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
9322 Link inside a section heading
9324 ==Section with a [[Main Page|link]] in it==
9326 <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>
9331 TOC regression (bug 12077)
9338 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9340 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9342 <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>
9345 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
9348 <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>
9349 <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>
9350 <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>
9355 BUG 1219 URL next to image (good)
9357 http://example.com [[Image:foobar.jpg]]
9359 <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>
9364 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
9367 The line above must have a trailing space!
9370 But just in case it doesn't...
9372 <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>
9373 <p>The line above must have a trailing space!
9375 <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>
9376 <p>But just in case it doesn't...
9381 Header with special characters (bug 25462)
9383 The tooltips shall not show entities to the user (ie. be double escaped)
9400 <p>The tooltips shall not show entities to the user (ie. be double escaped)
9402 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9404 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
9405 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
9406 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
9407 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
9408 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
9411 <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>
9414 <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>
9417 <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>
9420 <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>
9423 <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>
9429 Headers with excess '=' characters
9430 (Are similar tests necessary beyond the 1st level?)
9434 =''italic'' heading==
9435 ==''italic'' heading=
9437 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9439 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
9440 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
9441 <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>
9442 <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>
9445 <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>
9446 <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>
9447 <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>
9448 <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>
9453 HTML headers vs TOC (bug 23393)
9454 (__NOEDITSECTION__ for clearer output, doesn't matter here)
9466 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9468 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
9470 <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>
9471 <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>
9474 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
9476 <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>
9477 <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>
9482 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
9483 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
9484 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
9485 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
9486 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
9487 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
9492 BUG 1219 URL next to image (broken)
9494 http://example.com[[Image:foobar.jpg]]
9496 <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>
9501 Bug 1186 news: in the middle of text
9503 http://en.wikinews.org/wiki/Wikinews:Workplace
9505 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
9511 Namespaced link must have a title
9520 Namespaced link must have a title (bad fragment version)
9522 [[Project:#fragment]]
9524 <p>[[Project:#fragment]]
9530 ### HTML tags and HTML attributes
9534 div with no attributes
9536 <div>HTML rocks</div>
9538 <div>HTML rocks</div>
9543 div with double-quoted attribute
9545 <div id="rock">HTML rocks</div>
9547 <div id="rock">HTML rocks</div>
9552 div with single-quoted attribute
9554 <div id='rock'>HTML rocks</div>
9556 <div id="rock">HTML rocks</div>
9561 div with unquoted attribute
9563 <div id=rock>HTML rocks</div>
9565 <div id="rock">HTML rocks</div>
9570 div with illegal double attributes
9572 <div id="a" id="b">HTML rocks</div>
9574 <div id="b">HTML rocks</div>
9578 # FIXME: produce empty string instead of "class" in the PHP parser, following
9581 div with empty attribute value, space before equals
9585 <div class =>HTML rocks</div>
9587 <div class="">HTML rocks</div>
9591 # The PHP parser escapes the opening brace to { for some reason, so
9592 # disabled this test for it.
9594 div with braces in attribute value
9598 <div title="{}">Foo</div>
9600 <div title="{}">Foo</div>
9603 # This it very inconsistent in the PHP parser: it returns
9604 # class="class" if there is a space between the name and the equal sign (see
9605 # 'div with empty attribute value, space before equals'), but strips the
9606 # attribute completely if the space is missing. We hope that not much content
9607 # depends on this, so are implementing the behavior below in Parsoid for
9608 # consistencies' sake. Disabled for the PHP parser.
9609 # FIXME: fix this behavior in the PHP parser?
9611 div with empty attribute value, no space before equals
9615 <div class=>HTML rocks</div>
9617 <div class="">HTML rocks</div>
9622 HTML multiple attributes correction
9624 <p class="error" class="awesome">Awesome!</p>
9626 <p class="awesome">Awesome!</p>
9631 Table multiple attributes correction
9634 !+ class="error" class="awesome"| status
9639 <th class="awesome"> status
9647 <DIV ID="x">HTML ROCKS</DIV>
9649 <div id="x">HTML ROCKS</div>
9654 Non-ASCII pseudo-tags are rendered as text
9663 Pseudo-tag with URL 'name' renders as url link
9665 <http://example.com/>
9667 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
9672 text with amp in the middle of nowhere
9676 <p>Remember AT&T?
9681 text with character entity: eacute
9683 I always thought é was a cute letter.
9685 <p>I always thought é was a cute letter.
9690 text with entity-escaped character entity-like string: eacute
9692 I always thought &eacute; was a cute letter.
9694 <p>I always thought &eacute; was a cute letter.
9699 text with undefined character entity: xacute
9701 I always thought &xacute; was a cute letter.
9703 <p>I always thought &xacute; was a cute letter.
9709 ### Nesting tests (see bug 41545, 50604, 51081)
9712 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
9713 # Note that html2wt is considerably more difficult if we use <b> in
9714 # the test case, instead of <big>
9716 Ensure that HTML adoption agency algorithm is properly implemented.
9718 <big>X<big>Y</big>Z</big>
9720 <p><big>X<big>Y</big>Z</big>
9724 # This was bug 41545 in the PHP parser.
9728 <kbd>X<kbd>Y</kbd>Z</kbd>
9730 <p><kbd>X<kbd>Y</kbd>Z</kbd>
9734 # The following cases were bug 51081 in the PHP parser.
9735 # Note that there are some other nestable tags (b, i, etc) which are
9736 # not covered; see bug 51081 for discussion.
9740 <em>X<em>Y</em>Z</em>
9742 <p><em>X<em>Y</em>Z</em>
9749 <strong>X<strong>Y</strong>Z</strong>
9751 <p><strong>X<strong>Y</strong>Z</strong>
9760 <p><q>X<q>Y</q>Z</q>
9767 <ruby>X<ruby>Y</ruby>Z</ruby>
9769 <p><ruby>X<ruby>Y</ruby>Z</ruby>
9776 <bdo>X<bdo>Y</bdo>Z</bdo>
9778 <p><bdo>X<bdo>Y</bdo>Z</bdo>
9790 [[Media:Foobar.jpg]]
9792 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
9797 Media link with text
9799 [[Media:Foobar.jpg|A neat file to look at]]
9801 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
9805 # FIXME: this is still bad HTML tag nesting
9807 Media link with nasty text
9808 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
9810 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
9812 <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>
9817 Media link to nonexistent file (bug 1702)
9819 [[Media:No such.jpg]]
9821 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
9826 Image link to nonexistent file (bug 1850 - good)
9828 [[Image:No such.jpg]]
9830 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
9835 :Image link to nonexistent file (bug 1850 - bad)
9837 [[:Image:No such.jpg]]
9839 <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>
9846 Character reference normalization in link text (bug 1938)
9848 [[Main Page|this&that]]
9850 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
9857 Test for unicode normalization
9859 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
9863 (bug 19451) Links should refer to the normalized form.
9871 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9872 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9873 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9874 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9875 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9880 Empty attribute crash test (bug 2067)
9882 <font color="">foo</font>
9884 <p><font color="">foo</font>
9889 Empty attribute crash test single-quotes (bug 2067)
9891 <font color=''>foo</font>
9893 <p><font color="">foo</font>
9898 Attribute test: equals, then nothing
9900 <font color=>foo</font>
9907 Attribute test: unquoted value
9909 <font color=x>foo</font>
9911 <p><font color="x">foo</font>
9916 Attribute test: unquoted but illegal value (hash)
9918 <font color=#x>foo</font>
9920 <p><font color="#x">foo</font>
9925 Attribute test: no value
9927 <font color>foo</font>
9929 <p><font color="color">foo</font>
9934 Bug 2095: link with three closing brackets
9938 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
9943 Bug 2095: link with pipe and three closing brackets
9947 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
9952 Bug 2095: link with pipe and three closing brackets, version 2
9954 [[Main Page|[http://example.com/]]]
9956 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
9966 Template:Dangerous attribute
9968 " onmouseover="alert(document.cookie)
9972 Template:Dangerous style attribute
9974 border-size: expression(alert(document.cookie))
9980 <div style="float: right; {{{1}}}">Magic div</div>
9984 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
9986 <div title="{{test}}"></div>
9988 <div title="This is a test template"></div>
9993 Bug 2304: HTML attribute safety (dangerous template; 2309)
9995 <div title="{{dangerous attribute}}"></div>
9997 <div title=""></div>
10002 Bug 2304: HTML attribute safety (dangerous style template; 2309)
10004 <div style="{{dangerous style attribute}}"></div>
10006 <div style="/* insecure input */"></div>
10011 Bug 2304: HTML attribute safety (safe parameter; 2309)
10013 {{div style|width: 200px}}
10015 <div style="float: right; width: 200px">Magic div</div>
10020 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
10022 {{div style|width: expression(alert(document.cookie))}}
10024 <div style="/* insecure input */">Magic div</div>
10029 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
10031 {{div style|"><script>alert(document.cookie)</script>}}
10033 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
10038 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
10040 {{div style|" ><script>alert(document.cookie)</script>}}
10042 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
10047 Bug 2304: HTML attribute safety (link)
10049 <div title="[[Main Page]]"></div>
10051 <div title="[[Main Page]]"></div>
10056 Bug 2304: HTML attribute safety (italics)
10058 <div title="''foobar''"></div>
10060 <div title="''foobar''"></div>
10065 Bug 2304: HTML attribute safety (bold)
10067 <div title="'''foobar'''"></div>
10069 <div title="'''foobar'''"></div>
10075 Bug 2304: HTML attribute safety (ISBN)
10077 <div title="ISBN 1234567890"></div>
10079 <div title="ISBN 1234567890"></div>
10084 Bug 2304: HTML attribute safety (RFC)
10086 <div title="RFC 1234"></div>
10088 <div title="RFC 1234"></div>
10093 Bug 2304: HTML attribute safety (PMID)
10095 <div title="PMID 1234567890"></div>
10097 <div title="PMID 1234567890"></div>
10102 Bug 2304: HTML attribute safety (web link)
10104 <div title="http://example.com/"></div>
10106 <div title="http://example.com/"></div>
10111 Bug 2304: HTML attribute safety (named web link)
10113 <div title="[http://example.com/ link]"></div>
10115 <div title="[http://example.com/ link]"></div>
10120 Bug 3244: HTML attribute safety (extension; safe)
10122 <div style="<nowiki>background:blue</nowiki>"></div>
10124 <div style="background:blue"></div>
10129 Bug 3244: HTML attribute safety (extension; unsafe)
10131 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
10133 <div style="/* insecure input */"></div>
10137 # More MSIE fun discovered by Tom Gilder
10140 MSIE CSS safety test: spurious slash
10142 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
10144 <div style="/* insecure input */">evil</div>
10149 MSIE CSS safety test: hex code
10151 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
10153 <div style="/* insecure input */">evil</div>
10158 MSIE CSS safety test: comment in url
10160 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
10162 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
10167 MSIE CSS safety test: comment in expression
10169 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
10171 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
10177 Table attribute legitimate extension
10180 !+ style="<nowiki>color:blue</nowiki>"| status
10185 <th style="color:blue"> status
10191 Table attribute safety
10194 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
10199 <th style="/* insecure input */"> status
10205 CSS line continuation 1
10207 <div style="background-image: u\ rl(test.jpg);"></div>
10209 <div style="/* insecure input */"></div>
10214 CSS line continuation 2
10216 <div style="background-image: u\ rl(test.jpg); "></div>
10218 <div style="/* insecure input */"></div>
10229 Expansion of multi-line templates in attribute values (bug 6255)
10231 <div style="background: {{identity|#00FF00}}">-</div>
10233 <div style="background: #00FF00">-</div>
10239 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
10241 <div style="background:
10244 <div style="background: #00FF00">-</div>
10249 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
10251 <div style="background: #00FF00">-</div>
10253 <div style="background: #00FF00">-</div>
10258 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
10261 Parser hook: empty input
10274 Parser hook: empty input using terminated empty elements
10287 Parser hook: empty input using terminated empty elements (space before)
10300 Parser hook: basic input
10314 Parser hook: case insensitive
10328 Parser hook: case insensitive, redux
10341 Parser hook: nested tags
10345 <tag><tag></tag></tag>
10356 Parser hook: basic arguments
10358 <tag width=200 height = "100" depth = '50' square></tag>
10366 'square' => 'square',
10373 Parser hook: argument containing a forward slash (bug 5344)
10375 <tag filename='/tmp/bla'></tag>
10380 'filename' => '/tmp/bla',
10387 Parser hook: empty input using terminated empty elements (bug 2374)
10400 # </tag> should be output literally since there is no matching tag that begins it
10402 Parser hook: basic arguments using terminated empty elements (bug 2374)
10404 <tag width=200 height = "100" depth = '50' square/>
10414 'square' => 'square',
10423 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
10427 Parser hook: static parser hook not inside a comment
10429 <statictag>hello, world</statictag>
10430 <statictag action=flush/>
10438 Parser hook: static parser hook inside a comment
10440 <!-- <statictag>hello, world</statictag> -->
10441 <statictag action=flush/>
10447 # Nested template calls; this case was broken by Parser.php rev 1.506,
10451 Template:One-parameter
10453 (My parameter is: {{{1}}})
10457 Template:Map-one-parameter
10459 {{{{{1}}}|{{{2}}}}}
10463 Nested template calls
10465 {{Map-one-parameter|One-parameter|param}}
10467 <p>(My parameter is: param)
10476 Sanitizer: Closing of open tags
10478 <s></s><table></table>
10480 <s></s><table></table>
10485 Sanitizer: Closing of open but not closed tags
10494 Sanitizer: Closing of closed but not open tags
10503 Sanitizer: Closing of closed but not open table tags
10505 Table not started</td></tr></table>
10507 <p>Table not started</td></tr></table>
10512 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
10514 <span id="æ: v">byte</span>[[#æ: v|backlink]]
10516 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
10521 Sanitizer: Validating the contents of the id attribute (bug 4515)
10527 Something, but definitely not <br id="9" />...
10531 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
10535 <br id="foo" /><br id="foo" />
10537 Something need to be done. foo-2 ?
10541 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
10544 <meta itemprop="hello" content="world">
10545 <meta http-equiv="refresh" content="5">
10546 <meta itemprop="hello" http-equiv="refresh" content="5">
10547 <link itemprop="hello" href="{{SERVER}}">
10548 <link rel="stylesheet" href="{{SERVER}}">
10549 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
10552 <div itemscope="itemscope">
10553 <p> <meta itemprop="hello" content="world" />
10554 <meta http-equiv="refresh" content="5">
10555 <meta itemprop="hello" content="5" />
10557 <link itemprop="hello" href="http://example.org" />
10558 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
10559 <link itemprop="hello" href="http://example.org" />
10565 Language converter: output gets cut off unexpectedly (bug 5757)
10569 this bit is safe: }-
10571 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
10573 then we get cut off here: }-
10575 all additional text is vanished
10577 <p>this bit is safe: }-
10578 </p><p>but if we add a conversion instance: xxx
10579 </p><p>then we get cut off here: }-
10580 </p><p>all additional text is vanished
10585 Self closed html pairs (bug 5487)
10588 <center><font id="bug" />Centered text</center>
10589 <div><font id="bug2" />In div text</div>
10591 <center><font id="bug" />Centered text</center>
10592 <div><font id="bug2" />In div text</div>
10601 Punctuation: nbsp before exclamation
10605 <p>C'est grave !
10610 Punctuation: CSS !important (bug 11874)
10612 <div style="width:50% !important">important</div>
10614 <div style="width:50% !important">important</div>
10619 Punctuation: CSS ! important (bug 11874; with space after)
10621 <div style="width:50% ! important">important</div>
10623 <div style="width:50% ! important">important</div>
10629 HTML bullet list, closed tags (bug 5497)
10644 HTML bullet list, unclosed tags (bug 5497)
10661 HTML ordered list, closed tags (bug 5497)
10676 HTML ordered list, unclosed tags (bug 5497)
10693 HTML nested bullet list, closed tags (bug 5497)
10718 HTML nested bullet list, open tags (bug 5497)
10743 HTML nested ordered list, closed tags (bug 5497)
10768 HTML nested ordered list, open tags (bug 5497)
10793 HTML ordered list item with parameters oddity
10795 <ol><li id="fragment">One</li></ol>
10797 <ol><li id="fragment">One</li></ol>
10802 bug 5918: autonumbering
10804 [http://first/] [http://second] [ftp://ftp]
10808 [mailto:enclosed@mail.tld With target]
10810 [mailto:enclosed@mail.tld]
10812 mailto:inline@mail.tld
10814 <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>
10815 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
10816 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
10817 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
10818 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
10824 # Security and HTML correctness
10825 # From Nick Jenkins' fuzz testing
10829 Fuzz testing: Parser13
10844 Fuzz testing: Parser14
10849 <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>
10850 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10852 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
10859 Fuzz testing: Parser14-table
10864 <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>
10865 <table style="__TOC__">
10871 # Known to produce bogus xml (extra </td>)
10873 Fuzz testing: Parser16
10893 Fuzz testing: Parser21
10896 ! irc://{{ftp://a" onmouseover="alert('hello world');"
10901 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
10911 Fuzz testing: Parser22
10913 http://===r:::https://b
10917 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
10925 # Known to produce bad XML for now
10927 Fuzz testing: Parser24
10934 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
10935 <br style="onmouseover='alert(document.cookie);' " />
10937 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
10942 <u class="|">}}}} >
10943 <br style="onmouseover='alert(document.cookie);'" />
10945 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
10954 # Note: the current result listed for this is not what the original one was,
10955 # but the original bug was JavaScript injection, which is fixed in any case.
10956 # It's not clear that the original result listed was any more correct than the
10957 # current one. Original result:
10960 # <li class="||">
10961 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
10963 Fuzz testing: Parser25 (bug 6055)
10969 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
10971 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
10976 Fuzz testing: URL adjacent extension (with space, clean)
10979 http://example.com <nowiki>junk</nowiki>
10981 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
10986 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
10989 http://example.com<nowiki>junk</nowiki>
10991 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
10996 Fuzz testing: URL adjacent extension (no space, dirty; pre)
10999 http://example.com<pre>junk</pre>
11001 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
11006 Fuzz testing: image with bogus manual thumbnail
11008 [[Image:foobar.jpg|thumbnail= ]]
11010 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
11015 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
11017 <pre dir=" "></pre>
11019 <pre dir=" "></pre>
11024 Parsing optional HTML elements (Bug 6171)
11029 <td> Some tabular data</td>
11030 <td> More tabular data ...
11031 <td> And yet som tabular data</td>
11037 <td> Some tabular data</td>
11038 <td> More tabular data ...
11039 </td><td> And yet som tabular data</td>
11046 Correct handling of <td>, <tr> (Bug 6171)
11051 <td> Some tabular data</td>
11052 <td> More tabular data ...</td>
11053 <td> And yet som tabular data</td>
11059 <td> Some tabular data</td>
11060 <td> More tabular data ...</td>
11061 <td> And yet som tabular data</td>
11069 Parsing crashing regression (fr:JavaScript)
11073 <p></body></x>
11078 Inline wiki vs wiki block nesting
11084 <p><b>Bold paragraph</b>
11085 </p><p>New wiki paragraph
11090 Inline HTML vs wiki block nesting
11098 <p><b>Bold paragraph</b>
11099 </p><p>New wiki paragraph
11103 # Original result was this:
11104 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
11106 # While that might be marginally more intuitive, maybe, the six-apostrophe
11107 # construct is clearly pathological and the result stated here (which is what
11108 # the parser actually does) is about as reasonable as anything.
11110 Mixing markup for italics and bold
11113 '''bold''''''bold''bolditalics'''''
11115 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
11123 Article for special page transclusion test
11127 Special page transclusion
11130 {{Special:Prefixindex/Xyzzyx}}
11132 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11137 Special page transclusion twice (bug 5021)
11140 {{Special:Prefixindex/Xyzzyx}}
11141 {{Special:Prefixindex/Xyzzyx}}
11143 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11144 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11149 Transclusion of default MediaWiki message
11151 {{MediaWiki:Mainpage}}
11158 Transclusion of nonexistent MediaWiki message
11160 {{MediaWiki:Mainpagexxx}}
11162 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
11167 Transclusion of MediaWiki message with underscore
11169 {{MediaWiki:history_short}}
11176 Transclusion of MediaWiki message with space
11178 {{MediaWiki:history short}}
11185 Invalid header with following text
11195 Section extraction test (section 0)
11215 Section extraction test (section 1)
11237 Section extraction test (section 2)
11258 Section extraction test (section 3)
11278 Section extraction test (section 4)
11302 Section extraction test (section 5)
11322 Section extraction test (section 6)
11343 Section extraction test (section 7)
11363 Section extraction test (section 8)
11383 Section extraction test (section 9)
11404 Section extraction test (section 10)
11424 Section extraction test (nonexistent section 11)
11443 Section extraction test with bogus heading (section 1)
11448 ==bogus== not a legal section
11452 ==bogus== not a legal section
11456 Section extraction test with bogus heading (section 2)
11461 ==bogus== not a legal section
11468 Section extraction test with comment after heading (section 1)
11480 Section extraction test with comment after heading (section 2)
11492 Section extraction test with bogus <nowiki> heading (section 1)
11497 ==bogus== <nowiki>not a legal section</nowiki>
11501 ==bogus== <nowiki>not a legal section</nowiki>
11505 Section extraction test with bogus <nowiki> heading (section 2)
11510 ==bogus== <nowiki>not a legal section</nowiki>
11517 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
11518 # instead of respecting commented sections
11520 Section extraction prefixed by comment (section 1)
11531 Section extraction prefixed by comment (section 2)
11542 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
11543 # instead of respecting HTML-style headings
11545 Section extraction, mixed wiki and html (section 1)
11561 Section extraction, mixed wiki and html (section 2)
11577 # Formerly testing for bug 3342
11579 Section extraction, heading surrounded by <noinclude>
11583 <noinclude>==unmarked==</noinclude>
11589 # Test behavior of bug 19910
11591 Sectiion with all-equals
11596 The line above must have a trailing space
11599 But just in case it doesn't...
11603 But just in case it doesn't...
11607 Section replacement test (section 0)
11638 Section replacement test (section 1)
11667 Section replacement test (section 2)
11697 Section replacement test (section 3)
11728 Section replacement test (section 4)
11755 Section replacement test (section 5)
11786 Section replacement test (section 6)
11816 Section replacement test (section 7)
11847 Section replacement test (section 8)
11878 Section replacement test (section 9)
11907 Section replacement test (section 10)
11937 Section replacement test with initial whitespace (bug 13728)
11941 Preformatted initial line
11945 Preformatted initial line
11952 Section extraction, heading followed by pre with 20 spaces (bug 6398)
11964 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
11977 Section extraction, <pre> around bogus header (bug 10309)
11994 Section replacement, <pre> around bogus header (bug 10309)
11996 noxml replace=2,"xxx"
12017 Handling of 
 in URLs
12021 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
12028 5 quotes, code coverage +1 line (php)
12035 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
12037 5 quotes, code coverage +1 line (parsoid)
12043 <p><i><b></b></i></p>
12047 Special:Search page linking.
12051 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
12063 * {{ROOTPAGENAMEE}}
12065 * {{BASEPAGENAMEE}}
12067 * {{TALKPAGENAMEE}}
12068 * {{SUBJECTPAGENAME}}
12069 * {{SUBJECTPAGENAMEE}}
12075 * {{SUBJECTSPACEE}}
12076 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
12078 <ul><li> Parser test
12079 </li><li> Parser test
12080 </li><li> Parser test
12081 </li><li> Parser_test
12082 </li><li> Parser test
12083 </li><li> Parser_test
12084 </li><li> Parser test
12085 </li><li> Parser_test
12086 </li><li> Talk:Parser test
12087 </li><li> Talk:Parser_test
12088 </li><li> Parser test
12089 </li><li> Parser_test
12096 </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>
12100 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
12110 image4 |300px| centre
12111 image5.svg| http://///////
12116 <ul class="gallery">
12117 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12118 <div style="height: 150px;">Image1.png</div>
12119 <div class="gallerytext">
12122 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12123 <div style="height: 150px;">Image2.gif</div>
12124 <div class="gallerytext">
12129 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12130 <div style="height: 150px;">Image3</div>
12131 <div class="gallerytext">
12134 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12135 <div style="height: 150px;">Image4</div>
12136 <div class="gallerytext">
12141 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12142 <div style="height: 150px;">Image5.svg</div>
12143 <div class="gallerytext">
12144 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
12148 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12149 <div style="height: 150px;">* image6</div>
12150 <div class="gallerytext">
12158 Gallery (with options)
12160 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
12161 File:Nonexistant.jpg|caption
12162 File:Nonexistant.jpg
12163 image:foobar.jpg|some '''caption''' [[Main Page]]
12165 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
12168 <ul class="gallery" style="max-width: 226px;_width: 226px;">
12169 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
12170 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12171 <div style="height: 70px;">Nonexistant.jpg</div>
12172 <div class="gallerytext">
12177 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12178 <div style="height: 70px;">Nonexistant.jpg</div>
12179 <div class="gallerytext">
12182 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12183 <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>
12184 <div class="gallerytext">
12185 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
12189 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12190 <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>
12191 <div class="gallerytext">
12194 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12195 <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>
12196 <div class="gallerytext">
12206 Gallery with wikitext inside caption
12209 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
12210 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
12213 <ul class="gallery">
12214 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12215 <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>
12216 <div class="gallerytext">
12217 <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>
12221 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12222 <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>
12223 <div class="gallerytext">
12224 <p>This is a test template
12233 gallery (with showfilename option)
12235 <gallery showfilename>
12236 File:Nonexistant.jpg|caption
12237 File:Nonexistant.jpg
12238 image:foobar.jpg|some '''caption''' [[Main Page]]
12242 <ul class="gallery">
12243 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12244 <div style="height: 150px;">Nonexistant.jpg</div>
12245 <div class="gallerytext">
12246 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
12251 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12252 <div style="height: 150px;">Nonexistant.jpg</div>
12253 <div class="gallerytext">
12254 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
12258 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12259 <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>
12260 <div class="gallerytext">
12261 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
12262 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
12266 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12267 <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>
12268 <div class="gallerytext">
12269 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
12278 Gallery (with namespace-less filenames)
12281 File:Nonexistant.jpg
12287 <ul class="gallery">
12288 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12289 <div style="height: 150px;">Nonexistant.jpg</div>
12290 <div class="gallerytext">
12293 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12294 <div style="height: 150px;">Nonexistant.jpg</div>
12295 <div class="gallerytext">
12298 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12299 <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>
12300 <div class="gallerytext">
12303 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12304 <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>
12305 <div class="gallerytext">
12313 HTML Hex character encoding (spells the word "JavaScript")
12315 JavaScript
12317 <p>JavaScript
12322 HTML Hex character encoding bogus encoding (bug 26437 regression check)
12326 <p>&#xsee;&#XSEE;
12331 HTML Hex character encoding mixed case
12340 __FORCETOC__ override
12352 ISBN 978-0-1234-56 789
12354 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
12359 ISBN followed by 5 spaces
12370 ISBN ISBN 1234567890
12372 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
12377 Bug 22905: <abbr> followed by ISBN followed by </a>
12379 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
12381 <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>
12390 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
12395 Double RFC with a wiki link
12399 <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>
12408 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
12413 Centre-aligned image
12415 [[Image:foobar.jpg|centre]]
12417 <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>
12424 [[Image:foobar.jpg|none]]
12426 <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>
12431 Width + Height sized image (using px) (height is ignored)
12433 [[Image:foobar.jpg|640x480px]]
12435 <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>
12440 Width-sized image (using px, no following whitespace)
12442 [[Image:foobar.jpg|640px]]
12444 <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>
12449 Width-sized image (using px, with following whitespace - test regression from r39467)
12451 [[Image:foobar.jpg|640px ]]
12453 <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>
12458 Width-sized image (using px, with preceding whitespace - test regression from r39467)
12460 [[Image:foobar.jpg| 640px]]
12462 <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>
12467 Another italics / bold test
12475 # Note the results may be incorrect, as parserTest output included this:
12476 # XML error: Mismatched tag at byte 6120:
12477 # ...<dd> </dt></dl> </dd...
12485 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
12496 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
12498 Images with the "|" character in the comment
12500 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
12502 <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>
12507 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
12509 <html><script>alert(1);</script></html>
12511 <p><html><script>alert(1);</script></html>
12516 HTML with raw HTML ($wgRawHtml==true)
12520 <html><script>alert(1);</script></html>
12522 <p><script>alert(1);</script>
12527 Parents of subpages, one level up
12529 subpage title=[[Subpage test/L1/L2/L3]]
12533 <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>
12539 Parents of subpages, one level up, not named
12541 subpage title=[[Subpage test/L1/L2/L3]]
12545 <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>
12552 Parents of subpages, two levels up
12554 subpage title=[[Subpage test/L1/L2/L3]]
12560 <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
12561 </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>
12566 Parents of subpages, two levels up, without trailing slash or name.
12568 subpage title=[[Subpage test/L1/L2/L3]]
12577 Parents of subpages, two levels up, with lots of extra trailing slashes.
12579 subpage title=[[Subpage test/L1/L2/L3]]
12583 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
12588 Subpage test/L1/L2/L3Sibling
12594 Transclusion of a sibling page (one level up)
12596 subpage title=[[Subpage test/L1/L2/L3]]
12605 Transclusion of a child page
12607 subpage title=[[Subpage test/L1/L2]]
12616 Non-transclusion because of too many up levels
12618 subpage title=[[Subpage test/L1/L2/L3]]
12620 {{../../../../More than parent}}
12622 <p>{{../../../../More than parent}}
12627 Definition list code coverage
12633 <dl><dt> title  </dt><dd> def
12634 </dd><dt> title </dt><dd> def
12635 </dd><dt>title</dt><dd> def
12641 Don't fall for the self-closing div
12643 <div>hello world</div/>
12645 <div>hello world</div>
12654 <p>[[:Template:Msg]]
12663 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
12667 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
12669 Always escape literal '>' in output, not just after '<'
12683 <p>This is a test template
12684 This is a test template
12696 Inclusion of !userCanEdit() content
12700 <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>
12706 Out-of-order TOC heading levels
12715 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12717 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
12719 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
12720 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
12723 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
12725 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
12726 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
12731 <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>
12732 <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>
12733 <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>
12734 <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>
12735 <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>
12736 <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>
12742 ISBN with a dummy number
12752 ISBN with space-delimited number
12756 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
12762 ISBN with multiple spaces, no number
12781 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
12782 </p><p>ISBN 12345678901
12788 ISBN with trailing year (bug 8110)
12790 ISBN 1-234-56789-0 - 2006
12792 ISBN 1 234 56789 0 - 2006
12794 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
12795 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
12803 {{anchorencode:foo bar©#%n}}
12805 <p>foo_bar.C2.A9.23.25n
12810 anchorencode trims spaces
12812 {{anchorencode: __pretty__please__}}
12819 anchorencode deals with links
12821 {{anchorencode: [[hello|world]] [[hi]]}}
12828 anchorencode deals with templates
12830 {{anchorencode: {{Foo}} }}
12837 anchorencode encodes like the TOC generator: (bug 18431)
12839 === _ +:.3A%3A&&]] ===
12840 {{anchorencode: _ +:.3A%3A&&]] }}
12843 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
12844 <p>.2B:.3A.253A.26.26.5D.5D
12848 # Expected output in the following test is not necessarily expected (there
12849 # should probably be <p> tags inside the <blockquote> in the output) -- it's
12850 # only testing for well-formedness.
12852 Bug 6200: blockquotes and paragraph formatting
12872 Bug 8293: Use of center tag ruins paragraph formatting
12893 Parsing of overlapping (improperly nested) inline html tags (PHP parser)
12897 <span><s>x</span></s>
12899 <p><span><s>x</span></s></span>
12904 Parsing of overlapping (improperly nested) inline html tags (Parsoid)
12908 <span><s>x</span></s>
12910 <p><span><s>x</s></span><s></s>
12915 ### Language variants related tests
12918 Self-link in language variants
12920 title=[[Dunav]] language=sr
12922 Both [[Dunav]] and [[Дунав]] are names for this river.
12924 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
12935 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
12937 title=[[Duna]] language=sr
12939 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
12941 <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.
12946 Link to pages in language variants
12950 Main Page can be written as [[Маин Паге]]
12952 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
12958 Multiple links to pages in language variants
12962 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
12964 <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>.
12970 Simple template in language variants
12976 <p>This is a test template
12982 Template with explicit namespace in language variants
12988 <p>This is a test template
12994 Basic test for template parameter in language variants
12998 {{парамтест|param=foo}}
13000 <p>This is a test template with parameter foo
13006 Simple category in language variants
13010 [[Category:МедиаWики Усер'с Гуиде]]
13012 <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>
13029 Don't convert blue categorylinks to another variant (bug 33210)
13033 [[A]][[Category:分类]]
13035 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
13040 Stripping -{}- tags (language variants)
13044 Latin proverb: -{Ne nuntium necare}-
13046 <p>Latin proverb: Ne nuntium necare
13052 Prevent conversion with -{}- tags (language variants)
13054 language=sr variant=sr-ec
13056 Latinski: -{Ne nuntium necare}-
13058 <p>Латински: Ne nuntium necare
13064 Prevent conversion of text with -{}- tags (language variants)
13066 language=sr variant=sr-ec
13068 Latinski: -{Ne nuntium necare}-
13070 <p>Латински: Ne nuntium necare
13076 Prevent conversion of links with -{}- tags (language variants)
13078 language=sr variant=sr-ec
13082 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13088 -{}- tags within headlines (within html for parserConvert())
13090 language=sr variant=sr-ec
13094 <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>
13100 Explicit definition of language variant alternatives
13102 language=zh variant=zh-tw
13104 -{zh:China;zh-tw:Taiwan}-, not China
13106 <p>Taiwan, not China
13112 Conversion around HTML tags
13114 language=sr variant=sr-ec
13116 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
13117 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
13120 <span title="ЛаCтин">ски</span>
13126 Explicit session-wise language variant mapping (A flag and - flag)
13128 language=zh variant=zh-tw
13130 Taiwan is not China.
13131 But -{A|zh:China;zh-tw:Taiwan}- is China,
13132 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
13133 and -{China}- is China.
13135 <p>Taiwan is not China.
13136 But Taiwan is Taiwan,
13137 (This should be stripped!)
13138 and China is China.
13143 Explicit session-wise language variant mapping (H flag for hide)
13145 language=zh variant=zh-tw
13147 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
13150 <p>(This should be stripped!)
13156 Adding explicit conversion rule for title (T flag)
13158 language=zh variant=zh-tw showtitle
13160 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13163 <p>Should be stripped!
13168 Testing that changing the language variant here in the tests actually works
13170 language=zh variant=zh showtitle
13172 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13175 <p>Should be stripped!
13180 Recursive conversion of alt and title attrs shouldn't clear converter state
13182 language=zh variant=zh-cn showtitle
13184 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
13185 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
13189 Should be stripped<span title="Exclamation">!</span>
13194 Bug 24072: more test on conversion rule for title
13196 language=zh variant=zh-tw showtitle
13198 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13199 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
13202 <p>This should be stripped!
13203 This won't take interferes with the title rule.
13208 Partly disable title conversion if variant == main language code
13210 language=zh variant=zh title=[[ZH]] showtitle
13212 -{T|zh-cn:CN;zh-tw:TW}-
13220 Partly disable title conversion if variant == main language code, more
13222 language=zh variant=zh title=[[ZH]] showtitle
13232 Raw output of variant escape tags (R flag)
13234 language=zh variant=zh-tw
13236 Raw: -{R|zh:China;zh-tw:Taiwan}-
13238 <p>Raw: zh:China;zh-tw:Taiwan
13243 Nested using of manual convert syntax
13245 language=zh variant=zh-hk
13247 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
13249 <p>Nested: Hello Hong Kong!
13254 Proper conversion of text in external links
13256 language=sr variant=sr-ec
13258 http://www.google.com
13259 gopher://www.google.com
13260 [http://www.google.com http://www.google.com]
13261 [gopher://www.google.com gopher://www.google.com]
13262 [https://www.google.com irc://www.google.com]
13263 [ftp://www.google.com www.google.com/ftp://dir]
13264 [//www.google.com www.google.com]
13266 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
13267 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
13268 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
13269 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
13270 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
13271 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
13272 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
13277 Do not convert roman numbers to language variants
13279 language=sr variant=sr-ec
13283 <p>Фридрих IV је цар.
13288 Unclosed language converter markup "-{"
13299 Don't convert raw rule "-{R|=>}-" to "=>"
13316 Bug 529: Uncovered bullet
13326 # Plain MediaWiki does not remove empty lists, but tidy actually does.
13327 # Templates in Wikipedia rely on this behavior, as tidy has always been
13328 # enabled there. These tests are normally run *without* tidy, so specify the
13329 # full output here.
13330 # To test realistic parsing behavior, apply a tidy-like transformation to both
13331 # the expected output and your parser's output.
13333 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
13335 ******* Foo {{bullet}}
13337 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
13350 Bug 529: Uncovered table already at line-start
13373 Bug 529: Uncovered bullet in parser function result
13375 * Foo {{lc:{{bullet}} }}
13384 Bug 5678: Double-parsed template argument
13386 {{lc:{{{1}}}|hello}}
13393 Bug 5678: Double-parsed template invocation
13395 {{lc:{{paramtest {{!}} param = hello }} }}
13397 <p>{{paramtest | param = hello }}
13402 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
13405 title=[[Main Page]]
13407 {{PRVNÍVELKÉ:ěščř}}
13408 {{prvnívelké:ěščř}}
13428 Morwen/13: Unclosed link followed by heading
13435 <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>
13440 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
13447 <h1><span class="mw-headline" id="heading">heading</span></h1>
13452 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
13459 <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>
13474 Paragraphs inside divs (no extra line breaks)
13486 Paragraphs inside divs (extra line break on open)
13501 Paragraphs inside divs (extra line break on close)
13516 Paragraphs inside divs (extra line break on open and close)
13533 Nesting tags, paragraphs on lines which begin with <div>
13537 <div></div><strong>A
13546 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
13548 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
13552 <blockquote>Line one
13554 Line two</blockquote>
13556 <blockquote>Line one
13557 Line two</blockquote>
13562 Bug 6200: paragraphs inside blockquotes (extra line break on open)
13569 Line two</blockquote>
13574 Line two</blockquote>
13579 Bug 6200: paragraphs inside blockquotes (extra line break on close)
13583 <blockquote>Line one
13588 <blockquote>Line one
13596 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
13615 Paragraphs inside blockquotes/divs (no extra line breaks)
13617 <blockquote><div>Line one
13619 Line two</div></blockquote>
13621 <blockquote><div>Line one
13622 Line two</div></blockquote>
13627 Paragraphs inside blockquotes/divs (extra line break on open)
13632 Line two</div></blockquote>
13637 Line two</div></blockquote>
13642 Paragraphs inside blockquotes/divs (extra line break on close)
13644 <blockquote><div>Line one
13647 </div></blockquote>
13649 <blockquote><div>Line one
13652 </div></blockquote>
13657 Paragraphs inside blockquotes/divs (extra line break on open and close)
13663 </div></blockquote>
13669 </div></blockquote>
13674 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
13676 wgLinkHolderBatchSize=0
13682 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
13683 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
13684 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
13689 Free external link invading image caption
13691 [[Image:Foobar.jpg|thumb|http://x|hello]]
13693 <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>
13698 Bug 15196: localised external link numbers
13702 [http://en.wikipedia.org/]
13704 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
13709 Multibyte character in padleft
13711 {{padleft:-Hello|7|Æ}}
13718 Multibyte character in padright
13720 {{padright:Hello-|7|Æ}}
13727 formatdate parser function
13729 {{#formatdate:2009-03-24}}
13731 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
13736 formatdate parser function, with default format
13738 {{#formatdate:2009-03-24|mdy}}
13740 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
13745 Spacing of numbers in formatted dates
13747 {{#formatdate:January 15}}
13749 <p><span class="mw-formatted-date" title="01-15">January 15</span>
13754 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
13756 language=nl title=[[MediaWiki:Common.css]]
13758 {{#formatdate:2009-03-24|dmy}}
13760 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
13773 Edit comment with link
13777 I like the [[Main Page]] a lot
13779 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
13783 Edit comment with link and link text
13787 I like the [[Main Page|best pages]] a lot
13789 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
13793 Edit comment with link and link text with suffix
13797 I like the [[Main Page|best page]]s a lot
13799 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
13803 Edit comment with section link (non-local, eg in history list)
13805 comment title=[[Main Page]]
13807 /* External links */ removed bogus entries
13809 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
13813 Edit comment with section link and text before it (non-local, eg in history list)
13815 comment title=[[Main Page]]
13817 pre-comment text /* External links */ removed bogus entries
13819 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>
13823 Edit comment with section link (local, eg in diff view)
13825 comment local title=[[Main Page]]
13827 /* External links */ removed bogus entries
13829 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
13833 Edit comment with subpage link (bug 14080)
13837 title=[[Subpage test]]
13839 Poked at a [[/subpage]] here...
13841 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
13845 Edit comment with subpage link and link text (bug 14080)
13849 title=[[Subpage test]]
13851 Poked at a [[/subpage|neat little page]] here...
13853 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
13857 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
13860 title=[[Subpage test]]
13862 Poked at a [[/subpage]] here...
13864 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
13868 Edit comment with bare anchor link (local, as on diff)
13872 title=[[Main Page]]
13876 <a href="#section">#section</a>
13880 Edit comment with bare anchor link (non-local, as on history)
13883 title=[[Main Page]]
13887 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
13891 Anchor starting with underscore
13895 <p><a href="#_ref">One</a>
13900 Id starting with underscore
13902 <div id="_ref"></div>
13904 <div id="_ref"></div>
13909 Space normalisation on autocomment (bug 22784)
13912 title=[[Main Page]]
13914 /* __hello__world__ */
13916 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
13920 percent-encoding and + signs in comments (Bug 26410)
13924 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
13926 <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>
13930 Bad images - basic functionality
13939 Bad images - bug 16039: text after bad image disappears
13953 Verify that displaytitle works (bug #22501) no displaytitle
13957 wgAllowDisplayTitle=true
13958 wgRestrictDisplayTitle=false
13960 this is not the the title
13963 <p>this is not the the title
13968 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
13973 wgAllowDisplayTitle=true
13974 wgRestrictDisplayTitle=false
13976 this is not the the title
13977 {{DISPLAYTITLE:whatever}}
13980 <p>this is not the the title
13985 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
13990 wgAllowDisplayTitle=true
13991 wgRestrictDisplayTitle=true
13993 this is not the the title
13994 {{DISPLAYTITLE:whatever}}
13997 <p>this is not the the title
14002 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
14007 wgAllowDisplayTitle=true
14008 wgRestrictDisplayTitle=true
14010 this is not the the title
14011 {{DISPLAYTITLE:screen}}
14014 <p>this is not the the title
14019 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
14024 wgAllowDisplayTitle=false
14026 this is not the the title
14027 {{DISPLAYTITLE:screen}}
14030 <p>this is not the the title
14031 <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>
14036 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
14041 wgAllowDisplayTitle=false
14043 this is not the the title
14046 <p>this is not the the title
14051 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
14056 wgAllowDisplayTitle=true
14057 wgRestrictDisplayTitle=true
14059 this is not the the title
14060 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
14062 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
14063 <p>this is not the the title
14068 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
14073 wgAllowDisplayTitle=true
14074 wgRestrictDisplayTitle=true
14076 this is not the the title
14077 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
14079 <span style="color: red;">s</span>creen
14080 <p>this is not the the title
14085 preload: check <noinclude> and <includeonly>
14089 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
14095 preload: check <onlyinclude>
14099 Goodbye <onlyinclude>Hello world</onlyinclude>
14105 preload: can pass tags through if we want to
14109 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
14111 <includeonly>Hello world</includeonly>
14115 preload: check that it doesn't try to do tricks
14119 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
14121 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
14125 Play a bit with r67090 and bug 3158
14129 <div style="width:50% !important"> </div>
14130 <div style="width:50% !important"> </div>
14131 <div style="width:50% !important"> </div>
14132 <div style="border : solid;"> </div>
14134 <div style="width:50% !important"> </div>
14135 <div style="width:50% !important"> </div>
14136 <div style="width:50% !important"> </div>
14137 <div style="border : solid;"> </div>
14142 HTML5 data attributes
14144 <span data-foo="bar">Baz</span>
14145 <p data-abc-def_hij="">Quuz</p>
14147 <p><span data-foo="bar">Baz</span>
14149 <p data-abc-def_hij="">Quuz</p>
14154 percent-encoding and + signs in internal links (Bug 26410)
14156 [[User:+%]] [[Page+title%]]
14157 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
14158 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
14159 [[%33%45]] [[%33%45+]]
14161 <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>
14162 <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>
14163 <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>
14164 <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>
14169 Special characters in embedded file links (bug 27679)
14171 [[File:Contains & ampersand.jpg]]
14172 [[File:Does not exist.jpg|Title with & ampersand]]
14174 <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>
14175 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
14181 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
14183 Text's been normalized?
14185 <p>Text's been normalized?
14190 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
14192 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
14194 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
14199 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
14201 [http://www.example.org/ ideograms]
14203 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
14208 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
14210 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
14212 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
14236 Bug 31098 Template which includes system messages which includes the template
14240 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
14241 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
14246 Bug31490 Turkish: ucfirst 'blah'
14257 Bug31490 Turkish: ucfirst 'ix'
14268 Bug31490 Turkish: lcfirst 'BLAH'
14279 Bug31490 Turkish: ucfırst (with a dotless i)
14285 <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>
14290 Bug31490 ucfırst (with a dotless i) with English language
14296 <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>
14301 Bug 26375: TOC with italics
14303 title=[[Main Page]]
14306 == ''Lost'' episodes ==
14308 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14310 <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>
14313 <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>
14318 Bug 26375: TOC with bold
14320 title=[[Main Page]]
14323 == '''should be bold''' then normal text ==
14325 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14327 <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>
14330 <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>
14335 Bug 33845: Headings become cursive in TOC when they contain an image
14337 title=[[Main Page]]
14340 == Image [[Image:foobar.jpg]] ==
14342 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14344 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
14347 <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>
14352 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
14354 title=[[Main Page]]
14357 == <blockquote>Quote</blockquote> ==
14359 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14361 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
14364 <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>
14369 Unclosed tags in TOC
14371 title=[[Main Page]]
14375 <small>Hanc marginis exiguitas non caperet.</small>
14378 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14380 <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>
14383 <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>
14384 <p><small>Hanc marginis exiguitas non caperet.</small>
14390 Multiple tags in TOC
14393 == <i>Foo</i> <b>Bar</b> ==
14395 == <i>Foo</i> <blockquote>Bar</blockquote> ==
14397 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14399 <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>
14400 <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>
14403 <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>
14404 <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>
14409 Tags with parameters in TOC
14412 == <sup class="in-h2">Hello</sup> ==
14414 == <sup class="a > b">Evilbye</sup> ==
14416 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14418 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
14419 <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>
14422 <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>
14423 <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>
14428 span tags with directionality in TOC
14431 == <span dir="ltr">C++</span> ==
14433 == <span dir="rtl">זבנג!</span> ==
14435 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
14437 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
14439 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
14441 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14443 <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>
14444 <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>
14445 <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>
14446 <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>
14447 <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>
14450 <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>
14451 <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>
14452 <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>
14453 <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>
14454 <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>
14461 == {{int:headline_sample}} ==
14465 Bug 32057: Title needed when expanding <h> nodes.
14467 title=[[Main Page]]
14471 <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>
14476 Strip marker in urlencode
14478 {{urlencode:x<nowiki/>y}}
14479 {{urlencode:x<nowiki/>y|wiki}}
14480 {{urlencode:x<nowiki/>y|path}}
14507 Strip marker in formatNum
14509 {{formatnum:1<nowiki/>2}}
14510 {{formatnum:1<nowiki/>2|R}}
14518 Check noCommafy in formatNum
14522 {{formatnum:123456.78}}
14523 {{formatnum:123456.78|NOSEP}}
14531 Strip marker in grammar
14535 {{grammar:elative|foo<nowiki/>bar}}
14542 Strip marker in padleft
14544 {{padleft:|2|x<nowiki/>y}}
14551 Strip marker in padright
14553 {{padright:|2|x<nowiki/>y}}
14560 Strip marker in anchorencode
14562 {{anchorencode:x<nowiki/>y}}
14569 nowiki inside link inside heading (bug 18295)
14571 ==[[foo|x<nowiki>y</nowiki>z]]==
14573 <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>
14578 new support for bdi element (bug 31817)
14580 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
14582 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
14587 Ignore pipe between table row attributes
14591 |- id=foo | style='color: red'
14599 <tr id="foo" style="color: red">
14606 Gallery override link with WikiLink (bug 34852)
14609 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
14612 <ul class="gallery">
14613 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14614 <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>
14615 <div class="gallerytext">
14625 Gallery override link with absolute external link (bug 34852)
14628 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
14631 <ul class="gallery">
14632 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14633 <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>
14634 <div class="gallerytext">
14644 Gallery override link with malicious javascript (bug 34852)
14647 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
14650 <ul class="gallery">
14651 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14652 <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>
14653 <div class="gallerytext">
14663 Gallery with invalid title as link (bug 43964)
14666 File:foobar.jpg|link=<
14669 <ul class="gallery">
14670 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14671 <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>
14672 <div class="gallerytext">
14680 Language parser function
14689 Padleft and padright as substr
14691 {{padleft:|3|abcde}}
14692 {{padright:|3|abcde}}
14700 Special parser function
14702 {{#special:RandomPage}}
14703 {{#special:BaDtItLe}}
14704 {{#special:Foobar}}
14713 Bug 34939 - Case insensitive link parsing ([HttP://])
14715 [HttP://MediaWiki.Org/]
14717 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
14722 Bug 34939 - Case insensitive link parsing ([HttP:// title])
14724 [HttP://MediaWiki.Org/ MediaWiki]
14726 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
14731 Bug 34939 - Case insensitive link parsing (HttP://)
14733 HttP://MediaWiki.Org/
14735 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
14741 ### Parsoids-specific tests
14742 ### Parsoid-PHP parser incompatibilities
14745 1. SOL-sensitive wikitext tokens as template-args
14747 parsoid=wt2html,wt2wt
14753 <span about="#mwt1" typeof="mw:Transclusion">
14754 </span><ul about="#mwt1"><li>a</li></ul>
14755 <span about="#mwt2" typeof="mw:Transclusion">
14756 </span><ol about="#mwt2"><li>a</li></ol>
14757 <span about="#mwt3" typeof="mw:Transclusion">
14758 </span><dl about="#mwt3"><dd>a</dd></dl>
14761 #### ----------------------------------------------------------------
14762 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
14763 #### tags. Parsoid's output for these tags differs from that of the
14765 #### ----------------------------------------------------------------
14768 Ref: 1. ref-location should be replaced with an index span
14773 B <ref name="x">foo</ref>
14776 <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>
14777 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>
14778 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>
14782 Ref: 2. ref-tags with identical names should all get the same index
14786 A <ref name="x">foo</ref>
14789 <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>
14790 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>
14794 Ref: 3. spaces in ref-names should be ignored
14798 A <ref name="x">foo</ref>
14799 B <ref name=" x " />
14802 <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>
14803 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>
14804 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>
14808 Ref: 4. 'constructor' should be accepted as a valid ref-name
14809 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
14813 A <ref name="constructor">foo</ref>
14815 <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>
14819 Ref: 5. body should accept generic wikitext
14824 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
14829 <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>
14831 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14832 <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>
14837 Ref: 6. indent-pres should not be output in ref-body
14849 <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>
14851 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14852 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
14859 Ref: 6. No p-wrapping in ref-body
14878 <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>
14880 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14881 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
14895 Ref: 8. transclusion wikitext has lower precedence
14899 A <ref> foo {{echo|</ref> B C}}
14903 <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>
14905 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14906 <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>
14910 Ref: 9. unclosed comments should not leak out of ref-body
14914 A <ref> foo <!--</ref> B C
14918 <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>
14920 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14921 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li></ol>
14925 Ref: 10. Unclosed HTML tags should not leak out of ref-body
14929 A <ref> <b> foo </ref> B C
14933 <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>
14935 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14936 <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>
14940 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
14947 <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
14948 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>
14952 Ref: 12. ref-tags act as trailing newline migration barrier
14956 <!--the newline at the end of this line moves out of the p-tag-->a
14958 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
14963 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
14966 <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>
14967 <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>
14974 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
14982 <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
14983 <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>
14987 Ref: 14. A nested ref-tag should be emitted as plain text
14991 <ref>foo <ref>bar</ref> baz</ref>
14995 <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>
14997 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw="{"name":"references","attrs":{}}">
14998 <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>
15002 Ref: 15. ref-tags with identical names should get identical indexes
15006 A1 <ref name="a">foo</ref> A2 <ref name="a" />
15007 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
15011 <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>
15012 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>
15014 <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>
15018 References: 1. references tag without any refs should be handled properly
15024 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references"></ol>
15028 References: 2. references tag with group only outputs references from that group
15032 A <ref group="a">foo</ref>
15033 B <ref group="b">bar</ref>
15035 <references group='a' />
15037 <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>
15038 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>
15040 <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>
15044 References: 3. ref list should be cleared after processing references
15056 <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>
15058 <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>
15060 <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>
15062 <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>
15066 References: 4. only referenced group should be cleared after processing references
15070 A <ref group="a">afoo</ref>
15073 <references group="a"/>
15079 <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>
15080 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>
15082 <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>
15084 <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>
15086 <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>
15090 References: 5. ref tags in references should be processed while ignoring all other content
15095 B <ref name="b">bar</ref>
15098 <ref name="a">foo</ref>
15099 This should just get lost.
15102 <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>
15103 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>
15105 <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>
15109 References: 6. <references /> from a transclusion
15113 {{echo|<references />}}
15115 <ol class="references" about="#mwt2" typeof="mw:Transclusion" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}'></ol>
15119 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
15123 A <ref>foo bar for a</ref>
15129 <ref name="b">foo</ref>
15132 <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>
15133 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>
15135 <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>
15137 <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>
15141 #### ----------------------------------------------------------------
15142 #### The following section of tests are primarily to test
15143 #### wikitext escaping capabilities of Parsoid. Given that
15144 #### escaping can be done any number of ways, the wikitext (input)
15145 #### is always adjusted to reflect how Parsoid adds nowiki
15148 #### We are marking several tests as parsoid-only since the
15149 #### HTML in the result section is different from what the
15150 #### PHP parser generates for it.
15151 #### ----------------------------------------------------------------
15154 #### --------------- Headings ---------------
15156 #### 1. Nested inside html <h1>=foo=</h1>
15157 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
15158 #### 3. Nested inside html with wikitext split by html tags
15159 #### 4. No escape needed
15160 #### 5. Empty headings <h1></h1>
15161 #### 6. Heading chars in SOL context
15162 #### ----------------------------------------
15164 Headings: 0. Unnested
15168 <nowiki>=foo=</nowiki>
15170 <nowiki> =foo= </nowiki>
15172 <nowiki>=foo=</nowiki>
15174 =foo''a''<nowiki>=</nowiki>
15176 <p><span typeof="mw:Nowiki">=foo=</span></p>
15178 <p><span typeof="mw:Nowiki"> =foo= </span>
15180 <span typeof="mw:Nowiki">=foo=</span></p>
15182 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
15186 Headings: 1. Nested inside html
15190 =<nowiki>=foo=</nowiki>=
15192 ==<nowiki>=foo=</nowiki>==
15194 ===<nowiki>=foo=</nowiki>===
15196 ====<nowiki>=foo=</nowiki>====
15198 =====<nowiki>=foo=</nowiki>=====
15200 ======<nowiki>=foo=</nowiki>======
15202 <h1><span typeof="mw:Nowiki">=foo=</span></h1>
15203 <h2><span typeof="mw:Nowiki">=foo=</span></h2>
15204 <h3><span typeof="mw:Nowiki">=foo=</span></h3>
15205 <h4><span typeof="mw:Nowiki">=foo=</span></h4>
15206 <h5><span typeof="mw:Nowiki">=foo=</span></h5>
15207 <h6><span typeof="mw:Nowiki">=foo=</span></h6>
15211 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
15216 <nowiki>*</nowiki>bar
15222 <nowiki>=bar=</nowiki>
15230 Headings: 3. Nested inside html with wikitext split by html tags
15234 =='''bold'''<nowiki>foo=</nowiki>=
15236 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
15240 Headings: 4a. No escaping needed (testing just h1 and h2)
15258 =<nowiki>=</nowiki>=
15266 <h1><i>=</i>foo=</h1>
15267 <h1><span typeof="mw:Nowiki">=</span></h1>
15271 Headings: 4b. No escaping needed (inside p-tags)
15286 Headings: 5. Empty headings
15298 =====<nowiki/>=====
15300 ======<nowiki/>======
15311 Headings: 6a. Heading chars in SOL context (with trailing spaces)
15315 <nowiki>=a=</nowiki>
15317 <nowiki>=a=</nowiki>
15319 <nowiki>=a=</nowiki>
15321 <nowiki>=a=</nowiki>
15330 Headings: 6b. Heading chars in SOL context (with trailing newlines)
15358 Headings: 6c. Heading chars in SOL context (leading newline break)
15363 <nowiki>=b=</nowiki>
15370 Headings: 6d. Heading chars in SOL context (with interspersed comments)
15374 <!--c0--><nowiki>=a=</nowiki>
15376 <nowiki>=a=</nowiki> <!--c2--> <!--c3-->
15378 <p><!--c0-->=a=</p>
15379 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
15383 Headings: 6d. Heading chars in SOL context (No escaping needed)
15392 #### --------------- Lists ---------------
15393 #### 0. Outside nests (*foo, etc.)
15394 #### 1. Nested inside html <ul><li>*foo</li></ul>
15395 #### 2. Inside definition lists
15396 #### 3. Only bullets at start should be escaped
15397 #### 4. No escapes needed
15398 #### 5. No unnecessary escapes
15399 #### 6. Escape bullets in SOL position
15400 #### 7. Escape bullets in a multi-line context
15401 #### ----------------------------------------
15404 Lists: 0. Outside nests
15406 <nowiki>*</nowiki>foo
15408 <nowiki>#</nowiki>foo
15416 Lists: 1. Nested inside html
15418 *<nowiki>*foo</nowiki>
15420 *<nowiki>#foo</nowiki>
15422 *<nowiki>:foo</nowiki>
15424 *<nowiki>;foo</nowiki>
15426 #<nowiki>*foo</nowiki>
15428 #<nowiki>#foo</nowiki>
15430 #<nowiki>:foo</nowiki>
15432 #<nowiki>;foo</nowiki>
15454 Lists: 2. Inside definition lists
15456 ;<nowiki>;foo</nowiki>
15458 ;<nowiki>:foo</nowiki>
15460 ;<nowiki>:foo</nowiki>
15463 :<nowiki>:foo</nowiki>
15478 Lists: 3. Only bullets at start of text should be escaped
15480 *<nowiki>*foo*bar</nowiki>
15482 *<nowiki>*foo</nowiki>''it''*bar
15486 <ul><li>*foo<i>it</i>*bar
15492 Lists: 4. No escapes needed
15504 <ul><li><i>foo</i>*bar
15506 <ul><li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
15511 Lists: 5. No unnecessary escapes
15513 * bar <span><nowiki>[[foo]]</nowiki></span>
15515 *=bar <span><nowiki>[[foo]]</nowiki></span>
15517 *[[bar <span><nowiki>[[foo]]</nowiki></span>
15519 *]]bar <span><nowiki>[[foo]]</nowiki></span>
15521 *=bar <span>foo]]</span>=
15525 <ul><li> bar <span>[[foo]]</span>
15527 <ul><li>=bar <span>[[foo]]</span>
15529 <ul><li>[[bar <span>[[foo]]</span>
15531 <ul><li>]]bar <span>[[foo]]</span>
15533 <ul><li>=bar <span>foo]]</span>=
15535 <ul><li> <s></s>: a
15541 Lists: 6. Escape bullets in SOL position
15545 <!--cmt--><nowiki>*foo</nowiki>
15547 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
15551 Lists: 7. Escape bullets in a multi-line context
15554 <nowiki>*</nowiki>b
15561 #### --------------- HRs ---------------
15562 #### 1. Single line
15563 #### -----------------------------------
15566 HRs: 1. Single line
15570 ----<nowiki>----</nowiki>
15574 <hr><span typeof="mw:Nowiki">----</span>
15579 #### --------------- Tables ---------------
15580 #### 1a. Simple example
15581 #### 1b. No escaping needed (!foo)
15582 #### 1c. No escaping needed (|foo)
15583 #### 1d. No escaping needed (|}foo)
15585 #### 2a. Nested in td (<td>foo|bar</td>)
15586 #### 2b. Nested in td (<td>foo||bar</td>)
15587 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
15589 #### 3a. Nested in th (<th>foo!bar</th>)
15590 #### 3b. Nested in th (<th>foo!!bar</th>)
15591 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
15595 #### 4c. No escaping needed
15596 #### --------------------------------------
15599 Tables: 1a. Simple example
15610 Tables: 1b. No escaping needed
15619 Tables: 1c. No escaping needed
15628 Tables: 1d. No escaping needed
15637 Tables: 2a. Nested in td
15642 |<nowiki>foo|bar</nowiki>
15646 <td><span typeof="mw:Nowiki">foo|bar</span></td></tr></tbody></table>
15650 Tables: 2b. Nested in td
15655 |<nowiki>foo||bar</nowiki>
15656 |''it''<nowiki>foo||bar</nowiki>
15660 <td><span typeof="mw:Nowiki">foo||bar</span></td>
15661 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
15665 Tables: 2c. Nested in td -- no escaping needed
15673 <table><tbody><tr><td>foo!!bar
15674 </td></tr></tbody></table>
15679 Tables: 3a. Nested in th
15687 <table><tbody><tr><th>foo!bar
15688 </th></tr></tbody></table>
15693 Tables: 3b. Nested in th
15698 !<nowiki>foo!!bar</nowiki>
15702 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
15707 Tables: 3c. Nested in th -- no escaping needed
15712 !<nowiki>foo||bar</nowiki>
15716 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
15720 Tables: 4a. Escape -
15728 |<nowiki>-bar</nowiki>
15732 <tr><th>-bar</th></tr>
15734 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
15738 Tables: 4b. Escape +
15746 |<nowiki>+bar</nowiki>
15750 <tr><th>+bar</th></tr>
15752 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
15756 Tables: 4c. No escaping needed
15775 <tr><td>foo-bar</td><td>foo+bar</td></tr>
15776 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
15784 ### SSS FIXME: Disabled right now because accurate html2wt
15785 ### on this snippet requires data-parsoid flags that we've
15786 ### stripped out of these tests. We should scheme how we
15787 ### we want to handle these kind of tests that require
15788 ### data-parsoid flags for accurate html2wt serialization
15791 Tables: 4d. No escaping needed
15809 #### --------------- Links ----------------
15810 #### 1. Quote marks in link text
15811 #### 2. Wikilinks: Escapes needed
15812 #### 3. Wikilinks: No escapes needed
15813 #### 4. Extlinks: Escapes needed
15814 #### 5. Extlinks: No escapes needed
15815 #### --------------------------------------
15817 Links 1. Quote marks in link text
15821 [[Foo|Foo<nowiki>''boo''</nowiki>]]
15823 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
15827 Links 2. WikiLinks: Escapes needed
15831 [[Foo|<nowiki>[Foobar]</nowiki>]]
15832 [[Foo|<nowiki>Foobar]</nowiki>]]
15833 [[Foo|x [Foobar] x]]
15834 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
15835 [[Foo|<nowiki>[[Bar]]</nowiki>]]
15836 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
15837 [[Foo|<nowiki>|Bar</nowiki>]]
15838 [[Foo|<nowiki>]]bar</nowiki>]]
15839 [[Foo|<nowiki>[[bar</nowiki>]]
15840 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
15842 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
15843 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
15844 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
15845 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
15846 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
15847 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
15848 <a href="Foo" rel="mw:WikiLink">|Bar</a>
15849 <a href="Foo" rel="mw:WikiLink">]]bar</a>
15850 <a href="Foo" rel="mw:WikiLink">[[bar</a>
15851 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
15855 Links 3. WikiLinks: No escapes needed
15862 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
15863 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
15867 Links 4. ExtLinks: Escapes needed
15871 [http://google.com <nowiki>[google]</nowiki>]
15872 [http://google.com <nowiki>google]</nowiki>]
15874 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
15875 <a href="http://google.com" rel="mw:ExtLink">google]</a>
15879 Links 5. ExtLinks: No escapes needed
15883 [http://google.com [google]
15885 <a href="http://google.com" rel="mw:ExtLink">[google</a>
15888 #### --------------- Quotes ---------------
15889 #### 1. Quotes inside <b> and <i>
15890 #### 2. Link fragments separated by <i> and <b> tags
15891 #### 3. Link fragments inside <i> and <b>
15892 #### 4. No escaping needed
15893 #### --------------------------------------
15895 1. Quotes inside <b> and <i>
15897 parsoid=html2wt,wt2wt
15899 ''<nowiki>'foo'</nowiki>''
15900 ''<nowiki>''foo''</nowiki>''
15901 ''<nowiki>'''foo'''</nowiki>''
15903 '''<nowiki>'foo'</nowiki>'''
15904 '''<nowiki>''foo''</nowiki>'''
15905 '''<nowiki>'''foo'''</nowiki>'''
15906 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
15907 '''foo'''<nowiki/>'s
15910 '<nowiki/>''foo''<nowiki/>'
15912 '''foo'''<nowiki/>'
15913 '<nowiki/>'''foo'''<nowiki/>'
15922 <b>foo'<i>bar'</i>baz</b>
15933 2. Link fragments separated by <i> and <b> tags
15935 [[''foo''<nowiki>hello]]</nowiki>
15937 [['''foo'''<nowiki>hello]]</nowiki>
15939 <p>[[<i>foo</i>hello]]
15940 </p><p>[[<b>foo</b>hello]]
15945 3. Link fragments inside <i> and <b>
15946 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
15947 this is one of the shortcomings of this format)
15949 ''[[foo''<nowiki>]]</nowiki>
15951 '''[[foo'''<nowiki>]]</nowiki>
15954 </p><p><b>[[foo</b>]]
15959 4. No escaping needed
15961 '<span>''bar''</span>'
15962 '<span>'''bar'''</span>'
15964 <p>'<span><i>bar</i></span>'
15965 '<span><b>bar</b></span>'
15969 #### ----------- Paragraphs ---------------
15970 #### 1. No unnecessary escapes
15971 #### --------------------------------------
15974 1. No unnecessary escapes
15976 bar <span><nowiki>[[foo]]</nowiki></span>
15978 =bar <span><nowiki>[[foo]]</nowiki></span>
15980 [[bar <span><nowiki>[[foo]]</nowiki></span>
15982 ]]bar <span><nowiki>[[foo]]</nowiki></span>
15984 =bar <span>foo]]</span><nowiki>=</nowiki>
15986 <p>bar <span>[[foo]]</span>
15987 </p><p>=bar <span>[[foo]]</span>
15988 </p><p>[[bar <span>[[foo]]</span>
15989 </p><p>]]bar <span>[[foo]]</span>
15990 </p><p>=bar <span>foo]]</span>=
15994 #### ----------------------- PRE --------------------------
15995 #### 1. Leading whitespace in SOL context should be escaped
15996 #### ------------------------------------------------------
15998 1. Leading whitespace in SOL context should be escaped
16002 <nowiki> </nowiki>a
16004 <nowiki> </nowiki> a
16006 <nowiki> </nowiki>a(tab)
16008 <nowiki> </nowiki> a
16010 <nowiki> </nowiki> a
16013 <nowiki> </nowiki>b
16016 <nowiki> </nowiki>b
16019 <nowiki> </nowiki> b
16025 <p><!--cmt--> a</p>
16034 #### --------------- HTML tags ---------------
16037 #### 3. multi-line html tag
16038 #### -----------------------------------------
16044 <a href="http://google.com">google</a>
16046 <a href="http://google.com">google</a>
16052 <nowiki><div>foo</div>
16053 <div style="color:red">foo</div></nowiki>
16055 <p><div>foo</div>
16056 <div style="color:red">foo</div>
16061 3. multi-line html tag
16076 <nowiki><ref>foo</ref></nowiki>
16078 <p><ref>foo</ref>
16082 #### --------------- Others ---------------
16086 <nowiki>foo</nowiki>
16088 <p><nowiki>foo</nowiki>
16092 ## The quote-char in the input is necessary for triggering the bug
16094 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
16096 parsoid=wt2wt,html2wt
16105 Tag-like HTML structures are passed through as text
16127 </p><p>1<d e>f
16132 # This fails in the PHP parser (see bug 40670,
16133 # https://bugzilla.wikimedia.org/show_bug.cgi?id=40670), so disabled for it.
16135 Tag names followed by punctuation should not be recognized as tags
16141 <p><s.ome> text
16146 HTML tag with necessary entities in attributes
16148 <span title="&amp;">foo</span>
16150 <p><span title="&amp;">foo</span>
16155 HTML tag with 'unnecessary' entity encoding in attributes
16157 <span title="&">foo</span>
16159 <p><span title="&">foo</span>
16164 HTML tag with broken attribute value quoting
16166 <span title="Hello world>Foo</span>
16168 <p><span>Foo</span>
16173 Parsoid-only: HTML tag with broken attribute value quoting
16177 <span title="Hello world>Foo</span>
16179 <p><span title="Hello world">Foo</span>
16184 Table with broken attribute value quoting
16187 | title="Hello world|Foo
16198 Table with broken attribute value quoting on consecutive lines
16201 | title="Hello world|Foo
16202 | style="color:red|Bar
16215 Parsoid-only: Table with broken attribute value quoting on consecutive lines
16220 | title="Hello world|Foo
16221 | style="color:red|Bar
16226 <td title="Hello world">Foo
16227 </td><td style="color: red">Bar
16228 </td></tr></tbody></table>
16233 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
16243 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
16253 Accept empty td cell attribute
16256 | align="center" | foo || |
16261 <td align="center"> foo </td>
16268 Non-empty attributes in th-cells
16271 ! Foo !! style="color: red" | Bar
16277 <th style="color: red"> Bar
16283 Accept empty attributes in th-cells
16298 Empty table rows go away
16319 ### Parsoid-centric tests for testing RTing of inter-element separators
16320 ### Edge cases not tested by existing parser tests and specific to
16321 ### Parsoid-specific serialization strategies.
16325 RT-ed inter-element separators should be valid separators
16338 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
16339 (Parsoid-only since PHP parser relies on Tidy for correct output)
16355 Empty TD followed by TD with tpl-generated attribute
16360 |{{echo|style='color:red'}}|foo
16374 Indented table with an empty td
16393 Empty TR followed by a template-generated TR
16394 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
16396 parsoid=wt2html,wt2wt
16400 {{echo|<tr><td>foo</td></tr>}}
16406 <tr typeof="mw:Transclusion">
16407 <td>foo</td></tr></tbody></table>
16410 ## PHP and parsoid output differ for this, and since this is primarily
16411 ## for testing Parsoid's serializer, marking this Parsoid only
16413 Empty TR followed by mixed-ws-comment line should RT correctly
16427 <td> <!--c--></td></tr>
16429 <td><!--c--> <!--d--></td></tr>
16435 Multi-line image caption generated by templates with/without trailing newlines
16439 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
16440 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
16442 <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>
16443 <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>
16447 ## PHP emits broken html for this, and since this is primarily
16448 ## a Parsoid serializer test, marking this Parsoid only
16450 Improperly nested inline or quotes tags with whitespace in between
16454 <span> <s>x</span> </s>
16457 <p><span> <s>x</s></span><s> </s>
16458 <b> <i>x</i></b><i> </i>
16463 Encapsulate protected attributes from wt
16467 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
16469 <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>
16473 # -----------------------------------------------------------------
16474 # The following section of tests are primarily to spec requirements
16475 # around serialization of new/edited content.
16477 # All these tests are marked Parsoid html2wt and html2html only
16478 # ----------------------------------------------------------------
16481 Image: Modifying size of an image
16485 [[Image:Wiki.png|230x230px]]
16487 <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>
16491 Image: New block level image should have \n before and after
16496 [[File:Wiki.png|right|thumb|150x150px]]
16499 <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>
16503 Lists: Add space after bullets
16510 * <span> baz</span>
16515 <li><span> baz</span></li>
16520 Parsoid: Serialize positional parameters with = in them as named parameter
16526 <p about="#mwt1" typeof="mw:Transclusion"
16527 data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}'
16531 # -----------------------------------------------------------------
16532 # End of section for Parsoid-only html2wt tests for serialization
16534 # -----------------------------------------------------------------
16541 Try for 100% code coverage