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 ### <nowiki> test cases
873 <nowiki> unordered list
875 <nowiki>* This is not an unordered list item.</nowiki>
877 <p>* This is not an unordered list item.
884 <nowiki>Lorem ipsum dolor
905 :There is not nowiki.
906 :There is <nowiki>nowiki</nowiki>.
908 #There is not nowiki.
909 #There is <nowiki>nowiki</nowiki>.
911 *There is not nowiki.
912 *There is <nowiki>nowiki</nowiki>.
914 <dl><dd>There is not nowiki.
915 </dd><dd>There is nowiki.
917 <ol><li>There is not nowiki.
918 </li><li>There is nowiki.
920 <ul><li>There is not nowiki.
921 </li><li>There is nowiki.
927 Entities inside <nowiki>
929 <nowiki><</nowiki>
936 Entities inside template parameters
942 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}'>–</span>
950 Comments and Indent-Pre
952 <!-- comment 1 --> asdf
954 <!-- comment 1 --> asdf
957 <!-- comment 1 --> asdf
958 <!-- comment 2 -->xyz
960 <!-- comment 1 --> asdf
961 <!-- comment 2 --> xyz
1017 asdf<!-- comment 1 -->jkl
1027 <!-- foo --> b <!-- bar -->
1041 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1047 Comment semantics and delimiters
1049 <!-- --><!----><!-----><!------>
1055 Comment semantics and delimiters, redux
1057 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1058 -- foo -- funky huh? ... -->
1064 Comment semantics and delimiters: directors cut
1066 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1067 everything starting with < followed by !-- until the first -- and > we see,
1068 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1076 Comment semantics: nesting
1078 <!--<!-- no, we're not going to do anything fancy here -->-->
1085 Comment semantics: unclosed comment at end
1087 <!--This comment will run out to the end of the document
1093 Comment in template title
1102 Comment on its own line post-expand
1114 Comment on its own line post-expand with non-significant whitespace
1126 ### paragraph wrapping tests
1140 Block tag on one line
1152 Block tag on both lines
1164 Multiple lines without block tags
1182 Empty lines between lines with block tags
1212 ### Preformatted text
1221 And a [[Main Page|link]]
1227 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1232 Ident preformatting with inline content
1243 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1260 Regression with preformatted in <center>
1273 # Expected output in the following test is not really expected (there should be
1274 # <pre> in the output) -- it's only testing for well-formedness.
1276 Bug 6200: Preformatted in <blockquote>
1289 <pre> with attributes (bug 3202)
1291 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1293 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1298 <pre> with width attribute (bug 3202)
1300 <pre width="8">Narrow screen goodies</pre>
1302 <pre width="8">Narrow screen goodies</pre>
1307 <pre> with forbidden attribute (bug 3202)
1309 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1311 <pre width="8">Narrow screen goodies</pre>
1316 Entities inside <pre>
1325 <pre> with forbidden attribute values (bug 3202)
1327 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1329 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1334 <nowiki> inside <pre> (bug 13238)
1342 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1350 <pre><nowiki>Foo</nowiki></pre>
1355 <nowiki> and <pre> preference (first one wins)
1386 </pre> inside nowiki
1388 <nowiki></pre></nowiki>
1395 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1403 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1413 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1425 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1446 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1450 {{echo| foo}}{{echo| bar}}
1455 {{echo|<!--cmt--> foo}}
1457 <!--cmt-->{{echo| foo}}
1459 {{echo|{{echo| }}bar}}
1477 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1514 Templates: Single-line variant of parameter whitespace stripping test
1520 {{echo|{{echo| a}}}}
1522 {{echo|1={{echo| a}}}}
1535 Templates: Strip whitespace from named parameters, but not positional ones
1563 Templates: Dont strip whitespace from whitespace/comment-only arguments
1567 {{echo| <!--cmt--> }}
1574 Templates: Parsoid parameter escaping test 1
1578 {{echo|[foo]|{{echo|[bar]}}}}
1580 <p about="#mwt1" typeof="mw:Transclusion"
1581 data-mw="{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}">[foo]</p>
1585 Parsoid: Pipes in external links in template parameter
1589 {{echo|[{{echo|http://example.com}} link]}}
1591 <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>
1595 Parsoid: pipe in transclusion parameter
1599 {{echo|http://foo.com/a|b}}
1601 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1602 typeof="mw:Transclusion"
1603 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>
1607 Parsoid: Pipe in external link target and content in template parameter
1609 parsoid=html2wt,wt2wt
1611 {{echo|[http://foo.com/a|b a|b]}}
1613 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1614 typeof="mw:Transclusion"
1615 data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},
1616 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}'>a|b</a></p>
1620 Templates: Dont escape already nowiki-escaped text in template parameters
1622 parsoid=html2wt,wt2wt
1624 {{echo|foo<nowiki>|</nowiki>bar}}
1625 {{echo|<nowiki><div></nowiki>}}
1626 {{echo|<nowiki></nowiki>}}
1628 <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>
1629 <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>
1630 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}'></span>
1635 ### Parsoid-centric tests for testing RT edge cases for pre
1639 1a. Indent-Pre and Comments
1652 1b. Indent-Pre and Comments
1665 1c. Indent-Pre and Comments
1678 2a. Indent-Pre and tables
1699 2b. Indent-Pre and tables
1715 2c. Indent-Pre and tables (bug 42252)
1732 3a. Indent-Pre and block tags (single-line html)
1740 <pre><span> foo </span>
1745 3b. Indent-Pre and block tags (pre-content on separate line)
1797 4. Multiple spaces at start-of-line
1816 5. White-space in indent-pre
1817 NOTE: the white-space char on 2nd line is significant
1830 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
1834 HTML-pre: 1. embedded newlines
1870 HTML-pre: 2: indented text
1883 HTML-pre: 3: other wikitext
1904 ### Definition lists
1911 <dl><dt> name </dt><dd> Definition
1917 Definition list for indentation only
1921 <dl><dd> Indented text
1927 Definition list with no space
1931 <dl><dt>name</dt><dd>Definition
1937 Definition list with URL link
1939 ; http://example.com/ : definition
1941 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt><dd> definition
1947 Definition list with bracketed URL link
1949 ;[http://www.example.com/ Example]:Something about it
1951 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt><dd>Something about it
1957 Definition list with wikilink containing colon
1959 ; [[Help:FAQ]]: The least-read page on Wikipedia
1961 <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
1966 # At Brion's and JeLuF's insistence... :)
1968 Definition list with news link containing colon
1970 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
1972 <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!
1978 Malformed definition list with colon
1980 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
1982 <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
1988 Definition lists: colon in external link text
1990 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
1992 <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
1998 Definition lists: colon in HTML attribute
2000 ;<b style="display: inline">bold</b>
2002 <dl><dt><b style="display: inline">bold</b>
2008 Definition lists: self-closed tag
2010 ;one<br/>two : two-line fun
2012 <dl><dt>one<br />two </dt><dd> two-line fun
2018 Bug 11748: Literal closing tags
2022 <dd>test test test test test</dd>
2024 <dd>test test test test test</dd>
2029 <dd>test test test test test</dd>
2031 <dd>test test test test test</dd>
2037 Definition and unordered list using wiki syntax nested in unordered list using html tags.
2040 ; term : description
2046 <dl><dt> term </dt><dd> description
2057 Definition list with empty definition and following paragraph
2062 <dl><dt> term</dt><dd>
2069 Nested definition lists using html syntax
2086 Definition Lists: No nesting: Multiple dd's
2100 Definition Lists: Indentation: Regular
2116 Definition Lists: Indentation: Missing 1st level
2130 Definition Lists: Indentation: Multi-level indent
2134 <dl><dd><dl><dd><dl><dd>i3
2142 Definition Lists: Hacky use to indent tables
2149 should be left alone
2151 <dl><dd><dl><dd><table>
2156 </td></tr></table></dd></dl></dd></dl>
2158 should be left alone
2161 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
2162 ## as an empty dt item. It also ignores all but the last ";" when followed
2163 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
2164 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
2167 ## Ex: ";;t2 ::d2" is transformed into:
2179 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
2180 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
2191 ## All Parsoid only definition list tests have this difference.
2193 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
2194 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
2197 Table / list interaction: indented table with lists in table contents
2219 </td></tr></table></dd></dl>
2224 Table / list interaction: lists nested in tables nested in indented lists
2249 </td></tr></table></dd></dl>
2257 Definition Lists: Nesting: Multi-level (Parsoid only)
2287 Definition Lists: Nesting: Test 2 (Parsoid only)
2307 Definition Lists: Nesting: Test 3 (Parsoid only)
2335 Definition Lists: Nesting: Test 4
2340 <dl><dd><dl><dd><dl><dt>t3
2349 ## The Parsoid team believes the following three test exposes a
2350 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
2351 ## wrong to close the <dl> after the <dt> containing the <ul>.)
2353 Definition Lists: Mixed Lists: Test 1 (php)
2361 <dl><dd><dl><dt><ul><li> foo
2371 Definition Lists: Mixed Lists: Test 1 (parsoid)
2379 <dl><dd><dl><dt><ul><li> foo
2380 </li></ul></dt><dd><ul><li> bar
2381 </li></ul></dd><dt> baz</dt></dl></dd></dl>
2385 Definition Lists: Mixed Lists: Test 2
2399 Definition Lists: Mixed Lists: Test 3
2404 <ul><li><dl><dd><dl><dd><dl><dd> d1
2415 Definition Lists: Mixed Lists: Test 4
2420 <ul><li><dl><dt>d1 </dt><dd>d2
2421 </dd><dt>d3 </dt><dd>d4
2429 Definition Lists: Mixed Lists: Test 5
2444 Definition Lists: Mixed Lists: Test 6
2449 <ol><li><ul><li><dl><dd>d1
2461 Definition Lists: Mixed Lists: Test 7
2475 Definition Lists: Mixed Lists: Test 8
2491 Definition Lists: Mixed Lists: Test 9
2495 <ul><li><dl><dt>foo </dt><dd>bar
2503 Definition Lists: Mixed Lists: Test 10
2507 <ul><li><ol><li><dl><dt>foo </dt><dd>bar
2514 # The Parsoid team disagrees with the PHP parser's seemingly-random
2515 # rules regarding dd/dt on the next two tests. Parsoid is more
2516 # consistent, and recognizes the shared nesting and keeps the
2517 # still-open tags around until the nesting is complete.
2520 Definition Lists: Mixed Lists: Test 11 (php)
2527 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt><dd><ul><li><dl><dt><dl><dt>bar
2532 <dl><dt>boo </dt><dd>baz
2541 Definition Lists: Mixed Lists: Test 11 (parsoid)
2563 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2564 <dd data-parsoid='{"stx":"row"}'>bar</dd></dl></dt></dl></li></ul></dt>
2565 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2566 <dd data-parsoid='{"stx":"row"}'>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
2571 Definition Lists: Weird Ones: Test 1 (php)
2575 *#;*::;; foo : bar (who uses this?)
2577 <ul><li><ol><li><dl><dt> foo </dt><dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)
2589 Definition Lists: Weird Ones: Test 1 (parsoid)
2593 *#;*::;; foo : bar (who uses this?)
2610 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2611 <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>
2618 External links: non-bracketed
2620 Non-bracketed: http://example.com
2622 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2627 External links: numbered
2629 Numbered: [http://example.com]
2630 Numbered: [http://example.net]
2631 Numbered: [http://example.com]
2633 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
2634 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
2635 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
2640 External links: specified text
2642 Specified text: [http://example.com link]
2644 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
2649 External links: trail
2651 Linktrails should not work for external links: [http://example.com link]s
2653 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
2658 External links: dollar sign in URL
2660 http://example.com/1$2345
2662 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
2667 External links: dollar sign in URL (named)
2669 [http://example.com/1$2345]
2671 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
2676 External links: open square bracket forbidden in URL (bug 4377)
2678 http://example.com/1[2345
2680 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
2685 External links: open square bracket forbidden in URL (named) (bug 4377)
2687 [http://example.com/1[2345]
2689 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
2694 External links: nowiki in URL link text (bug 6230)
2696 [http://example.com/ <nowiki>''example site''</nowiki>]
2698 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
2703 External links: newline forbidden in text (bug 6230 regression check)
2705 [http://example.com/ first
2708 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
2714 External links: Pipe char between url and text
2716 [http://example.com | link]
2718 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
2723 External links: protocol-relative URL in brackets
2725 [//example.com/ Test]
2727 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
2732 External links: protocol-relative URL in brackets without text
2736 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
2741 External links: protocol-relative URL in free text is left alone
2745 <p>//example.com/Foo
2750 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
2752 foo//example.com/Foo
2754 <p>foo//example.com/Foo
2761 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2763 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2768 External image from https
2770 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2772 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2777 External image (when not allowed)
2779 wgAllowExternalImages=0
2781 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2783 <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>
2788 Link to non-http image, no img tag
2790 Link to non-http image, no img tag: ftp://example.com/test.jpg
2792 <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>
2797 External links: terminating separator
2799 Terminating separator: http://example.com/thing,
2801 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
2806 External links: intervening separator
2808 Intervening separator: http://example.com/1,2,3
2810 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
2815 External links: old bug with URL in query
2817 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
2819 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
2824 External links: old URL-in-URL bug, mixed protocols
2826 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
2828 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
2833 External links: URL in text
2835 URL in text: [http://example.com http://example.com]
2837 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2842 External links: Clickable images
2844 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
2846 <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>
2851 External links: raw ampersand
2853 Old & use: http://x&y
2855 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2860 External links: encoded ampersand
2862 Old & use: http://x&y
2864 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2869 External links: encoded equals (bug 6102)
2871 http://example.com/?foo=bar
2873 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
2878 External links: [raw ampersand]
2880 Old & use: [http://x&y]
2882 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2887 External links: [encoded ampersand]
2889 Old & use: [http://x&y]
2891 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2896 External links: [encoded equals] (bug 6102)
2898 [http://example.com/?foo=bar]
2900 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
2905 External links: [IDN ignored character reference in hostname; strip it right off]
2907 [http://e‌xample.com/]
2909 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
2913 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
2914 # Where an external link could easily circumvent the sanitization of the text of
2915 # a link like this (where an IDN-ignore character is in the URL somewhere), this
2916 # test demands a higher standard. That's a bit strange.
2920 # http://example.com -> [http://example.com|http://example.com]
2921 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
2923 # The first example is sanitized, but the second is not. Any security benefits
2924 # from this production are trivial to circumvent. Either remove this test and
2925 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
2926 # the test accordingly.
2931 External links: IDN ignored character reference in hostname; strip it right off
2933 http://e‌xample.com/
2935 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
2940 External links: www.jpeg.org (bug 554)
2944 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
2949 External links: URL within URL (original bug 2)
2951 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
2953 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
2958 BUG 361: URL inside bracketed URL
2960 [http://www.example.com/foo http://www.example.com/bar]
2962 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
2967 BUG 361: URL within URL, not bracketed
2969 http://www.example.com/foo?=http://www.example.com/bar
2971 <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>
2976 BUG 289: ">"-token in URL-tail
2978 http://www.example.com/<hello>
2980 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
2985 BUG 289: literal ">"-token in URL-tail
2987 http://www.example.com/<b>html</b>
2989 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
2994 BUG 289: ">"-token in bracketed URL
2996 [http://www.example.com/<hello> stuff]
2998 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
3003 BUG 289: literal ">"-token in bracketed URL
3005 [http://www.example.com/<b>html</b> stuff]
3007 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
3012 BUG 289: literal double quote at end of URL
3014 http://www.example.com/"hello"
3016 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
3021 BUG 289: literal double quote in bracketed URL
3023 [http://www.example.com/"hello" stuff]
3025 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
3030 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
3032 [http://www.example.com test]
3034 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
3039 External links: link text with spaces
3041 [http://www.example.com a b c]
3042 [http://www.example.com ''a'' ''b'']
3044 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
3045 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
3050 External links: wiki links within external link (Bug 3695)
3052 [http://example.com [[wikilink]] embedded in ext link]
3054 <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>
3059 BUG 787: Links with one slash after the url protocol are invalid
3063 [http:/example.com title]
3065 <p>http:/example.com
3066 </p><p>[http:/example.com title]
3071 Bracketed external links with template-generated invalid target
3073 [{{echo|http:/example.com}} title]
3075 <p>[http:/example.com title]
3080 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
3082 ''[http://example.com text'']
3083 [http://example.com '''text]'''
3084 ''Something [http://example.com in italic'']
3085 ''Something [http://example.com mixed''''', even bold]'''
3086 '''''Now [http://example.com both''''']
3088 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
3089 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
3090 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
3091 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
3092 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
3098 Bug 4781: %26 in URL
3100 http://www.example.com/?title=AT%26T
3102 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
3106 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
3107 # % is actually legal in HTML5. Any change in output would need testing though.
3109 Bug 4781, 5267: %25 in URL
3111 http://www.example.com/?title=100%25_Bran
3113 <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>
3118 Bug 4781, 5267: %28, %29 in URL
3120 http://www.example.com/?title=Ben-Hur_%281959_film%29
3122 <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>
3128 Bug 4781: %26 in autonumber URL
3130 [http://www.example.com/?title=AT%26T]
3132 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
3137 Bug 4781, 5267: %26 in autonumber URL
3139 [http://www.example.com/?title=100%25_Bran]
3141 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
3146 Bug 4781, 5267: %28, %29 in autonumber URL
3148 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
3150 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
3156 Bug 4781: %26 in bracketed URL
3158 [http://www.example.com/?title=AT%26T link]
3160 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
3165 Bug 4781, 5267: %26 in bracketed URL
3167 [http://www.example.com/?title=100%25_Bran link]
3169 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
3174 Bug 4781, 5267: %28, %29 in bracketed URL
3176 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
3178 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
3183 External link containing double-single-quotes in text '' (bug 4598 sanity check)
3185 Some [http://example.com/ pretty ''italics'' and stuff]!
3187 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
3192 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
3194 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
3196 <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>
3201 External link containing double-single-quotes with no space separating the url from text in italics
3203 [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]].]
3205 <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>
3210 External link with comments in link text
3212 [http://www.google.com Google <!-- comment -->]
3214 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
3219 URL-encoding in URL functions (single parameter)
3221 {{localurl:Some page|amp=&}}
3223 <p>/index.php?title=Some_page&amp=&
3228 URL-encoding in URL functions (multiple parameters)
3230 {{localurl:Some page|q=?&=&}}
3232 <p>/index.php?title=Some_page&q=?&amp=&
3239 http://example.com/index.php?foozoid%5B%5D=bar
3241 http://example.com/index.php?foozoid[]=bar
3243 <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>
3244 </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>
3249 IPv6 urls (bug 21261)
3253 http://[2404:130:0:1000::187:2]/index.php
3255 <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>
3260 Non-extlinks in brackets
3269 [{{echo|foo}} ''bar'']
3270 [{{echo|foo}}l's] errand
3271 [{{echo|foo}}l's errand]
3273 [url=http://example.com]
3286 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
3291 Parsoid: Percent encoding in external links
3295 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
3297 <p><a rel="mw:ExtLink"
3298 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
3302 Parsoid: use url link syntax for links where the content is equal the link
3309 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
3319 Normal text. '''Bold text.''' Normal text. ''Italic text.''
3321 Normal text. '''''Bold italic text.''''' Normal text.
3323 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
3324 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
3330 Unclosed and unmatched quotes (php)
3334 '''''Bold italic text '''with bold deactivated''' in between.'''''
3336 '''''Bold italic text ''with italic deactivated'' in between.'''''
3340 ..spanning two paragraphs (should not work).'''
3342 '''Bold tag left open
3344 ''Italic tag left open
3348 <!-- Unmatching number of opening, closing tags: -->
3349 '''This year''''s election ''should'' beat '''last year''''s.
3351 ''Tom'''s car is bigger than ''Susan'''s.
3353 Plain ''italic'''s plain
3355 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3356 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
3357 </p><p><b>Bold text..</b>
3358 </p><p>..spanning two paragraphs (should not work).
3359 </p><p><b>Bold tag left open</b>
3360 </p><p><i>Italic tag left open</i>
3362 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3363 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3364 </p><p>Plain <i>italic'</i>s plain
3367 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
3368 # parser strips. The wikitext contains just the first half of the bold
3369 # quote pair. (There's also a case where Parsoid nests <b> and <i>
3370 # differently than the PHP parser.)
3372 Unclosed and unmatched quotes (parsoid)
3376 '''''Bold italic text '''with bold deactivated''' in between.'''''
3378 '''''Bold italic text ''with italic deactivated'' in between.'''''
3382 ..spanning two paragraphs (should not work).'''
3384 '''Bold tag left open
3386 ''Italic tag left open
3390 <!-- Unmatching number of opening, closing tags: -->
3391 '''This year''''s election ''should'' beat '''last year''''s.
3393 ''Tom'''s car is bigger than ''Susan'''s.
3395 Plain ''italic'''s plain
3397 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3398 </p><p><i><b>Bold italic text </b></i><b>with italic deactivated<i> in between.</i></b>
3399 </p><p><b>Bold text..</b>
3400 </p><p>..spanning two paragraphs (should not work).<b></b>
3401 </p><p><b>Bold tag left open</b>
3402 </p><p><i>Italic tag left open</i>
3404 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3405 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3406 </p><p>Plain <i>italic'</i>s plain
3413 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
3416 # This should not produce <table></table> as <table><tr><td></td></tr></table>
3417 # is the bare minimum required by the spec, see:
3418 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
3420 A table with no data. (php)
3427 # Parsoid team replies: empty table tags are legal in HTML5
3429 A table with no data. (parsoid)
3438 # A table with nothing but a caption is invalid XHTML, we might want to render
3439 # this as <p>caption</p>
3441 A table with nothing but a caption (php)
3451 </caption><tr><td></td></tr></table>
3454 # Parsoid team replies: table with only a caption is legal in HTML5
3456 A table with nothing but a caption (parsoid)
3464 <table><caption> caption</caption></table>
3468 A table with caption with default-spaced attributes and a table row
3471 |+ style="color: red;" | caption1
3477 <caption style="color: red;"> caption1
3486 A table with captions with non-default spaced attributes and a table row
3489 |+style="color: red;"|caption2
3490 |+ style="color: red;"| caption3
3496 <caption style="color: red;">caption2
3498 <caption style="color: red;"> caption3
3507 Table td-cell syntax variations
3511 | foo bar foo || baz
3512 | style='color:red;' | baz
3513 | style='color:red;' || baz
3520 <td> foo bar foo </td>
3523 <td style="color:red;"> baz
3525 <td> style='color:red;' </td>
3553 Simple table but with multiple dashes for row wikitext
3571 Multiplication table
3573 {| border="1" cellpadding="2"
3574 |+Multiplication table
3576 ! × !! 1 !! 2 !! 3
3594 <table border="1" cellpadding="2">
3595 <caption>Multiplication table
3642 Accept "||" in table headings
3657 Accept "||" in indented table headings
3667 </th></tr></table></dd></dl>
3672 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
3689 Accept "| !" at start of line in tables (ignore !-attribute)
3693 | !style="color:red" | bar
3705 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 +/-
3709 |style='color:red;'|+1
3710 |style='color:blue;'|-1
3722 <td style="color:red;">+1
3724 <td style="color:blue;">-1
3748 |rowspan=2| Cell 2, row 1 (and 2)
3759 <td rowspan="2"> Cell 2, row 1 (and 2)
3777 {| bgcolor=#ABCDEF border=2
3782 |the original table again
3790 <table bgcolor="#ABCDEF" border="2">
3798 <td>the original table again
3804 Invalid attributes in table cell (bug 1830)
3819 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
3822 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
3826 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
3827 <td>]" onmouseover="alert(document.cookie)">test
3836 Indented table markup mixed with indented pre content (proposed in bug 6200)
3841 Text that should be rendered preformatted
3849 <pre>Text that should be rendered preformatted
3858 Template-generated table cell attributes and cell content
3866 <td style="color: red"> Foo
3872 Template-generated table cell attributes and cell content (2)
3875 |align=center {{table_attribs}}
3880 <td align="center" style="color: red"> Foo
3886 Template-generated table cell attributes and cell content (3)
3889 |align=center {{table_cells}}
3894 <td align="center" style="color: red"> Foo </td>
3902 Table with row followed by newlines and table heading
3920 Table with empty line following the start tag
3937 # FIXME: Preserve the attribute properly (with an empty string as value) in
3938 # the PHP parser. Parsoid implements the behavior below.
3940 Table attributes with empty value
3952 </td></tr></tbody></table>
3957 Wikitext table with a lot of comments
3980 Wikitext table with double-line table cell
3997 Table cell with a single comment
4013 # The expected HTML structure in this test is debatable. The PHP parser does
4014 # not parse this kind of table at all. The main focus for Parsoid is on
4015 # round-tripping, so this output is ok for now. TODO: revisit!
4017 Wikitext table with html-syntax row (Parsoid)
4029 <td>foo</td></tr></tbody></table>
4033 Implicit <td> after a |-
4034 (PHP parser relies on Tidy to add the missing <td> tags)
4036 parsoid=wt2html,wt2wt
4049 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
4050 (PHP parser relies on Tidy to add the missing <td> tags)
4052 parsoid=wt2html,wt2wt
4064 <tr><td><pre>a</pre></td></tr>
4065 <tr><td> b</td></tr>
4071 Lists should be recognized in an implicit <td> context
4072 (PHP parser relies on Tidy to add the missing <td> tags)
4074 parsoid=wt2html,wt2wt
4083 <td><ul><li>a</li></ul></td>
4092 Plain link, capitalized
4096 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
4101 Plain link, uncapitalized
4105 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
4112 [[Main Page|The Main Page]]
4114 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4119 Piped link with comment in link text
4121 [[Main Page|The Main<!--front--> Page]]
4123 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4132 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
4137 Broken link with fragment
4139 [[Zigzagzogzagzig#zug]]
4141 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
4146 Special page link with fragment
4148 [[Special:Version#anchor]]
4150 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
4155 Nonexistent special page link with fragment
4157 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
4159 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
4166 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
4168 <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>
4175 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
4177 <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>!!!
4188 Bug 43661: Piped links with identical prefixes
4190 [[prefixed article|prefixed articles with spaces]]
4192 [[prefixed article|prefixed articlesaoeu]]
4194 [[Main Page|Main Page test]]
4196 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
4197 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
4198 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
4204 Link with HTML entity in suffix / tail
4206 [[Main Page]]", [[Main Page]]a
4208 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
4213 Link with 3 brackets
4222 Piped link with 3 brackets
4224 [[[main page|the main page]]]
4226 <p>[[[main page|the main page]]]
4231 Link with multiple pipes
4233 [[Main Page|The|Main|Page]]
4235 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
4242 [[Talk:Parser testing]], [[Meta:Disclaimers]]
4244 <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>
4249 Piped link to namespace
4251 [[Meta:Disclaimers|The disclaimers]]
4253 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
4260 [[Usually caused by a typo (oops}]]
4262 <p>[[Usually caused by a typo (oops}]]
4267 Link containing % (not as a hex sequence)
4271 <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>
4276 Link containing % as a single hex sequence interpreted to char
4280 <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>
4285 Link containing % as a double hex sequence interpreted to hex sequence
4289 <p>[[7%2525 Solution]]
4294 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
4295 Example for such a section: == < ==
4297 [[%23%3c]][[%23%3e]]
4299 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
4304 Link containing "<#" and ">#" as a hex sequences
4306 [[%3c%23]][[%3e%23]]
4308 <p>[[%3c%23]][[%3e%23]]
4313 Link containing an equals sign
4315 [[Special:BookSources/isbn=4-00-026157-6]]
4317 <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>
4324 Just a test of an article title containing a tilde.
4327 # note that links containing signatures, like [[Foo~~~~]], are
4328 # massaged by the pre-save transform (PST) and so the tildes are never
4329 # seen by the parser.
4331 Link containing a tilde
4335 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
4340 Link containing double-single-quotes '' (bug 4598)
4342 [[Lista d''e paise d''o munno]]
4344 <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>
4349 Link containing double-single-quotes '' in text (bug 4598 sanity check)
4351 Some [[Link|pretty ''italics'' and stuff]]!
4353 <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>!
4358 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
4360 ''Some [[Link|pretty ''italics'' and stuff]]!
4362 <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>
4367 Link with double quotes in title part (literal) and alternate part (interpreted)
4369 [[File:Denys Savchenko ''Pentecoste''.jpg]]
4373 [[''Pentecoste''|Pentecoste]]
4375 [[''Pentecoste''|''Pentecoste'']]
4377 <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>
4378 </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>
4379 </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>
4380 </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>
4385 Broken image links with HTML captions (bug 39700)
4387 [[File:Nonexistent|<script></script>]]
4388 [[File:Nonexistent|100px|<script></script>]]
4389 [[File:Nonexistent|<]]
4390 [[File:Nonexistent|a<i>b</i>c]]
4392 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4393 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4394 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
4395 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
4402 [[http://www.example.com]]
4404 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
4409 Plain link to URL with link text
4411 [[http://www.example.com Link text]]
4413 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
4418 Plain link to protocol-relative URL
4420 [[//www.example.com]]
4422 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
4427 Plain link to protocol-relative URL with link text
4429 [[//www.example.com Link text]]
4431 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
4436 Plain link to page with question mark in title
4442 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
4443 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
4448 # I'm fairly sure the expected result here is wrong.
4449 # We want these to be URL links, not pseudo-pages with URLs for titles....
4450 # However the current output is also pretty screwy.
4453 # I'm changing it to match the current output--it arguably makes more
4454 # sense in the light of the test above. Old expected result was:
4455 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
4457 # But I think this test is bordering on "garbage in, garbage out" anyway.
4462 Piped link to URL: [[http://www.example.com|an example URL]]
4464 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
4469 BUG 2: [[page|http://url/]] should link to page, not http://url/
4471 [[Main Page|http://url/]]
4473 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
4478 BUG 337: Escaped self-links should be bold
4482 [[Bug462]] [[Bug462]]
4484 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
4489 Self-link to section should not be bold
4493 [[Main Page#section]]
4495 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
4506 Self-link to numeric title
4512 <p><strong class="selflink">0</strong>
4517 Link to numeric-equivalent title
4523 <p><a href="/wiki/00" title="00">00</a>
4528 <nowiki> inside a link
4530 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
4532 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
4537 Non-breaking spaces in title
4539 [[ Main Page ]]
4541 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
4546 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
4552 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
4557 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
4563 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
4568 Internal link with en linktrail: no apostrophes (bug 27473)
4574 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
4579 Internal link with ca linktrail with apostrophes (bug 27473)
4585 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
4590 Internal link with kaa linktrail with apostrophes (bug 27473)
4596 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
4607 Internal link with is link prefix
4611 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
4613 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
4624 Internal link with is link trail and link prefix
4628 [[mótmælendatrú|xxx]]ar
4630 mótmælenda[[söfnuður]]
4631 mótmælenda[[söfnuður|söfnuðir]]
4632 mótmælenda[[söfnuður|söfnuðir]]xxx
4634 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
4635 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
4636 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
4637 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
4638 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
4643 Parsoid link trail escaping
4645 parsoid=html2wt,html2html
4649 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
4653 Parsoid link prefix escaping
4656 parsoid=html2wt,html2html
4658 Aðrir mótmælenda<nowiki/>[[söfnuður]]
4660 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
4664 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
4672 [http://wp.org ''foo'']
4674 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
4675 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
4676 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
4677 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
4682 ### Interwiki links (see maintenance/interwiki.sql)
4686 Inline interwiki link
4688 [[MeatBall:SoftSecurity]]
4690 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
4695 Inline interwiki link with empty title (bug 2372)
4699 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
4704 Interwiki link encoding conversion (bug 1636)
4706 *[[Wikipedia:ro:Olteniţa]]
4707 *[[Wikipedia:ro:Olteniţa]]
4709 <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>
4710 </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>
4716 Interwiki link with fragment (bug 2130)
4718 [[MeatBall:SoftSecurity#foo]]
4720 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
4735 Double interlanguage link
4746 Interlanguage link, with prefix links
4758 Double interlanguage link, with prefix links (bug 8897)
4771 Parsoid-specific test: Wikilinks with should RT properly
4777 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
4782 Parsoid: handle constructor well
4790 <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>
4793 <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>
4797 ## Redirects, Parsoid-only
4800 Simple redirect to page
4804 #REDIRECT [[Main Page]]
4806 <link rel="mw:PageProp/redirect" href="./Main_Page">
4810 Redirect to category
4814 #REDIRECT [[Category:Foo]]
4816 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
4820 Redirect to category page
4822 parsoid=wt2html,html2html
4824 #REDIRECT [[:Category:Foo]]
4826 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
4830 Redirect to image page
4834 #REDIRECT [[File:Wiki.png]]
4836 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
4840 Redirect to language
4844 #REDIRECT [[en:File:Wiki.png]]
4846 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
4850 Redirect to interwiki
4854 #REDIRECT [[meatball:File:Wiki.png]]
4856 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
4873 Broken br tag sanitization
4883 # TODO: Fix html2html mode (bug 51055)!
4885 Parsoid: Broken br tag recognition
4895 Incorrecly removing closing slashes from correctly formed XHTML
4897 <br style="clear:both;" />
4899 <p><br style="clear:both;" />
4904 Failing to transform badly formed HTML into correct XHTML
4906 <br style="clear: left;">
4907 <br style="clear: right;">
4908 <br style="clear: both;">
4910 <p><br style="clear: left;" />
4911 <br style="clear: right;" />
4912 <br style="clear: both;" />
4917 Handling html with a div self-closing tag
4926 <p><div title />
4930 <p><div title=bar />
4931 <div title=bar/>
4933 <div title="bar/"></div>
4939 Handling html with a br self-closing tag
4948 <p><br title="title" />
4949 <br title="title" />
4958 Horizontal ruler (should it add that extra space?)
4972 Horizontal ruler -- 4+ dashes render hr
4981 Horizontal ruler -- eats additional dashes on the same line
4990 Horizontal ruler -- does not collapse dashes on consecutive lines
5001 Horizontal ruler -- <4 dashes render as plain text
5010 Horizontal ruler -- Supports content following dashes on same line
5019 ### Block-level elements
5042 <ol><li>Numbered list
5059 ***#Number on level 4
5061 **#Number on level 3
5062 **#Number on level 3
5066 #** Level 3, but ordered
5069 <ol><li> with numbers
5071 <ul><li> and bullets
5073 <ol><li> and numbers
5075 </li><li>bullets again
5076 <ul><li>bullet level 2
5077 <ul><li>bullet level 3
5078 <ol><li>Number on level 4
5081 </li><li>bullet level 2
5082 <ol><li>Number on level 3
5083 </li><li>Number on level 3
5086 <ol><li>number level 2
5089 <ul><li><ul><li> Level 3
5093 <ol><li><ul><li><ul><li> Level 3, but ordered
5127 Nested lists 3 (first element empty)
5140 Nested lists 4 (first element empty)
5153 Nested lists 5 (both elements empty)
5166 Nested lists 6 (both elements empty)
5179 Nested lists 7 (skip initial nesting levels)
5183 <ul><li><ul><li><ul><li> foo
5191 Nested lists 8 (multiple nesting transitions)
5199 <ul><li><ul><li> bar
5209 1. Lists with start-of-line-transparent tokens before bullets: Comments
5223 2. Lists with start-of-line-transparent tokens before bullets: Template close
5235 List items are not parsed correctly following a <pre> block (bug 785)
5241 <ul><li> <pre>foo</pre>
5242 </li><li> <pre>bar</pre>
5249 List items from template
5260 * notSOL{{inner list}}
5279 List interrupted by empty line or heading
5289 <ul><li><ul><li> bar
5292 <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>
5293 <ul><li> Another list item
5299 Multiple list tags generated by templates
5314 Single-comment whitespace lines dont break lists, but multi-comment whitespace lines do
5317 <!--This line will NOT split the list-->
5319 <!--This line will NOT split the list either-->
5321 <!--foo--> <!--This line with more than 1 comment will split the list-->
5335 (Cannot test this with PHP parser since it relies on Tidy for the hack)
5337 parsoid=wt2html,wt2wt
5341 * {{echo|<li>templated li-hack}}
5342 * <!--foo--> <li> unsupported li-hack with preceding comments
5345 <li><li>not a li-hack
5351 <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>
5352 <li> <!--foo--> </li><li> li-hack with preceding comments</li></ul>
5355 <li></li><li>not a li-hack
5361 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
5372 <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>
5375 # ------------------------------------------------------------------------
5376 # The next set of tests are about Parsoid's ability to handle badly nested
5377 # tags (parse, minimize scope of fixup, and roundtrip back)
5378 # ------------------------------------------------------------------------
5381 Unbalanced closing block tags break a list
5382 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5392 </li></ul></div><div>
5398 Unbalanced closing non-block tags don't break a list
5399 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5409 <ul><li>a<span></span>
5415 Unclosed formatting tags that straddle lists are closed and reopened
5416 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5424 </li><li> <s> b </s>
5429 List embedded in a non-block tag
5430 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
5438 <p><small></small></p>
5444 <p><small></small></p>
5452 Magic Word: {{CURRENTDAY}}
5461 Magic Word: {{CURRENTDAY2}}
5470 Magic Word: {{CURRENTDAYNAME}}
5479 Magic Word: {{CURRENTDOW}}
5488 Magic Word: {{CURRENTMONTH}}
5497 Magic Word: {{CURRENTMONTHABBREV}}
5499 {{CURRENTMONTHABBREV}}
5506 Magic Word: {{CURRENTMONTHNAME}}
5508 {{CURRENTMONTHNAME}}
5515 Magic Word: {{CURRENTMONTHNAMEGEN}}
5517 {{CURRENTMONTHNAMEGEN}}
5524 Magic Word: {{CURRENTTIME}}
5533 Magic Word: {{CURRENTWEEK}} (@bug 4594)
5542 Magic Word: {{CURRENTYEAR}}
5551 Magic Word: {{FULLPAGENAME}}
5553 title=[[User:Ævar Arnfjörð Bjarmason]]
5557 <p>User:Ævar Arnfjörð Bjarmason
5562 Magic Word: {{FULLPAGENAMEE}}
5564 title=[[User:Ævar Arnfjörð Bjarmason]]
5568 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
5573 Magic Word: {{NAMESPACE}}
5575 title=[[User:Ævar Arnfjörð Bjarmason]]
5584 Magic Word: {{NAMESPACEE}}
5586 title=[[User:Ævar Arnfjörð Bjarmason]]
5595 Magic Word: {{NAMESPACENUMBER}}
5597 title=[[User:Ævar Arnfjörð Bjarmason]]
5606 Magic Word: {{NUMBEROFFILES}}
5615 Magic Word: {{PAGENAME}}
5617 title=[[User:Ævar Arnfjörð Bjarmason]]
5621 <p>Ævar Arnfjörð Bjarmason
5626 Magic Word: {{PAGENAME}} with metacharacters
5628 title=[['foo & bar = baz']]
5632 <p><i>'foo & bar = baz'</i>
5637 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
5639 title=[[*RFC 1234 http://example.com/]]
5643 <p>*RFC 1234 http://example.com/
5648 Magic Word: {{PAGENAMEE}}
5650 title=[[User:Ævar Arnfjörð Bjarmason]]
5654 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
5659 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
5661 title=[[*RFC 1234 http://example.com/]]
5665 <p>*RFC_1234_http://example.com/
5670 Magic Word: {{REVISIONID}}
5679 Magic Word: {{SCRIPTPATH}}
5688 Magic Word: {{SERVER}}
5692 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
5697 Magic Word: {{SERVERNAME}}
5706 Magic Word: {{SITENAME}}
5715 Case-sensitive magic words, when cased differently, should just be template transclusions
5722 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
5723 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
5724 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
5725 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
5730 Case-insensitive magic words should still work with weird casing.
5740 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
5745 Namespace 1 {{ns:1}}
5754 Namespace 1 {{ns:01}}
5763 Namespace 0 {{ns:0}} (bug 4783)
5771 Namespace 0 {{ns:00}} (bug 4783)
5779 Namespace -1 {{ns:-1}}
5788 Namespace User {{ns:User}}
5797 Namespace User talk {{ns:User_talk}}
5806 Namespace User talk {{ns:uSeR tAlK}}
5815 Namespace File {{ns:File}}
5824 Namespace File {{ns:Image}}
5833 Namespace (lang=de) Benutzer {{ns:User}}
5844 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
5850 <p>Benutzer Diskussion
5858 {{urlencode:hi world?!}}
5859 {{urlencode:hi world?!|WIKI}}
5860 {{urlencode:hi world?!|PATH}}
5861 {{urlencode:hi world?!|QUERY}}
5874 Magic links: internal link to RFC (bug 479)
5878 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
5883 Magic links: RFC (bug 479)
5887 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
5892 Magic links: ISBN (bug 1937)
5896 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
5901 Magic links: PMID incorrectly converts space to underscore
5905 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
5914 Nonexistent template
5916 {{thistemplatedoesnotexist}}
5918 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
5923 Template with invalid target containing tags
5925 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5927 <p>{{a<b>b</b>|foo|a=b|a = b}}
5932 Template with invalid target containing unclosed tag
5934 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5936 <p>{{a<b>|foo|a=b|a = b}}</b>
5943 This is a test template
5951 <p>This is a test template
5956 Template with explicit namespace
5960 <p>This is a test template
5968 This is a test template with parameter {{{param}}}
5974 {{paramtest|param=foo}}
5976 <p>This is a test template with parameter foo
5981 Template:paramtestnum
5987 Template unnamed parameter
5989 {{paramtestnum|Main Page|the main page}}
5991 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
5996 Template:templatesimple
6002 Template:templateredirect
6004 #redirect [[Template:templatesimple]]
6008 Template:templateasargtestnum
6014 Template:templateasargtest
6016 {{template{{{templ}}}}}
6020 Template:templateasargtest2
6026 Template with template name as unnamed argument
6028 {{templateasargtestnum|templatesimple}}
6035 Template with template name as argument
6037 {{templateasargtest|templ=simple}}
6044 Template with template name as argument (2)
6046 {{templateasargtest2|templ=templatesimple}}
6053 Template:templateasargtestdefault
6055 {{{{{templ|templatesimple}}}}}
6065 Template with default value
6067 {{templateasargtestdefault}}
6074 Template with default value (value set)
6076 {{templateasargtestdefault|templ=templa}}
6085 {{templateredirect}}
6092 Template with argument in separate line
6094 {{ templateasargtest |
6102 Template with complex template as argument
6105 param ={{ templateasargtest |
6108 <p>This is a test template with parameter (test)
6113 Template with thumb image (with link in description)
6116 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
6118 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>
6123 Template:complextemplate
6125 {{{1}}} {{paramtest|
6126 param ={{{param}}}}}
6130 Template with complex arguments
6133 param ={{ templateasargtest |
6134 templ = simple }}|[[Template:complextemplate|link]]}}
6136 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
6141 BUG 553: link with two variables in a piped link
6144 |[[{{{1}}}|{{{2}}}]]
6149 <td>[[{{{1}}}|{{{2}}}]]
6155 Magic variable as template parameter
6157 {{paramtest|param={{SITENAME}}}}
6159 <p>This is a test template with parameter MediaWiki
6166 [[{{{param}}}|link]]
6170 Template parameter as link source
6172 {{linktest|param=Main Page}}
6174 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
6179 Template-generated attribute string (k='v')
6181 <span {{attr_str|id|v1}}>bar</span>
6183 <p><span id="v1">bar</span>
6190 including another template, {{paramtest|param={{{arg}}}}}
6194 Template passing argument to another template
6196 {{paramtest2|arg='hmm'}}
6198 <p>including another template, This is a test template with parameter 'hmm'
6209 Template as link source
6213 [[{{linktest2}}|Main Page]]
6215 [[{{linktest2}}]]Page
6217 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6218 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6219 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
6237 Template infinite loop
6241 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
6246 Template from main namespace
6265 BUG 529: Template with table, not included at beginning of line
6284 BUG 523: Template shouldn't eat newline (or add an extra one before table)
6304 BUG 41: Template parameters shown as broken links
6313 Template with targets containing wikilinks
6317 {{[[{{echo|foo}}]]}}
6319 {{{{echo|[[foo}}]]}}
6321 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
6322 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
6330 ''None'' of '''this''' should be
6332 but rather passed unmodified
6336 # hmm, fix this or just deprecate msgnw and document its behavior?
6342 {{msgnw:MSGNW test}}
6344 <p>''None'' of '''this''' should be
6346 but rather passed unmodified
6354 {{int:youhavenewmessages|lots of money|not!}}
6356 <p>You have lots of money (not!).
6363 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
6367 <includeonly> and <noinclude> being included
6378 <onlyinclude>Foo</onlyinclude>bar
6382 <onlyinclude> being included
6394 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
6398 <onlyinclude> and <includeonly> being included
6407 <includeonly> and <noinclude> on a page
6409 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
6416 Un-closed <noinclude>
6423 <onlyinclude> on a page
6425 <onlyinclude>Foo</onlyinclude>bar
6432 Un-closed <onlyinclude>
6439 Self-closed noinclude, includeonly, onlyinclude tags
6450 Unbalanced includeonly and noinclude tags
6454 |b</noinclude></noinclude>
6455 |c</noinclude></includeonly>
6456 |d</includeonly></includeonly>
6465 <td>c</includeonly>
6467 <td>d</includeonly></includeonly>
6473 Template:Includeonly section
6476 ==Includeonly section==
6482 Bug 6563: Edit link generation for section shown by <includeonly>
6484 {{includeonly section}}
6486 <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>
6487 <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>
6491 # Uses same input as the contents of [[Template:Includeonly section]]
6493 Bug 6563: Section extraction for section shown by <includeonly>
6498 ==Includeonly section==
6506 Bug 6563: Edit link generation for section suppressed by <includeonly>
6509 ==Includeonly section==
6513 <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>
6518 Bug 6563: Section extraction for section suppressed by <includeonly>
6523 ==Includeonly section==
6531 Un-closed <includeonly>
6537 # TODO: test with DOM fragment reuse!
6539 Parsoid: DOM fragment reuse
6541 parsoid=wt2wt,wt2html
6543 a{{echo|b<table></table>c}}d
6555 a<span typeof="mw:Transclusion">b</span>
6556 <table></table><span>c</span>d
6557 <p typeof="mw:Transclusion">ab</p>
6560 <p typeof="mw:Transclusion">a</p>
6566 ### <includeonly> and <noinclude> in attributes
6569 0. includeonly around the entire attribute
6571 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
6573 <p><span id="v2">bar</span>
6578 1. includeonly in html attr key
6580 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
6582 <p><span id="foo">bar</span>
6587 2. includeonly in html attr value
6589 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
6590 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
6592 <p><span id="v1">bar</span>
6593 <span id="v1">bar</span>
6598 3. includeonly in part of an attr value
6600 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
6602 <p><span style="color:red;">bar</span>
6607 ### Testing parsing of templates where a template arg
6608 ### has the same name as the template itself.
6618 Templates: Template Name/Arg clash: 1. Use of positional param
6627 Templates: Template Name/Arg clash: 2. Use of named param
6636 Templates: Template Name/Arg clash: 3. Use of named param with empty input
6645 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
6649 Templates: 1. Simple use
6658 Templates: 2. Inside a block tag
6660 <div>{{echo|Foo}}</div>
6667 Templates: P-wrapping: 1a. Templates on consecutive lines
6678 Templates: P-wrapping: 1b. Templates on consecutive lines
6692 Templates: P-wrapping: 1c. Templates on consecutive lines
6695 {{echo|bar}} <div>baz</div>
6704 Templates: P-wrapping: 1d. Template preceded by comment-only line
6706 parsoid=wt2html,wt2wt
6712 <p typeof="mw:Transclusion">Bar
6717 Templates: Inline Text: 1. Multiple tmeplate uses
6719 {{echo|Foo}}bar{{echo|baz}}
6726 Templates: Inline Text: 2. Back-to-back template uses
6728 {{echo|Foo}}{{echo|bar}}
6735 Templates: Block Tags: 1. Multiple template uses
6737 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
6739 <div>Foo</div><div>bar</div><div>baz</div>
6744 Templates: Block Tags: 2. Back-to-back template uses
6746 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
6748 <div>Foo</div><div>bar</div>
6753 Templates: Links: 1. Simple example
6755 {{echo|[[Foo|bar]]}}
6757 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6762 Templates: Links: 2. Generation of link href
6764 [[{{echo|Foo}}|bar]]
6766 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6771 Templates: Links: 3. Generation of part of a link href
6773 [[Fo{{echo|o}}|bar]]
6777 [[Foo{{echo|bar}}baz]]
6779 [[Foo{{echo|bar}}|bar]]
6781 [[:Foo{{echo|bar}}]]
6783 [[:Foo{{echo|bar}}|bar]]
6785 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6786 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6787 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
6788 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
6789 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6790 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
6795 Templates: Links: 4. Multiple templates generating link href
6797 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
6799 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6804 Templates: Links: 5. Generation of link text
6806 [[Foo|{{echo|bar}}]]
6808 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6813 Templates: Links: 5. Nested templates (only outermost template should be marked)
6815 {{echo|[[{{echo|Foo}}|bar]]}}
6817 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6822 Templates: HTML Tag: 1. Generation of HTML attr. key
6824 <div {{echo|style}}="color:red;">foo</div>
6826 <div style="color:red;">foo</div>
6831 Templates: HTML Tag: 2. Generation of HTML attr. value
6833 <div style={{echo|'color:red;'}}>foo</div>
6835 <div style="color:red;">foo</div>
6840 Templates: HTML Tag: 3. Generation of HTML attr key and value
6842 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
6844 <div style="color:red;">foo</div>
6849 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
6851 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
6853 <div title="This is a long title with just one piece templated">foo</div>
6858 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
6860 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
6862 <div title="This is a long title with just one piece templated">foo</div>
6867 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
6869 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
6871 <div title="This is a long title with just one piece templated">foo</div>
6876 Templates: HTML Tag: 7. Generation of partial attribute key string
6878 <div st{{echo|yle}}="color:red;">foo</div>
6880 <div style="color:red;">foo</div>
6885 Templates: HTML Tables: 1. Generating start of a HTML table
6887 {{echo|<table><tr><td>foo</td>}}</tr></table>
6889 <table><tr><td>foo</td></tr></table>
6894 Templates: HTML Tables: 2a. Generating middle of a HTML table
6896 <table><tr>{{echo|<td>foo</td>}}</tr></table>
6898 <table><tr><td>foo</td></tr></table>
6903 Templates: HTML Tables: 2b. Generating middle of a HTML table
6905 <table>{{echo|<tr><td>foo</td></tr>}}</table>
6907 <table><tr><td>foo</td></tr></table>
6912 Templates: HTML Tables: 3. Generating end of a HTML table
6914 <table><tr>{{echo|<td>foo</td></tr></table>}}
6916 <table><tr><td>foo</td></tr></table>
6921 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
6923 {{echo|<table>}}<tr><td>foo</td></tr></table>
6925 <table><tr><td>foo</td></tr></table>
6930 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
6932 <table>{{echo|<tr>}}<td>foo</td></tr></table>
6934 <table><tr><td>foo</td></tr></table>
6939 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
6941 <table><tr>{{echo|<td>}}foo</td></tr></table>
6943 <table><tr><td>foo</td></tr></table>
6948 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
6950 <table><tr><td>foo{{echo|</td>}}</tr></table>
6952 <table><tr><td>foo</td></tr></table>
6957 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
6959 <table><tr><td>foo</td>{{echo|</tr>}}</table>
6961 <table><tr><td>foo</td></tr></table>
6966 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
6968 <table><tr><td>foo</td></tr>{{echo|</table>}}
6970 <table><tr><td>foo</td></tr></table>
6975 Templates: HTML Tables: 5. Proper fostering of categories from inside
6977 parsoid=wt2html,wt2wt
6979 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
6980 <!--Two categories (Bug 50330)-->
6981 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
6983 <link rel="mw:WikiLink/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
6984 <!--Two categories (Bug 50330)-->
6985 <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>
6989 Templates: Wiki Tables: 1a. Fostering of entire template content
6997 <tr><td></td></tr></table>
7002 Templates: Wiki Tables: 1b. Fostering of entire template content
7015 <tr><td></td></tr></table>
7020 Templates: Wiki Tables: 2. Fostering of partial template content
7030 <tr><td></td></tr></table>
7035 Templates: Wiki Tables: 3. td-content via multiple templates
7038 {{echo|{{pipe}}a}}{{echo|b}}
7049 Templates: Wiki Tables: 4. Templated tags, no content
7055 <tr><td></td></tr></table>
7060 Templates: Wiki Tables: 5. Templated tags, regular td-tags
7074 Templates: Wiki Tables: 6. Templated tags, templated td-tags
7088 Templates: Lists: Multi-line list-items via templates
7090 *{{echo|a {{nonexistent|
7092 *{{echo|b {{nonexistent|
7095 <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>
7096 </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>
7102 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
7104 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
7106 <p><i>ab</i>c<i>d</i>e
7111 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
7112 (PHP parser generates misnested html)
7114 parsoid=wt2html,wt2wt
7116 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
7118 <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>
7122 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
7123 (PHP parser generates misnested html)
7125 parsoid=wt2html,wt2wt
7127 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
7129 <div typeof="mw:Transclusion"><i>a</i></div>
7130 <div typeof="mw:Transclusion"><i>b</i>c<i>d</i></div>
7131 <div typeof="mw:Transclusion">e</div>
7135 Templates: Ugly nesting: 4. Divs opened/closed across templates
7137 a<div>b{{echo|c</div>d}}e
7144 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
7150 |{{echo|foo</table>}}
7154 <table typeof="mw:Transclusion">
7157 <td>foo</td></tr></tbody></table><span>bar</span>
7161 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
7171 <td>1. {{echo|foo </table>}}</td>
7173 <td>2. {{echo|baz </table>}}</td>
7186 <table about="#mwt1" typeof="mw:Transclusion">
7191 <td >1. foo </td></tr></tbody></table></td>
7193 <td >2. baz </td></tr></tbody></table><span about="#mwt1">
7194 </span><span about="#mwt1">
7196 abc</span><span about="#mwt1">
7197 </span><span about="#mwt1">
7198 </span><span about="#mwt1">
7199 </span><span about="#mwt1">
7200 </span><span about="#mwt1">
7202 xyz</span><span about="#mwt1">
7203 </span><span about="#mwt1">
7208 Templates: Ugly templates: 3. newline-only template parameter
7217 # This looks like a bug: a single newline triggers p/br for some reason.
7219 Templates: Ugly templates: 4. newline-only template parameter inconsistency
7230 Parser Functions: 1. Simple example
7239 Parser Functions: 2. Nested use (only outermost should be marked up)
7248 ### Pre-save transform tests
7251 pre-save transform: subst:
7257 This is a test template
7261 pre-save transform: normal template
7271 pre-save transform: nonexistent template
7275 {{thistemplatedoesnotexist}}
7277 {{thistemplatedoesnotexist}}
7282 pre-save transform: subst magic variables
7291 # This is bug 89, which I fixed. -- wtm
7293 pre-save transform: subst: templates with parameters
7297 {{subst:paramtest|param="something else"}}
7299 This is a test template with parameter "something else"
7305 <nowiki>'''not wiki'''</nowiki>
7309 pre-save transform: nowiki in subst (bug 1188)
7313 {{subst:nowikitest}}
7315 <nowiki>'''not wiki'''</nowiki>
7320 Template:commenttest
7322 This template has <!-- a comment --> in it.
7326 pre-save transform: comment in subst (bug 1936)
7330 {{subst:commenttest}}
7332 This template has <!-- a comment --> in it.
7336 pre-save transform: unclosed tag
7340 <nowiki>'''not wiki'''
7342 <nowiki>'''not wiki'''
7346 pre-save transform: mixed tag case
7350 <NOwiki>'''not wiki'''</noWIKI>
7352 <NOwiki>'''not wiki'''</noWIKI>
7356 pre-save transform: unclosed comment in <nowiki>
7360 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
7362 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
7365 # Leading @ in this template definition works around a limitation
7366 # in parsoid's parserTests which otherwise strips the <span> from the
7367 # result (confusing it for a template wrapper)
7371 @<span onmouseover="alert('crap')">Oh no</span>
7375 (confirming safety of fix for subst bug 1936)
7377 {{Template:dangerous}}
7379 <p>@<span>Oh no</span>
7384 pre-save transform: comment containing gallery (bug 5024)
7388 <!-- <gallery>data</gallery> -->
7390 <!-- <gallery>data</gallery> -->
7394 pre-save transform: comment containing extension
7398 <!-- <tag>data</tag> -->
7400 <!-- <tag>data</tag> -->
7404 pre-save transform: comment containing nowiki
7408 <!-- <nowiki>data</nowiki> -->
7410 <!-- <nowiki>data</nowiki> -->
7414 pre-save transform: <noinclude> in subst (bug 3298)
7424 pre-save transform: <onlyinclude> in subst (bug 3298)
7436 {{<includeonly>subst:</includeonly>Includes}}
7440 Template:SafeSubstTest
7442 {{<includeonly>safesubst:</includeonly>Includes}}
7446 bug 22297: safesubst: works during PST
7450 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
7456 bug 22297: safesubst: works during normal parse
7465 subst: does not work during normal parse
7469 <p>{{subst:Includes}}
7474 pre-save transform: context links ("pipe trick")
7478 [[Article (context)|]]
7481 [[Bar:Article (context)|]]
7482 [[:Bar:Article (context)|]]
7484 [[|Article (context)]]
7488 [[Article (context)|Article]]
7489 [[Bar:Article|Article]]
7490 [[:Bar:Article|Article]]
7491 [[Bar:Article (context)|Article]]
7492 [[:Bar:Article (context)|Article]]
7494 [[Article (context)]]
7495 [[Bar:X (Y) Z|X (Y) Z]]
7496 [[:Bar:X (Y) Z|X (Y) Z]]
7500 pre-save transform: context links ("pipe trick") with interwiki prefix
7504 [[interwiki:Article|]]
7505 [[:interwiki:Article|]]
7506 [[interwiki:Bar:Article|]]
7507 [[:interwiki:Bar:Article|]]
7509 [[interwiki:Article|Article]]
7510 [[:interwiki:Article|Article]]
7511 [[interwiki:Bar:Article|Bar:Article]]
7512 [[:interwiki:Bar:Article|Bar:Article]]
7516 pre-save transform: context links ("pipe trick") with parens in title
7518 pst title=[[Somearticle (context)]]
7522 [[Article (context)|Article]]
7526 pre-save transform: context links ("pipe trick") with comma in title
7528 pst title=[[Someplace, Somewhere]]
7531 [[Otherplace, Elsewhere|]]
7532 [[Otherplace, Elsewhere, Anywhere|]]
7534 [[Otherplace, Somewhere|Otherplace]]
7535 [[Otherplace, Elsewhere|Otherplace]]
7536 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
7540 pre-save transform: context links ("pipe trick") with parens and comma
7542 pst title=[[Someplace (IGNORED), Somewhere]]
7545 [[Otherplace (place), Elsewhere|]]
7547 [[Otherplace, Somewhere|Otherplace]]
7548 [[Otherplace (place), Elsewhere|Otherplace]]
7552 pre-save transform: context links ("pipe trick") with comma and parens
7554 pst title=[[Who, me? (context)]]
7557 [[Me, Myself, and I (1937 song)|]]
7559 [[Yes, you. (context)|Yes, you.]]
7560 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
7564 pre-save transform: context links ("pipe trick") with namespace
7566 pst title=[[Ns:Somearticle]]
7570 [[Ns:Article|Article]]
7574 pre-save transform: context links ("pipe trick") with namespace and parens
7576 pst title=[[Ns:Somearticle (context)]]
7580 [[Ns:Article (context)|Article]]
7584 pre-save transform: context links ("pipe trick") with namespace and comma
7586 pst title=[[Ns:Somearticle, Context, Whatever]]
7590 [[Ns:Article, Context, Whatever|Article]]
7594 pre-save transform: context links ("pipe trick") with namespace, comma and parens
7596 pst title=[[Ns:Somearticle, Context (context)]]
7600 [[Ns:Article (context)|Article]]
7604 pre-save transform: context links ("pipe trick") with namespace, parens and comma
7606 pst title=[[Ns:Somearticle (IGNORED), Context]]
7610 [[Ns:Article, Context|Article]]
7614 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
7618 [[Article(context)|]]
7619 [[Bar:Article(context)|]]
7620 [[:Bar:Article(context)|]]
7621 [[|Article(context)]]
7625 [[Article(context)|Article]]
7626 [[Bar:Article(context)|Article]]
7627 [[:Bar:Article(context)|Article]]
7628 [[Article(context)]]
7630 [[:Bar:X(Y)Z|X(Y)Z]]
7634 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
7638 [[Article (context)|]]
7639 [[Bar:Article (context)|]]
7640 [[:Bar:Article (context)|]]
7641 [[|Article (context)]]
7645 [[Article (context)|Article]]
7646 [[Bar:Article (context)|Article]]
7647 [[:Bar:Article (context)|Article]]
7648 [[Article (context)]]
7649 [[Bar:X (Y) Z|X (Y) Z]]
7650 [[:Bar:X (Y) Z|X (Y) Z]]
7654 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
7658 [[Article(context)|]]
7659 [[Bar:Article(context)|]]
7660 [[:Bar:Article(context)|]]
7661 [[|Article(context)]]
7665 [[Article(context)|Article]]
7666 [[Bar:Article(context)|Article]]
7667 [[:Bar:Article(context)|Article]]
7668 [[Article(context)]]
7670 [[:Bar:X(Y)Z|X(Y)Z]]
7674 pre-save transform: context links ("pipe trick") with commas (bug 21660)
7678 [[Article (context), context|]]
7679 [[Article (context),context|]]
7680 [[Bar:Article (context), context|]]
7681 [[Bar:Article (context),context|]]
7682 [[:Bar:Article (context), context|]]
7683 [[:Bar:Article (context),context|]]
7685 [[Article (context), context|Article]]
7686 [[Article (context),context|Article]]
7687 [[Bar:Article (context), context|Article]]
7688 [[Bar:Article (context),context|Article]]
7689 [[:Bar:Article (context), context|Article]]
7690 [[:Bar:Article (context),context|Article]]
7694 pre-save transform: trim trailing empty lines
7698 Empty lines are trimmed
7704 Empty lines are trimmed
7708 pre-save transform: Signature expansion
7713 * <noinclude>~~~</noinclude>
7714 * <includeonly>~~~</includeonly>
7715 * <onlyinclude>~~~</onlyinclude>
7717 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
7718 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
7719 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
7720 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
7725 pre-save transform: Signature expansion in nowiki tags (bug 93)
7731 <nowiki>~~~~</nowiki>
7733 <includeonly><nowiki>~~~~</nowiki></includeonly>
7735 <noinclude><nowiki>~~~~</nowiki></noinclude>
7737 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
7739 {{subst:Foo}} shall be converted to FOO
7741 As well as inside noinclude/onlyinclude
7742 <noinclude>{{subst:Foo}}</noinclude>
7743 <onlyinclude>{{subst:Foo}}</onlyinclude>
7745 But not inside includeonly
7746 <includeonly>{{subst:Foo}}</includeonly>
7750 <nowiki>~~~~</nowiki>
7752 <includeonly><nowiki>~~~~</nowiki></includeonly>
7754 <noinclude><nowiki>~~~~</nowiki></noinclude>
7756 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
7758 FOO shall be converted to FOO
7760 As well as inside noinclude/onlyinclude
7761 <noinclude>FOO</noinclude>
7762 <onlyinclude>FOO</onlyinclude>
7764 But not inside includeonly
7765 <includeonly>{{subst:Foo}}</includeonly>
7769 Parsoid: Recognize nowiki with trailing space in tags
7773 <nowiki ><div>[[foo]]</nowiki >
7781 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
7788 Parsoid: Recognize nowiki with odd capitalization
7792 <noWikI ><div>[[foo]]</Nowiki >
7794 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
7799 Parsoid: Escape nowiki with trailing space in tags
7803 <nowiki > foo </nowiki >
7809 <p><nowiki > foo </nowiki ></p>
7810 <p>a<nowiki />b</p>
7811 <p>c<nowiki/ >d</p>
7815 Parsoid: Escape weird noWikI capitalizations
7819 <noWikI > foo </NoWikI >
7821 <p><noWikI > foo </NoWikI ></p>
7825 ### Message transform tests
7828 message transform: magic variables
7838 message transform: should not transform wiki markup
7848 message transform: <noinclude> in transcluded template (bug 4926)
7858 message transform: <onlyinclude> in transcluded template (bug 4926)
7868 {{#special:}} page name, known
7872 {{#special:Recentchanges}}
7874 Special:RecentChanges
7878 {{#special:}} page name with subpage, known
7882 {{#special:Recentchanges/param}}
7884 Special:RecentChanges/param
7888 {{#special:}} page name, unknown
7892 {{#special:foobar nonexistent}}
7894 Special:Foobar nonexistent
7898 {{#speciale:}} page name, known
7902 {{#speciale:Recentchanges}}
7904 Special:RecentChanges
7908 {{#speciale:}} page name with subpage, known
7912 {{#speciale:Recentchanges/param}}
7914 Special:RecentChanges/param
7918 {{#speciale:}} page name, unknown
7922 {{#speciale:foobar nonexistent}}
7924 Special:Foobar_nonexistent
7933 [[Image:foobar.jpg]]
7935 <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>
7942 [[Image:foobar.jpg|right]]
7944 <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>
7949 Simple image (using File: namespace, now canonical)
7953 <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>
7960 [[Image:foobar.jpg|right|Caption text]]
7962 <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>
7967 Image with empty attribute
7969 [[Image:foobar.jpg|right||Caption text]]
7971 <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>
7976 Image with attributes from template.
7978 [[Image:foobar.jpg|{{image_attribs}}]]
7980 <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>
7985 Image with link tails
7987 123[[Image:foobar.jpg]]456
7988 123[[Image:foobar.jpg|right]]456
7989 123[[Image:foobar.jpg|thumb]]456
7991 <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
7993 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
7994 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
7999 Image with multiple captions -- only last one is accepted
8001 [[Image:foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8003 <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>
8008 Image with width attribute at different positions
8010 [[Image:foobar.jpg|200px|right|Caption]]
8011 [[Image:foobar.jpg|right|200px|Caption]]
8012 [[Image:foobar.jpg|right|Caption|200px]]
8014 <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>
8015 <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>
8016 <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>
8021 Image with link parameter, wiki target
8023 [[Image:foobar.jpg|link=Target page]]
8025 <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>
8030 Image with link parameter, URL target
8032 [[Image:foobar.jpg|link=http://example.com/]]
8034 <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>
8039 Image with link parameter, wgExternalLinkTarget
8041 [[Image:foobar.jpg|link=http://example.com/]]
8043 wgExternalLinkTarget='foobar'
8045 <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>
8050 Image with link parameter, wgNoFollowLinks set to false
8052 [[Image:foobar.jpg|link=http://example.com/]]
8054 wgNoFollowLinks=false
8056 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8061 Image with link parameter, wgNoFollowDomainExceptions
8063 [[Image:foobar.jpg|link=http://example.com/]]
8065 wgNoFollowDomainExceptions='example.com'
8067 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8072 Image with link parameter, wgExternalLinkTarget, unnamed parameter
8074 [[Image:foobar.jpg|link=http://example.com/|Title]]
8076 wgExternalLinkTarget='foobar'
8078 <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>
8083 Image with empty link parameter
8085 [[Image:foobar.jpg|link=]]
8087 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
8092 Image with link parameter (wiki target) and unnamed parameter
8094 [[Image:foobar.jpg|link=Target page|Title]]
8096 <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>
8101 Image with link parameter (URL target) and unnamed parameter
8103 [[Image:foobar.jpg|link=http://example.com/|Title]]
8105 <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>
8110 Thumbnail image with link parameter
8114 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
8116 <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>
8121 Manually-specified thumbnail image
8125 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
8127 <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>
8132 Manually-specified thumbnail image with explicit link to wiki page
8136 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
8138 <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>
8143 Manually-specified thumbnail image with explicit link to url
8147 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
8149 <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>
8154 Manually-specified thumbnail image with explicit no link
8158 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
8160 <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>
8165 Manually-specified thumbnail image with explicit link and alt text
8169 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
8171 <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>
8176 Image with frame and link
8178 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
8180 <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>
8185 Image with frame and link and explicit alt
8187 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
8189 <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>
8194 Image with wiki markup in implicit alt
8196 [[Image:Foobar.jpg|testing '''bold''' in alt]]
8198 <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>
8203 Image with wiki markup in explicit alt
8205 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
8207 <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>
8212 Link to image page- image page normally doesn't exists, hence edit link
8213 Add test with existing image page
8214 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
8218 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
8223 bug 18784 Link to non-existent image page with caption should use caption as link text
8225 [[:Image:test|caption]]
8227 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
8232 Frameless image caption with a free URL
8234 [[Image:foobar.jpg|http://example.com]]
8236 <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>
8241 Thumbnail image caption with a free URL
8243 [[Image:foobar.jpg|thumb|http://example.com]]
8245 <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>
8250 Thumbnail image caption with a free URL and explicit alt
8252 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
8254 <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>
8259 SVG thumbnails with no language set
8262 [[File:Foobar.svg|thumb|width=200]]
8264 <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>
8269 SVG thumbnails with language de
8272 [[File:Foobar.svg|thumb|width=200|lang=de]]
8274 <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>
8279 SVG thumbnails with invalid language code
8282 [[File:Foobar.svg|thumb|width=200|lang=invalid.language.code]]
8284 <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>
8289 BUG 1887: A ISBN with a thumbnail
8291 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
8293 <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>
8298 BUG 1887: A RFC with a thumbnail
8300 [[Image:foobar.jpg|thumb|This is RFC 12354]]
8302 <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>
8307 BUG 1887: A mailto link with a thumbnail
8309 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
8311 <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>
8315 # Pending resolution to bug 368
8317 BUG 648: Frameless image caption with a link
8319 [[Image:foobar.jpg|text with a [[link]] in it]]
8321 <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>
8326 BUG 648: Frameless image caption with a link (suffix)
8328 [[Image:foobar.jpg|text with a [[link]]foo in it]]
8330 <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>
8335 BUG 648: Frameless image caption with an interwiki link
8337 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
8339 <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>
8344 BUG 648: Frameless image caption with a piped interwiki link
8346 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
8348 <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>
8353 Escape HTML special chars in image alt text
8355 [[Image:foobar.jpg|& < > "]]
8357 <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>
8362 BUG 499: Alt text should have Ӓ, not &1234;
8364 [[Image:foobar.jpg|♀]]
8366 <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>
8371 Broken image caption with link
8373 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
8375 <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.
8380 Image caption containing another image
8382 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
8384 <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>
8389 Image caption containing a newline
8391 [[Image:Foobar.jpg|This
8394 <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>
8399 Parsoid: Image caption containing leading space
8400 (The leading space should not trigger nowiki escaping in wt2wt mode)
8402 [[Image:Foobar.jpg|thumb| bar]]
8404 <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>
8409 Bug 3090: External links other than http: in image captions
8411 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
8413 <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>
8420 [[Image:foobar.jpg|a|class=b]]
8422 <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>
8427 Localized image handling (1).
8431 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
8433 <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>
8438 Localized image handling (2).
8442 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
8444 <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>
8449 "border", "frameless" and "class" attributes on an image.
8451 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
8453 <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>
8460 #REDIRECT [[File:Barfoo.jpg]]
8466 [[Image:Barfoo.jpg]]
8468 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
8473 Missing image with uploads disabled
8477 [[Image:Foobaz.jpg]]
8479 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
8483 # Parsoid-specific testing for images
8484 # http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
8485 # Currently imperfect due to a flaw in the Parsoid testrunner
8489 Parsoid-specific image handling - simple image
8493 [[Image:Foobar.jpg]]
8496 <span class="mw-default-size" typeof="mw:Image">
8497 <a href="File:Foobar.jpg">
8498 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8505 Parsoid-specific image handling - simple image without link
8509 [[Image:Foobar.jpg|link=]]
8512 <span class="mw-default-size" typeof="mw:Image">
8514 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8521 Parsoid-specific image handling - simple image with specific link
8525 [[Image:Foobar.jpg|link=Main Page]]
8528 <span class="mw-default-size" typeof="mw:Image">
8529 <a href="Main_Page">
8530 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8537 Parsoid-specific image handling - simple image with size and middle alignment
8541 [[Image:Foobar.jpg|50px|middle]]
8544 <span class="mw-valign-middle" typeof="mw:Image">
8545 <a href="File:Foobar.jpg">
8546 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
8553 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
8557 [[Image:Foobar.jpg|500x10px|baseline|caption]]
8560 <span class="mw-valign-baseline" typeof="mw:Image" data-mw="{"caption":"caption"}">
8561 <a href="File:Foobar.jpg">
8562 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/89px-Foobar.jpg" height="10" width="89">
8569 Parsoid-specific image handling - simple image with border and size spec
8573 [[Image:Foobar.jpg|50px|border|caption]]
8576 <span class="mw-image-border" typeof="mw:Image" data-mw="{"caption":"caption"}">
8577 <a href="File:Foobar.jpg">
8578 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
8585 Parsoid-specific image handling - thumbnail with halign, valign, and caption
8589 [[Image:Foobar.jpg|thumb|left|baseline|caption content]]
8591 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
8592 <a href="File:Foobar.jpg">
8593 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/180px-Foobar.jpg" height="21" width="180" />
8595 <figcaption>caption content</figcaption>
8600 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
8604 [[Image:Foobar.jpg|thumb|50x50px|right|middle|caption]]
8606 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
8607 <a href="File:Foobar.jpg">
8608 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
8610 <figcaption>caption</figcaption>
8615 Parsoid-specific image handling - framed image with specific size and caption
8619 [[Image:Foobar.jpg|500x50px|frame|caption]]
8621 <figure typeof="mw:Image/Frame">
8622 <a href="File:Foobar.jpg">
8623 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
8625 <figcaption>caption</figcaption>
8630 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
8634 [[Image:Foobar.jpg|500x50px|frame|left|baseline|caption]]
8636 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
8637 <a href="File:Foobar.jpg">
8638 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
8640 <figcaption>caption</figcaption>
8645 Parsoid-specific image handling - frameless image with specific size, border, and caption
8649 [[Image:Foobar.jpg|frameless|500x50px|border|caption]]
8652 <span class="mw-image-border" typeof="mw:Image/Frameless" data-mw="{"caption":"caption"}">
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" />
8660 #Parsoid-specific image handling - simple image with a formatted caption
8664 #[[Image:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
8667 #<span typeof="mw:Image">
8668 #<a class="mw-default-size" href="Image:Foobar.jpg">
8669 #<img alt="Foobar.jpg" class="mw-default-size" src="http://upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8680 Subpage test/subpage
8688 subpage title=[[Subpage test]]
8692 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
8697 Subpage noslash link
8699 subpage title=[[Subpage test]]
8703 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
8707 # TODO: make this PHP-parser compatible!
8709 Relative subpage noslash link
8711 parsoid=wt2wt,wt2html,html2html
8712 subpage title=[[Subpage test/1/2/3/4]]
8718 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
8719 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
8722 # TODO: make this PHP-parser compatible!
8724 Parsoid: dot-slash prefixed wikilinks
8726 parsoid=wt2wt,wt2html,html2html
8734 <p><a rel="mw:WikiLink" href="./Foo">foo</a></p>
8735 <p><a rel="mw:WikiLink" href="./Bar">bar</a></p>
8736 <p><a rel="mw:WikiLink" href="./Baz/">baz/</a></p>
8744 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
8749 BUG 561: {{/Subpage}}
8751 subpage title=[[Page]]
8755 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
8763 Category:MediaWiki User's Guide
8771 [[:Category:MediaWiki User's Guide]]
8773 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
8782 [[Category:MediaWiki User's Guide]]
8784 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
8788 PAGESINCATEGORY invalid title fatal (r33546 fix)
8790 {{PAGESINCATEGORY:<bogus>}}
8797 Category with different sort key
8801 [[Category:MediaWiki User's Guide|Foo]]
8803 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
8807 Category with identical sort key
8811 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
8813 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
8817 Category with empty sort key
8822 [[Category:MediaWiki User's Guide|]]
8824 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
8828 Category with empty sort key and parentheses
8833 [[Category:Foo (bar)|]]
8835 [[Category:Foo (bar)|Foo]]
8839 Category with link tail
8844 123[[Category:Foo]]456
8846 123[[Category:Foo]]456
8850 Category with template
8855 [[Category:{{echo|Foo}}]]
8857 [[Category:{{echo|Foo}}]]
8861 Category with template in sort key
8866 [[Category:Foo|{{echo|Bar}}]]
8868 [[Category:Foo|{{echo|Bar}}]]
8872 Category with template in sort key and title
8877 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
8879 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
8883 Category / paragraph interactions
8885 Foo [[Category:Baz]] Bar
8887 Foo [[Category:Baz]]
8895 [[Category:Baz]] Bar
8908 {{echo|[[Category:Baz]]}}
8923 Parsoid: Serialize link to category page with colon escape
8929 [[:Category:Foo|Bar]]
8932 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
8933 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
8938 Parsoid: Link prefix/suffixes aren't applied to category links
8940 parsoid=wt2html,wt2wt,html2html
8945 <p>x<link rel="mw:WikiLink/Category" href="Category:Foo">y</p>
8949 Parsoid: Serialize link to file page with colon escape
8955 [[:File:Foo.png|Bar]]
8958 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
8959 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
8964 Parsoid: Serialize a genuine category link without colon escape
8969 [[Category:Foo|Bar]]
8971 <link rel="mw:WikiLink/Category" href="Category:Foo">
8972 <link rel="mw:WikiLink/Category" href="Category:Foo#Bar">
8976 ### Inter-language links
8979 Inter-language links
8985 [[zh:食品]]
8987 es:Alimento fr:Nourriture zh:食品
8991 Duplicate interlanguage links (bug 24502)
9007 Basic section headings
9014 ===Smaller headline===
9017 <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>
9020 <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>
9023 <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>
9029 Section headings with TOC
9032 === Subheadline 1 ===
9033 ===== Skipping a level =====
9034 ====== Skipping a level ======
9038 ===Another headline===
9040 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9042 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
9044 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
9046 <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>
9048 <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>
9055 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
9057 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
9062 <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>
9063 <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>
9064 <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>
9065 <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>
9066 <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>
9069 <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>
9073 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
9075 Handling of sections up to level 6 and beyond
9078 == Level 2 Heading==
9079 === Level 3 Heading===
9080 ==== Level 4 Heading====
9081 ===== Level 5 Heading=====
9082 ====== Level 6 Heading======
9083 ======= Level 7 Heading=======
9084 ======== Level 8 Heading========
9085 ========= Level 9 Heading=========
9086 ========== Level 10 Heading==========
9088 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9090 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
9092 <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>
9094 <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>
9096 <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>
9098 <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>
9100 <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>
9101 <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>
9102 <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>
9103 <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>
9104 <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>
9117 <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>
9118 <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>
9119 <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>
9120 <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>
9121 <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>
9122 <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>
9123 <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>
9124 <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>
9125 <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>
9126 <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>
9131 TOC regression (bug 9764)
9135 ==== title 1.1.1 ====
9140 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9142 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9144 <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>
9146 <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>
9149 <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>
9152 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
9154 <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>
9159 <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>
9160 <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>
9161 <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>
9162 <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>
9163 <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>
9164 <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>
9169 TOC with wgMaxTocLevel=3 (bug 6204)
9175 ==== title 1.1.1 ====
9180 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9182 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9184 <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>
9185 <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>
9188 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
9190 <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>
9195 <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>
9196 <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>
9197 <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>
9198 <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>
9199 <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>
9200 <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>
9205 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
9211 ====Section 1.1.1====
9212 ====Section 1.1.1.1====
9215 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9217 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
9219 <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>
9222 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
9225 <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>
9226 <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>
9227 <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>
9228 <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>
9229 <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>
9235 Resolving duplicate section names
9240 <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>
9241 <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>
9246 Resolving duplicate section names with differing case (bug 10721)
9251 <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>
9252 <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>
9264 Template with sections, __NOTOC__
9271 <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>
9272 <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>
9273 <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>
9274 <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>
9279 __NOEDITSECTION__ keyword
9285 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
9286 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
9291 Link inside a section heading
9293 ==Section with a [[Main Page|link]] in it==
9295 <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>
9300 TOC regression (bug 12077)
9307 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9309 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9311 <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>
9314 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
9317 <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>
9318 <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>
9319 <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>
9324 BUG 1219 URL next to image (good)
9326 http://example.com [[Image:foobar.jpg]]
9328 <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>
9333 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
9336 The line above must have a trailing space!
9339 But just in case it doesn't...
9341 <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>
9342 <p>The line above must have a trailing space!
9344 <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>
9345 <p>But just in case it doesn't...
9350 Header with special characters (bug 25462)
9352 The tooltips shall not show entities to the user (ie. be double escaped)
9369 <p>The tooltips shall not show entities to the user (ie. be double escaped)
9371 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9373 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
9374 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
9375 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
9376 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
9377 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
9380 <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>
9383 <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>
9386 <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>
9389 <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>
9392 <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>
9398 Headers with excess '=' characters
9399 (Are similar tests necessary beyond the 1st level?)
9403 =''italic'' heading==
9404 ==''italic'' heading=
9406 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9408 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
9409 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
9410 <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>
9411 <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>
9414 <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>
9415 <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>
9416 <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>
9417 <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>
9422 HTML headers vs TOC (bug 23393)
9423 (__NOEDITSECTION__ for clearer output, doesn't matter here)
9435 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9437 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
9439 <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>
9440 <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>
9443 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
9445 <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>
9446 <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>
9451 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
9452 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
9453 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
9454 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
9455 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
9456 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
9461 BUG 1219 URL next to image (broken)
9463 http://example.com[[Image:foobar.jpg]]
9465 <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>
9470 Bug 1186 news: in the middle of text
9472 http://en.wikinews.org/wiki/Wikinews:Workplace
9474 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
9480 Namespaced link must have a title
9489 Namespaced link must have a title (bad fragment version)
9491 [[Project:#fragment]]
9493 <p>[[Project:#fragment]]
9499 ### HTML tags and HTML attributes
9503 div with no attributes
9505 <div>HTML rocks</div>
9507 <div>HTML rocks</div>
9512 div with double-quoted attribute
9514 <div id="rock">HTML rocks</div>
9516 <div id="rock">HTML rocks</div>
9521 div with single-quoted attribute
9523 <div id='rock'>HTML rocks</div>
9525 <div id="rock">HTML rocks</div>
9530 div with unquoted attribute
9532 <div id=rock>HTML rocks</div>
9534 <div id="rock">HTML rocks</div>
9539 div with illegal double attributes
9541 <div id="a" id="b">HTML rocks</div>
9543 <div id="b">HTML rocks</div>
9547 # FIXME: produce empty string instead of "class" in the PHP parser, following
9550 div with empty attribute value, space before equals
9554 <div class =>HTML rocks</div>
9556 <div class="">HTML rocks</div>
9560 # The PHP parser escapes the opening brace to { for some reason, so
9561 # disabled this test for it.
9563 div with braces in attribute value
9567 <div title="{}">Foo</div>
9569 <div title="{}">Foo</div>
9572 # This it very inconsistent in the PHP parser: it returns
9573 # class="class" if there is a space between the name and the equal sign (see
9574 # 'div with empty attribute value, space before equals'), but strips the
9575 # attribute completely if the space is missing. We hope that not much content
9576 # depends on this, so are implementing the behavior below in Parsoid for
9577 # consistencies' sake. Disabled for the PHP parser.
9578 # FIXME: fix this behavior in the PHP parser?
9580 div with empty attribute value, no space before equals
9584 <div class=>HTML rocks</div>
9586 <div class="">HTML rocks</div>
9591 HTML multiple attributes correction
9593 <p class="error" class="awesome">Awesome!</p>
9595 <p class="awesome">Awesome!</p>
9600 Table multiple attributes correction
9603 !+ class="error" class="awesome"| status
9608 <th class="awesome"> status
9616 <DIV ID="x">HTML ROCKS</DIV>
9618 <div id="x">HTML ROCKS</div>
9623 Non-ASCII pseudo-tags are rendered as text
9632 Pseudo-tag with URL 'name' renders as url link
9634 <http://example.com/>
9636 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
9641 text with amp in the middle of nowhere
9645 <p>Remember AT&T?
9650 text with character entity: eacute
9652 I always thought é was a cute letter.
9654 <p>I always thought é was a cute letter.
9659 text with entity-escaped character entity-like string: eacute
9661 I always thought &eacute; was a cute letter.
9663 <p>I always thought &eacute; was a cute letter.
9668 text with undefined character entity: xacute
9670 I always thought &xacute; was a cute letter.
9672 <p>I always thought &xacute; was a cute letter.
9678 ### Nesting tests (see bug 41545, 50604, 51081)
9681 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
9682 # Note that html2wt is considerably more difficult if we use <b> in
9683 # the test case, instead of <big>
9685 Ensure that HTML adoption agency algorithm is properly implemented.
9687 <big>X<big>Y</big>Z</big>
9689 <p><big>X<big>Y</big>Z</big>
9693 # This was bug 41545 in the PHP parser.
9697 <kbd>X<kbd>Y</kbd>Z</kbd>
9699 <p><kbd>X<kbd>Y</kbd>Z</kbd>
9703 # The following cases were bug 51081 in the PHP parser.
9704 # Note that there are some other nestable tags (b, i, etc) which are
9705 # not covered; see bug 51081 for discussion.
9709 <em>X<em>Y</em>Z</em>
9711 <p><em>X<em>Y</em>Z</em>
9718 <strong>X<strong>Y</strong>Z</strong>
9720 <p><strong>X<strong>Y</strong>Z</strong>
9729 <p><q>X<q>Y</q>Z</q>
9736 <ruby>X<ruby>Y</ruby>Z</ruby>
9738 <p><ruby>X<ruby>Y</ruby>Z</ruby>
9745 <bdo>X<bdo>Y</bdo>Z</bdo>
9747 <p><bdo>X<bdo>Y</bdo>Z</bdo>
9759 [[Media:Foobar.jpg]]
9761 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
9766 Media link with text
9768 [[Media:Foobar.jpg|A neat file to look at]]
9770 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
9774 # FIXME: this is still bad HTML tag nesting
9776 Media link with nasty text
9777 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
9779 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
9781 <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>
9786 Media link to nonexistent file (bug 1702)
9788 [[Media:No such.jpg]]
9790 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
9795 Image link to nonexistent file (bug 1850 - good)
9797 [[Image:No such.jpg]]
9799 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
9804 :Image link to nonexistent file (bug 1850 - bad)
9806 [[:Image:No such.jpg]]
9808 <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>
9815 Character reference normalization in link text (bug 1938)
9817 [[Main Page|this&that]]
9819 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
9826 Test for unicode normalization
9828 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
9832 (bug 19451) Links should refer to the normalized form.
9840 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9841 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9842 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9843 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9844 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9849 Empty attribute crash test (bug 2067)
9851 <font color="">foo</font>
9853 <p><font color="">foo</font>
9858 Empty attribute crash test single-quotes (bug 2067)
9860 <font color=''>foo</font>
9862 <p><font color="">foo</font>
9867 Attribute test: equals, then nothing
9869 <font color=>foo</font>
9876 Attribute test: unquoted value
9878 <font color=x>foo</font>
9880 <p><font color="x">foo</font>
9885 Attribute test: unquoted but illegal value (hash)
9887 <font color=#x>foo</font>
9889 <p><font color="#x">foo</font>
9894 Attribute test: no value
9896 <font color>foo</font>
9898 <p><font color="color">foo</font>
9903 Bug 2095: link with three closing brackets
9907 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
9912 Bug 2095: link with pipe and three closing brackets
9916 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
9921 Bug 2095: link with pipe and three closing brackets, version 2
9923 [[Main Page|[http://example.com/]]]
9925 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
9935 Template:Dangerous attribute
9937 " onmouseover="alert(document.cookie)
9941 Template:Dangerous style attribute
9943 border-size: expression(alert(document.cookie))
9949 <div style="float: right; {{{1}}}">Magic div</div>
9953 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
9955 <div title="{{test}}"></div>
9957 <div title="This is a test template"></div>
9962 Bug 2304: HTML attribute safety (dangerous template; 2309)
9964 <div title="{{dangerous attribute}}"></div>
9966 <div title=""></div>
9971 Bug 2304: HTML attribute safety (dangerous style template; 2309)
9973 <div style="{{dangerous style attribute}}"></div>
9975 <div style="/* insecure input */"></div>
9980 Bug 2304: HTML attribute safety (safe parameter; 2309)
9982 {{div style|width: 200px}}
9984 <div style="float: right; width: 200px">Magic div</div>
9989 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
9991 {{div style|width: expression(alert(document.cookie))}}
9993 <div style="/* insecure input */">Magic div</div>
9998 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
10000 {{div style|"><script>alert(document.cookie)</script>}}
10002 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
10007 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
10009 {{div style|" ><script>alert(document.cookie)</script>}}
10011 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
10016 Bug 2304: HTML attribute safety (link)
10018 <div title="[[Main Page]]"></div>
10020 <div title="[[Main Page]]"></div>
10025 Bug 2304: HTML attribute safety (italics)
10027 <div title="''foobar''"></div>
10029 <div title="''foobar''"></div>
10034 Bug 2304: HTML attribute safety (bold)
10036 <div title="'''foobar'''"></div>
10038 <div title="'''foobar'''"></div>
10044 Bug 2304: HTML attribute safety (ISBN)
10046 <div title="ISBN 1234567890"></div>
10048 <div title="ISBN 1234567890"></div>
10053 Bug 2304: HTML attribute safety (RFC)
10055 <div title="RFC 1234"></div>
10057 <div title="RFC 1234"></div>
10062 Bug 2304: HTML attribute safety (PMID)
10064 <div title="PMID 1234567890"></div>
10066 <div title="PMID 1234567890"></div>
10071 Bug 2304: HTML attribute safety (web link)
10073 <div title="http://example.com/"></div>
10075 <div title="http://example.com/"></div>
10080 Bug 2304: HTML attribute safety (named web link)
10082 <div title="[http://example.com/ link]"></div>
10084 <div title="[http://example.com/ link]"></div>
10089 Bug 3244: HTML attribute safety (extension; safe)
10091 <div style="<nowiki>background:blue</nowiki>"></div>
10093 <div style="background:blue"></div>
10098 Bug 3244: HTML attribute safety (extension; unsafe)
10100 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
10102 <div style="/* insecure input */"></div>
10106 # More MSIE fun discovered by Tom Gilder
10109 MSIE CSS safety test: spurious slash
10111 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
10113 <div style="/* insecure input */">evil</div>
10118 MSIE CSS safety test: hex code
10120 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
10122 <div style="/* insecure input */">evil</div>
10127 MSIE CSS safety test: comment in url
10129 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
10131 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
10136 MSIE CSS safety test: comment in expression
10138 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
10140 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
10146 Table attribute legitimate extension
10149 !+ style="<nowiki>color:blue</nowiki>"| status
10154 <th style="color:blue"> status
10160 Table attribute safety
10163 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
10168 <th style="/* insecure input */"> status
10174 CSS line continuation 1
10176 <div style="background-image: u\ rl(test.jpg);"></div>
10178 <div style="/* insecure input */"></div>
10183 CSS line continuation 2
10185 <div style="background-image: u\ rl(test.jpg); "></div>
10187 <div style="/* insecure input */"></div>
10198 Expansion of multi-line templates in attribute values (bug 6255)
10200 <div style="background: {{identity|#00FF00}}">-</div>
10202 <div style="background: #00FF00">-</div>
10208 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
10210 <div style="background:
10213 <div style="background: #00FF00">-</div>
10218 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
10220 <div style="background: #00FF00">-</div>
10222 <div style="background: #00FF00">-</div>
10227 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
10230 Parser hook: empty input
10243 Parser hook: empty input using terminated empty elements
10256 Parser hook: empty input using terminated empty elements (space before)
10269 Parser hook: basic input
10283 Parser hook: case insensitive
10297 Parser hook: case insensitive, redux
10310 Parser hook: nested tags
10314 <tag><tag></tag></tag>
10325 Parser hook: basic arguments
10327 <tag width=200 height = "100" depth = '50' square></tag>
10335 'square' => 'square',
10342 Parser hook: argument containing a forward slash (bug 5344)
10344 <tag filename='/tmp/bla'></tag>
10349 'filename' => '/tmp/bla',
10356 Parser hook: empty input using terminated empty elements (bug 2374)
10369 # </tag> should be output literally since there is no matching tag that begins it
10371 Parser hook: basic arguments using terminated empty elements (bug 2374)
10373 <tag width=200 height = "100" depth = '50' square/>
10383 'square' => 'square',
10392 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
10396 Parser hook: static parser hook not inside a comment
10398 <statictag>hello, world</statictag>
10399 <statictag action=flush/>
10407 Parser hook: static parser hook inside a comment
10409 <!-- <statictag>hello, world</statictag> -->
10410 <statictag action=flush/>
10416 # Nested template calls; this case was broken by Parser.php rev 1.506,
10420 Template:One-parameter
10422 (My parameter is: {{{1}}})
10426 Template:Map-one-parameter
10428 {{{{{1}}}|{{{2}}}}}
10432 Nested template calls
10434 {{Map-one-parameter|One-parameter|param}}
10436 <p>(My parameter is: param)
10445 Sanitizer: Closing of open tags
10447 <s></s><table></table>
10449 <s></s><table></table>
10454 Sanitizer: Closing of open but not closed tags
10463 Sanitizer: Closing of closed but not open tags
10472 Sanitizer: Closing of closed but not open table tags
10474 Table not started</td></tr></table>
10476 <p>Table not started</td></tr></table>
10481 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
10483 <span id="æ: v">byte</span>[[#æ: v|backlink]]
10485 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
10490 Sanitizer: Validating the contents of the id attribute (bug 4515)
10496 Something, but definitely not <br id="9" />...
10500 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
10504 <br id="foo" /><br id="foo" />
10506 Something need to be done. foo-2 ?
10510 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
10513 <meta itemprop="hello" content="world">
10514 <meta http-equiv="refresh" content="5">
10515 <meta itemprop="hello" http-equiv="refresh" content="5">
10516 <link itemprop="hello" href="{{SERVER}}">
10517 <link rel="stylesheet" href="{{SERVER}}">
10518 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
10521 <div itemscope="itemscope">
10522 <p> <meta itemprop="hello" content="world" />
10523 <meta http-equiv="refresh" content="5">
10524 <meta itemprop="hello" content="5" />
10526 <link itemprop="hello" href="http://example.org" />
10527 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
10528 <link itemprop="hello" href="http://example.org" />
10534 Language converter: output gets cut off unexpectedly (bug 5757)
10538 this bit is safe: }-
10540 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
10542 then we get cut off here: }-
10544 all additional text is vanished
10546 <p>this bit is safe: }-
10547 </p><p>but if we add a conversion instance: xxx
10548 </p><p>then we get cut off here: }-
10549 </p><p>all additional text is vanished
10554 Self closed html pairs (bug 5487)
10557 <center><font id="bug" />Centered text</center>
10558 <div><font id="bug2" />In div text</div>
10560 <center><font id="bug" />Centered text</center>
10561 <div><font id="bug2" />In div text</div>
10570 Punctuation: nbsp before exclamation
10574 <p>C'est grave !
10579 Punctuation: CSS !important (bug 11874)
10581 <div style="width:50% !important">important</div>
10583 <div style="width:50% !important">important</div>
10588 Punctuation: CSS ! important (bug 11874; with space after)
10590 <div style="width:50% ! important">important</div>
10592 <div style="width:50% ! important">important</div>
10598 HTML bullet list, closed tags (bug 5497)
10613 HTML bullet list, unclosed tags (bug 5497)
10630 HTML ordered list, closed tags (bug 5497)
10645 HTML ordered list, unclosed tags (bug 5497)
10662 HTML nested bullet list, closed tags (bug 5497)
10687 HTML nested bullet list, open tags (bug 5497)
10712 HTML nested ordered list, closed tags (bug 5497)
10737 HTML nested ordered list, open tags (bug 5497)
10762 HTML ordered list item with parameters oddity
10764 <ol><li id="fragment">One</li></ol>
10766 <ol><li id="fragment">One</li></ol>
10771 bug 5918: autonumbering
10773 [http://first/] [http://second] [ftp://ftp]
10777 [mailto:enclosed@mail.tld With target]
10779 [mailto:enclosed@mail.tld]
10781 mailto:inline@mail.tld
10783 <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>
10784 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
10785 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
10786 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
10787 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
10793 # Security and HTML correctness
10794 # From Nick Jenkins' fuzz testing
10798 Fuzz testing: Parser13
10813 Fuzz testing: Parser14
10818 <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>
10819 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10821 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
10828 Fuzz testing: Parser14-table
10833 <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>
10834 <table style="__TOC__">
10840 # Known to produce bogus xml (extra </td>)
10842 Fuzz testing: Parser16
10862 Fuzz testing: Parser21
10865 ! irc://{{ftp://a" onmouseover="alert('hello world');"
10870 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
10880 Fuzz testing: Parser22
10882 http://===r:::https://b
10886 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
10894 # Known to produce bad XML for now
10896 Fuzz testing: Parser24
10903 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
10904 <br style="onmouseover='alert(document.cookie);' " />
10906 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
10911 <u class="|">}}}} >
10912 <br style="onmouseover='alert(document.cookie);'" />
10914 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
10923 # Note: the current result listed for this is not what the original one was,
10924 # but the original bug was JavaScript injection, which is fixed in any case.
10925 # It's not clear that the original result listed was any more correct than the
10926 # current one. Original result:
10929 # <li class="||">
10930 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
10932 Fuzz testing: Parser25 (bug 6055)
10938 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
10940 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
10945 Fuzz testing: URL adjacent extension (with space, clean)
10948 http://example.com <nowiki>junk</nowiki>
10950 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
10955 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
10958 http://example.com<nowiki>junk</nowiki>
10960 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
10965 Fuzz testing: URL adjacent extension (no space, dirty; pre)
10968 http://example.com<pre>junk</pre>
10970 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
10975 Fuzz testing: image with bogus manual thumbnail
10977 [[Image:foobar.jpg|thumbnail= ]]
10979 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
10984 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
10986 <pre dir=" "></pre>
10988 <pre dir=" "></pre>
10993 Parsing optional HTML elements (Bug 6171)
10998 <td> Some tabular data</td>
10999 <td> More tabular data ...
11000 <td> And yet som tabular data</td>
11006 <td> Some tabular data</td>
11007 <td> More tabular data ...
11008 </td><td> And yet som tabular data</td>
11015 Correct handling of <td>, <tr> (Bug 6171)
11020 <td> Some tabular data</td>
11021 <td> More tabular data ...</td>
11022 <td> And yet som tabular data</td>
11028 <td> Some tabular data</td>
11029 <td> More tabular data ...</td>
11030 <td> And yet som tabular data</td>
11038 Parsing crashing regression (fr:JavaScript)
11042 <p></body></x>
11047 Inline wiki vs wiki block nesting
11053 <p><b>Bold paragraph</b>
11054 </p><p>New wiki paragraph
11059 Inline HTML vs wiki block nesting
11067 <p><b>Bold paragraph</b>
11068 </p><p>New wiki paragraph
11072 # Original result was this:
11073 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
11075 # While that might be marginally more intuitive, maybe, the six-apostrophe
11076 # construct is clearly pathological and the result stated here (which is what
11077 # the parser actually does) is about as reasonable as anything.
11079 Mixing markup for italics and bold
11082 '''bold''''''bold''bolditalics'''''
11084 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
11092 Article for special page transclusion test
11096 Special page transclusion
11099 {{Special:Prefixindex/Xyzzyx}}
11101 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11106 Special page transclusion twice (bug 5021)
11109 {{Special:Prefixindex/Xyzzyx}}
11110 {{Special:Prefixindex/Xyzzyx}}
11112 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11113 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11118 Transclusion of default MediaWiki message
11120 {{MediaWiki:Mainpage}}
11127 Transclusion of nonexistent MediaWiki message
11129 {{MediaWiki:Mainpagexxx}}
11131 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
11136 Transclusion of MediaWiki message with underscore
11138 {{MediaWiki:history_short}}
11145 Transclusion of MediaWiki message with space
11147 {{MediaWiki:history short}}
11154 Invalid header with following text
11164 Section extraction test (section 0)
11184 Section extraction test (section 1)
11206 Section extraction test (section 2)
11227 Section extraction test (section 3)
11247 Section extraction test (section 4)
11271 Section extraction test (section 5)
11291 Section extraction test (section 6)
11312 Section extraction test (section 7)
11332 Section extraction test (section 8)
11352 Section extraction test (section 9)
11373 Section extraction test (section 10)
11393 Section extraction test (nonexistent section 11)
11412 Section extraction test with bogus heading (section 1)
11417 ==bogus== not a legal section
11421 ==bogus== not a legal section
11425 Section extraction test with bogus heading (section 2)
11430 ==bogus== not a legal section
11437 Section extraction test with comment after heading (section 1)
11449 Section extraction test with comment after heading (section 2)
11461 Section extraction test with bogus <nowiki> heading (section 1)
11466 ==bogus== <nowiki>not a legal section</nowiki>
11470 ==bogus== <nowiki>not a legal section</nowiki>
11474 Section extraction test with bogus <nowiki> heading (section 2)
11479 ==bogus== <nowiki>not a legal section</nowiki>
11486 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
11487 # instead of respecting commented sections
11489 Section extraction prefixed by comment (section 1)
11500 Section extraction prefixed by comment (section 2)
11511 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
11512 # instead of respecting HTML-style headings
11514 Section extraction, mixed wiki and html (section 1)
11530 Section extraction, mixed wiki and html (section 2)
11546 # Formerly testing for bug 3342
11548 Section extraction, heading surrounded by <noinclude>
11552 <noinclude>==unmarked==</noinclude>
11558 # Test behavior of bug 19910
11560 Sectiion with all-equals
11565 The line above must have a trailing space
11568 But just in case it doesn't...
11572 But just in case it doesn't...
11576 Section replacement test (section 0)
11607 Section replacement test (section 1)
11636 Section replacement test (section 2)
11666 Section replacement test (section 3)
11697 Section replacement test (section 4)
11724 Section replacement test (section 5)
11755 Section replacement test (section 6)
11785 Section replacement test (section 7)
11816 Section replacement test (section 8)
11847 Section replacement test (section 9)
11876 Section replacement test (section 10)
11906 Section replacement test with initial whitespace (bug 13728)
11910 Preformatted initial line
11914 Preformatted initial line
11921 Section extraction, heading followed by pre with 20 spaces (bug 6398)
11933 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
11946 Section extraction, <pre> around bogus header (bug 10309)
11963 Section replacement, <pre> around bogus header (bug 10309)
11965 noxml replace=2,"xxx"
11986 Handling of 
 in URLs
11990 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
11997 5 quotes, code coverage +1 line (php)
12004 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
12006 5 quotes, code coverage +1 line (parsoid)
12012 <p><i><b></b></i></p>
12016 Special:Search page linking.
12020 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
12032 * {{ROOTPAGENAMEE}}
12034 * {{BASEPAGENAMEE}}
12036 * {{TALKPAGENAMEE}}
12037 * {{SUBJECTPAGENAME}}
12038 * {{SUBJECTPAGENAMEE}}
12044 * {{SUBJECTSPACEE}}
12045 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
12047 <ul><li> Parser test
12048 </li><li> Parser test
12049 </li><li> Parser test
12050 </li><li> Parser_test
12051 </li><li> Parser test
12052 </li><li> Parser_test
12053 </li><li> Parser test
12054 </li><li> Parser_test
12055 </li><li> Talk:Parser test
12056 </li><li> Talk:Parser_test
12057 </li><li> Parser test
12058 </li><li> Parser_test
12065 </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>
12069 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
12079 image4 |300px| centre
12080 image5.svg| http://///////
12085 <ul class="gallery">
12086 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12087 <div style="height: 150px;">Image1.png</div>
12088 <div class="gallerytext">
12091 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12092 <div style="height: 150px;">Image2.gif</div>
12093 <div class="gallerytext">
12098 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12099 <div style="height: 150px;">Image3</div>
12100 <div class="gallerytext">
12103 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12104 <div style="height: 150px;">Image4</div>
12105 <div class="gallerytext">
12110 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12111 <div style="height: 150px;">Image5.svg</div>
12112 <div class="gallerytext">
12113 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
12117 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12118 <div style="height: 150px;">* image6</div>
12119 <div class="gallerytext">
12127 Gallery (with options)
12129 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
12130 File:Nonexistant.jpg|caption
12131 File:Nonexistant.jpg
12132 image:foobar.jpg|some '''caption''' [[Main Page]]
12134 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
12137 <ul class="gallery" style="max-width: 226px;_width: 226px;">
12138 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
12139 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12140 <div style="height: 70px;">Nonexistant.jpg</div>
12141 <div class="gallerytext">
12146 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12147 <div style="height: 70px;">Nonexistant.jpg</div>
12148 <div class="gallerytext">
12151 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12152 <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>
12153 <div class="gallerytext">
12154 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
12158 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12159 <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>
12160 <div class="gallerytext">
12163 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12164 <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>
12165 <div class="gallerytext">
12175 Gallery with wikitext inside caption
12178 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
12179 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
12182 <ul class="gallery">
12183 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12184 <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>
12185 <div class="gallerytext">
12186 <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>
12190 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12191 <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>
12192 <div class="gallerytext">
12193 <p>This is a test template
12202 gallery (with showfilename option)
12204 <gallery showfilename>
12205 File:Nonexistant.jpg|caption
12206 File:Nonexistant.jpg
12207 image:foobar.jpg|some '''caption''' [[Main Page]]
12211 <ul class="gallery">
12212 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12213 <div style="height: 150px;">Nonexistant.jpg</div>
12214 <div class="gallerytext">
12215 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
12220 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12221 <div style="height: 150px;">Nonexistant.jpg</div>
12222 <div class="gallerytext">
12223 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
12227 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12228 <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>
12229 <div class="gallerytext">
12230 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
12231 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
12235 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12236 <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>
12237 <div class="gallerytext">
12238 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
12247 Gallery (with namespace-less filenames)
12250 File:Nonexistant.jpg
12256 <ul class="gallery">
12257 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12258 <div style="height: 150px;">Nonexistant.jpg</div>
12259 <div class="gallerytext">
12262 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12263 <div style="height: 150px;">Nonexistant.jpg</div>
12264 <div class="gallerytext">
12267 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12268 <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>
12269 <div class="gallerytext">
12272 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12273 <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>
12274 <div class="gallerytext">
12282 HTML Hex character encoding (spells the word "JavaScript")
12284 JavaScript
12286 <p>JavaScript
12291 HTML Hex character encoding bogus encoding (bug 26437 regression check)
12295 <p>&#xsee;&#XSEE;
12300 HTML Hex character encoding mixed case
12309 __FORCETOC__ override
12321 ISBN 978-0-1234-56 789
12323 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
12328 ISBN followed by 5 spaces
12339 ISBN ISBN 1234567890
12341 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
12346 Bug 22905: <abbr> followed by ISBN followed by </a>
12348 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
12350 <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>
12359 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
12364 Double RFC with a wiki link
12368 <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>
12377 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
12382 Centre-aligned image
12384 [[Image:foobar.jpg|centre]]
12386 <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>
12393 [[Image:foobar.jpg|none]]
12395 <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>
12400 Width + Height sized image (using px) (height is ignored)
12402 [[Image:foobar.jpg|640x480px]]
12404 <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>
12409 Width-sized image (using px, no following whitespace)
12411 [[Image:foobar.jpg|640px]]
12413 <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>
12418 Width-sized image (using px, with following whitespace - test regression from r39467)
12420 [[Image:foobar.jpg|640px ]]
12422 <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>
12427 Width-sized image (using px, with preceding whitespace - test regression from r39467)
12429 [[Image:foobar.jpg| 640px]]
12431 <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>
12436 Another italics / bold test
12444 # Note the results may be incorrect, as parserTest output included this:
12445 # XML error: Mismatched tag at byte 6120:
12446 # ...<dd> </dt></dl> </dd...
12454 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
12465 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
12467 Images with the "|" character in the comment
12469 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
12471 <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>
12476 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
12478 <html><script>alert(1);</script></html>
12480 <p><html><script>alert(1);</script></html>
12485 HTML with raw HTML ($wgRawHtml==true)
12489 <html><script>alert(1);</script></html>
12491 <p><script>alert(1);</script>
12496 Parents of subpages, one level up
12498 subpage title=[[Subpage test/L1/L2/L3]]
12502 <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>
12508 Parents of subpages, one level up, not named
12510 subpage title=[[Subpage test/L1/L2/L3]]
12514 <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>
12521 Parents of subpages, two levels up
12523 subpage title=[[Subpage test/L1/L2/L3]]
12529 <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
12530 </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>
12535 Parents of subpages, two levels up, without trailing slash or name.
12537 subpage title=[[Subpage test/L1/L2/L3]]
12546 Parents of subpages, two levels up, with lots of extra trailing slashes.
12548 subpage title=[[Subpage test/L1/L2/L3]]
12552 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
12557 Subpage test/L1/L2/L3Sibling
12563 Transclusion of a sibling page (one level up)
12565 subpage title=[[Subpage test/L1/L2/L3]]
12574 Transclusion of a child page
12576 subpage title=[[Subpage test/L1/L2]]
12585 Non-transclusion because of too many up levels
12587 subpage title=[[Subpage test/L1/L2/L3]]
12589 {{../../../../More than parent}}
12591 <p>{{../../../../More than parent}}
12596 Definition list code coverage
12602 <dl><dt> title  </dt><dd> def
12603 </dd><dt> title </dt><dd> def
12604 </dd><dt>title</dt><dd> def
12610 Don't fall for the self-closing div
12612 <div>hello world</div/>
12614 <div>hello world</div>
12623 <p>[[:Template:Msg]]
12632 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
12636 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
12638 Always escape literal '>' in output, not just after '<'
12652 <p>This is a test template
12653 This is a test template
12665 Inclusion of !userCanEdit() content
12669 <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>
12675 Out-of-order TOC heading levels
12684 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12686 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
12688 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
12689 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
12692 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
12694 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
12695 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
12700 <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>
12701 <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>
12702 <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>
12703 <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>
12704 <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>
12705 <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>
12711 ISBN with a dummy number
12721 ISBN with space-delimited number
12725 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
12731 ISBN with multiple spaces, no number
12750 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
12751 </p><p>ISBN 12345678901
12757 ISBN with trailing year (bug 8110)
12759 ISBN 1-234-56789-0 - 2006
12761 ISBN 1 234 56789 0 - 2006
12763 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
12764 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
12772 {{anchorencode:foo bar©#%n}}
12774 <p>foo_bar.C2.A9.23.25n
12779 anchorencode trims spaces
12781 {{anchorencode: __pretty__please__}}
12788 anchorencode deals with links
12790 {{anchorencode: [[hello|world]] [[hi]]}}
12797 anchorencode deals with templates
12799 {{anchorencode: {{Foo}} }}
12806 anchorencode encodes like the TOC generator: (bug 18431)
12808 === _ +:.3A%3A&&]] ===
12809 {{anchorencode: _ +:.3A%3A&&]] }}
12812 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
12813 <p>.2B:.3A.253A.26.26.5D.5D
12817 # Expected output in the following test is not necessarily expected (there
12818 # should probably be <p> tags inside the <blockquote> in the output) -- it's
12819 # only testing for well-formedness.
12821 Bug 6200: blockquotes and paragraph formatting
12841 Bug 8293: Use of center tag ruins paragraph formatting
12862 Parsing of overlapping (improperly nested) inline html tags (PHP parser)
12866 <span><s>x</span></s>
12868 <p><span><s>x</span></s></span>
12873 Parsing of overlapping (improperly nested) inline html tags (Parsoid)
12877 <span><s>x</span></s>
12879 <p><span><s>x</s></span><s></s>
12884 ### Language variants related tests
12887 Self-link in language variants
12889 title=[[Dunav]] language=sr
12891 Both [[Dunav]] and [[Дунав]] are names for this river.
12893 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
12904 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
12906 title=[[Duna]] language=sr
12908 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
12910 <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.
12915 Link to pages in language variants
12919 Main Page can be written as [[Маин Паге]]
12921 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
12927 Multiple links to pages in language variants
12931 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
12933 <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>.
12939 Simple template in language variants
12945 <p>This is a test template
12951 Template with explicit namespace in language variants
12957 <p>This is a test template
12963 Basic test for template parameter in language variants
12967 {{парамтест|param=foo}}
12969 <p>This is a test template with parameter foo
12975 Simple category in language variants
12979 [[Category:МедиаWики Усер'с Гуиде]]
12981 <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>
12998 Don't convert blue categorylinks to another variant (bug 33210)
13002 [[A]][[Category:分类]]
13004 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
13009 Stripping -{}- tags (language variants)
13013 Latin proverb: -{Ne nuntium necare}-
13015 <p>Latin proverb: Ne nuntium necare
13021 Prevent conversion with -{}- tags (language variants)
13023 language=sr variant=sr-ec
13025 Latinski: -{Ne nuntium necare}-
13027 <p>Латински: Ne nuntium necare
13033 Prevent conversion of text with -{}- tags (language variants)
13035 language=sr variant=sr-ec
13037 Latinski: -{Ne nuntium necare}-
13039 <p>Латински: Ne nuntium necare
13045 Prevent conversion of links with -{}- tags (language variants)
13047 language=sr variant=sr-ec
13051 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13057 -{}- tags within headlines (within html for parserConvert())
13059 language=sr variant=sr-ec
13063 <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>
13069 Explicit definition of language variant alternatives
13071 language=zh variant=zh-tw
13073 -{zh:China;zh-tw:Taiwan}-, not China
13075 <p>Taiwan, not China
13081 Conversion around HTML tags
13083 language=sr variant=sr-ec
13085 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
13086 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
13089 <span title="ЛаCтин">ски</span>
13095 Explicit session-wise language variant mapping (A flag and - flag)
13097 language=zh variant=zh-tw
13099 Taiwan is not China.
13100 But -{A|zh:China;zh-tw:Taiwan}- is China,
13101 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
13102 and -{China}- is China.
13104 <p>Taiwan is not China.
13105 But Taiwan is Taiwan,
13106 (This should be stripped!)
13107 and China is China.
13112 Explicit session-wise language variant mapping (H flag for hide)
13114 language=zh variant=zh-tw
13116 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
13119 <p>(This should be stripped!)
13125 Adding explicit conversion rule for title (T flag)
13127 language=zh variant=zh-tw showtitle
13129 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13132 <p>Should be stripped!
13137 Testing that changing the language variant here in the tests actually works
13139 language=zh variant=zh showtitle
13141 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13144 <p>Should be stripped!
13149 Recursive conversion of alt and title attrs shouldn't clear converter state
13151 language=zh variant=zh-cn showtitle
13153 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
13154 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
13158 Should be stripped<span title="Exclamation">!</span>
13163 Bug 24072: more test on conversion rule for title
13165 language=zh variant=zh-tw showtitle
13167 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13168 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
13171 <p>This should be stripped!
13172 This won't take interferes with the title rule.
13177 Partly disable title conversion if variant == main language code
13179 language=zh variant=zh title=[[ZH]] showtitle
13181 -{T|zh-cn:CN;zh-tw:TW}-
13189 Partly disable title conversion if variant == main language code, more
13191 language=zh variant=zh title=[[ZH]] showtitle
13201 Raw output of variant escape tags (R flag)
13203 language=zh variant=zh-tw
13205 Raw: -{R|zh:China;zh-tw:Taiwan}-
13207 <p>Raw: zh:China;zh-tw:Taiwan
13212 Nested using of manual convert syntax
13214 language=zh variant=zh-hk
13216 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
13218 <p>Nested: Hello Hong Kong!
13223 Proper conversion of text in external links
13225 language=sr variant=sr-ec
13227 http://www.google.com
13228 gopher://www.google.com
13229 [http://www.google.com http://www.google.com]
13230 [gopher://www.google.com gopher://www.google.com]
13231 [https://www.google.com irc://www.google.com]
13232 [ftp://www.google.com www.google.com/ftp://dir]
13233 [//www.google.com www.google.com]
13235 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
13236 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
13237 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
13238 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
13239 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
13240 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
13241 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
13246 Do not convert roman numbers to language variants
13248 language=sr variant=sr-ec
13252 <p>Фридрих IV је цар.
13257 Unclosed language converter markup "-{"
13268 Don't convert raw rule "-{R|=>}-" to "=>"
13285 Bug 529: Uncovered bullet
13295 # Plain MediaWiki does not remove empty lists, but tidy actually does.
13296 # Templates in Wikipedia rely on this behavior, as tidy has always been
13297 # enabled there. These tests are normally run *without* tidy, so specify the
13298 # full output here.
13299 # To test realistic parsing behavior, apply a tidy-like transformation to both
13300 # the expected output and your parser's output.
13302 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
13304 ******* Foo {{bullet}}
13306 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
13319 Bug 529: Uncovered table already at line-start
13342 Bug 529: Uncovered bullet in parser function result
13344 * Foo {{lc:{{bullet}} }}
13353 Bug 5678: Double-parsed template argument
13355 {{lc:{{{1}}}|hello}}
13362 Bug 5678: Double-parsed template invocation
13364 {{lc:{{paramtest {{!}} param = hello }} }}
13366 <p>{{paramtest | param = hello }}
13371 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
13374 title=[[Main Page]]
13376 {{PRVNÍVELKÉ:ěščř}}
13377 {{prvnívelké:ěščř}}
13397 Morwen/13: Unclosed link followed by heading
13404 <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>
13409 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
13416 <h1><span class="mw-headline" id="heading">heading</span></h1>
13421 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
13428 <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>
13443 Paragraphs inside divs (no extra line breaks)
13455 Paragraphs inside divs (extra line break on open)
13470 Paragraphs inside divs (extra line break on close)
13485 Paragraphs inside divs (extra line break on open and close)
13502 Nesting tags, paragraphs on lines which begin with <div>
13506 <div></div><strong>A
13515 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
13517 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
13521 <blockquote>Line one
13523 Line two</blockquote>
13525 <blockquote>Line one
13526 Line two</blockquote>
13531 Bug 6200: paragraphs inside blockquotes (extra line break on open)
13538 Line two</blockquote>
13543 Line two</blockquote>
13548 Bug 6200: paragraphs inside blockquotes (extra line break on close)
13552 <blockquote>Line one
13557 <blockquote>Line one
13565 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
13584 Paragraphs inside blockquotes/divs (no extra line breaks)
13586 <blockquote><div>Line one
13588 Line two</div></blockquote>
13590 <blockquote><div>Line one
13591 Line two</div></blockquote>
13596 Paragraphs inside blockquotes/divs (extra line break on open)
13601 Line two</div></blockquote>
13606 Line two</div></blockquote>
13611 Paragraphs inside blockquotes/divs (extra line break on close)
13613 <blockquote><div>Line one
13616 </div></blockquote>
13618 <blockquote><div>Line one
13621 </div></blockquote>
13626 Paragraphs inside blockquotes/divs (extra line break on open and close)
13632 </div></blockquote>
13638 </div></blockquote>
13643 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
13645 wgLinkHolderBatchSize=0
13651 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
13652 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
13653 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
13658 Free external link invading image caption
13660 [[Image:Foobar.jpg|thumb|http://x|hello]]
13662 <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>
13667 Bug 15196: localised external link numbers
13671 [http://en.wikipedia.org/]
13673 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
13678 Multibyte character in padleft
13680 {{padleft:-Hello|7|Æ}}
13687 Multibyte character in padright
13689 {{padright:Hello-|7|Æ}}
13696 formatdate parser function
13698 {{#formatdate:2009-03-24}}
13700 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
13705 formatdate parser function, with default format
13707 {{#formatdate:2009-03-24|mdy}}
13709 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
13714 Spacing of numbers in formatted dates
13716 {{#formatdate:January 15}}
13718 <p><span class="mw-formatted-date" title="01-15">January 15</span>
13723 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
13725 language=nl title=[[MediaWiki:Common.css]]
13727 {{#formatdate:2009-03-24|dmy}}
13729 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
13742 Edit comment with link
13746 I like the [[Main Page]] a lot
13748 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
13752 Edit comment with link and link text
13756 I like the [[Main Page|best pages]] a lot
13758 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
13762 Edit comment with link and link text with suffix
13766 I like the [[Main Page|best page]]s a lot
13768 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
13772 Edit comment with section link (non-local, eg in history list)
13774 comment title=[[Main Page]]
13776 /* External links */ removed bogus entries
13778 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
13782 Edit comment with section link and text before it (non-local, eg in history list)
13784 comment title=[[Main Page]]
13786 pre-comment text /* External links */ removed bogus entries
13788 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>
13792 Edit comment with section link (local, eg in diff view)
13794 comment local title=[[Main Page]]
13796 /* External links */ removed bogus entries
13798 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
13802 Edit comment with subpage link (bug 14080)
13806 title=[[Subpage test]]
13808 Poked at a [[/subpage]] here...
13810 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
13814 Edit comment with subpage link and link text (bug 14080)
13818 title=[[Subpage test]]
13820 Poked at a [[/subpage|neat little page]] here...
13822 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
13826 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
13829 title=[[Subpage test]]
13831 Poked at a [[/subpage]] here...
13833 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
13837 Edit comment with bare anchor link (local, as on diff)
13841 title=[[Main Page]]
13845 <a href="#section">#section</a>
13849 Edit comment with bare anchor link (non-local, as on history)
13852 title=[[Main Page]]
13856 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
13860 Anchor starting with underscore
13864 <p><a href="#_ref">One</a>
13869 Id starting with underscore
13871 <div id="_ref"></div>
13873 <div id="_ref"></div>
13878 Space normalisation on autocomment (bug 22784)
13881 title=[[Main Page]]
13883 /* __hello__world__ */
13885 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
13889 percent-encoding and + signs in comments (Bug 26410)
13893 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
13895 <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>
13899 Bad images - basic functionality
13908 Bad images - bug 16039: text after bad image disappears
13922 Verify that displaytitle works (bug #22501) no displaytitle
13926 wgAllowDisplayTitle=true
13927 wgRestrictDisplayTitle=false
13929 this is not the the title
13932 <p>this is not the the title
13937 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
13942 wgAllowDisplayTitle=true
13943 wgRestrictDisplayTitle=false
13945 this is not the the title
13946 {{DISPLAYTITLE:whatever}}
13949 <p>this is not the the title
13954 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
13959 wgAllowDisplayTitle=true
13960 wgRestrictDisplayTitle=true
13962 this is not the the title
13963 {{DISPLAYTITLE:whatever}}
13966 <p>this is not the the title
13971 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
13976 wgAllowDisplayTitle=true
13977 wgRestrictDisplayTitle=true
13979 this is not the the title
13980 {{DISPLAYTITLE:screen}}
13983 <p>this is not the the title
13988 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
13993 wgAllowDisplayTitle=false
13995 this is not the the title
13996 {{DISPLAYTITLE:screen}}
13999 <p>this is not the the title
14000 <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>
14005 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
14010 wgAllowDisplayTitle=false
14012 this is not the the title
14015 <p>this is not the the title
14020 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
14025 wgAllowDisplayTitle=true
14026 wgRestrictDisplayTitle=true
14028 this is not the the title
14029 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
14031 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
14032 <p>this is not the the title
14037 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
14042 wgAllowDisplayTitle=true
14043 wgRestrictDisplayTitle=true
14045 this is not the the title
14046 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
14048 <span style="color: red;">s</span>creen
14049 <p>this is not the the title
14054 preload: check <noinclude> and <includeonly>
14058 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
14064 preload: check <onlyinclude>
14068 Goodbye <onlyinclude>Hello world</onlyinclude>
14074 preload: can pass tags through if we want to
14078 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
14080 <includeonly>Hello world</includeonly>
14084 preload: check that it doesn't try to do tricks
14088 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
14090 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
14094 Play a bit with r67090 and bug 3158
14098 <div style="width:50% !important"> </div>
14099 <div style="width:50% !important"> </div>
14100 <div style="width:50% !important"> </div>
14101 <div style="border : solid;"> </div>
14103 <div style="width:50% !important"> </div>
14104 <div style="width:50% !important"> </div>
14105 <div style="width:50% !important"> </div>
14106 <div style="border : solid;"> </div>
14111 HTML5 data attributes
14113 <span data-foo="bar">Baz</span>
14114 <p data-abc-def_hij="">Quuz</p>
14116 <p><span data-foo="bar">Baz</span>
14118 <p data-abc-def_hij="">Quuz</p>
14123 percent-encoding and + signs in internal links (Bug 26410)
14125 [[User:+%]] [[Page+title%]]
14126 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
14127 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
14128 [[%33%45]] [[%33%45+]]
14130 <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>
14131 <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>
14132 <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>
14133 <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>
14138 Special characters in embedded file links (bug 27679)
14140 [[File:Contains & ampersand.jpg]]
14141 [[File:Does not exist.jpg|Title with & ampersand]]
14143 <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>
14144 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
14150 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
14152 Text's been normalized?
14154 <p>Text's been normalized?
14159 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
14161 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
14163 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
14168 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
14170 [http://www.example.org/ ideograms]
14172 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
14177 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
14179 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
14181 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
14205 Bug 31098 Template which includes system messages which includes the template
14209 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
14210 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
14215 Bug31490 Turkish: ucfirst 'blah'
14226 Bug31490 Turkish: ucfirst 'ix'
14237 Bug31490 Turkish: lcfirst 'BLAH'
14248 Bug31490 Turkish: ucfırst (with a dotless i)
14254 <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>
14259 Bug31490 ucfırst (with a dotless i) with English language
14265 <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>
14270 Bug 26375: TOC with italics
14272 title=[[Main Page]]
14275 == ''Lost'' episodes ==
14277 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14279 <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>
14282 <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>
14287 Bug 26375: TOC with bold
14289 title=[[Main Page]]
14292 == '''should be bold''' then normal text ==
14294 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14296 <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>
14299 <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>
14304 Bug 33845: Headings become cursive in TOC when they contain an image
14306 title=[[Main Page]]
14309 == Image [[Image:foobar.jpg]] ==
14311 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14313 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
14316 <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>
14321 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
14323 title=[[Main Page]]
14326 == <blockquote>Quote</blockquote> ==
14328 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14330 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
14333 <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>
14338 Unclosed tags in TOC
14340 title=[[Main Page]]
14344 <small>Hanc marginis exiguitas non caperet.</small>
14347 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14349 <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>
14352 <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>
14353 <p><small>Hanc marginis exiguitas non caperet.</small>
14359 Multiple tags in TOC
14362 == <i>Foo</i> <b>Bar</b> ==
14364 == <i>Foo</i> <blockquote>Bar</blockquote> ==
14366 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14368 <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>
14369 <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>
14372 <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>
14373 <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>
14378 Tags with parameters in TOC
14381 == <sup class="in-h2">Hello</sup> ==
14383 == <sup class="a > b">Evilbye</sup> ==
14385 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14387 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
14388 <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>
14391 <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>
14392 <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>
14397 span tags with directionality in TOC
14400 == <span dir="ltr">C++</span> ==
14402 == <span dir="rtl">זבנג!</span> ==
14404 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
14406 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
14408 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
14410 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14412 <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>
14413 <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>
14414 <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>
14415 <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>
14416 <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>
14419 <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>
14420 <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>
14421 <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>
14422 <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>
14423 <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>
14430 == {{int:headline_sample}} ==
14434 Bug 32057: Title needed when expanding <h> nodes.
14436 title=[[Main Page]]
14440 <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>
14445 Strip marker in urlencode
14447 {{urlencode:x<nowiki/>y}}
14448 {{urlencode:x<nowiki/>y|wiki}}
14449 {{urlencode:x<nowiki/>y|path}}
14476 Strip marker in formatNum
14478 {{formatnum:1<nowiki/>2}}
14479 {{formatnum:1<nowiki/>2|R}}
14487 Check noCommafy in formatNum
14491 {{formatnum:123456.78}}
14492 {{formatnum:123456.78|NOSEP}}
14500 Strip marker in grammar
14504 {{grammar:elative|foo<nowiki/>bar}}
14511 Strip marker in padleft
14513 {{padleft:|2|x<nowiki/>y}}
14520 Strip marker in padright
14522 {{padright:|2|x<nowiki/>y}}
14529 Strip marker in anchorencode
14531 {{anchorencode:x<nowiki/>y}}
14538 nowiki inside link inside heading (bug 18295)
14540 ==[[foo|x<nowiki>y</nowiki>z]]==
14542 <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>
14547 new support for bdi element (bug 31817)
14549 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
14551 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
14556 Ignore pipe between table row attributes
14560 |- id=foo | style='color: red'
14568 <tr id="foo" style="color: red">
14575 Gallery override link with WikiLink (bug 34852)
14578 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
14581 <ul class="gallery">
14582 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14583 <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>
14584 <div class="gallerytext">
14594 Gallery override link with absolute external link (bug 34852)
14597 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
14600 <ul class="gallery">
14601 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14602 <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>
14603 <div class="gallerytext">
14613 Gallery override link with malicious javascript (bug 34852)
14616 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
14619 <ul class="gallery">
14620 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14621 <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>
14622 <div class="gallerytext">
14632 Gallery with invalid title as link (bug 43964)
14635 File:foobar.jpg|link=<
14638 <ul class="gallery">
14639 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14640 <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>
14641 <div class="gallerytext">
14649 Language parser function
14658 Padleft and padright as substr
14660 {{padleft:|3|abcde}}
14661 {{padright:|3|abcde}}
14669 Special parser function
14671 {{#special:RandomPage}}
14672 {{#special:BaDtItLe}}
14673 {{#special:Foobar}}
14682 Bug 34939 - Case insensitive link parsing ([HttP://])
14684 [HttP://MediaWiki.Org/]
14686 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
14691 Bug 34939 - Case insensitive link parsing ([HttP:// title])
14693 [HttP://MediaWiki.Org/ MediaWiki]
14695 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
14700 Bug 34939 - Case insensitive link parsing (HttP://)
14702 HttP://MediaWiki.Org/
14704 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
14710 ### Parsoids-specific tests
14711 ### Parsoid-PHP parser incompatibilities
14714 1. SOL-sensitive wikitext tokens as template-args
14716 parsoid=wt2html,wt2wt
14722 <span about="#mwt1" typeof="mw:Transclusion">
14723 </span><ul about="#mwt1"><li>a</li></ul>
14724 <span about="#mwt2" typeof="mw:Transclusion">
14725 </span><ol about="#mwt2"><li>a</li></ol>
14726 <span about="#mwt3" typeof="mw:Transclusion">
14727 </span><dl about="#mwt3"><dd>a</dd></dl>
14730 #### ----------------------------------------------------------------
14731 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
14732 #### tags. Parsoid's output for these tags differs from that of the
14734 #### ----------------------------------------------------------------
14737 Ref: 1. ref-location should be replaced with an index span
14742 B <ref name="x">foo</ref>
14745 <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>
14746 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>
14747 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>
14751 Ref: 2. ref-tags with identical names should all get the same index
14755 A <ref name="x">foo</ref>
14758 <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>
14759 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>
14763 Ref: 3. spaces in ref-names should be ignored
14767 A <ref name="x">foo</ref>
14768 B <ref name=" x " />
14771 <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>
14772 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>
14773 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>
14777 Ref: 4. 'constructor' should be accepted as a valid ref-name
14778 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
14782 A <ref name="constructor">foo</ref>
14784 <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>
14788 Ref: 5. body should accept generic wikitext
14793 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
14798 <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>
14800 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14801 <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>
14806 Ref: 6. indent-pres should not be output in ref-body
14818 <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>
14820 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14821 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
14828 Ref: 6. No p-wrapping in ref-body
14847 <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>
14849 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14850 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
14864 Ref: 8. transclusion wikitext has lower precedence
14868 A <ref> foo {{echo|</ref> B C}}
14872 <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>
14874 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14875 <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>
14879 Ref: 9. unclosed comments should not leak out of ref-body
14883 A <ref> foo <!--</ref> B C
14887 <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>
14889 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14890 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li></ol>
14894 Ref: 10. Unclosed HTML tags should not leak out of ref-body
14898 A <ref> <b> foo </ref> B C
14902 <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>
14904 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14905 <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>
14909 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
14916 <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
14917 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>
14921 Ref: 12. ref-tags act as trailing newline migration barrier
14925 <!--the newline at the end of this line moves out of the p-tag-->a
14927 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
14932 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
14935 <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>
14936 <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>
14943 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
14951 <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
14952 <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>
14956 Ref: 14. A nested ref-tag should be emitted as plain text
14960 <ref>foo <ref>bar</ref> baz</ref>
14964 <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>
14966 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw="{"name":"references","attrs":{}}">
14967 <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>
14971 Ref: 15. ref-tags with identical names should get identical indexes
14975 A1 <ref name="a">foo</ref> A2 <ref name="a" />
14976 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
14980 <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>
14981 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>
14983 <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>
14987 References: 1. references tag without any refs should be handled properly
14993 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references"></ol>
14997 References: 2. references tag with group only outputs references from that group
15001 A <ref group="a">foo</ref>
15002 B <ref group="b">bar</ref>
15004 <references group='a' />
15006 <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>
15007 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>
15009 <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>
15013 References: 3. ref list should be cleared after processing references
15025 <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>
15027 <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>
15029 <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>
15031 <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>
15035 References: 4. only referenced group should be cleared after processing references
15039 A <ref group="a">afoo</ref>
15042 <references group="a"/>
15048 <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>
15049 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>
15051 <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>
15053 <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>
15055 <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>
15059 References: 5. ref tags in references should be processed while ignoring all other content
15064 B <ref name="b">bar</ref>
15067 <ref name="a">foo</ref>
15068 This should just get lost.
15071 <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>
15072 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>
15074 <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>
15078 References: 6. <references /> from a transclusion
15082 {{echo|<references />}}
15084 <ol class="references" about="#mwt2" typeof="mw:Transclusion" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}'></ol>
15088 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
15092 A <ref>foo bar for a</ref>
15098 <ref name="b">foo</ref>
15101 <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>
15102 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>
15104 <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>
15106 <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>
15110 #### ----------------------------------------------------------------
15111 #### The following section of tests are primarily to test
15112 #### wikitext escaping capabilities of Parsoid. Given that
15113 #### escaping can be done any number of ways, the wikitext (input)
15114 #### is always adjusted to reflect how Parsoid adds nowiki
15117 #### We are marking several tests as parsoid-only since the
15118 #### HTML in the result section is different from what the
15119 #### PHP parser generates for it.
15120 #### ----------------------------------------------------------------
15123 #### --------------- Headings ---------------
15125 #### 1. Nested inside html <h1>=foo=</h1>
15126 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
15127 #### 3. Nested inside html with wikitext split by html tags
15128 #### 4. No escape needed
15129 #### 5. Empty headings <h1></h1>
15130 #### 6. Heading chars in SOL context
15131 #### ----------------------------------------
15133 Headings: 0. Unnested
15137 <nowiki>=foo=</nowiki>
15139 <nowiki> =foo= </nowiki>
15141 <nowiki>=foo=</nowiki>
15143 =foo''a''<nowiki>=</nowiki>
15145 <p><span typeof="mw:Nowiki">=foo=</span></p>
15147 <p><span typeof="mw:Nowiki"> =foo= </span>
15149 <span typeof="mw:Nowiki">=foo=</span></p>
15151 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
15155 Headings: 1. Nested inside html
15159 =<nowiki>=foo=</nowiki>=
15161 ==<nowiki>=foo=</nowiki>==
15163 ===<nowiki>=foo=</nowiki>===
15165 ====<nowiki>=foo=</nowiki>====
15167 =====<nowiki>=foo=</nowiki>=====
15169 ======<nowiki>=foo=</nowiki>======
15171 <h1><span typeof="mw:Nowiki">=foo=</span></h1>
15172 <h2><span typeof="mw:Nowiki">=foo=</span></h2>
15173 <h3><span typeof="mw:Nowiki">=foo=</span></h3>
15174 <h4><span typeof="mw:Nowiki">=foo=</span></h4>
15175 <h5><span typeof="mw:Nowiki">=foo=</span></h5>
15176 <h6><span typeof="mw:Nowiki">=foo=</span></h6>
15180 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
15185 <nowiki>*</nowiki>bar
15191 <nowiki>=bar=</nowiki>
15199 Headings: 3. Nested inside html with wikitext split by html tags
15203 =='''bold'''<nowiki>foo=</nowiki>=
15205 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
15209 Headings: 4a. No escaping needed (testing just h1 and h2)
15227 =<nowiki>=</nowiki>=
15235 <h1><i>=</i>foo=</h1>
15236 <h1><span typeof="mw:Nowiki">=</span></h1>
15240 Headings: 4b. No escaping needed (inside p-tags)
15255 Headings: 5. Empty headings
15267 =====<nowiki/>=====
15269 ======<nowiki/>======
15280 Headings: 6a. Heading chars in SOL context (with trailing spaces)
15284 <nowiki>=a=</nowiki>
15286 <nowiki>=a=</nowiki>
15288 <nowiki>=a=</nowiki>
15290 <nowiki>=a=</nowiki>
15299 Headings: 6b. Heading chars in SOL context (with trailing newlines)
15327 Headings: 6c. Heading chars in SOL context (leading newline break)
15332 <nowiki>=b=</nowiki>
15339 Headings: 6d. Heading chars in SOL context (with interspersed comments)
15343 <!--c0--><nowiki>=a=</nowiki>
15345 <nowiki>=a=</nowiki> <!--c2--> <!--c3-->
15347 <p><!--c0-->=a=</p>
15348 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
15352 Headings: 6d. Heading chars in SOL context (No escaping needed)
15361 #### --------------- Lists ---------------
15362 #### 0. Outside nests (*foo, etc.)
15363 #### 1. Nested inside html <ul><li>*foo</li></ul>
15364 #### 2. Inside definition lists
15365 #### 3. Only bullets at start should be escaped
15366 #### 4. No escapes needed
15367 #### 5. No unnecessary escapes
15368 #### 6. Escape bullets in SOL position
15369 #### 7. Escape bullets in a multi-line context
15370 #### ----------------------------------------
15373 Lists: 0. Outside nests
15375 <nowiki>*</nowiki>foo
15377 <nowiki>#</nowiki>foo
15385 Lists: 1. Nested inside html
15387 *<nowiki>*foo</nowiki>
15389 *<nowiki>#foo</nowiki>
15391 *<nowiki>:foo</nowiki>
15393 *<nowiki>;foo</nowiki>
15395 #<nowiki>*foo</nowiki>
15397 #<nowiki>#foo</nowiki>
15399 #<nowiki>:foo</nowiki>
15401 #<nowiki>;foo</nowiki>
15423 Lists: 2. Inside definition lists
15425 ;<nowiki>;foo</nowiki>
15427 ;<nowiki>:foo</nowiki>
15429 ;<nowiki>:foo</nowiki>
15432 :<nowiki>:foo</nowiki>
15447 Lists: 3. Only bullets at start of text should be escaped
15449 *<nowiki>*foo*bar</nowiki>
15451 *<nowiki>*foo</nowiki>''it''*bar
15455 <ul><li>*foo<i>it</i>*bar
15461 Lists: 4. No escapes needed
15473 <ul><li><i>foo</i>*bar
15475 <ul><li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
15480 Lists: 5. No unnecessary escapes
15482 * bar <span><nowiki>[[foo]]</nowiki></span>
15484 *=bar <span><nowiki>[[foo]]</nowiki></span>
15486 *[[bar <span><nowiki>[[foo]]</nowiki></span>
15488 *]]bar <span><nowiki>[[foo]]</nowiki></span>
15490 *=bar <span>foo]]</span>=
15494 <ul><li> bar <span>[[foo]]</span>
15496 <ul><li>=bar <span>[[foo]]</span>
15498 <ul><li>[[bar <span>[[foo]]</span>
15500 <ul><li>]]bar <span>[[foo]]</span>
15502 <ul><li>=bar <span>foo]]</span>=
15504 <ul><li> <s></s>: a
15510 Lists: 6. Escape bullets in SOL position
15514 <!--cmt--><nowiki>*foo</nowiki>
15516 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
15520 Lists: 7. Escape bullets in a multi-line context
15523 <nowiki>*</nowiki>b
15530 #### --------------- HRs ---------------
15531 #### 1. Single line
15532 #### -----------------------------------
15535 HRs: 1. Single line
15539 ----<nowiki>----</nowiki>
15543 <hr><span typeof="mw:Nowiki">----</span>
15548 #### --------------- Tables ---------------
15549 #### 1a. Simple example
15550 #### 1b. No escaping needed (!foo)
15551 #### 1c. No escaping needed (|foo)
15552 #### 1d. No escaping needed (|}foo)
15554 #### 2a. Nested in td (<td>foo|bar</td>)
15555 #### 2b. Nested in td (<td>foo||bar</td>)
15556 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
15558 #### 3a. Nested in th (<th>foo!bar</th>)
15559 #### 3b. Nested in th (<th>foo!!bar</th>)
15560 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
15564 #### 4c. No escaping needed
15565 #### --------------------------------------
15568 Tables: 1a. Simple example
15579 Tables: 1b. No escaping needed
15588 Tables: 1c. No escaping needed
15597 Tables: 1d. No escaping needed
15606 Tables: 2a. Nested in td
15611 |<nowiki>foo|bar</nowiki>
15615 <td><span typeof="mw:Nowiki">foo|bar</span></td></tr></tbody></table>
15619 Tables: 2b. Nested in td
15624 |<nowiki>foo||bar</nowiki>
15625 |''it''<nowiki>foo||bar</nowiki>
15629 <td><span typeof="mw:Nowiki">foo||bar</span></td>
15630 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
15634 Tables: 2c. Nested in td -- no escaping needed
15642 <table><tbody><tr><td>foo!!bar
15643 </td></tr></tbody></table>
15648 Tables: 3a. Nested in th
15656 <table><tbody><tr><th>foo!bar
15657 </th></tr></tbody></table>
15662 Tables: 3b. Nested in th
15667 !<nowiki>foo!!bar</nowiki>
15671 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
15676 Tables: 3c. Nested in th -- no escaping needed
15681 !<nowiki>foo||bar</nowiki>
15685 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
15689 Tables: 4a. Escape -
15697 |<nowiki>-bar</nowiki>
15701 <tr><th>-bar</th></tr>
15703 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
15707 Tables: 4b. Escape +
15715 |<nowiki>+bar</nowiki>
15719 <tr><th>+bar</th></tr>
15721 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
15725 Tables: 4c. No escaping needed
15744 <tr><td>foo-bar</td><td>foo+bar</td></tr>
15745 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
15753 ### SSS FIXME: Disabled right now because accurate html2wt
15754 ### on this snippet requires data-parsoid flags that we've
15755 ### stripped out of these tests. We should scheme how we
15756 ### we want to handle these kind of tests that require
15757 ### data-parsoid flags for accurate html2wt serialization
15760 Tables: 4d. No escaping needed
15778 #### --------------- Links ----------------
15779 #### 1. Quote marks in link text
15780 #### 2. Wikilinks: Escapes needed
15781 #### 3. Wikilinks: No escapes needed
15782 #### 4. Extlinks: Escapes needed
15783 #### 5. Extlinks: No escapes needed
15784 #### --------------------------------------
15786 Links 1. Quote marks in link text
15790 [[Foo|Foo<nowiki>''boo''</nowiki>]]
15792 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
15796 Links 2. WikiLinks: Escapes needed
15800 [[Foo|<nowiki>[Foobar]</nowiki>]]
15801 [[Foo|<nowiki>Foobar]</nowiki>]]
15802 [[Foo|x [Foobar] x]]
15803 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
15804 [[Foo|<nowiki>[[Bar]]</nowiki>]]
15805 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
15806 [[Foo|<nowiki>|Bar</nowiki>]]
15807 [[Foo|<nowiki>]]bar</nowiki>]]
15808 [[Foo|<nowiki>[[bar</nowiki>]]
15809 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
15811 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
15812 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
15813 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
15814 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
15815 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
15816 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
15817 <a href="Foo" rel="mw:WikiLink">|Bar</a>
15818 <a href="Foo" rel="mw:WikiLink">]]bar</a>
15819 <a href="Foo" rel="mw:WikiLink">[[bar</a>
15820 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
15824 Links 3. WikiLinks: No escapes needed
15831 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
15832 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
15836 Links 4. ExtLinks: Escapes needed
15840 [http://google.com <nowiki>[google]</nowiki>]
15841 [http://google.com <nowiki>google]</nowiki>]
15843 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
15844 <a href="http://google.com" rel="mw:ExtLink">google]</a>
15848 Links 5. ExtLinks: No escapes needed
15852 [http://google.com [google]
15854 <a href="http://google.com" rel="mw:ExtLink">[google</a>
15857 #### --------------- Quotes ---------------
15858 #### 1. Quotes inside <b> and <i>
15859 #### 2. Link fragments separated by <i> and <b> tags
15860 #### 3. Link fragments inside <i> and <b>
15861 #### 4. No escaping needed
15862 #### --------------------------------------
15864 1. Quotes inside <b> and <i>
15866 parsoid=html2wt,wt2wt
15868 ''<nowiki>'foo'</nowiki>''
15869 ''<nowiki>''foo''</nowiki>''
15870 ''<nowiki>'''foo'''</nowiki>''
15872 '''<nowiki>'foo'</nowiki>'''
15873 '''<nowiki>''foo''</nowiki>'''
15874 '''<nowiki>'''foo'''</nowiki>'''
15875 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
15876 '''foo'''<nowiki/>'s
15879 '<nowiki/>''foo''<nowiki/>'
15881 '''foo'''<nowiki/>'
15882 '<nowiki/>'''foo'''<nowiki/>'
15891 <b>foo'<i>bar'</i>baz</b>
15902 2. Link fragments separated by <i> and <b> tags
15904 [[''foo''<nowiki>hello]]</nowiki>
15906 [['''foo'''<nowiki>hello]]</nowiki>
15908 <p>[[<i>foo</i>hello]]
15909 </p><p>[[<b>foo</b>hello]]
15914 3. Link fragments inside <i> and <b>
15915 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
15916 this is one of the shortcomings of this format)
15918 ''[[foo''<nowiki>]]</nowiki>
15920 '''[[foo'''<nowiki>]]</nowiki>
15923 </p><p><b>[[foo</b>]]
15928 4. No escaping needed
15930 '<span>''bar''</span>'
15931 '<span>'''bar'''</span>'
15933 <p>'<span><i>bar</i></span>'
15934 '<span><b>bar</b></span>'
15938 #### ----------- Paragraphs ---------------
15939 #### 1. No unnecessary escapes
15940 #### --------------------------------------
15943 1. No unnecessary escapes
15945 bar <span><nowiki>[[foo]]</nowiki></span>
15947 =bar <span><nowiki>[[foo]]</nowiki></span>
15949 [[bar <span><nowiki>[[foo]]</nowiki></span>
15951 ]]bar <span><nowiki>[[foo]]</nowiki></span>
15953 =bar <span>foo]]</span><nowiki>=</nowiki>
15955 <p>bar <span>[[foo]]</span>
15956 </p><p>=bar <span>[[foo]]</span>
15957 </p><p>[[bar <span>[[foo]]</span>
15958 </p><p>]]bar <span>[[foo]]</span>
15959 </p><p>=bar <span>foo]]</span>=
15963 #### ----------------------- PRE --------------------------
15964 #### 1. Leading whitespace in SOL context should be escaped
15965 #### ------------------------------------------------------
15967 1. Leading whitespace in SOL context should be escaped
15971 <nowiki> </nowiki>a
15973 <nowiki> </nowiki> a
15975 <nowiki> </nowiki>a(tab)
15977 <nowiki> </nowiki> a
15979 <nowiki> </nowiki> a
15982 <nowiki> </nowiki>b
15985 <nowiki> </nowiki>b
15988 <nowiki> </nowiki> b
15994 <p><!--cmt--> a</p>
16003 #### --------------- HTML tags ---------------
16006 #### 3. multi-line html tag
16007 #### -----------------------------------------
16013 <a href="http://google.com">google</a>
16015 <a href="http://google.com">google</a>
16021 <nowiki><div>foo</div>
16022 <div style="color:red">foo</div></nowiki>
16024 <p><div>foo</div>
16025 <div style="color:red">foo</div>
16030 3. multi-line html tag
16045 <nowiki><ref>foo</ref></nowiki>
16047 <p><ref>foo</ref>
16051 #### --------------- Others ---------------
16055 <nowiki>foo</nowiki>
16057 <p><nowiki>foo</nowiki>
16061 ## The quote-char in the input is necessary for triggering the bug
16063 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
16065 parsoid=wt2wt,html2wt
16074 Tag-like HTML structures are passed through as text
16096 </p><p>1<d e>f
16101 # This fails in the PHP parser (see bug 40670,
16102 # https://bugzilla.wikimedia.org/show_bug.cgi?id=40670), so disabled for it.
16104 Tag names followed by punctuation should not be recognized as tags
16110 <p><s.ome> text
16115 HTML tag with necessary entities in attributes
16117 <span title="&amp;">foo</span>
16119 <p><span title="&amp;">foo</span>
16124 HTML tag with 'unnecessary' entity encoding in attributes
16126 <span title="&">foo</span>
16128 <p><span title="&">foo</span>
16133 HTML tag with broken attribute value quoting
16135 <span title="Hello world>Foo</span>
16137 <p><span>Foo</span>
16142 Parsoid-only: HTML tag with broken attribute value quoting
16146 <span title="Hello world>Foo</span>
16148 <p><span title="Hello world">Foo</span>
16153 Table with broken attribute value quoting
16156 | title="Hello world|Foo
16167 Table with broken attribute value quoting on consecutive lines
16170 | title="Hello world|Foo
16171 | style="color:red|Bar
16184 Parsoid-only: Table with broken attribute value quoting on consecutive lines
16189 | title="Hello world|Foo
16190 | style="color:red|Bar
16195 <td title="Hello world">Foo
16196 </td><td style="color: red">Bar
16197 </td></tr></tbody></table>
16202 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
16212 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
16222 Accept empty td cell attribute
16225 | align="center" | foo || |
16230 <td align="center"> foo </td>
16237 Non-empty attributes in th-cells
16240 ! Foo !! style="color: red" | Bar
16246 <th style="color: red"> Bar
16252 Accept empty attributes in th-cells
16267 Empty table rows go away
16288 ### Parsoid-centric tests for testing RTing of inter-element separators
16289 ### Edge cases not tested by existing parser tests and specific to
16290 ### Parsoid-specific serialization strategies.
16294 RT-ed inter-element separators should be valid separators
16307 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
16308 (Parsoid-only since PHP parser relies on Tidy for correct output)
16324 Empty TD followed by TD with tpl-generated attribute
16329 |{{echo|style='color:red'}}|foo
16343 Indented table with an empty td
16362 Empty TR followed by a template-generated TR
16363 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
16365 parsoid=wt2html,wt2wt
16369 {{echo|<tr><td>foo</td></tr>}}
16375 <tr typeof="mw:Transclusion">
16376 <td>foo</td></tr></tbody></table>
16379 ## PHP and parsoid output differ for this, and since this is primarily
16380 ## for testing Parsoid's serializer, marking this Parsoid only
16382 Empty TR followed by mixed-ws-comment line should RT correctly
16396 <td> <!--c--></td></tr>
16398 <td><!--c--> <!--d--></td></tr>
16404 Multi-line image caption generated by templates with/without trailing newlines
16408 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
16409 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
16411 <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>
16412 <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>
16416 ## PHP emits broken html for this, and since this is primarily
16417 ## a Parsoid serializer test, marking this Parsoid only
16419 Improperly nested inline or quotes tags with whitespace in between
16423 <span> <s>x</span> </s>
16426 <p><span> <s>x</s></span><s> </s>
16427 <b> <i>x</i></b><i> </i>
16432 Encapsulate protected attributes from wt
16436 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
16438 <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>
16442 # -----------------------------------------------------------------
16443 # The following section of tests are primarily to spec requirements
16444 # around serialization of new/edited content.
16446 # All these tests are marked Parsoid html2wt and html2html only
16447 # ----------------------------------------------------------------
16450 Image: Modifying size of an image
16454 [[Image:Wiki.png|230x230px]]
16456 <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>
16460 Image: New block level image should have \n before and after
16465 [[File:Wiki.png|right|thumb|150x150px]]
16468 <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>
16472 Lists: Add space after bullets
16479 * <span> baz</span>
16484 <li><span> baz</span></li>
16489 Parsoid: Serialize positional parameters with = in them as named parameter
16495 <p about="#mwt1" typeof="mw:Transclusion"
16496 data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}'
16500 # -----------------------------------------------------------------
16501 # End of section for Parsoid-only html2wt tests for serialization
16503 # -----------------------------------------------------------------
16510 Try for 100% code coverage