1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well formdness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-only test (not run by PHP parser)
25 # php php-only test (not run by the parsoid parser)
26 # showtitle make the first line the title
27 # comment run through Linker::formatComment() instead of main parser
28 # local format section links in edit comment text as local links
30 # You can also set the following parser properties via test options:
31 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
32 # wgLinkHolderBatchSize, wgRawHtml
34 # For testing purposes, temporary articles can created:
35 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
36 # where '/' denotes a newline.
38 # This is the standard article assumed to exist.
63 MediaWiki:bad image list
65 * [[File:Bad.jpg]] except [[Nasty page]]
99 Template:echo_with_span
105 Template:echo_with_div
117 Template:table_attribs
120 |</noinclude>style="color: red"| Foo
126 {{table_attribs}} || Bar || Baz
130 Template:image_attribs
133 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
155 This is a simple paragraph.
157 <p>This is a simple paragraph.
162 Paragraphs with extra newline spacing
185 Paragraphs with newline spacing with comment lines in between
193 <!--foo--><!--More than 1 comment disables stripping of this line!-->
250 Paragraphs with newline spacing with non-empty white-space lines in between
277 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
285 <!--foo--><!--More than 1 comment disables stripping of this line!-->
324 Extra newlines: More paragraphs with indented comment
339 Extra newlines followed by heading
354 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
355 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
358 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
363 Extra newlines between heading and content are swallowed
371 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
372 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
379 http://fr.wikipedia.org/wiki/🍺
380 <!-- EasterEgg we love beer, better be able be able to link to it -->
382 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
402 * plain''italic''plain
403 * plain''italic''plain''italic''plain
404 * plain'''bold'''plain
405 * plain'''bold'''plain'''bold'''plain
406 * plain''italic''plain'''bold'''plain
407 * plain'''bold'''plain''italic''plain
408 * plain''italic'''bold-italic'''italic''plain
409 * plain'''bold''bold-italic''bold'''plain
410 * plain'''''bold-italic'''italic''plain
411 * plain'''''bold-italic''bold'''plain
412 * plain''italic'''bold-italic'''''plain
413 * plain'''bold''bold-italic'''''plain
414 * plain l'''italic''plain
415 * plain l''''bold''' plain
418 </li><li> plain<i>italic</i>plain
419 </li><li> plain<i>italic</i>plain<i>italic</i>plain
420 </li><li> plain<b>bold</b>plain
421 </li><li> plain<b>bold</b>plain<b>bold</b>plain
422 </li><li> plain<i>italic</i>plain<b>bold</b>plain
423 </li><li> plain<b>bold</b>plain<i>italic</i>plain
424 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
425 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
426 </li><li> plain<i><b>bold-italic</b>italic</i>plain
427 </li><li> plain<b><i>bold-italic</i>bold</b>plain
428 </li><li> plain<i>italic<b>bold-italic</b></i>plain
429 </li><li> plain<b>bold<i>bold-italic</i></b>plain
430 </li><li> plain l'<i>italic</i>plain
431 </li><li> plain l'<b>bold</b> plain
436 # this example taken from the simple/Moon article
438 Italics and possessives
440 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
442 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
447 ### 2-quote opening sequence tests
450 Italics and bold: 2-quote opening sequence: (2,2)
460 Italics and bold: 2-quote opening sequence: (2,3)
470 Italics and bold: 2-quote opening sequence: (2,4)
480 Italics and bold: 2-quote opening sequence: (2,5) (php)
489 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
491 Italics and bold: 2-quote opening sequence: (2,5) (parsoid)
503 ### 3-quote opening sequence tests
507 Italics and bold: 3-quote opening sequence: (3,2)
517 Italics and bold: 3-quote opening sequence: (3,3)
527 Italics and bold: 3-quote opening sequence: (3,4)
537 Italics and bold: 3-quote opening sequence: (3,5) (php)
546 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
548 Italics and bold: 3-quote opening sequence: (3,5) (parsoid)
560 ### 4-quote opening sequence tests
564 Italics and bold: 4-quote opening sequence: (4,2)
574 Italics and bold: 4-quote opening sequence: (4,3)
584 Italics and bold: 4-quote opening sequence: (4,4)
594 Italics and bold: 4-quote opening sequence: (4,5) (php)
603 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
605 Italics and bold: 4-quote opening sequence: (4,5) (parsoid)
611 <p>'<b>foo<i></i></b>
617 ### 5-quote opening sequence tests
621 Italics and bold: 5-quote opening sequence: (5,2) (php)
630 # Parsoid reverses the nesting order, compared to the PHP parser
632 Italics and bold: 5-quote opening sequence: (5,2) (parsoid)
644 Italics and bold: 5-quote opening sequence: (5,3)
654 Italics and bold: 5-quote opening sequence: (5,4)
658 <p><i><b>foo'</b></i>
664 Italics and bold: 5-quote opening sequence: (5,5)
673 ### multiple quote sequences in a line
676 Italics and bold: multiple quote sequences: (2,4,2)
680 <p><i>foo'<b>bar</b></i>
686 Italics and bold: multiple quote sequences: (2,4,3)
690 <p><i>foo'<b>bar</b></i>
696 Italics and bold: multiple quote sequences: (2,4,4)
700 <p><i>foo'<b>bar'</b></i>
706 Italics and bold: multiple quote sequences: (3,4,2) (php)
715 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
717 Italics and bold: multiple quote sequences: (3,4,2) (parsoid)
723 <p><b>foo'</b>bar<i></i>
729 Italics and bold: multiple quote sequences: (3,4,3) (php)
738 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
740 Italics and bold: multiple quote sequences: (3,4,3) (parsoid)
746 <p><b>foo'</b>bar<b></b>
751 ### other quote tests
754 Italics and bold: other quote tests: (2,3,5)
756 ''this is about '''foo's family'''''
758 <p><i>this is about <b>foo's family</b></i>
764 Italics and bold: other quote tests: (2,(3,3),2)
766 ''this is about '''foo's''' family''
768 <p><i>this is about <b>foo's</b> family</i>
774 Italics and bold: other quote tests: (3,2,3,2)
776 '''this is about ''foo'''s family''
778 <p><b>this is about <i>foo</i></b><i>s family</i>
783 # The Parsoid team believes the PHP parser's output on this test is wrong.
784 # It only checks for convert-to-bold-on-single-character-word when the word
785 # matches with a bold tag ("'''") that is *odd* in the list of quote tokens.
786 # This means that the bold token in position 2 (0-indexed) gets converted by
787 # parsoid, but doesn't get changed by the PHP parser.
789 Italics and bold: other quote tests: (3,2,3,3) (php)
793 '''this is about ''foo'''s family'''
795 <p>'<i>this is about </i>foo<b>s family</b>
798 # This is the output the Parsoid team believes to be correct.
800 Italics and bold: other quote tests: (3,2,3,3) (parsoid)
804 '''this is about ''foo'''s family'''
806 <p><b>this is about <i>foo'</i>s family</b>
812 Italics and bold: other quote tests: (3,(2,2),3)
814 '''this is about ''foo's'' family'''
816 <p><b>this is about <i>foo's</i> family</b>
822 Italicized possessive
824 The ''[[Main Page]]'''s talk page.
826 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
831 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
832 (Requires tidy for PHP parser output to be fixed up)
834 parsoid=wt2html,wt2wt
842 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
843 <td><i>a</i></td><td><i>b</i></td></tr>
852 Non-html5 tags should be accepted
854 <center>''foo''</center>
857 <strike>''foo''</strike>
860 <center><i>foo</i></center>
861 <p><big><i>foo</i></big>
862 <font><i>foo</i></font>
863 <strike><i>foo</i></strike>
869 <wbr> isn't (yet) valid wikitext (bug 52468)
877 # <strike> is HTML4, <s> is HTML4/5.
879 <s> or <strike> for strikethrough
881 <strike>strike</strike>
885 <p><strike>strike</strike>
891 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
893 <b→> doesn't work! </b>
895 <bä> doesn't work! </b>
897 <boo> works fine </b>
905 <p><b→> doesn't work! </b>
906 </p><p><bä> doesn't work! </b>
907 </p><p><boo> works fine </b>
908 </p><p><s.foo>foo</s>
909 </p><p><s.foo>s.foo</s.foo>
910 </p><p><sub-ID#1>
915 ### Special characters
919 Bare pipe character (bug 52363)
928 Bare pipe character from a template (bug 52363)
937 ### <nowiki> test cases
941 <nowiki> unordered list
943 <nowiki>* This is not an unordered list item.</nowiki>
945 <p>* This is not an unordered list item.
952 <nowiki>Lorem ipsum dolor
973 :There is not nowiki.
974 :There is <nowiki>nowiki</nowiki>.
976 #There is not nowiki.
977 #There is <nowiki>nowiki</nowiki>.
979 *There is not nowiki.
980 *There is <nowiki>nowiki</nowiki>.
982 <dl><dd>There is not nowiki.
983 </dd><dd>There is nowiki.
985 <ol><li>There is not nowiki.
986 </li><li>There is nowiki.
988 <ul><li>There is not nowiki.
989 </li><li>There is nowiki.
995 Entities inside <nowiki>
997 <nowiki><</nowiki>
1004 Entities inside template parameters
1010 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}'>–</span>
1018 Comments and Indent-Pre
1020 <!-- comment 1 --> asdf
1022 <!-- comment 1 --> asdf
1025 <!-- comment 1 --> asdf
1026 <!-- comment 2 -->xyz
1028 <!-- comment 1 --> asdf
1029 <!-- comment 2 --> xyz
1085 asdf<!-- comment 1 -->jkl
1095 <!-- foo --> b <!-- bar -->
1109 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1115 Comment semantics and delimiters
1117 <!-- --><!----><!-----><!------>
1123 Comment semantics and delimiters, redux
1125 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1126 -- foo -- funky huh? ... -->
1132 Comment semantics and delimiters: directors cut
1134 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1135 everything starting with < followed by !-- until the first -- and > we see,
1136 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1144 Comment semantics: nesting
1146 <!--<!-- no, we're not going to do anything fancy here -->-->
1153 Comment semantics: unclosed comment at end
1155 <!--This comment will run out to the end of the document
1161 Comment in template title
1170 Comment on its own line post-expand
1182 Comment on its own line post-expand with non-significant whitespace
1194 ### paragraph wrapping tests
1208 Block tag on one line
1220 Block tag on both lines
1232 Multiple lines without block tags
1250 Empty lines between lines with block tags
1280 ### Preformatted text
1289 And a [[Main Page|link]]
1295 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1300 Ident preformatting with inline content
1311 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1328 Regression with preformatted in <center>
1341 # Expected output in the following test is not really expected (there should be
1342 # <pre> in the output) -- it's only testing for well-formedness.
1344 Bug 6200: Preformatted in <blockquote>
1357 <pre> with attributes (bug 3202)
1359 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1361 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1366 <pre> with width attribute (bug 3202)
1368 <pre width="8">Narrow screen goodies</pre>
1370 <pre width="8">Narrow screen goodies</pre>
1375 <pre> with forbidden attribute (bug 3202)
1377 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1379 <pre width="8">Narrow screen goodies</pre>
1384 Entities inside <pre>
1393 <pre> with forbidden attribute values (bug 3202)
1395 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1397 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1402 <nowiki> inside <pre> (bug 13238)
1410 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1418 <pre><nowiki>Foo</nowiki></pre>
1423 <nowiki> and <pre> preference (first one wins)
1454 </pre> inside nowiki
1456 <nowiki></pre></nowiki>
1463 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1471 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1481 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1493 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1514 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1518 {{echo| foo}}{{echo| bar}}
1523 {{echo|<!--cmt--> foo}}
1525 <!--cmt-->{{echo| foo}}
1527 {{echo|{{echo| }}bar}}
1545 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1582 Templates: Single-line variant of parameter whitespace stripping test
1588 {{echo|{{echo| a}}}}
1590 {{echo|1={{echo| a}}}}
1603 Templates: Strip whitespace from named parameters, but not positional ones
1631 Templates: Dont strip whitespace from whitespace/comment-only arguments
1635 {{echo| <!--cmt--> }}
1642 Templates: Parsoid parameter escaping test 1
1646 {{echo|[foo]|{{echo|[bar]}}}}
1648 <p about="#mwt1" typeof="mw:Transclusion"
1649 data-mw="{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}">[foo]</p>
1653 Parsoid: Pipes in external links in template parameter
1657 {{echo|[{{echo|http://example.com}} link]}}
1659 <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>
1663 Parsoid: pipe in transclusion parameter
1667 {{echo|http://foo.com/a|b}}
1669 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1670 typeof="mw:Transclusion"
1671 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>
1675 Parsoid: Pipe in external link target and content in template parameter
1677 parsoid=html2wt,wt2wt
1679 {{echo|[http://foo.com/a|b a|b]}}
1681 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1682 typeof="mw:Transclusion"
1683 data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},
1684 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}'>a|b</a></p>
1688 Templates: Dont escape already nowiki-escaped text in template parameters
1690 parsoid=html2wt,wt2wt
1692 {{echo|foo<nowiki>|</nowiki>bar}}
1693 {{echo|<nowiki><div></nowiki>}}
1694 {{echo|<nowiki></nowiki>}}
1696 <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>
1697 <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>
1698 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}'></span>
1703 ### Parsoid-centric tests for testing RT edge cases for pre
1707 1a. Indent-Pre and Comments
1720 1b. Indent-Pre and Comments
1733 1c. Indent-Pre and Comments
1746 2a. Indent-Pre and tables
1767 2b. Indent-Pre and tables
1783 2c. Indent-Pre and tables (bug 42252)
1800 3a. Indent-Pre and block tags (single-line html)
1808 <pre><span> foo </span>
1813 3b. Indent-Pre and block tags (pre-content on separate line)
1865 4. Multiple spaces at start-of-line
1884 5. White-space in indent-pre
1885 NOTE: the white-space char on 2nd line is significant
1898 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
1902 HTML-pre: 1. embedded newlines
1938 HTML-pre: 2: indented text
1951 HTML-pre: 3: other wikitext
1972 ### Definition lists
1979 <dl><dt> name </dt><dd> Definition
1985 Definition list for indentation only
1989 <dl><dd> Indented text
1995 Definition list with no space
1999 <dl><dt>name</dt><dd>Definition
2005 Definition list with URL link
2007 ; http://example.com/ : definition
2009 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt><dd> definition
2015 Definition list with bracketed URL link
2017 ;[http://www.example.com/ Example]:Something about it
2019 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt><dd>Something about it
2025 Definition list with wikilink containing colon
2027 ; [[Help:FAQ]]: The least-read page on Wikipedia
2029 <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
2034 # At Brion's and JeLuF's insistence... :)
2036 Definition list with news link containing colon
2038 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2040 <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!
2046 Malformed definition list with colon
2048 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2050 <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
2056 Definition lists: colon in external link text
2058 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2060 <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
2066 Definition lists: colon in HTML attribute
2068 ;<b style="display: inline">bold</b>
2070 <dl><dt><b style="display: inline">bold</b>
2076 Definition lists: self-closed tag
2078 ;one<br/>two : two-line fun
2080 <dl><dt>one<br />two </dt><dd> two-line fun
2086 Bug 11748: Literal closing tags
2090 <dd>test test test test test</dd>
2092 <dd>test test test test test</dd>
2097 <dd>test test test test test</dd>
2099 <dd>test test test test test</dd>
2105 Definition and unordered list using wiki syntax nested in unordered list using html tags.
2108 ; term : description
2114 <dl><dt> term </dt><dd> description
2125 Definition list with empty definition and following paragraph
2130 <dl><dt> term</dt><dd>
2137 Nested definition lists using html syntax
2154 Definition Lists: No nesting: Multiple dd's
2168 Definition Lists: Indentation: Regular
2184 Definition Lists: Indentation: Missing 1st level
2198 Definition Lists: Indentation: Multi-level indent
2202 <dl><dd><dl><dd><dl><dd>i3
2210 Definition Lists: Hacky use to indent tables
2217 should be left alone
2219 <dl><dd><dl><dd><table>
2224 </td></tr></table></dd></dl></dd></dl>
2226 should be left alone
2229 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
2230 ## as an empty dt item. It also ignores all but the last ";" when followed
2231 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
2232 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
2235 ## Ex: ";;t2 ::d2" is transformed into:
2247 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
2248 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
2259 ## All Parsoid only definition list tests have this difference.
2261 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
2262 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
2265 Table / list interaction: indented table with lists in table contents
2287 </td></tr></table></dd></dl>
2292 Table / list interaction: lists nested in tables nested in indented lists
2317 </td></tr></table></dd></dl>
2325 Definition Lists: Nesting: Multi-level (Parsoid only)
2355 Definition Lists: Nesting: Test 2 (Parsoid only)
2375 Definition Lists: Nesting: Test 3 (Parsoid only)
2403 Definition Lists: Nesting: Test 4
2408 <dl><dd><dl><dd><dl><dt>t3
2417 ## The Parsoid team believes the following three test exposes a
2418 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
2419 ## wrong to close the <dl> after the <dt> containing the <ul>.)
2421 Definition Lists: Mixed Lists: Test 1 (php)
2429 <dl><dd><dl><dt><ul><li> foo
2439 Definition Lists: Mixed Lists: Test 1 (parsoid)
2447 <dl><dd><dl><dt><ul><li> foo
2448 </li></ul></dt><dd><ul><li> bar
2449 </li></ul></dd><dt> baz</dt></dl></dd></dl>
2453 Definition Lists: Mixed Lists: Test 2
2467 Definition Lists: Mixed Lists: Test 3
2472 <ul><li><dl><dd><dl><dd><dl><dd> d1
2483 Definition Lists: Mixed Lists: Test 4
2488 <ul><li><dl><dt>d1 </dt><dd>d2
2489 </dd><dt>d3 </dt><dd>d4
2497 Definition Lists: Mixed Lists: Test 5
2512 Definition Lists: Mixed Lists: Test 6
2517 <ol><li><ul><li><dl><dd>d1
2529 Definition Lists: Mixed Lists: Test 7
2543 Definition Lists: Mixed Lists: Test 8
2559 Definition Lists: Mixed Lists: Test 9
2563 <ul><li><dl><dt>foo </dt><dd>bar
2571 Definition Lists: Mixed Lists: Test 10
2575 <ul><li><ol><li><dl><dt>foo </dt><dd>bar
2582 # The Parsoid team disagrees with the PHP parser's seemingly-random
2583 # rules regarding dd/dt on the next two tests. Parsoid is more
2584 # consistent, and recognizes the shared nesting and keeps the
2585 # still-open tags around until the nesting is complete.
2588 Definition Lists: Mixed Lists: Test 11 (php)
2595 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt><dd><ul><li><dl><dt><dl><dt>bar
2600 <dl><dt>boo </dt><dd>baz
2609 Definition Lists: Mixed Lists: Test 11 (parsoid)
2631 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2632 <dd data-parsoid='{"stx":"row"}'>bar</dd></dl></dt></dl></li></ul></dt>
2633 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2634 <dd data-parsoid='{"stx":"row"}'>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
2639 Definition Lists: Weird Ones: Test 1 (php)
2643 *#;*::;; foo : bar (who uses this?)
2645 <ul><li><ol><li><dl><dt> foo </dt><dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)
2657 Definition Lists: Weird Ones: Test 1 (parsoid)
2661 *#;*::;; foo : bar (who uses this?)
2678 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
2679 <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>
2686 External links: non-bracketed
2688 Non-bracketed: http://example.com
2690 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2695 External links: numbered
2697 Numbered: [http://example.com]
2698 Numbered: [http://example.net]
2699 Numbered: [http://example.com]
2701 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
2702 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
2703 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
2708 External links: specified text
2710 Specified text: [http://example.com link]
2712 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
2717 External links: trail
2719 Linktrails should not work for external links: [http://example.com link]s
2721 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
2726 External links: dollar sign in URL
2728 http://example.com/1$2345
2730 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
2735 External links: dollar sign in URL (named)
2737 [http://example.com/1$2345]
2739 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
2744 External links: open square bracket forbidden in URL (bug 4377)
2746 http://example.com/1[2345
2748 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
2753 External links: open square bracket forbidden in URL (named) (bug 4377)
2755 [http://example.com/1[2345]
2757 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
2762 External links: nowiki in URL link text (bug 6230)
2764 [http://example.com/ <nowiki>''example site''</nowiki>]
2766 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
2771 External links: newline forbidden in text (bug 6230 regression check)
2773 [http://example.com/ first
2776 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
2782 External links: Pipe char between url and text
2784 [http://example.com | link]
2786 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
2791 External links: protocol-relative URL in brackets
2793 [//example.com/ Test]
2795 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
2800 External links: protocol-relative URL in brackets without text
2804 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
2809 External links: protocol-relative URL in free text is left alone
2813 <p>//example.com/Foo
2818 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
2820 foo//example.com/Foo
2822 <p>foo//example.com/Foo
2829 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2831 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2836 External image from https
2838 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2840 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2845 External image (when not allowed)
2847 wgAllowExternalImages=0
2849 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2851 <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>
2856 Link to non-http image, no img tag
2858 Link to non-http image, no img tag: ftp://example.com/test.jpg
2860 <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>
2865 External links: terminating separator
2867 Terminating separator: http://example.com/thing,
2869 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
2874 External links: intervening separator
2876 Intervening separator: http://example.com/1,2,3
2878 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
2883 External links: old bug with URL in query
2885 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
2887 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
2892 External links: old URL-in-URL bug, mixed protocols
2894 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
2896 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
2901 External links: URL in text
2903 URL in text: [http://example.com http://example.com]
2905 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2910 External links: Clickable images
2912 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
2914 <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>
2919 External links: raw ampersand
2921 Old & use: http://x&y
2923 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2928 External links: encoded ampersand
2930 Old & use: http://x&y
2932 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2937 External links: encoded equals (bug 6102)
2939 http://example.com/?foo=bar
2941 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
2946 External links: [raw ampersand]
2948 Old & use: [http://x&y]
2950 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2955 External links: [encoded ampersand]
2957 Old & use: [http://x&y]
2959 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2964 External links: [encoded equals] (bug 6102)
2966 [http://example.com/?foo=bar]
2968 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
2973 External links: [IDN ignored character reference in hostname; strip it right off]
2975 [http://e‌xample.com/]
2977 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
2981 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
2982 # Where an external link could easily circumvent the sanitization of the text of
2983 # a link like this (where an IDN-ignore character is in the URL somewhere), this
2984 # test demands a higher standard. That's a bit strange.
2988 # http://example.com -> [http://example.com|http://example.com]
2989 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
2991 # The first example is sanitized, but the second is not. Any security benefits
2992 # from this production are trivial to circumvent. Either remove this test and
2993 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
2994 # the test accordingly.
2999 External links: IDN ignored character reference in hostname; strip it right off
3001 http://e‌xample.com/
3003 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
3008 External links: www.jpeg.org (bug 554)
3012 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
3017 External links: URL within URL (original bug 2)
3019 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
3021 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
3026 BUG 361: URL inside bracketed URL
3028 [http://www.example.com/foo http://www.example.com/bar]
3030 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
3035 BUG 361: URL within URL, not bracketed
3037 http://www.example.com/foo?=http://www.example.com/bar
3039 <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>
3044 BUG 289: ">"-token in URL-tail
3046 http://www.example.com/<hello>
3048 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
3053 BUG 289: literal ">"-token in URL-tail
3055 http://www.example.com/<b>html</b>
3057 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
3062 BUG 289: ">"-token in bracketed URL
3064 [http://www.example.com/<hello> stuff]
3066 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
3071 BUG 289: literal ">"-token in bracketed URL
3073 [http://www.example.com/<b>html</b> stuff]
3075 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
3080 BUG 289: literal double quote at end of URL
3082 http://www.example.com/"hello"
3084 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
3089 BUG 289: literal double quote in bracketed URL
3091 [http://www.example.com/"hello" stuff]
3093 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
3098 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
3100 [http://www.example.com test]
3102 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
3107 External links: link text with spaces
3109 [http://www.example.com a b c]
3110 [http://www.example.com ''a'' ''b'']
3112 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
3113 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
3118 External links: wiki links within external link (Bug 3695)
3120 [http://example.com [[wikilink]] embedded in ext link]
3122 <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>
3127 BUG 787: Links with one slash after the url protocol are invalid
3131 [http:/example.com title]
3133 <p>http:/example.com
3134 </p><p>[http:/example.com title]
3139 Bracketed external links with template-generated invalid target
3141 [{{echo|http:/example.com}} title]
3143 <p>[http:/example.com title]
3148 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
3150 ''[http://example.com text'']
3151 [http://example.com '''text]'''
3152 ''Something [http://example.com in italic'']
3153 ''Something [http://example.com mixed''''', even bold]'''
3154 '''''Now [http://example.com both''''']
3156 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
3157 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
3158 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
3159 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
3160 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
3166 Bug 4781: %26 in URL
3168 http://www.example.com/?title=AT%26T
3170 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
3174 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
3175 # % is actually legal in HTML5. Any change in output would need testing though.
3177 Bug 4781, 5267: %25 in URL
3179 http://www.example.com/?title=100%25_Bran
3181 <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>
3186 Bug 4781, 5267: %28, %29 in URL
3188 http://www.example.com/?title=Ben-Hur_%281959_film%29
3190 <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>
3196 Bug 4781: %26 in autonumber URL
3198 [http://www.example.com/?title=AT%26T]
3200 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
3205 Bug 4781, 5267: %26 in autonumber URL
3207 [http://www.example.com/?title=100%25_Bran]
3209 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
3214 Bug 4781, 5267: %28, %29 in autonumber URL
3216 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
3218 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
3224 Bug 4781: %26 in bracketed URL
3226 [http://www.example.com/?title=AT%26T link]
3228 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
3233 Bug 4781, 5267: %26 in bracketed URL
3235 [http://www.example.com/?title=100%25_Bran link]
3237 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
3242 Bug 4781, 5267: %28, %29 in bracketed URL
3244 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
3246 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
3251 External link containing double-single-quotes in text '' (bug 4598 sanity check)
3253 Some [http://example.com/ pretty ''italics'' and stuff]!
3255 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
3260 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
3262 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
3264 <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>
3269 External link containing double-single-quotes with no space separating the url from text in italics
3271 [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]].]
3273 <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>
3278 External link with comments in link text
3280 [http://www.google.com Google <!-- comment -->]
3282 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
3287 URL-encoding in URL functions (single parameter)
3289 {{localurl:Some page|amp=&}}
3291 <p>/index.php?title=Some_page&amp=&
3296 URL-encoding in URL functions (multiple parameters)
3298 {{localurl:Some page|q=?&=&}}
3300 <p>/index.php?title=Some_page&q=?&amp=&
3307 http://example.com/index.php?foozoid%5B%5D=bar
3309 http://example.com/index.php?foozoid[]=bar
3311 <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>
3312 </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>
3317 IPv6 urls (bug 21261)
3321 http://[2404:130:0:1000::187:2]/index.php
3323 <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>
3328 Non-extlinks in brackets
3337 [{{echo|foo}} ''bar'']
3338 [{{echo|foo}}l's] errand
3339 [{{echo|foo}}l's errand]
3341 [url=http://example.com]
3354 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
3359 Parsoid: Percent encoding in external links
3363 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
3365 <p><a rel="mw:ExtLink"
3366 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
3370 Parsoid: use url link syntax for links where the content is equal the link
3377 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
3387 Normal text. '''Bold text.''' Normal text. ''Italic text.''
3389 Normal text. '''''Bold italic text.''''' Normal text.
3391 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
3392 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
3398 Unclosed and unmatched quotes (php)
3402 '''''Bold italic text '''with bold deactivated''' in between.'''''
3404 '''''Bold italic text ''with italic deactivated'' in between.'''''
3408 ..spanning two paragraphs (should not work).'''
3410 '''Bold tag left open
3412 ''Italic tag left open
3416 <!-- Unmatching number of opening, closing tags: -->
3417 '''This year''''s election ''should'' beat '''last year''''s.
3419 ''Tom'''s car is bigger than ''Susan'''s.
3421 Plain ''italic'''s plain
3423 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3424 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
3425 </p><p><b>Bold text..</b>
3426 </p><p>..spanning two paragraphs (should not work).
3427 </p><p><b>Bold tag left open</b>
3428 </p><p><i>Italic tag left open</i>
3430 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3431 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3432 </p><p>Plain <i>italic'</i>s plain
3435 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
3436 # parser strips. The wikitext contains just the first half of the bold
3437 # quote pair. (There's also a case where Parsoid nests <b> and <i>
3438 # differently than the PHP parser.)
3440 Unclosed and unmatched quotes (parsoid)
3444 '''''Bold italic text '''with bold deactivated''' in between.'''''
3446 '''''Bold italic text ''with italic deactivated'' in between.'''''
3450 ..spanning two paragraphs (should not work).'''
3452 '''Bold tag left open
3454 ''Italic tag left open
3458 <!-- Unmatching number of opening, closing tags: -->
3459 '''This year''''s election ''should'' beat '''last year''''s.
3461 ''Tom'''s car is bigger than ''Susan'''s.
3463 Plain ''italic'''s plain
3465 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3466 </p><p><i><b>Bold italic text </b></i><b>with italic deactivated<i> in between.</i></b>
3467 </p><p><b>Bold text..</b>
3468 </p><p>..spanning two paragraphs (should not work).<b></b>
3469 </p><p><b>Bold tag left open</b>
3470 </p><p><i>Italic tag left open</i>
3472 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3473 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3474 </p><p>Plain <i>italic'</i>s plain
3481 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
3484 # This should not produce <table></table> as <table><tr><td></td></tr></table>
3485 # is the bare minimum required by the spec, see:
3486 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
3488 A table with no data. (php)
3495 # Parsoid team replies: empty table tags are legal in HTML5
3497 A table with no data. (parsoid)
3506 # A table with nothing but a caption is invalid XHTML, we might want to render
3507 # this as <p>caption</p>
3509 A table with nothing but a caption (php)
3519 </caption><tr><td></td></tr></table>
3522 # Parsoid team replies: table with only a caption is legal in HTML5
3524 A table with nothing but a caption (parsoid)
3532 <table><caption> caption</caption></table>
3536 A table with caption with default-spaced attributes and a table row
3539 |+ style="color: red;" | caption1
3545 <caption style="color: red;"> caption1
3554 A table with captions with non-default spaced attributes and a table row
3557 |+style="color: red;"|caption2
3558 |+ style="color: red;"| caption3
3564 <caption style="color: red;">caption2
3566 <caption style="color: red;"> caption3
3575 Table td-cell syntax variations
3579 | foo bar foo || baz
3580 | style='color:red;' | baz
3581 | style='color:red;' || baz
3588 <td> foo bar foo </td>
3591 <td style="color:red;"> baz
3593 <td> style='color:red;' </td>
3621 Simple table but with multiple dashes for row wikitext
3639 Multiplication table
3641 {| border="1" cellpadding="2"
3642 |+Multiplication table
3644 ! × !! 1 !! 2 !! 3
3662 <table border="1" cellpadding="2">
3663 <caption>Multiplication table
3710 Accept "||" in table headings
3725 Accept "||" in indented table headings
3735 </th></tr></table></dd></dl>
3740 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
3757 Accept "| !" at start of line in tables (ignore !-attribute)
3761 | !style="color:red" | bar
3773 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 +/-
3777 |style='color:red;'|+1
3778 |style='color:blue;'|-1
3790 <td style="color:red;">+1
3792 <td style="color:blue;">-1
3816 |rowspan=2| Cell 2, row 1 (and 2)
3827 <td rowspan="2"> Cell 2, row 1 (and 2)
3845 {| bgcolor=#ABCDEF border=2
3850 |the original table again
3858 <table bgcolor="#ABCDEF" border="2">
3866 <td>the original table again
3872 Invalid attributes in table cell (bug 1830)
3887 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
3890 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
3894 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
3895 <td>]" onmouseover="alert(document.cookie)">test
3904 Indented table markup mixed with indented pre content (proposed in bug 6200)
3909 Text that should be rendered preformatted
3917 <pre>Text that should be rendered preformatted
3926 Template-generated table cell attributes and cell content
3934 <td style="color: red"> Foo
3940 Template-generated table cell attributes and cell content (2)
3943 |align=center {{table_attribs}}
3948 <td align="center" style="color: red"> Foo
3954 Template-generated table cell attributes and cell content (3)
3957 |align=center {{table_cells}}
3962 <td align="center" style="color: red"> Foo </td>
3970 Table with row followed by newlines and table heading
3988 Table with empty line following the start tag
4005 # FIXME: Preserve the attribute properly (with an empty string as value) in
4006 # the PHP parser. Parsoid implements the behavior below.
4008 Table attributes with empty value
4020 </td></tr></tbody></table>
4025 Wikitext table with a lot of comments
4048 Wikitext table with double-line table cell
4065 Table cell with a single comment
4081 # The expected HTML structure in this test is debatable. The PHP parser does
4082 # not parse this kind of table at all. The main focus for Parsoid is on
4083 # round-tripping, so this output is ok for now. TODO: revisit!
4085 Wikitext table with html-syntax row (Parsoid)
4097 <td>foo</td></tr></tbody></table>
4101 Implicit <td> after a |-
4102 (PHP parser relies on Tidy to add the missing <td> tags)
4104 parsoid=wt2html,wt2wt
4117 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
4118 (PHP parser relies on Tidy to add the missing <td> tags)
4120 parsoid=wt2html,wt2wt
4132 <tr><td><pre>a</pre></td></tr>
4133 <tr><td> b</td></tr>
4139 Lists should be recognized in an implicit <td> context
4140 (PHP parser relies on Tidy to add the missing <td> tags)
4142 parsoid=wt2html,wt2wt
4151 <td><ul><li>a</li></ul></td>
4160 Plain link, capitalized
4164 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
4169 Plain link, uncapitalized
4173 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
4180 [[Main Page|The Main Page]]
4182 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4187 Piped link with comment in link text
4189 [[Main Page|The Main<!--front--> Page]]
4191 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4200 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
4205 Broken link with fragment
4207 [[Zigzagzogzagzig#zug]]
4209 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
4214 Special page link with fragment
4216 [[Special:Version#anchor]]
4218 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
4223 Nonexistent special page link with fragment
4225 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
4227 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
4234 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
4236 <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>
4243 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
4245 <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>!!!
4256 Bug 43661: Piped links with identical prefixes
4258 [[prefixed article|prefixed articles with spaces]]
4260 [[prefixed article|prefixed articlesaoeu]]
4262 [[Main Page|Main Page test]]
4264 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
4265 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
4266 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
4272 Link with HTML entity in suffix / tail
4274 [[Main Page]]", [[Main Page]]a
4276 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
4281 Link with 3 brackets
4290 Piped link with 3 brackets
4292 [[[main page|the main page]]]
4294 <p>[[[main page|the main page]]]
4299 Link with multiple pipes
4301 [[Main Page|The|Main|Page]]
4303 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
4310 [[Talk:Parser testing]], [[Meta:Disclaimers]]
4312 <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>
4317 Piped link to namespace
4319 [[Meta:Disclaimers|The disclaimers]]
4321 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
4328 [[Usually caused by a typo (oops}]]
4330 <p>[[Usually caused by a typo (oops}]]
4335 Link containing % (not as a hex sequence)
4339 <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>
4344 Link containing % as a single hex sequence interpreted to char
4348 <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>
4353 Link containing % as a double hex sequence interpreted to hex sequence
4357 <p>[[7%2525 Solution]]
4362 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
4363 Example for such a section: == < ==
4365 [[%23%3c]][[%23%3e]]
4367 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
4372 Link containing "<#" and ">#" as a hex sequences
4374 [[%3c%23]][[%3e%23]]
4376 <p>[[%3c%23]][[%3e%23]]
4381 Link containing an equals sign
4383 [[Special:BookSources/isbn=4-00-026157-6]]
4385 <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>
4392 Just a test of an article title containing a tilde.
4395 # note that links containing signatures, like [[Foo~~~~]], are
4396 # massaged by the pre-save transform (PST) and so the tildes are never
4397 # seen by the parser.
4399 Link containing a tilde
4403 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
4408 Link containing double-single-quotes '' (bug 4598)
4410 [[Lista d''e paise d''o munno]]
4412 <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>
4417 Link containing double-single-quotes '' in text (bug 4598 sanity check)
4419 Some [[Link|pretty ''italics'' and stuff]]!
4421 <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>!
4426 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
4428 ''Some [[Link|pretty ''italics'' and stuff]]!
4430 <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>
4435 Link with double quotes in title part (literal) and alternate part (interpreted)
4437 [[File:Denys Savchenko ''Pentecoste''.jpg]]
4441 [[''Pentecoste''|Pentecoste]]
4443 [[''Pentecoste''|''Pentecoste'']]
4445 <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>
4446 </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>
4447 </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>
4448 </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>
4453 Broken image links with HTML captions (bug 39700)
4455 [[File:Nonexistent|<script></script>]]
4456 [[File:Nonexistent|100px|<script></script>]]
4457 [[File:Nonexistent|<]]
4458 [[File:Nonexistent|a<i>b</i>c]]
4460 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4461 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4462 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
4463 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
4470 [[http://www.example.com]]
4472 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
4477 Plain link to URL with link text
4479 [[http://www.example.com Link text]]
4481 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
4486 Plain link to protocol-relative URL
4488 [[//www.example.com]]
4490 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
4495 Plain link to protocol-relative URL with link text
4497 [[//www.example.com Link text]]
4499 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
4504 Plain link to page with question mark in title
4510 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
4511 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
4516 # I'm fairly sure the expected result here is wrong.
4517 # We want these to be URL links, not pseudo-pages with URLs for titles....
4518 # However the current output is also pretty screwy.
4521 # I'm changing it to match the current output--it arguably makes more
4522 # sense in the light of the test above. Old expected result was:
4523 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
4525 # But I think this test is bordering on "garbage in, garbage out" anyway.
4530 Piped link to URL: [[http://www.example.com|an example URL]]
4532 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
4537 BUG 2: [[page|http://url/]] should link to page, not http://url/
4539 [[Main Page|http://url/]]
4541 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
4546 BUG 337: Escaped self-links should be bold
4550 [[Bug462]] [[Bug462]]
4552 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
4557 Self-link to section should not be bold
4561 [[Main Page#section]]
4563 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
4574 Self-link to numeric title
4580 <p><strong class="selflink">0</strong>
4585 Link to numeric-equivalent title
4591 <p><a href="/wiki/00" title="00">00</a>
4596 <nowiki> inside a link
4598 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
4600 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
4605 Non-breaking spaces in title
4607 [[ Main Page ]]
4609 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
4614 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
4620 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
4625 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
4631 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
4636 Internal link with en linktrail: no apostrophes (bug 27473)
4642 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
4647 Internal link with ca linktrail with apostrophes (bug 27473)
4653 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
4658 Internal link with kaa linktrail with apostrophes (bug 27473)
4664 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
4675 Internal link with is link prefix
4679 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
4681 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
4692 Internal link with is link trail and link prefix
4696 [[mótmælendatrú|xxx]]ar
4698 mótmælenda[[söfnuður]]
4699 mótmælenda[[söfnuður|söfnuðir]]
4700 mótmælenda[[söfnuður|söfnuðir]]xxx
4702 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
4703 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
4704 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
4705 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
4706 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
4711 Parsoid link trail escaping
4713 parsoid=html2wt,html2html
4717 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
4721 Parsoid link prefix escaping
4724 parsoid=html2wt,html2html
4726 Aðrir mótmælenda<nowiki/>[[söfnuður]]
4728 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
4732 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
4740 [http://wp.org ''foo'']
4742 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
4743 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
4744 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
4745 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
4750 ### Interwiki links (see maintenance/interwiki.sql)
4754 Inline interwiki link
4756 [[MeatBall:SoftSecurity]]
4758 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
4763 Inline interwiki link with empty title (bug 2372)
4767 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
4772 Interwiki link encoding conversion (bug 1636)
4774 *[[Wikipedia:ro:Olteniţa]]
4775 *[[Wikipedia:ro:Olteniţa]]
4777 <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>
4778 </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>
4784 Interwiki link with fragment (bug 2130)
4786 [[MeatBall:SoftSecurity#foo]]
4788 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
4803 Double interlanguage link
4814 Interlanguage link, with prefix links
4826 Double interlanguage link, with prefix links (bug 8897)
4839 Parsoid-specific test: Wikilinks with should RT properly
4845 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
4850 Parsoid: handle constructor well
4858 <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>
4861 <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>
4865 ## Redirects, Parsoid-only
4868 Simple redirect to page
4872 #REDIRECT [[Main Page]]
4874 <link rel="mw:PageProp/redirect" href="./Main_Page">
4878 Redirect to category
4882 #REDIRECT [[Category:Foo]]
4884 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Foo">
4888 Redirect to category page
4890 parsoid=wt2html,html2html
4892 #REDIRECT [[:Category:Foo]]
4894 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
4898 Redirect to image page
4902 #REDIRECT [[File:Wiki.png]]
4904 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
4908 Redirect to language
4912 #REDIRECT [[en:File:Wiki.png]]
4914 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
4918 Redirect to interwiki
4922 #REDIRECT [[meatball:File:Wiki.png]]
4924 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
4941 Broken br tag sanitization
4951 # TODO: Fix html2html mode (bug 51055)!
4953 Parsoid: Broken br tag recognition
4963 Incorrecly removing closing slashes from correctly formed XHTML
4965 <br style="clear:both;" />
4967 <p><br style="clear:both;" />
4972 Failing to transform badly formed HTML into correct XHTML
4974 <br style="clear: left;">
4975 <br style="clear: right;">
4976 <br style="clear: both;">
4978 <p><br style="clear: left;" />
4979 <br style="clear: right;" />
4980 <br style="clear: both;" />
4985 Handling html with a div self-closing tag
4994 <p><div title />
4998 <p><div title=bar />
4999 <div title=bar/>
5001 <div title="bar/"></div>
5007 Handling html with a br self-closing tag
5016 <p><br title="title" />
5017 <br title="title" />
5026 Horizontal ruler (should it add that extra space?)
5040 Horizontal ruler -- 4+ dashes render hr
5049 Horizontal ruler -- eats additional dashes on the same line
5058 Horizontal ruler -- does not collapse dashes on consecutive lines
5069 Horizontal ruler -- <4 dashes render as plain text
5078 Horizontal ruler -- Supports content following dashes on same line
5087 ### Block-level elements
5110 <ol><li>Numbered list
5127 ***#Number on level 4
5129 **#Number on level 3
5130 **#Number on level 3
5134 #** Level 3, but ordered
5137 <ol><li> with numbers
5139 <ul><li> and bullets
5141 <ol><li> and numbers
5143 </li><li>bullets again
5144 <ul><li>bullet level 2
5145 <ul><li>bullet level 3
5146 <ol><li>Number on level 4
5149 </li><li>bullet level 2
5150 <ol><li>Number on level 3
5151 </li><li>Number on level 3
5154 <ol><li>number level 2
5157 <ul><li><ul><li> Level 3
5161 <ol><li><ul><li><ul><li> Level 3, but ordered
5195 Nested lists 3 (first element empty)
5208 Nested lists 4 (first element empty)
5221 Nested lists 5 (both elements empty)
5234 Nested lists 6 (both elements empty)
5247 Nested lists 7 (skip initial nesting levels)
5251 <ul><li><ul><li><ul><li> foo
5259 Nested lists 8 (multiple nesting transitions)
5267 <ul><li><ul><li> bar
5277 1. Lists with start-of-line-transparent tokens before bullets: Comments
5291 2. Lists with start-of-line-transparent tokens before bullets: Template close
5303 List items are not parsed correctly following a <pre> block (bug 785)
5309 <ul><li> <pre>foo</pre>
5310 </li><li> <pre>bar</pre>
5317 List items from template
5328 * notSOL{{inner list}}
5347 List interrupted by empty line or heading
5357 <ul><li><ul><li> bar
5360 <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>
5361 <ul><li> Another list item
5367 Multiple list tags generated by templates
5382 Single-comment whitespace lines dont break lists, but multi-comment whitespace lines do
5385 <!--This line will NOT split the list-->
5387 <!--This line will NOT split the list either-->
5389 <!--foo--> <!--This line with more than 1 comment will split the list-->
5403 (Cannot test this with PHP parser since it relies on Tidy for the hack)
5405 parsoid=wt2html,wt2wt
5409 * {{echo|<li>templated li-hack}}
5410 * <!--foo--> <li> unsupported li-hack with preceding comments
5413 <li><li>not a li-hack
5419 <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>
5420 <li> <!--foo--> </li><li> li-hack with preceding comments</li></ul>
5423 <li></li><li>not a li-hack
5429 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
5440 <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>
5443 # ------------------------------------------------------------------------
5444 # The next set of tests are about Parsoid's ability to handle badly nested
5445 # tags (parse, minimize scope of fixup, and roundtrip back)
5446 # ------------------------------------------------------------------------
5449 Unbalanced closing block tags break a list
5450 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5460 </li></ul></div><div>
5466 Unbalanced closing non-block tags don't break a list
5467 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5477 <ul><li>a<span></span>
5483 Unclosed formatting tags that straddle lists are closed and reopened
5484 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
5492 </li><li> <s> b </s>
5497 List embedded in a non-block tag
5498 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
5506 <p><small></small></p>
5512 <p><small></small></p>
5520 Magic Word: {{CURRENTDAY}}
5529 Magic Word: {{CURRENTDAY2}}
5538 Magic Word: {{CURRENTDAYNAME}}
5547 Magic Word: {{CURRENTDOW}}
5556 Magic Word: {{CURRENTMONTH}}
5565 Magic Word: {{CURRENTMONTHABBREV}}
5567 {{CURRENTMONTHABBREV}}
5574 Magic Word: {{CURRENTMONTHNAME}}
5576 {{CURRENTMONTHNAME}}
5583 Magic Word: {{CURRENTMONTHNAMEGEN}}
5585 {{CURRENTMONTHNAMEGEN}}
5592 Magic Word: {{CURRENTTIME}}
5601 Magic Word: {{CURRENTWEEK}} (@bug 4594)
5610 Magic Word: {{CURRENTYEAR}}
5619 Magic Word: {{FULLPAGENAME}}
5621 title=[[User:Ævar Arnfjörð Bjarmason]]
5625 <p>User:Ævar Arnfjörð Bjarmason
5630 Magic Word: {{FULLPAGENAMEE}}
5632 title=[[User:Ævar Arnfjörð Bjarmason]]
5636 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
5641 Magic Word: {{NAMESPACE}}
5643 title=[[User:Ævar Arnfjörð Bjarmason]]
5652 Magic Word: {{NAMESPACEE}}
5654 title=[[User:Ævar Arnfjörð Bjarmason]]
5663 Magic Word: {{NAMESPACENUMBER}}
5665 title=[[User:Ævar Arnfjörð Bjarmason]]
5674 Magic Word: {{NUMBEROFFILES}}
5683 Magic Word: {{PAGENAME}}
5685 title=[[User:Ævar Arnfjörð Bjarmason]]
5689 <p>Ævar Arnfjörð Bjarmason
5694 Magic Word: {{PAGENAME}} with metacharacters
5696 title=[['foo & bar = baz']]
5700 <p><i>'foo & bar = baz'</i>
5705 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
5707 title=[[*RFC 1234 http://example.com/]]
5711 <p>*RFC 1234 http://example.com/
5716 Magic Word: {{PAGENAMEE}}
5718 title=[[User:Ævar Arnfjörð Bjarmason]]
5722 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
5727 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
5729 title=[[*RFC 1234 http://example.com/]]
5733 <p>*RFC_1234_http://example.com/
5738 Magic Word: {{REVISIONID}}
5747 Magic Word: {{SCRIPTPATH}}
5756 Magic Word: {{SERVER}}
5760 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
5765 Magic Word: {{SERVERNAME}}
5774 Magic Word: {{SITENAME}}
5783 Case-sensitive magic words, when cased differently, should just be template transclusions
5790 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
5791 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
5792 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
5793 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
5798 Case-insensitive magic words should still work with weird casing.
5808 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
5813 Namespace 1 {{ns:1}}
5822 Namespace 1 {{ns:01}}
5831 Namespace 0 {{ns:0}} (bug 4783)
5839 Namespace 0 {{ns:00}} (bug 4783)
5847 Namespace -1 {{ns:-1}}
5856 Namespace User {{ns:User}}
5865 Namespace User talk {{ns:User_talk}}
5874 Namespace User talk {{ns:uSeR tAlK}}
5883 Namespace File {{ns:File}}
5892 Namespace File {{ns:Image}}
5901 Namespace (lang=de) Benutzer {{ns:User}}
5912 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
5918 <p>Benutzer Diskussion
5926 {{urlencode:hi world?!}}
5927 {{urlencode:hi world?!|WIKI}}
5928 {{urlencode:hi world?!|PATH}}
5929 {{urlencode:hi world?!|QUERY}}
5942 Magic links: internal link to RFC (bug 479)
5946 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
5951 Magic links: RFC (bug 479)
5955 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
5960 Magic links: ISBN (bug 1937)
5964 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
5969 Magic links: PMID incorrectly converts space to underscore
5973 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
5982 Nonexistent template
5984 {{thistemplatedoesnotexist}}
5986 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
5991 Template with invalid target containing tags
5993 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5995 <p>{{a<b>b</b>|foo|a=b|a = b}}
6000 Template with invalid target containing unclosed tag
6002 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
6004 <p>{{a<b>|foo|a=b|a = b}}</b>
6011 This is a test template
6019 <p>This is a test template
6024 Template with explicit namespace
6028 <p>This is a test template
6036 This is a test template with parameter {{{param}}}
6042 {{paramtest|param=foo}}
6044 <p>This is a test template with parameter foo
6049 Template:paramtestnum
6055 Template unnamed parameter
6057 {{paramtestnum|Main Page|the main page}}
6059 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
6064 Template:templatesimple
6070 Template:templateredirect
6072 #redirect [[Template:templatesimple]]
6076 Template:templateasargtestnum
6082 Template:templateasargtest
6084 {{template{{{templ}}}}}
6088 Template:templateasargtest2
6094 Template with template name as unnamed argument
6096 {{templateasargtestnum|templatesimple}}
6103 Template with template name as argument
6105 {{templateasargtest|templ=simple}}
6112 Template with template name as argument (2)
6114 {{templateasargtest2|templ=templatesimple}}
6121 Template:templateasargtestdefault
6123 {{{{{templ|templatesimple}}}}}
6133 Template with default value
6135 {{templateasargtestdefault}}
6142 Template with default value (value set)
6144 {{templateasargtestdefault|templ=templa}}
6153 {{templateredirect}}
6160 Template with argument in separate line
6162 {{ templateasargtest |
6170 Template with complex template as argument
6173 param ={{ templateasargtest |
6176 <p>This is a test template with parameter (test)
6181 Template with thumb image (with link in description)
6184 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
6186 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>
6191 Template:complextemplate
6193 {{{1}}} {{paramtest|
6194 param ={{{param}}}}}
6198 Template with complex arguments
6201 param ={{ templateasargtest |
6202 templ = simple }}|[[Template:complextemplate|link]]}}
6204 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
6209 BUG 553: link with two variables in a piped link
6212 |[[{{{1}}}|{{{2}}}]]
6217 <td>[[{{{1}}}|{{{2}}}]]
6223 Magic variable as template parameter
6225 {{paramtest|param={{SITENAME}}}}
6227 <p>This is a test template with parameter MediaWiki
6234 [[{{{param}}}|link]]
6238 Template parameter as link source
6240 {{linktest|param=Main Page}}
6242 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
6247 Template-generated attribute string (k='v')
6249 <span {{attr_str|id|v1}}>bar</span>
6251 <p><span id="v1">bar</span>
6258 including another template, {{paramtest|param={{{arg}}}}}
6262 Template passing argument to another template
6264 {{paramtest2|arg='hmm'}}
6266 <p>including another template, This is a test template with parameter 'hmm'
6277 Template as link source
6281 [[{{linktest2}}|Main Page]]
6283 [[{{linktest2}}]]Page
6285 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6286 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6287 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
6305 Template infinite loop
6309 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
6314 Template from main namespace
6333 BUG 529: Template with table, not included at beginning of line
6352 BUG 523: Template shouldn't eat newline (or add an extra one before table)
6372 BUG 41: Template parameters shown as broken links
6381 Template with targets containing wikilinks
6385 {{[[{{echo|foo}}]]}}
6387 {{{{echo|[[foo}}]]}}
6389 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
6390 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
6398 ''None'' of '''this''' should be
6400 but rather passed unmodified
6404 # hmm, fix this or just deprecate msgnw and document its behavior?
6410 {{msgnw:MSGNW test}}
6412 <p>''None'' of '''this''' should be
6414 but rather passed unmodified
6422 {{int:youhavenewmessages|lots of money|not!}}
6424 <p>You have lots of money (not!).
6431 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
6435 <includeonly> and <noinclude> being included
6446 <onlyinclude>Foo</onlyinclude>bar
6450 <onlyinclude> being included
6462 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
6466 <onlyinclude> and <includeonly> being included
6475 <includeonly> and <noinclude> on a page
6477 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
6484 Un-closed <noinclude>
6491 <onlyinclude> on a page
6493 <onlyinclude>Foo</onlyinclude>bar
6500 Un-closed <onlyinclude>
6507 Self-closed noinclude, includeonly, onlyinclude tags
6518 Unbalanced includeonly and noinclude tags
6522 |b</noinclude></noinclude>
6523 |c</noinclude></includeonly>
6524 |d</includeonly></includeonly>
6533 <td>c</includeonly>
6535 <td>d</includeonly></includeonly>
6541 Template:Includeonly section
6544 ==Includeonly section==
6550 Bug 6563: Edit link generation for section shown by <includeonly>
6552 {{includeonly section}}
6554 <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>
6555 <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>
6559 # Uses same input as the contents of [[Template:Includeonly section]]
6561 Bug 6563: Section extraction for section shown by <includeonly>
6566 ==Includeonly section==
6574 Bug 6563: Edit link generation for section suppressed by <includeonly>
6577 ==Includeonly section==
6581 <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>
6586 Bug 6563: Section extraction for section suppressed by <includeonly>
6591 ==Includeonly section==
6599 Un-closed <includeonly>
6605 # TODO: test with DOM fragment reuse!
6607 Parsoid: DOM fragment reuse
6609 parsoid=wt2wt,wt2html
6611 a{{echo|b<table></table>c}}d
6623 a<span typeof="mw:Transclusion">b</span>
6624 <table></table><span>c</span>d
6625 <p typeof="mw:Transclusion">ab</p>
6628 <p typeof="mw:Transclusion">a</p>
6634 ### <includeonly> and <noinclude> in attributes
6637 0. includeonly around the entire attribute
6639 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
6641 <p><span id="v2">bar</span>
6646 1. includeonly in html attr key
6648 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
6650 <p><span id="foo">bar</span>
6655 2. includeonly in html attr value
6657 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
6658 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
6660 <p><span id="v1">bar</span>
6661 <span id="v1">bar</span>
6666 3. includeonly in part of an attr value
6668 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
6670 <p><span style="color:red;">bar</span>
6675 ### Testing parsing of templates where a template arg
6676 ### has the same name as the template itself.
6686 Templates: Template Name/Arg clash: 1. Use of positional param
6695 Templates: Template Name/Arg clash: 2. Use of named param
6704 Templates: Template Name/Arg clash: 3. Use of named param with empty input
6713 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
6717 Templates: 1. Simple use
6726 Templates: 2. Inside a block tag
6728 <div>{{echo|Foo}}</div>
6735 Templates: P-wrapping: 1a. Templates on consecutive lines
6746 Templates: P-wrapping: 1b. Templates on consecutive lines
6760 Templates: P-wrapping: 1c. Templates on consecutive lines
6763 {{echo|bar}} <div>baz</div>
6772 Templates: P-wrapping: 1d. Template preceded by comment-only line
6774 parsoid=wt2html,wt2wt
6780 <p typeof="mw:Transclusion">Bar
6785 Templates: Inline Text: 1. Multiple tmeplate uses
6787 {{echo|Foo}}bar{{echo|baz}}
6794 Templates: Inline Text: 2. Back-to-back template uses
6796 {{echo|Foo}}{{echo|bar}}
6803 Templates: Block Tags: 1. Multiple template uses
6805 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
6807 <div>Foo</div><div>bar</div><div>baz</div>
6812 Templates: Block Tags: 2. Back-to-back template uses
6814 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
6816 <div>Foo</div><div>bar</div>
6821 Templates: Links: 1. Simple example
6823 {{echo|[[Foo|bar]]}}
6825 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6830 Templates: Links: 2. Generation of link href
6832 [[{{echo|Foo}}|bar]]
6834 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6839 Templates: Links: 3. Generation of part of a link href
6841 [[Fo{{echo|o}}|bar]]
6845 [[Foo{{echo|bar}}baz]]
6847 [[Foo{{echo|bar}}|bar]]
6849 [[:Foo{{echo|bar}}]]
6851 [[:Foo{{echo|bar}}|bar]]
6853 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6854 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6855 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
6856 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
6857 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6858 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
6863 Templates: Links: 4. Multiple templates generating link href
6865 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
6867 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6872 Templates: Links: 5. Generation of link text
6874 [[Foo|{{echo|bar}}]]
6876 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6881 Templates: Links: 5. Nested templates (only outermost template should be marked)
6883 {{echo|[[{{echo|Foo}}|bar]]}}
6885 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6890 Templates: HTML Tag: 1. Generation of HTML attr. key
6892 <div {{echo|style}}="color:red;">foo</div>
6894 <div style="color:red;">foo</div>
6899 Templates: HTML Tag: 2. Generation of HTML attr. value
6901 <div style={{echo|'color:red;'}}>foo</div>
6903 <div style="color:red;">foo</div>
6908 Templates: HTML Tag: 3. Generation of HTML attr key and value
6910 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
6912 <div style="color:red;">foo</div>
6917 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
6919 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
6921 <div title="This is a long title with just one piece templated">foo</div>
6926 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
6928 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
6930 <div title="This is a long title with just one piece templated">foo</div>
6935 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
6937 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
6939 <div title="This is a long title with just one piece templated">foo</div>
6944 Templates: HTML Tag: 7. Generation of partial attribute key string
6946 <div st{{echo|yle}}="color:red;">foo</div>
6948 <div style="color:red;">foo</div>
6953 Templates: HTML Tables: 1. Generating start of a HTML table
6955 {{echo|<table><tr><td>foo</td>}}</tr></table>
6957 <table><tr><td>foo</td></tr></table>
6962 Templates: HTML Tables: 2a. Generating middle of a HTML table
6964 <table><tr>{{echo|<td>foo</td>}}</tr></table>
6966 <table><tr><td>foo</td></tr></table>
6971 Templates: HTML Tables: 2b. Generating middle of a HTML table
6973 <table>{{echo|<tr><td>foo</td></tr>}}</table>
6975 <table><tr><td>foo</td></tr></table>
6980 Templates: HTML Tables: 3. Generating end of a HTML table
6982 <table><tr>{{echo|<td>foo</td></tr></table>}}
6984 <table><tr><td>foo</td></tr></table>
6989 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
6991 {{echo|<table>}}<tr><td>foo</td></tr></table>
6993 <table><tr><td>foo</td></tr></table>
6998 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
7000 <table>{{echo|<tr>}}<td>foo</td></tr></table>
7002 <table><tr><td>foo</td></tr></table>
7007 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
7009 <table><tr>{{echo|<td>}}foo</td></tr></table>
7011 <table><tr><td>foo</td></tr></table>
7016 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
7018 <table><tr><td>foo{{echo|</td>}}</tr></table>
7020 <table><tr><td>foo</td></tr></table>
7025 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
7027 <table><tr><td>foo</td>{{echo|</tr>}}</table>
7029 <table><tr><td>foo</td></tr></table>
7034 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
7036 <table><tr><td>foo</td></tr>{{echo|</table>}}
7038 <table><tr><td>foo</td></tr></table>
7043 Templates: HTML Tables: 5. Proper fostering of categories from inside
7045 parsoid=wt2html,wt2wt
7047 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
7048 <!--Two categories (Bug 50330)-->
7049 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
7051 <link rel="mw:WikiLink/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
7052 <!--Two categories (Bug 50330)-->
7053 <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>
7057 Templates: Wiki Tables: 1a. Fostering of entire template content
7065 <tr><td></td></tr></table>
7070 Templates: Wiki Tables: 1b. Fostering of entire template content
7083 <tr><td></td></tr></table>
7088 Templates: Wiki Tables: 2. Fostering of partial template content
7098 <tr><td></td></tr></table>
7103 Templates: Wiki Tables: 3. td-content via multiple templates
7106 {{echo|{{pipe}}a}}{{echo|b}}
7117 Templates: Wiki Tables: 4. Templated tags, no content
7123 <tr><td></td></tr></table>
7128 Templates: Wiki Tables: 5. Templated tags, regular td-tags
7142 Templates: Wiki Tables: 6. Templated tags, templated td-tags
7156 Templates: Lists: Multi-line list-items via templates
7158 *{{echo|a {{nonexistent|
7160 *{{echo|b {{nonexistent|
7163 <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>
7164 </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>
7170 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
7172 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
7174 <p><i>ab</i>c<i>d</i>e
7179 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
7180 (PHP parser generates misnested html)
7182 parsoid=wt2html,wt2wt
7184 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
7186 <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>
7190 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
7191 (PHP parser generates misnested html)
7193 parsoid=wt2html,wt2wt
7195 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
7197 <div typeof="mw:Transclusion"><i>a</i></div>
7198 <div typeof="mw:Transclusion"><i>b</i>c<i>d</i></div>
7199 <div typeof="mw:Transclusion">e</div>
7203 Templates: Ugly nesting: 4. Divs opened/closed across templates
7205 a<div>b{{echo|c</div>d}}e
7212 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
7218 |{{echo|foo</table>}}
7222 <table typeof="mw:Transclusion">
7225 <td>foo</td></tr></tbody></table><span>bar</span>
7229 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
7239 <td>1. {{echo|foo </table>}}</td>
7241 <td>2. {{echo|baz </table>}}</td>
7254 <table about="#mwt1" typeof="mw:Transclusion">
7259 <td >1. foo </td></tr></tbody></table></td>
7261 <td >2. baz </td></tr></tbody></table><span about="#mwt1">
7262 </span><span about="#mwt1">
7264 abc</span><span about="#mwt1">
7265 </span><span about="#mwt1">
7266 </span><span about="#mwt1">
7267 </span><span about="#mwt1">
7268 </span><span about="#mwt1">
7270 xyz</span><span about="#mwt1">
7271 </span><span about="#mwt1">
7276 Templates: Ugly templates: 3. newline-only template parameter
7285 # This looks like a bug: a single newline triggers p/br for some reason.
7287 Templates: Ugly templates: 4. newline-only template parameter inconsistency
7298 Parser Functions: 1. Simple example
7307 Parser Functions: 2. Nested use (only outermost should be marked up)
7316 ### Pre-save transform tests
7319 pre-save transform: subst:
7325 This is a test template
7329 pre-save transform: normal template
7339 pre-save transform: nonexistent template
7343 {{thistemplatedoesnotexist}}
7345 {{thistemplatedoesnotexist}}
7350 pre-save transform: subst magic variables
7359 # This is bug 89, which I fixed. -- wtm
7361 pre-save transform: subst: templates with parameters
7365 {{subst:paramtest|param="something else"}}
7367 This is a test template with parameter "something else"
7373 <nowiki>'''not wiki'''</nowiki>
7377 pre-save transform: nowiki in subst (bug 1188)
7381 {{subst:nowikitest}}
7383 <nowiki>'''not wiki'''</nowiki>
7388 Template:commenttest
7390 This template has <!-- a comment --> in it.
7394 pre-save transform: comment in subst (bug 1936)
7398 {{subst:commenttest}}
7400 This template has <!-- a comment --> in it.
7404 pre-save transform: unclosed tag
7408 <nowiki>'''not wiki'''
7410 <nowiki>'''not wiki'''
7414 pre-save transform: mixed tag case
7418 <NOwiki>'''not wiki'''</noWIKI>
7420 <NOwiki>'''not wiki'''</noWIKI>
7424 pre-save transform: unclosed comment in <nowiki>
7428 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
7430 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
7433 # Leading @ in this template definition works around a limitation
7434 # in parsoid's parserTests which otherwise strips the <span> from the
7435 # result (confusing it for a template wrapper)
7439 @<span onmouseover="alert('crap')">Oh no</span>
7443 (confirming safety of fix for subst bug 1936)
7445 {{Template:dangerous}}
7447 <p>@<span>Oh no</span>
7452 pre-save transform: comment containing gallery (bug 5024)
7456 <!-- <gallery>data</gallery> -->
7458 <!-- <gallery>data</gallery> -->
7462 pre-save transform: comment containing extension
7466 <!-- <tag>data</tag> -->
7468 <!-- <tag>data</tag> -->
7472 pre-save transform: comment containing nowiki
7476 <!-- <nowiki>data</nowiki> -->
7478 <!-- <nowiki>data</nowiki> -->
7482 pre-save transform: <noinclude> in subst (bug 3298)
7492 pre-save transform: <onlyinclude> in subst (bug 3298)
7504 {{<includeonly>subst:</includeonly>Includes}}
7508 Template:SafeSubstTest
7510 {{<includeonly>safesubst:</includeonly>Includes}}
7514 bug 22297: safesubst: works during PST
7518 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
7524 bug 22297: safesubst: works during normal parse
7533 subst: does not work during normal parse
7537 <p>{{subst:Includes}}
7542 pre-save transform: context links ("pipe trick")
7546 [[Article (context)|]]
7549 [[Bar:Article (context)|]]
7550 [[:Bar:Article (context)|]]
7552 [[|Article (context)]]
7556 [[Article (context)|Article]]
7557 [[Bar:Article|Article]]
7558 [[:Bar:Article|Article]]
7559 [[Bar:Article (context)|Article]]
7560 [[:Bar:Article (context)|Article]]
7562 [[Article (context)]]
7563 [[Bar:X (Y) Z|X (Y) Z]]
7564 [[:Bar:X (Y) Z|X (Y) Z]]
7568 pre-save transform: context links ("pipe trick") with interwiki prefix
7572 [[interwiki:Article|]]
7573 [[:interwiki:Article|]]
7574 [[interwiki:Bar:Article|]]
7575 [[:interwiki:Bar:Article|]]
7577 [[interwiki:Article|Article]]
7578 [[:interwiki:Article|Article]]
7579 [[interwiki:Bar:Article|Bar:Article]]
7580 [[:interwiki:Bar:Article|Bar:Article]]
7584 pre-save transform: context links ("pipe trick") with parens in title
7586 pst title=[[Somearticle (context)]]
7590 [[Article (context)|Article]]
7594 pre-save transform: context links ("pipe trick") with comma in title
7596 pst title=[[Someplace, Somewhere]]
7599 [[Otherplace, Elsewhere|]]
7600 [[Otherplace, Elsewhere, Anywhere|]]
7602 [[Otherplace, Somewhere|Otherplace]]
7603 [[Otherplace, Elsewhere|Otherplace]]
7604 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
7608 pre-save transform: context links ("pipe trick") with parens and comma
7610 pst title=[[Someplace (IGNORED), Somewhere]]
7613 [[Otherplace (place), Elsewhere|]]
7615 [[Otherplace, Somewhere|Otherplace]]
7616 [[Otherplace (place), Elsewhere|Otherplace]]
7620 pre-save transform: context links ("pipe trick") with comma and parens
7622 pst title=[[Who, me? (context)]]
7625 [[Me, Myself, and I (1937 song)|]]
7627 [[Yes, you. (context)|Yes, you.]]
7628 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
7632 pre-save transform: context links ("pipe trick") with namespace
7634 pst title=[[Ns:Somearticle]]
7638 [[Ns:Article|Article]]
7642 pre-save transform: context links ("pipe trick") with namespace and parens
7644 pst title=[[Ns:Somearticle (context)]]
7648 [[Ns:Article (context)|Article]]
7652 pre-save transform: context links ("pipe trick") with namespace and comma
7654 pst title=[[Ns:Somearticle, Context, Whatever]]
7658 [[Ns:Article, Context, Whatever|Article]]
7662 pre-save transform: context links ("pipe trick") with namespace, comma and parens
7664 pst title=[[Ns:Somearticle, Context (context)]]
7668 [[Ns:Article (context)|Article]]
7672 pre-save transform: context links ("pipe trick") with namespace, parens and comma
7674 pst title=[[Ns:Somearticle (IGNORED), Context]]
7678 [[Ns:Article, Context|Article]]
7682 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
7686 [[Article(context)|]]
7687 [[Bar:Article(context)|]]
7688 [[:Bar:Article(context)|]]
7689 [[|Article(context)]]
7693 [[Article(context)|Article]]
7694 [[Bar:Article(context)|Article]]
7695 [[:Bar:Article(context)|Article]]
7696 [[Article(context)]]
7698 [[:Bar:X(Y)Z|X(Y)Z]]
7702 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
7706 [[Article (context)|]]
7707 [[Bar:Article (context)|]]
7708 [[:Bar:Article (context)|]]
7709 [[|Article (context)]]
7713 [[Article (context)|Article]]
7714 [[Bar:Article (context)|Article]]
7715 [[:Bar:Article (context)|Article]]
7716 [[Article (context)]]
7717 [[Bar:X (Y) Z|X (Y) Z]]
7718 [[:Bar:X (Y) Z|X (Y) Z]]
7722 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
7726 [[Article(context)|]]
7727 [[Bar:Article(context)|]]
7728 [[:Bar:Article(context)|]]
7729 [[|Article(context)]]
7733 [[Article(context)|Article]]
7734 [[Bar:Article(context)|Article]]
7735 [[:Bar:Article(context)|Article]]
7736 [[Article(context)]]
7738 [[:Bar:X(Y)Z|X(Y)Z]]
7742 pre-save transform: context links ("pipe trick") with commas (bug 21660)
7746 [[Article (context), context|]]
7747 [[Article (context),context|]]
7748 [[Bar:Article (context), context|]]
7749 [[Bar:Article (context),context|]]
7750 [[:Bar:Article (context), context|]]
7751 [[:Bar:Article (context),context|]]
7753 [[Article (context), context|Article]]
7754 [[Article (context),context|Article]]
7755 [[Bar:Article (context), context|Article]]
7756 [[Bar:Article (context),context|Article]]
7757 [[:Bar:Article (context), context|Article]]
7758 [[:Bar:Article (context),context|Article]]
7762 pre-save transform: trim trailing empty lines
7766 Empty lines are trimmed
7772 Empty lines are trimmed
7776 pre-save transform: Signature expansion
7781 * <noinclude>~~~</noinclude>
7782 * <includeonly>~~~</includeonly>
7783 * <onlyinclude>~~~</onlyinclude>
7785 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
7786 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
7787 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
7788 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
7793 pre-save transform: Signature expansion in nowiki tags (bug 93)
7799 <nowiki>~~~~</nowiki>
7801 <includeonly><nowiki>~~~~</nowiki></includeonly>
7803 <noinclude><nowiki>~~~~</nowiki></noinclude>
7805 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
7807 {{subst:Foo}} shall be converted to FOO
7809 As well as inside noinclude/onlyinclude
7810 <noinclude>{{subst:Foo}}</noinclude>
7811 <onlyinclude>{{subst:Foo}}</onlyinclude>
7813 But not inside includeonly
7814 <includeonly>{{subst:Foo}}</includeonly>
7818 <nowiki>~~~~</nowiki>
7820 <includeonly><nowiki>~~~~</nowiki></includeonly>
7822 <noinclude><nowiki>~~~~</nowiki></noinclude>
7824 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
7826 FOO shall be converted to FOO
7828 As well as inside noinclude/onlyinclude
7829 <noinclude>FOO</noinclude>
7830 <onlyinclude>FOO</onlyinclude>
7832 But not inside includeonly
7833 <includeonly>{{subst:Foo}}</includeonly>
7837 Parsoid: Recognize nowiki with trailing space in tags
7841 <nowiki ><div>[[foo]]</nowiki >
7849 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
7856 Parsoid: Recognize nowiki with odd capitalization
7860 <noWikI ><div>[[foo]]</Nowiki >
7862 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
7867 Parsoid: Escape nowiki with trailing space in tags
7871 <nowiki > foo </nowiki >
7877 <p><nowiki > foo </nowiki ></p>
7878 <p>a<nowiki />b</p>
7879 <p>c<nowiki/ >d</p>
7883 Parsoid: Escape weird noWikI capitalizations
7887 <noWikI > foo </NoWikI >
7889 <p><noWikI > foo </NoWikI ></p>
7893 ### Message transform tests
7896 message transform: magic variables
7906 message transform: should not transform wiki markup
7916 message transform: <noinclude> in transcluded template (bug 4926)
7926 message transform: <onlyinclude> in transcluded template (bug 4926)
7936 {{#special:}} page name, known
7940 {{#special:Recentchanges}}
7942 Special:RecentChanges
7946 {{#special:}} page name with subpage, known
7950 {{#special:Recentchanges/param}}
7952 Special:RecentChanges/param
7956 {{#special:}} page name, unknown
7960 {{#special:foobar nonexistent}}
7962 Special:Foobar nonexistent
7966 {{#speciale:}} page name, known
7970 {{#speciale:Recentchanges}}
7972 Special:RecentChanges
7976 {{#speciale:}} page name with subpage, known
7980 {{#speciale:Recentchanges/param}}
7982 Special:RecentChanges/param
7986 {{#speciale:}} page name, unknown
7990 {{#speciale:foobar nonexistent}}
7992 Special:Foobar_nonexistent
8001 [[Image:foobar.jpg]]
8003 <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>
8010 [[Image:foobar.jpg|right]]
8012 <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>
8017 Simple image (using File: namespace, now canonical)
8021 <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>
8028 [[Image:foobar.jpg|right|Caption text]]
8030 <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>
8035 Image with empty attribute
8037 [[Image:foobar.jpg|right||Caption text]]
8039 <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>
8044 Image with attributes from template.
8046 [[Image:foobar.jpg|{{image_attribs}}]]
8048 <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>
8053 Image with link tails
8055 123[[Image:foobar.jpg]]456
8056 123[[Image:foobar.jpg|right]]456
8057 123[[Image:foobar.jpg|thumb]]456
8059 <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
8061 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
8062 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
8067 Image with multiple captions -- only last one is accepted
8069 [[Image:foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
8071 <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>
8076 Image with width attribute at different positions
8078 [[Image:foobar.jpg|200px|right|Caption]]
8079 [[Image:foobar.jpg|right|200px|Caption]]
8080 [[Image:foobar.jpg|right|Caption|200px]]
8082 <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>
8083 <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>
8084 <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>
8089 Image with link parameter, wiki target
8091 [[Image:foobar.jpg|link=Target page]]
8093 <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>
8098 Image with link parameter, URL target
8100 [[Image:foobar.jpg|link=http://example.com/]]
8102 <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>
8107 Image with link parameter, wgExternalLinkTarget
8109 [[Image:foobar.jpg|link=http://example.com/]]
8111 wgExternalLinkTarget='foobar'
8113 <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>
8118 Image with link parameter, wgNoFollowLinks set to false
8120 [[Image:foobar.jpg|link=http://example.com/]]
8122 wgNoFollowLinks=false
8124 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8129 Image with link parameter, wgNoFollowDomainExceptions
8131 [[Image:foobar.jpg|link=http://example.com/]]
8133 wgNoFollowDomainExceptions='example.com'
8135 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8140 Image with link parameter, wgExternalLinkTarget, unnamed parameter
8142 [[Image:foobar.jpg|link=http://example.com/|Title]]
8144 wgExternalLinkTarget='foobar'
8146 <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>
8151 Image with empty link parameter
8153 [[Image:foobar.jpg|link=]]
8155 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
8160 Image with link parameter (wiki target) and unnamed parameter
8162 [[Image:foobar.jpg|link=Target page|Title]]
8164 <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>
8169 Image with link parameter (URL target) and unnamed parameter
8171 [[Image:foobar.jpg|link=http://example.com/|Title]]
8173 <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>
8178 Thumbnail image with link parameter
8182 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
8184 <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>
8189 Manually-specified thumbnail image
8193 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
8195 <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>
8200 Manually-specified thumbnail image with explicit link to wiki page
8204 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
8206 <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>
8211 Manually-specified thumbnail image with explicit link to url
8215 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
8217 <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>
8222 Manually-specified thumbnail image with explicit no link
8226 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
8228 <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>
8233 Manually-specified thumbnail image with explicit link and alt text
8237 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
8239 <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>
8244 Image with frame and link
8246 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
8248 <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>
8253 Image with frame and link and explicit alt
8255 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
8257 <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>
8262 Image with wiki markup in implicit alt
8264 [[Image:Foobar.jpg|testing '''bold''' in alt]]
8266 <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>
8271 Image with wiki markup in explicit alt
8273 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
8275 <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>
8280 Link to image page- image page normally doesn't exists, hence edit link
8281 Add test with existing image page
8282 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
8286 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
8291 bug 18784 Link to non-existent image page with caption should use caption as link text
8293 [[:Image:test|caption]]
8295 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
8300 Frameless image caption with a free URL
8302 [[Image:foobar.jpg|http://example.com]]
8304 <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>
8309 Thumbnail image caption with a free URL
8311 [[Image:foobar.jpg|thumb|http://example.com]]
8313 <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>
8318 Thumbnail image caption with a free URL and explicit alt
8320 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
8322 <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>
8327 SVG thumbnails with no language set
8330 [[File:Foobar.svg|thumb|width=200]]
8332 <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>
8337 SVG thumbnails with language de
8340 [[File:Foobar.svg|thumb|width=200|lang=de]]
8342 <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>
8347 SVG thumbnails with invalid language code
8350 [[File:Foobar.svg|thumb|width=200|lang=invalid.language.code]]
8352 <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>
8357 BUG 1887: A ISBN with a thumbnail
8359 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
8361 <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>
8366 BUG 1887: A RFC with a thumbnail
8368 [[Image:foobar.jpg|thumb|This is RFC 12354]]
8370 <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>
8375 BUG 1887: A mailto link with a thumbnail
8377 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
8379 <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>
8383 # Pending resolution to bug 368
8385 BUG 648: Frameless image caption with a link
8387 [[Image:foobar.jpg|text with a [[link]] in it]]
8389 <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>
8394 BUG 648: Frameless image caption with a link (suffix)
8396 [[Image:foobar.jpg|text with a [[link]]foo in it]]
8398 <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>
8403 BUG 648: Frameless image caption with an interwiki link
8405 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
8407 <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>
8412 BUG 648: Frameless image caption with a piped interwiki link
8414 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
8416 <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>
8421 Escape HTML special chars in image alt text
8423 [[Image:foobar.jpg|& < > "]]
8425 <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>
8430 BUG 499: Alt text should have Ӓ, not &1234;
8432 [[Image:foobar.jpg|♀]]
8434 <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>
8439 Broken image caption with link
8441 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
8443 <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.
8448 Image caption containing another image
8450 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
8452 <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>
8457 Image caption containing a newline
8459 [[Image:Foobar.jpg|This
8462 <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>
8467 Parsoid: Image caption containing leading space
8468 (The leading space should not trigger nowiki escaping in wt2wt mode)
8470 [[Image:Foobar.jpg|thumb| bar]]
8472 <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>
8477 Bug 3090: External links other than http: in image captions
8479 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
8481 <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>
8488 [[Image:foobar.jpg|a|class=b]]
8490 <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>
8495 Localized image handling (1).
8499 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
8501 <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>
8506 Localized image handling (2).
8510 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
8512 <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>
8517 "border", "frameless" and "class" attributes on an image.
8519 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
8521 <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>
8528 #REDIRECT [[File:Barfoo.jpg]]
8534 [[Image:Barfoo.jpg]]
8536 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
8541 Missing image with uploads disabled
8545 [[Image:Foobaz.jpg]]
8547 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
8551 # Parsoid-specific testing for images
8552 # http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
8553 # Currently imperfect due to a flaw in the Parsoid testrunner
8557 Parsoid-specific image handling - simple image
8561 [[Image:Foobar.jpg]]
8564 <span class="mw-default-size" typeof="mw:Image">
8565 <a href="File:Foobar.jpg">
8566 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8573 Parsoid-specific image handling - simple image without link
8577 [[Image:Foobar.jpg|link=]]
8580 <span class="mw-default-size" typeof="mw:Image">
8582 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8589 Parsoid-specific image handling - simple image with specific link
8593 [[Image:Foobar.jpg|link=Main Page]]
8596 <span class="mw-default-size" typeof="mw:Image">
8597 <a href="Main_Page">
8598 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8605 Parsoid-specific image handling - simple image with size and middle alignment
8609 [[Image:Foobar.jpg|50px|middle]]
8612 <span class="mw-valign-middle" typeof="mw:Image">
8613 <a href="File:Foobar.jpg">
8614 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
8621 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
8625 [[Image:Foobar.jpg|500x10px|baseline|caption]]
8628 <span class="mw-valign-baseline" typeof="mw:Image" data-mw="{"caption":"caption"}">
8629 <a href="File:Foobar.jpg">
8630 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/89px-Foobar.jpg" height="10" width="89">
8637 Parsoid-specific image handling - simple image with border and size spec
8641 [[Image:Foobar.jpg|50px|border|caption]]
8644 <span class="mw-image-border" typeof="mw:Image" data-mw="{"caption":"caption"}">
8645 <a href="File:Foobar.jpg">
8646 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
8653 Parsoid-specific image handling - thumbnail with halign, valign, and caption
8657 [[Image:Foobar.jpg|thumb|left|baseline|caption content]]
8659 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
8660 <a href="File:Foobar.jpg">
8661 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/180px-Foobar.jpg" height="21" width="180" />
8663 <figcaption>caption content</figcaption>
8668 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
8672 [[Image:Foobar.jpg|thumb|50x50px|right|middle|caption]]
8674 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
8675 <a href="File:Foobar.jpg">
8676 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
8678 <figcaption>caption</figcaption>
8683 Parsoid-specific image handling - framed image with specific size and caption
8687 [[Image:Foobar.jpg|500x50px|frame|caption]]
8689 <figure typeof="mw:Image/Frame">
8690 <a href="File:Foobar.jpg">
8691 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
8693 <figcaption>caption</figcaption>
8698 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
8702 [[Image:Foobar.jpg|500x50px|frame|left|baseline|caption]]
8704 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
8705 <a href="File:Foobar.jpg">
8706 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
8708 <figcaption>caption</figcaption>
8713 Parsoid-specific image handling - frameless image with specific size, border, and caption
8717 [[Image:Foobar.jpg|frameless|500x50px|border|caption]]
8720 <span class="mw-image-border" typeof="mw:Image/Frameless" data-mw="{"caption":"caption"}">
8721 <a href="File:Foobar.jpg">
8722 <img resource="./File:Foobar.jpg" src="//upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
8728 #Parsoid-specific image handling - simple image with a formatted caption
8732 #[[Image:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
8735 #<span typeof="mw:Image">
8736 #<a class="mw-default-size" href="Image:Foobar.jpg">
8737 #<img alt="Foobar.jpg" class="mw-default-size" src="http://upload.wikimedia.org/wikipedia/commons/3/3a/Foobar.jpg" height="220" width="1941">
8748 Subpage test/subpage
8756 subpage title=[[Subpage test]]
8760 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
8765 Subpage noslash link
8767 subpage title=[[Subpage test]]
8771 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
8775 # TODO: make this PHP-parser compatible!
8777 Relative subpage noslash link
8779 parsoid=wt2wt,wt2html,html2html
8780 subpage title=[[Subpage test/1/2/3/4]]
8786 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
8787 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
8790 # TODO: make this PHP-parser compatible!
8792 Parsoid: dot-slash prefixed wikilinks
8794 parsoid=wt2wt,wt2html,html2html
8802 <p><a rel="mw:WikiLink" href="./Foo">foo</a></p>
8803 <p><a rel="mw:WikiLink" href="./Bar">bar</a></p>
8804 <p><a rel="mw:WikiLink" href="./Baz/">baz/</a></p>
8812 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
8817 BUG 561: {{/Subpage}}
8819 subpage title=[[Page]]
8823 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
8831 Category:MediaWiki User's Guide
8839 [[:Category:MediaWiki User's Guide]]
8841 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
8850 [[Category:MediaWiki User's Guide]]
8852 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
8856 PAGESINCATEGORY invalid title fatal (r33546 fix)
8858 {{PAGESINCATEGORY:<bogus>}}
8865 Category with different sort key
8869 [[Category:MediaWiki User's Guide|Foo]]
8871 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
8875 Category with identical sort key
8879 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
8881 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
8885 Category with empty sort key
8890 [[Category:MediaWiki User's Guide|]]
8892 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
8896 Category with empty sort key and parentheses
8901 [[Category:Foo (bar)|]]
8903 [[Category:Foo (bar)|Foo]]
8907 Category with link tail
8912 123[[Category:Foo]]456
8914 123[[Category:Foo]]456
8918 Category with template
8923 [[Category:{{echo|Foo}}]]
8925 [[Category:{{echo|Foo}}]]
8929 Category with template in sort key
8934 [[Category:Foo|{{echo|Bar}}]]
8936 [[Category:Foo|{{echo|Bar}}]]
8940 Category with template in sort key and title
8945 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
8947 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
8951 Category / paragraph interactions
8953 Foo [[Category:Baz]] Bar
8955 Foo [[Category:Baz]]
8963 [[Category:Baz]] Bar
8976 {{echo|[[Category:Baz]]}}
8991 Parsoid: Serialize link to category page with colon escape
8997 [[:Category:Foo|Bar]]
9000 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
9001 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
9006 Parsoid: Link prefix/suffixes aren't applied to category links
9008 parsoid=wt2html,wt2wt,html2html
9013 <p>x<link rel="mw:WikiLink/Category" href="Category:Foo">y</p>
9017 Parsoid: Serialize link to file page with colon escape
9023 [[:File:Foo.png|Bar]]
9026 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
9027 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
9032 Parsoid: Serialize a genuine category link without colon escape
9037 [[Category:Foo|Bar]]
9039 <link rel="mw:WikiLink/Category" href="Category:Foo">
9040 <link rel="mw:WikiLink/Category" href="Category:Foo#Bar">
9044 ### Inter-language links
9047 Inter-language links
9053 [[zh:食品]]
9055 es:Alimento fr:Nourriture zh:食品
9059 Duplicate interlanguage links (bug 24502)
9075 Basic section headings
9082 ===Smaller headline===
9085 <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>
9088 <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>
9091 <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>
9097 Section headings with TOC
9100 === Subheadline 1 ===
9101 ===== Skipping a level =====
9102 ====== Skipping a level ======
9106 ===Another headline===
9108 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9110 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
9112 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
9114 <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>
9116 <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>
9123 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
9125 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
9130 <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>
9131 <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>
9132 <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>
9133 <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>
9134 <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>
9137 <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>
9141 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
9143 Handling of sections up to level 6 and beyond
9146 == Level 2 Heading==
9147 === Level 3 Heading===
9148 ==== Level 4 Heading====
9149 ===== Level 5 Heading=====
9150 ====== Level 6 Heading======
9151 ======= Level 7 Heading=======
9152 ======== Level 8 Heading========
9153 ========= Level 9 Heading=========
9154 ========== Level 10 Heading==========
9156 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9158 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
9160 <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>
9162 <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>
9164 <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>
9166 <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>
9168 <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>
9169 <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>
9170 <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>
9171 <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>
9172 <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>
9185 <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>
9186 <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>
9187 <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>
9188 <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>
9189 <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>
9190 <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>
9191 <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>
9192 <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>
9193 <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>
9194 <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>
9199 TOC regression (bug 9764)
9203 ==== title 1.1.1 ====
9208 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9210 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9212 <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>
9214 <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>
9217 <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>
9220 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
9222 <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>
9227 <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>
9228 <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>
9229 <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>
9230 <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>
9231 <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>
9232 <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>
9237 TOC with wgMaxTocLevel=3 (bug 6204)
9243 ==== title 1.1.1 ====
9248 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9250 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9252 <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>
9253 <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>
9256 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
9258 <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>
9263 <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>
9264 <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>
9265 <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>
9266 <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>
9267 <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>
9268 <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>
9273 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
9279 ====Section 1.1.1====
9280 ====Section 1.1.1.1====
9283 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9285 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
9287 <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>
9290 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
9293 <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>
9294 <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>
9295 <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>
9296 <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>
9297 <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>
9303 Resolving duplicate section names
9308 <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>
9309 <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>
9314 Resolving duplicate section names with differing case (bug 10721)
9319 <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>
9320 <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>
9332 Template with sections, __NOTOC__
9339 <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>
9340 <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>
9341 <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>
9342 <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>
9347 __NOEDITSECTION__ keyword
9353 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
9354 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
9359 Link inside a section heading
9361 ==Section with a [[Main Page|link]] in it==
9363 <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>
9368 TOC regression (bug 12077)
9375 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9377 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
9379 <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>
9382 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
9385 <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>
9386 <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>
9387 <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>
9392 BUG 1219 URL next to image (good)
9394 http://example.com [[Image:foobar.jpg]]
9396 <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>
9401 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
9404 The line above must have a trailing space!
9407 But just in case it doesn't...
9409 <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>
9410 <p>The line above must have a trailing space!
9412 <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>
9413 <p>But just in case it doesn't...
9418 Header with special characters (bug 25462)
9420 The tooltips shall not show entities to the user (ie. be double escaped)
9437 <p>The tooltips shall not show entities to the user (ie. be double escaped)
9439 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9441 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
9442 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
9443 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
9444 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
9445 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
9448 <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>
9451 <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>
9454 <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>
9457 <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>
9460 <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>
9466 Headers with excess '=' characters
9467 (Are similar tests necessary beyond the 1st level?)
9471 =''italic'' heading==
9472 ==''italic'' heading=
9474 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9476 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
9477 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
9478 <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>
9479 <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>
9482 <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>
9483 <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>
9484 <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>
9485 <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>
9490 HTML headers vs TOC (bug 23393)
9491 (__NOEDITSECTION__ for clearer output, doesn't matter here)
9503 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
9505 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
9507 <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>
9508 <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>
9511 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
9513 <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>
9514 <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>
9519 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
9520 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
9521 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
9522 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
9523 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
9524 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
9529 BUG 1219 URL next to image (broken)
9531 http://example.com[[Image:foobar.jpg]]
9533 <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>
9538 Bug 1186 news: in the middle of text
9540 http://en.wikinews.org/wiki/Wikinews:Workplace
9542 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
9548 Namespaced link must have a title
9557 Namespaced link must have a title (bad fragment version)
9559 [[Project:#fragment]]
9561 <p>[[Project:#fragment]]
9567 ### HTML tags and HTML attributes
9571 div with no attributes
9573 <div>HTML rocks</div>
9575 <div>HTML rocks</div>
9580 div with double-quoted attribute
9582 <div id="rock">HTML rocks</div>
9584 <div id="rock">HTML rocks</div>
9589 div with single-quoted attribute
9591 <div id='rock'>HTML rocks</div>
9593 <div id="rock">HTML rocks</div>
9598 div with unquoted attribute
9600 <div id=rock>HTML rocks</div>
9602 <div id="rock">HTML rocks</div>
9607 div with illegal double attributes
9609 <div id="a" id="b">HTML rocks</div>
9611 <div id="b">HTML rocks</div>
9615 # FIXME: produce empty string instead of "class" in the PHP parser, following
9618 div with empty attribute value, space before equals
9622 <div class =>HTML rocks</div>
9624 <div class="">HTML rocks</div>
9628 # The PHP parser escapes the opening brace to { for some reason, so
9629 # disabled this test for it.
9631 div with braces in attribute value
9635 <div title="{}">Foo</div>
9637 <div title="{}">Foo</div>
9640 # This it very inconsistent in the PHP parser: it returns
9641 # class="class" if there is a space between the name and the equal sign (see
9642 # 'div with empty attribute value, space before equals'), but strips the
9643 # attribute completely if the space is missing. We hope that not much content
9644 # depends on this, so are implementing the behavior below in Parsoid for
9645 # consistencies' sake. Disabled for the PHP parser.
9646 # FIXME: fix this behavior in the PHP parser?
9648 div with empty attribute value, no space before equals
9652 <div class=>HTML rocks</div>
9654 <div class="">HTML rocks</div>
9659 HTML multiple attributes correction
9661 <p class="error" class="awesome">Awesome!</p>
9663 <p class="awesome">Awesome!</p>
9668 Table multiple attributes correction
9671 !+ class="error" class="awesome"| status
9676 <th class="awesome"> status
9684 <DIV ID="x">HTML ROCKS</DIV>
9686 <div id="x">HTML ROCKS</div>
9691 Non-ASCII pseudo-tags are rendered as text
9700 Pseudo-tag with URL 'name' renders as url link
9702 <http://example.com/>
9704 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
9709 text with amp in the middle of nowhere
9713 <p>Remember AT&T?
9718 text with character entity: eacute
9720 I always thought é was a cute letter.
9722 <p>I always thought é was a cute letter.
9727 text with entity-escaped character entity-like string: eacute
9729 I always thought &eacute; was a cute letter.
9731 <p>I always thought &eacute; was a cute letter.
9736 text with undefined character entity: xacute
9738 I always thought &xacute; was a cute letter.
9740 <p>I always thought &xacute; was a cute letter.
9746 ### Nesting tests (see bug 41545, 50604, 51081)
9749 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
9750 # Note that html2wt is considerably more difficult if we use <b> in
9751 # the test case, instead of <big>
9753 Ensure that HTML adoption agency algorithm is properly implemented.
9755 <big>X<big>Y</big>Z</big>
9757 <p><big>X<big>Y</big>Z</big>
9761 # This was bug 41545 in the PHP parser.
9765 <kbd>X<kbd>Y</kbd>Z</kbd>
9767 <p><kbd>X<kbd>Y</kbd>Z</kbd>
9771 # The following cases were bug 51081 in the PHP parser.
9772 # Note that there are some other nestable tags (b, i, etc) which are
9773 # not covered; see bug 51081 for discussion.
9777 <em>X<em>Y</em>Z</em>
9779 <p><em>X<em>Y</em>Z</em>
9786 <strong>X<strong>Y</strong>Z</strong>
9788 <p><strong>X<strong>Y</strong>Z</strong>
9797 <p><q>X<q>Y</q>Z</q>
9804 <ruby>X<ruby>Y</ruby>Z</ruby>
9806 <p><ruby>X<ruby>Y</ruby>Z</ruby>
9813 <bdo>X<bdo>Y</bdo>Z</bdo>
9815 <p><bdo>X<bdo>Y</bdo>Z</bdo>
9827 [[Media:Foobar.jpg]]
9829 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
9834 Media link with text
9836 [[Media:Foobar.jpg|A neat file to look at]]
9838 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
9842 # FIXME: this is still bad HTML tag nesting
9844 Media link with nasty text
9845 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
9847 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
9849 <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>
9854 Media link to nonexistent file (bug 1702)
9856 [[Media:No such.jpg]]
9858 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
9863 Image link to nonexistent file (bug 1850 - good)
9865 [[Image:No such.jpg]]
9867 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
9872 :Image link to nonexistent file (bug 1850 - bad)
9874 [[:Image:No such.jpg]]
9876 <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>
9883 Character reference normalization in link text (bug 1938)
9885 [[Main Page|this&that]]
9887 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
9894 Test for unicode normalization
9896 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
9900 (bug 19451) Links should refer to the normalized form.
9908 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9909 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9910 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9911 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9912 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
9917 Empty attribute crash test (bug 2067)
9919 <font color="">foo</font>
9921 <p><font color="">foo</font>
9926 Empty attribute crash test single-quotes (bug 2067)
9928 <font color=''>foo</font>
9930 <p><font color="">foo</font>
9935 Attribute test: equals, then nothing
9937 <font color=>foo</font>
9944 Attribute test: unquoted value
9946 <font color=x>foo</font>
9948 <p><font color="x">foo</font>
9953 Attribute test: unquoted but illegal value (hash)
9955 <font color=#x>foo</font>
9957 <p><font color="#x">foo</font>
9962 Attribute test: no value
9964 <font color>foo</font>
9966 <p><font color="color">foo</font>
9971 Bug 2095: link with three closing brackets
9975 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
9980 Bug 2095: link with pipe and three closing brackets
9984 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
9989 Bug 2095: link with pipe and three closing brackets, version 2
9991 [[Main Page|[http://example.com/]]]
9993 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
10003 Template:Dangerous attribute
10005 " onmouseover="alert(document.cookie)
10009 Template:Dangerous style attribute
10011 border-size: expression(alert(document.cookie))
10017 <div style="float: right; {{{1}}}">Magic div</div>
10021 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
10023 <div title="{{test}}"></div>
10025 <div title="This is a test template"></div>
10030 Bug 2304: HTML attribute safety (dangerous template; 2309)
10032 <div title="{{dangerous attribute}}"></div>
10034 <div title=""></div>
10039 Bug 2304: HTML attribute safety (dangerous style template; 2309)
10041 <div style="{{dangerous style attribute}}"></div>
10043 <div style="/* insecure input */"></div>
10048 Bug 2304: HTML attribute safety (safe parameter; 2309)
10050 {{div style|width: 200px}}
10052 <div style="float: right; width: 200px">Magic div</div>
10057 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
10059 {{div style|width: expression(alert(document.cookie))}}
10061 <div style="/* insecure input */">Magic div</div>
10066 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
10068 {{div style|"><script>alert(document.cookie)</script>}}
10070 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
10075 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
10077 {{div style|" ><script>alert(document.cookie)</script>}}
10079 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
10084 Bug 2304: HTML attribute safety (link)
10086 <div title="[[Main Page]]"></div>
10088 <div title="[[Main Page]]"></div>
10093 Bug 2304: HTML attribute safety (italics)
10095 <div title="''foobar''"></div>
10097 <div title="''foobar''"></div>
10102 Bug 2304: HTML attribute safety (bold)
10104 <div title="'''foobar'''"></div>
10106 <div title="'''foobar'''"></div>
10112 Bug 2304: HTML attribute safety (ISBN)
10114 <div title="ISBN 1234567890"></div>
10116 <div title="ISBN 1234567890"></div>
10121 Bug 2304: HTML attribute safety (RFC)
10123 <div title="RFC 1234"></div>
10125 <div title="RFC 1234"></div>
10130 Bug 2304: HTML attribute safety (PMID)
10132 <div title="PMID 1234567890"></div>
10134 <div title="PMID 1234567890"></div>
10139 Bug 2304: HTML attribute safety (web link)
10141 <div title="http://example.com/"></div>
10143 <div title="http://example.com/"></div>
10148 Bug 2304: HTML attribute safety (named web link)
10150 <div title="[http://example.com/ link]"></div>
10152 <div title="[http://example.com/ link]"></div>
10157 Bug 3244: HTML attribute safety (extension; safe)
10159 <div style="<nowiki>background:blue</nowiki>"></div>
10161 <div style="background:blue"></div>
10166 Bug 3244: HTML attribute safety (extension; unsafe)
10168 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
10170 <div style="/* insecure input */"></div>
10174 # More MSIE fun discovered by Tom Gilder
10177 MSIE CSS safety test: spurious slash
10179 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
10181 <div style="/* insecure input */">evil</div>
10186 MSIE CSS safety test: hex code
10188 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
10190 <div style="/* insecure input */">evil</div>
10195 MSIE CSS safety test: comment in url
10197 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
10199 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
10204 MSIE CSS safety test: comment in expression
10206 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
10208 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
10214 Table attribute legitimate extension
10217 !+ style="<nowiki>color:blue</nowiki>"| status
10222 <th style="color:blue"> status
10228 Table attribute safety
10231 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
10236 <th style="/* insecure input */"> status
10242 CSS line continuation 1
10244 <div style="background-image: u\ rl(test.jpg);"></div>
10246 <div style="/* insecure input */"></div>
10251 CSS line continuation 2
10253 <div style="background-image: u\ rl(test.jpg); "></div>
10255 <div style="/* insecure input */"></div>
10266 Expansion of multi-line templates in attribute values (bug 6255)
10268 <div style="background: {{identity|#00FF00}}">-</div>
10270 <div style="background: #00FF00">-</div>
10276 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
10278 <div style="background:
10281 <div style="background: #00FF00">-</div>
10286 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
10288 <div style="background: #00FF00">-</div>
10290 <div style="background: #00FF00">-</div>
10295 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
10298 Parser hook: empty input
10311 Parser hook: empty input using terminated empty elements
10324 Parser hook: empty input using terminated empty elements (space before)
10337 Parser hook: basic input
10351 Parser hook: case insensitive
10365 Parser hook: case insensitive, redux
10378 Parser hook: nested tags
10382 <tag><tag></tag></tag>
10393 Parser hook: basic arguments
10395 <tag width=200 height = "100" depth = '50' square></tag>
10403 'square' => 'square',
10410 Parser hook: argument containing a forward slash (bug 5344)
10412 <tag filename='/tmp/bla'></tag>
10417 'filename' => '/tmp/bla',
10424 Parser hook: empty input using terminated empty elements (bug 2374)
10437 # </tag> should be output literally since there is no matching tag that begins it
10439 Parser hook: basic arguments using terminated empty elements (bug 2374)
10441 <tag width=200 height = "100" depth = '50' square/>
10451 'square' => 'square',
10460 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
10464 Parser hook: static parser hook not inside a comment
10466 <statictag>hello, world</statictag>
10467 <statictag action=flush/>
10475 Parser hook: static parser hook inside a comment
10477 <!-- <statictag>hello, world</statictag> -->
10478 <statictag action=flush/>
10484 # Nested template calls; this case was broken by Parser.php rev 1.506,
10488 Template:One-parameter
10490 (My parameter is: {{{1}}})
10494 Template:Map-one-parameter
10496 {{{{{1}}}|{{{2}}}}}
10500 Nested template calls
10502 {{Map-one-parameter|One-parameter|param}}
10504 <p>(My parameter is: param)
10513 Sanitizer: Closing of open tags
10515 <s></s><table></table>
10517 <s></s><table></table>
10522 Sanitizer: Closing of open but not closed tags
10531 Sanitizer: Closing of closed but not open tags
10540 Sanitizer: Closing of closed but not open table tags
10542 Table not started</td></tr></table>
10544 <p>Table not started</td></tr></table>
10549 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
10551 <span id="æ: v">byte</span>[[#æ: v|backlink]]
10553 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
10558 Sanitizer: Validating the contents of the id attribute (bug 4515)
10564 Something, but definitely not <br id="9" />...
10568 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
10572 <br id="foo" /><br id="foo" />
10574 Something need to be done. foo-2 ?
10578 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
10581 <meta itemprop="hello" content="world">
10582 <meta http-equiv="refresh" content="5">
10583 <meta itemprop="hello" http-equiv="refresh" content="5">
10584 <link itemprop="hello" href="{{SERVER}}">
10585 <link rel="stylesheet" href="{{SERVER}}">
10586 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
10589 <div itemscope="itemscope">
10590 <p> <meta itemprop="hello" content="world" />
10591 <meta http-equiv="refresh" content="5">
10592 <meta itemprop="hello" content="5" />
10594 <link itemprop="hello" href="http://example.org" />
10595 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
10596 <link itemprop="hello" href="http://example.org" />
10602 Language converter: output gets cut off unexpectedly (bug 5757)
10606 this bit is safe: }-
10608 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
10610 then we get cut off here: }-
10612 all additional text is vanished
10614 <p>this bit is safe: }-
10615 </p><p>but if we add a conversion instance: xxx
10616 </p><p>then we get cut off here: }-
10617 </p><p>all additional text is vanished
10622 Self closed html pairs (bug 5487)
10625 <center><font id="bug" />Centered text</center>
10626 <div><font id="bug2" />In div text</div>
10628 <center><font id="bug" />Centered text</center>
10629 <div><font id="bug2" />In div text</div>
10638 Punctuation: nbsp before exclamation
10642 <p>C'est grave !
10647 Punctuation: CSS !important (bug 11874)
10649 <div style="width:50% !important">important</div>
10651 <div style="width:50% !important">important</div>
10656 Punctuation: CSS ! important (bug 11874; with space after)
10658 <div style="width:50% ! important">important</div>
10660 <div style="width:50% ! important">important</div>
10666 HTML bullet list, closed tags (bug 5497)
10681 HTML bullet list, unclosed tags (bug 5497)
10698 HTML ordered list, closed tags (bug 5497)
10713 HTML ordered list, unclosed tags (bug 5497)
10730 HTML nested bullet list, closed tags (bug 5497)
10755 HTML nested bullet list, open tags (bug 5497)
10780 HTML nested ordered list, closed tags (bug 5497)
10805 HTML nested ordered list, open tags (bug 5497)
10830 HTML ordered list item with parameters oddity
10832 <ol><li id="fragment">One</li></ol>
10834 <ol><li id="fragment">One</li></ol>
10839 bug 5918: autonumbering
10841 [http://first/] [http://second] [ftp://ftp]
10845 [mailto:enclosed@mail.tld With target]
10847 [mailto:enclosed@mail.tld]
10849 mailto:inline@mail.tld
10851 <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>
10852 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
10853 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
10854 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
10855 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
10861 # Security and HTML correctness
10862 # From Nick Jenkins' fuzz testing
10866 Fuzz testing: Parser13
10881 Fuzz testing: Parser14
10886 <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>
10887 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
10889 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
10896 Fuzz testing: Parser14-table
10901 <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>
10902 <table style="__TOC__">
10908 # Known to produce bogus xml (extra </td>)
10910 Fuzz testing: Parser16
10930 Fuzz testing: Parser21
10933 ! irc://{{ftp://a" onmouseover="alert('hello world');"
10938 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
10948 Fuzz testing: Parser22
10950 http://===r:::https://b
10954 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
10962 # Known to produce bad XML for now
10964 Fuzz testing: Parser24
10971 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
10972 <br style="onmouseover='alert(document.cookie);' " />
10974 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
10979 <u class="|">}}}} >
10980 <br style="onmouseover='alert(document.cookie);'" />
10982 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
10991 # Note: the current result listed for this is not what the original one was,
10992 # but the original bug was JavaScript injection, which is fixed in any case.
10993 # It's not clear that the original result listed was any more correct than the
10994 # current one. Original result:
10997 # <li class="||">
10998 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
11000 Fuzz testing: Parser25 (bug 6055)
11006 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
11008 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
11013 Fuzz testing: URL adjacent extension (with space, clean)
11016 http://example.com <nowiki>junk</nowiki>
11018 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
11023 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
11026 http://example.com<nowiki>junk</nowiki>
11028 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
11033 Fuzz testing: URL adjacent extension (no space, dirty; pre)
11036 http://example.com<pre>junk</pre>
11038 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
11043 Fuzz testing: image with bogus manual thumbnail
11045 [[Image:foobar.jpg|thumbnail= ]]
11047 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
11052 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
11054 <pre dir=" "></pre>
11056 <pre dir=" "></pre>
11061 Parsing optional HTML elements (Bug 6171)
11066 <td> Some tabular data</td>
11067 <td> More tabular data ...
11068 <td> And yet som tabular data</td>
11074 <td> Some tabular data</td>
11075 <td> More tabular data ...
11076 </td><td> And yet som tabular data</td>
11083 Correct handling of <td>, <tr> (Bug 6171)
11088 <td> Some tabular data</td>
11089 <td> More tabular data ...</td>
11090 <td> And yet som tabular data</td>
11096 <td> Some tabular data</td>
11097 <td> More tabular data ...</td>
11098 <td> And yet som tabular data</td>
11106 Parsing crashing regression (fr:JavaScript)
11110 <p></body></x>
11115 Inline wiki vs wiki block nesting
11121 <p><b>Bold paragraph</b>
11122 </p><p>New wiki paragraph
11127 Inline HTML vs wiki block nesting
11135 <p><b>Bold paragraph</b>
11136 </p><p>New wiki paragraph
11140 # Original result was this:
11141 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
11143 # While that might be marginally more intuitive, maybe, the six-apostrophe
11144 # construct is clearly pathological and the result stated here (which is what
11145 # the parser actually does) is about as reasonable as anything.
11147 Mixing markup for italics and bold
11150 '''bold''''''bold''bolditalics'''''
11152 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
11160 Article for special page transclusion test
11164 Special page transclusion
11167 {{Special:Prefixindex/Xyzzyx}}
11169 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11174 Special page transclusion twice (bug 5021)
11177 {{Special:Prefixindex/Xyzzyx}}
11178 {{Special:Prefixindex/Xyzzyx}}
11180 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11181 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
11186 Transclusion of default MediaWiki message
11188 {{MediaWiki:Mainpage}}
11195 Transclusion of nonexistent MediaWiki message
11197 {{MediaWiki:Mainpagexxx}}
11199 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
11204 Transclusion of MediaWiki message with underscore
11206 {{MediaWiki:history_short}}
11213 Transclusion of MediaWiki message with space
11215 {{MediaWiki:history short}}
11222 Invalid header with following text
11232 Section extraction test (section 0)
11252 Section extraction test (section 1)
11274 Section extraction test (section 2)
11295 Section extraction test (section 3)
11315 Section extraction test (section 4)
11339 Section extraction test (section 5)
11359 Section extraction test (section 6)
11380 Section extraction test (section 7)
11400 Section extraction test (section 8)
11420 Section extraction test (section 9)
11441 Section extraction test (section 10)
11461 Section extraction test (nonexistent section 11)
11480 Section extraction test with bogus heading (section 1)
11485 ==bogus== not a legal section
11489 ==bogus== not a legal section
11493 Section extraction test with bogus heading (section 2)
11498 ==bogus== not a legal section
11505 Section extraction test with comment after heading (section 1)
11517 Section extraction test with comment after heading (section 2)
11529 Section extraction test with bogus <nowiki> heading (section 1)
11534 ==bogus== <nowiki>not a legal section</nowiki>
11538 ==bogus== <nowiki>not a legal section</nowiki>
11542 Section extraction test with bogus <nowiki> heading (section 2)
11547 ==bogus== <nowiki>not a legal section</nowiki>
11554 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
11555 # instead of respecting commented sections
11557 Section extraction prefixed by comment (section 1)
11568 Section extraction prefixed by comment (section 2)
11579 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
11580 # instead of respecting HTML-style headings
11582 Section extraction, mixed wiki and html (section 1)
11598 Section extraction, mixed wiki and html (section 2)
11614 # Formerly testing for bug 3342
11616 Section extraction, heading surrounded by <noinclude>
11620 <noinclude>==unmarked==</noinclude>
11626 # Test behavior of bug 19910
11628 Sectiion with all-equals
11633 The line above must have a trailing space
11636 But just in case it doesn't...
11640 But just in case it doesn't...
11644 Section replacement test (section 0)
11675 Section replacement test (section 1)
11704 Section replacement test (section 2)
11734 Section replacement test (section 3)
11765 Section replacement test (section 4)
11792 Section replacement test (section 5)
11823 Section replacement test (section 6)
11853 Section replacement test (section 7)
11884 Section replacement test (section 8)
11915 Section replacement test (section 9)
11944 Section replacement test (section 10)
11974 Section replacement test with initial whitespace (bug 13728)
11978 Preformatted initial line
11982 Preformatted initial line
11989 Section extraction, heading followed by pre with 20 spaces (bug 6398)
12001 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
12014 Section extraction, <pre> around bogus header (bug 10309)
12031 Section replacement, <pre> around bogus header (bug 10309)
12033 noxml replace=2,"xxx"
12054 Handling of 
 in URLs
12058 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
12065 5 quotes, code coverage +1 line (php)
12072 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
12074 5 quotes, code coverage +1 line (parsoid)
12080 <p><i><b></b></i></p>
12084 Special:Search page linking.
12088 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
12100 * {{ROOTPAGENAMEE}}
12102 * {{BASEPAGENAMEE}}
12104 * {{TALKPAGENAMEE}}
12105 * {{SUBJECTPAGENAME}}
12106 * {{SUBJECTPAGENAMEE}}
12112 * {{SUBJECTSPACEE}}
12113 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
12115 <ul><li> Parser test
12116 </li><li> Parser test
12117 </li><li> Parser test
12118 </li><li> Parser_test
12119 </li><li> Parser test
12120 </li><li> Parser_test
12121 </li><li> Parser test
12122 </li><li> Parser_test
12123 </li><li> Talk:Parser test
12124 </li><li> Talk:Parser_test
12125 </li><li> Parser test
12126 </li><li> Parser_test
12133 </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>
12137 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
12147 image4 |300px| centre
12148 image5.svg| http://///////
12153 <ul class="gallery">
12154 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12155 <div style="height: 150px;">Image1.png</div>
12156 <div class="gallerytext">
12159 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12160 <div style="height: 150px;">Image2.gif</div>
12161 <div class="gallerytext">
12166 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12167 <div style="height: 150px;">Image3</div>
12168 <div class="gallerytext">
12171 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12172 <div style="height: 150px;">Image4</div>
12173 <div class="gallerytext">
12178 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12179 <div style="height: 150px;">Image5.svg</div>
12180 <div class="gallerytext">
12181 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
12185 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12186 <div style="height: 150px;">* image6</div>
12187 <div class="gallerytext">
12195 Gallery (with options)
12197 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
12198 File:Nonexistant.jpg|caption
12199 File:Nonexistant.jpg
12200 image:foobar.jpg|some '''caption''' [[Main Page]]
12202 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
12205 <ul class="gallery" style="max-width: 226px;_width: 226px;">
12206 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
12207 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12208 <div style="height: 70px;">Nonexistant.jpg</div>
12209 <div class="gallerytext">
12214 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12215 <div style="height: 70px;">Nonexistant.jpg</div>
12216 <div class="gallerytext">
12219 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12220 <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>
12221 <div class="gallerytext">
12222 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
12226 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12227 <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>
12228 <div class="gallerytext">
12231 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
12232 <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>
12233 <div class="gallerytext">
12243 Gallery with wikitext inside caption
12246 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
12247 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
12250 <ul class="gallery">
12251 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12252 <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>
12253 <div class="gallerytext">
12254 <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>
12258 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12259 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
12260 <div class="gallerytext">
12261 <p>This is a test template
12270 gallery (with showfilename option)
12272 <gallery showfilename>
12273 File:Nonexistant.jpg|caption
12274 File:Nonexistant.jpg
12275 image:foobar.jpg|some '''caption''' [[Main Page]]
12279 <ul class="gallery">
12280 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12281 <div style="height: 150px;">Nonexistant.jpg</div>
12282 <div class="gallerytext">
12283 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
12288 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12289 <div style="height: 150px;">Nonexistant.jpg</div>
12290 <div class="gallerytext">
12291 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
12295 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12296 <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>
12297 <div class="gallerytext">
12298 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
12299 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
12303 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12304 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
12305 <div class="gallerytext">
12306 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
12315 Gallery (with namespace-less filenames)
12318 File:Nonexistant.jpg
12324 <ul class="gallery">
12325 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12326 <div style="height: 150px;">Nonexistant.jpg</div>
12327 <div class="gallerytext">
12330 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12331 <div style="height: 150px;">Nonexistant.jpg</div>
12332 <div class="gallerytext">
12335 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12336 <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>
12337 <div class="gallerytext">
12340 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
12341 <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>
12342 <div class="gallerytext">
12350 HTML Hex character encoding (spells the word "JavaScript")
12352 JavaScript
12354 <p>JavaScript
12359 HTML Hex character encoding bogus encoding (bug 26437 regression check)
12363 <p>&#xsee;&#XSEE;
12368 HTML Hex character encoding mixed case
12377 __FORCETOC__ override
12389 ISBN 978-0-1234-56 789
12391 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
12396 ISBN followed by 5 spaces
12407 ISBN ISBN 1234567890
12409 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
12414 Bug 22905: <abbr> followed by ISBN followed by </a>
12416 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
12418 <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>
12427 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
12432 Double RFC with a wiki link
12436 <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>
12445 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
12450 Centre-aligned image
12452 [[Image:foobar.jpg|centre]]
12454 <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>
12461 [[Image:foobar.jpg|none]]
12463 <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>
12468 Width + Height sized image (using px) (height is ignored)
12470 [[Image:foobar.jpg|640x480px]]
12472 <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>
12477 Width-sized image (using px, no following whitespace)
12479 [[Image:foobar.jpg|640px]]
12481 <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>
12486 Width-sized image (using px, with following whitespace - test regression from r39467)
12488 [[Image:foobar.jpg|640px ]]
12490 <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>
12495 Width-sized image (using px, with preceding whitespace - test regression from r39467)
12497 [[Image:foobar.jpg| 640px]]
12499 <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>
12504 Another italics / bold test
12512 # Note the results may be incorrect, as parserTest output included this:
12513 # XML error: Mismatched tag at byte 6120:
12514 # ...<dd> </dt></dl> </dd...
12522 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
12533 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
12535 Images with the "|" character in the comment
12537 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
12539 <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>
12544 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
12546 <html><script>alert(1);</script></html>
12548 <p><html><script>alert(1);</script></html>
12553 HTML with raw HTML ($wgRawHtml==true)
12557 <html><script>alert(1);</script></html>
12559 <p><script>alert(1);</script>
12564 Parents of subpages, one level up
12566 subpage title=[[Subpage test/L1/L2/L3]]
12570 <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>
12576 Parents of subpages, one level up, not named
12578 subpage title=[[Subpage test/L1/L2/L3]]
12582 <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>
12589 Parents of subpages, two levels up
12591 subpage title=[[Subpage test/L1/L2/L3]]
12597 <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
12598 </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>
12603 Parents of subpages, two levels up, without trailing slash or name.
12605 subpage title=[[Subpage test/L1/L2/L3]]
12614 Parents of subpages, two levels up, with lots of extra trailing slashes.
12616 subpage title=[[Subpage test/L1/L2/L3]]
12620 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
12625 Subpage test/L1/L2/L3Sibling
12631 Transclusion of a sibling page (one level up)
12633 subpage title=[[Subpage test/L1/L2/L3]]
12642 Transclusion of a child page
12644 subpage title=[[Subpage test/L1/L2]]
12653 Non-transclusion because of too many up levels
12655 subpage title=[[Subpage test/L1/L2/L3]]
12657 {{../../../../More than parent}}
12659 <p>{{../../../../More than parent}}
12664 Definition list code coverage
12670 <dl><dt> title  </dt><dd> def
12671 </dd><dt> title </dt><dd> def
12672 </dd><dt>title</dt><dd> def
12678 Don't fall for the self-closing div
12680 <div>hello world</div/>
12682 <div>hello world</div>
12691 <p>[[:Template:Msg]]
12700 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
12704 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
12706 Always escape literal '>' in output, not just after '<'
12720 <p>This is a test template
12721 This is a test template
12733 Inclusion of !userCanEdit() content
12737 <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>
12743 Out-of-order TOC heading levels
12752 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12754 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
12756 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
12757 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
12760 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
12762 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
12763 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
12768 <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>
12769 <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>
12770 <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>
12771 <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>
12772 <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>
12773 <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>
12779 ISBN with a dummy number
12789 ISBN with space-delimited number
12793 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
12799 ISBN with multiple spaces, no number
12818 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
12819 </p><p>ISBN 12345678901
12825 ISBN with trailing year (bug 8110)
12827 ISBN 1-234-56789-0 - 2006
12829 ISBN 1 234 56789 0 - 2006
12831 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
12832 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
12840 {{anchorencode:foo bar©#%n}}
12842 <p>foo_bar.C2.A9.23.25n
12847 anchorencode trims spaces
12849 {{anchorencode: __pretty__please__}}
12856 anchorencode deals with links
12858 {{anchorencode: [[hello|world]] [[hi]]}}
12865 anchorencode deals with templates
12867 {{anchorencode: {{Foo}} }}
12874 anchorencode encodes like the TOC generator: (bug 18431)
12876 === _ +:.3A%3A&&]] ===
12877 {{anchorencode: _ +:.3A%3A&&]] }}
12880 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
12881 <p>.2B:.3A.253A.26.26.5D.5D
12885 # Expected output in the following test is not necessarily expected (there
12886 # should probably be <p> tags inside the <blockquote> in the output) -- it's
12887 # only testing for well-formedness.
12889 Bug 6200: blockquotes and paragraph formatting
12909 Bug 8293: Use of center tag ruins paragraph formatting
12930 Parsing of overlapping (improperly nested) inline html tags (PHP parser)
12934 <span><s>x</span></s>
12936 <p><span><s>x</span></s></span>
12941 Parsing of overlapping (improperly nested) inline html tags (Parsoid)
12945 <span><s>x</span></s>
12947 <p><span><s>x</s></span><s></s>
12952 ### Language variants related tests
12955 Self-link in language variants
12957 title=[[Dunav]] language=sr
12959 Both [[Dunav]] and [[Дунав]] are names for this river.
12961 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
12972 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
12974 title=[[Duna]] language=sr
12976 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
12978 <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.
12983 Link to pages in language variants
12987 Main Page can be written as [[Маин Паге]]
12989 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
12995 Multiple links to pages in language variants
12999 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
13001 <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>.
13007 Simple template in language variants
13013 <p>This is a test template
13019 Template with explicit namespace in language variants
13025 <p>This is a test template
13031 Basic test for template parameter in language variants
13035 {{парамтест|param=foo}}
13037 <p>This is a test template with parameter foo
13043 Simple category in language variants
13047 [[Category:МедиаWики Усер'с Гуиде]]
13049 <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>
13066 Don't convert blue categorylinks to another variant (bug 33210)
13070 [[A]][[Category:分类]]
13072 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
13077 Stripping -{}- tags (language variants)
13081 Latin proverb: -{Ne nuntium necare}-
13083 <p>Latin proverb: Ne nuntium necare
13089 Prevent conversion with -{}- tags (language variants)
13091 language=sr variant=sr-ec
13093 Latinski: -{Ne nuntium necare}-
13095 <p>Латински: Ne nuntium necare
13101 Prevent conversion of text with -{}- tags (language variants)
13103 language=sr variant=sr-ec
13105 Latinski: -{Ne nuntium necare}-
13107 <p>Латински: Ne nuntium necare
13113 Prevent conversion of links with -{}- tags (language variants)
13115 language=sr variant=sr-ec
13119 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
13125 -{}- tags within headlines (within html for parserConvert())
13127 language=sr variant=sr-ec
13131 <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>
13137 Explicit definition of language variant alternatives
13139 language=zh variant=zh-tw
13141 -{zh:China;zh-tw:Taiwan}-, not China
13143 <p>Taiwan, not China
13149 Conversion around HTML tags
13151 language=sr variant=sr-ec
13153 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
13154 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
13157 <span title="ЛаCтин">ски</span>
13163 Explicit session-wise language variant mapping (A flag and - flag)
13165 language=zh variant=zh-tw
13167 Taiwan is not China.
13168 But -{A|zh:China;zh-tw:Taiwan}- is China,
13169 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
13170 and -{China}- is China.
13172 <p>Taiwan is not China.
13173 But Taiwan is Taiwan,
13174 (This should be stripped!)
13175 and China is China.
13180 Explicit session-wise language variant mapping (H flag for hide)
13182 language=zh variant=zh-tw
13184 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
13187 <p>(This should be stripped!)
13193 Adding explicit conversion rule for title (T flag)
13195 language=zh variant=zh-tw showtitle
13197 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13200 <p>Should be stripped!
13205 Testing that changing the language variant here in the tests actually works
13207 language=zh variant=zh showtitle
13209 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13212 <p>Should be stripped!
13217 Recursive conversion of alt and title attrs shouldn't clear converter state
13219 language=zh variant=zh-cn showtitle
13221 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
13222 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
13226 Should be stripped<span title="Exclamation">!</span>
13231 Bug 24072: more test on conversion rule for title
13233 language=zh variant=zh-tw showtitle
13235 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
13236 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
13239 <p>This should be stripped!
13240 This won't take interferes with the title rule.
13245 Partly disable title conversion if variant == main language code
13247 language=zh variant=zh title=[[ZH]] showtitle
13249 -{T|zh-cn:CN;zh-tw:TW}-
13257 Partly disable title conversion if variant == main language code, more
13259 language=zh variant=zh title=[[ZH]] showtitle
13269 Raw output of variant escape tags (R flag)
13271 language=zh variant=zh-tw
13273 Raw: -{R|zh:China;zh-tw:Taiwan}-
13275 <p>Raw: zh:China;zh-tw:Taiwan
13280 Nested using of manual convert syntax
13282 language=zh variant=zh-hk
13284 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
13286 <p>Nested: Hello Hong Kong!
13291 Proper conversion of text in external links
13293 language=sr variant=sr-ec
13295 http://www.google.com
13296 gopher://www.google.com
13297 [http://www.google.com http://www.google.com]
13298 [gopher://www.google.com gopher://www.google.com]
13299 [https://www.google.com irc://www.google.com]
13300 [ftp://www.google.com www.google.com/ftp://dir]
13301 [//www.google.com www.google.com]
13303 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
13304 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
13305 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
13306 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
13307 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
13308 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
13309 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
13314 Do not convert roman numbers to language variants
13316 language=sr variant=sr-ec
13320 <p>Фридрих IV је цар.
13325 Unclosed language converter markup "-{"
13336 Don't convert raw rule "-{R|=>}-" to "=>"
13353 Bug 529: Uncovered bullet
13363 # Plain MediaWiki does not remove empty lists, but tidy actually does.
13364 # Templates in Wikipedia rely on this behavior, as tidy has always been
13365 # enabled there. These tests are normally run *without* tidy, so specify the
13366 # full output here.
13367 # To test realistic parsing behavior, apply a tidy-like transformation to both
13368 # the expected output and your parser's output.
13370 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
13372 ******* Foo {{bullet}}
13374 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
13387 Bug 529: Uncovered table already at line-start
13410 Bug 529: Uncovered bullet in parser function result
13412 * Foo {{lc:{{bullet}} }}
13421 Bug 5678: Double-parsed template argument
13423 {{lc:{{{1}}}|hello}}
13430 Bug 5678: Double-parsed template invocation
13432 {{lc:{{paramtest {{!}} param = hello }} }}
13434 <p>{{paramtest | param = hello }}
13439 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
13442 title=[[Main Page]]
13444 {{PRVNÍVELKÉ:ěščř}}
13445 {{prvnívelké:ěščř}}
13465 Morwen/13: Unclosed link followed by heading
13472 <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>
13477 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
13484 <h1><span class="mw-headline" id="heading">heading</span></h1>
13489 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
13496 <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>
13511 Paragraphs inside divs (no extra line breaks)
13523 Paragraphs inside divs (extra line break on open)
13538 Paragraphs inside divs (extra line break on close)
13553 Paragraphs inside divs (extra line break on open and close)
13570 Nesting tags, paragraphs on lines which begin with <div>
13574 <div></div><strong>A
13583 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
13585 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
13589 <blockquote>Line one
13591 Line two</blockquote>
13593 <blockquote>Line one
13594 Line two</blockquote>
13599 Bug 6200: paragraphs inside blockquotes (extra line break on open)
13606 Line two</blockquote>
13611 Line two</blockquote>
13616 Bug 6200: paragraphs inside blockquotes (extra line break on close)
13620 <blockquote>Line one
13625 <blockquote>Line one
13633 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
13652 Paragraphs inside blockquotes/divs (no extra line breaks)
13654 <blockquote><div>Line one
13656 Line two</div></blockquote>
13658 <blockquote><div>Line one
13659 Line two</div></blockquote>
13664 Paragraphs inside blockquotes/divs (extra line break on open)
13669 Line two</div></blockquote>
13674 Line two</div></blockquote>
13679 Paragraphs inside blockquotes/divs (extra line break on close)
13681 <blockquote><div>Line one
13684 </div></blockquote>
13686 <blockquote><div>Line one
13689 </div></blockquote>
13694 Paragraphs inside blockquotes/divs (extra line break on open and close)
13700 </div></blockquote>
13706 </div></blockquote>
13711 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
13713 wgLinkHolderBatchSize=0
13719 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
13720 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
13721 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
13726 Free external link invading image caption
13728 [[Image:Foobar.jpg|thumb|http://x|hello]]
13730 <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>
13735 Bug 15196: localised external link numbers
13739 [http://en.wikipedia.org/]
13741 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
13746 Multibyte character in padleft
13748 {{padleft:-Hello|7|Æ}}
13755 Multibyte character in padright
13757 {{padright:Hello-|7|Æ}}
13764 formatdate parser function
13766 {{#formatdate:2009-03-24}}
13768 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
13773 formatdate parser function, with default format
13775 {{#formatdate:2009-03-24|mdy}}
13777 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
13782 Spacing of numbers in formatted dates
13784 {{#formatdate:January 15}}
13786 <p><span class="mw-formatted-date" title="01-15">January 15</span>
13791 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
13793 language=nl title=[[MediaWiki:Common.css]]
13795 {{#formatdate:2009-03-24|dmy}}
13797 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
13810 Edit comment with link
13814 I like the [[Main Page]] a lot
13816 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
13820 Edit comment with link and link text
13824 I like the [[Main Page|best pages]] a lot
13826 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
13830 Edit comment with link and link text with suffix
13834 I like the [[Main Page|best page]]s a lot
13836 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
13840 Edit comment with section link (non-local, eg in history list)
13842 comment title=[[Main Page]]
13844 /* External links */ removed bogus entries
13846 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
13850 Edit comment with section link and text before it (non-local, eg in history list)
13852 comment title=[[Main Page]]
13854 pre-comment text /* External links */ removed bogus entries
13856 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>
13860 Edit comment with section link (local, eg in diff view)
13862 comment local title=[[Main Page]]
13864 /* External links */ removed bogus entries
13866 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
13870 Edit comment with subpage link (bug 14080)
13874 title=[[Subpage test]]
13876 Poked at a [[/subpage]] here...
13878 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
13882 Edit comment with subpage link and link text (bug 14080)
13886 title=[[Subpage test]]
13888 Poked at a [[/subpage|neat little page]] here...
13890 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
13894 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
13897 title=[[Subpage test]]
13899 Poked at a [[/subpage]] here...
13901 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
13905 Edit comment with bare anchor link (local, as on diff)
13909 title=[[Main Page]]
13913 <a href="#section">#section</a>
13917 Edit comment with bare anchor link (non-local, as on history)
13920 title=[[Main Page]]
13924 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
13928 Anchor starting with underscore
13932 <p><a href="#_ref">One</a>
13937 Id starting with underscore
13939 <div id="_ref"></div>
13941 <div id="_ref"></div>
13946 Space normalisation on autocomment (bug 22784)
13949 title=[[Main Page]]
13951 /* __hello__world__ */
13953 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
13957 percent-encoding and + signs in comments (Bug 26410)
13961 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
13963 <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>
13967 Bad images - basic functionality
13976 Bad images - bug 16039: text after bad image disappears
13990 Verify that displaytitle works (bug #22501) no displaytitle
13994 wgAllowDisplayTitle=true
13995 wgRestrictDisplayTitle=false
13997 this is not the the title
14000 <p>this is not the the title
14005 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
14010 wgAllowDisplayTitle=true
14011 wgRestrictDisplayTitle=false
14013 this is not the the title
14014 {{DISPLAYTITLE:whatever}}
14017 <p>this is not the the title
14022 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
14027 wgAllowDisplayTitle=true
14028 wgRestrictDisplayTitle=true
14030 this is not the the title
14031 {{DISPLAYTITLE:whatever}}
14034 <p>this is not the the title
14039 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
14044 wgAllowDisplayTitle=true
14045 wgRestrictDisplayTitle=true
14047 this is not the the title
14048 {{DISPLAYTITLE:screen}}
14051 <p>this is not the the title
14056 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
14061 wgAllowDisplayTitle=false
14063 this is not the the title
14064 {{DISPLAYTITLE:screen}}
14067 <p>this is not the the title
14068 <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>
14073 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
14078 wgAllowDisplayTitle=false
14080 this is not the the title
14083 <p>this is not the the title
14088 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
14093 wgAllowDisplayTitle=true
14094 wgRestrictDisplayTitle=true
14096 this is not the the title
14097 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
14099 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
14100 <p>this is not the the title
14105 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
14110 wgAllowDisplayTitle=true
14111 wgRestrictDisplayTitle=true
14113 this is not the the title
14114 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
14116 <span style="color: red;">s</span>creen
14117 <p>this is not the the title
14122 preload: check <noinclude> and <includeonly>
14126 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
14132 preload: check <onlyinclude>
14136 Goodbye <onlyinclude>Hello world</onlyinclude>
14142 preload: can pass tags through if we want to
14146 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
14148 <includeonly>Hello world</includeonly>
14152 preload: check that it doesn't try to do tricks
14156 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
14158 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
14162 Play a bit with r67090 and bug 3158
14166 <div style="width:50% !important"> </div>
14167 <div style="width:50% !important"> </div>
14168 <div style="width:50% !important"> </div>
14169 <div style="border : solid;"> </div>
14171 <div style="width:50% !important"> </div>
14172 <div style="width:50% !important"> </div>
14173 <div style="width:50% !important"> </div>
14174 <div style="border : solid;"> </div>
14179 HTML5 data attributes
14181 <span data-foo="bar">Baz</span>
14182 <p data-abc-def_hij="">Quuz</p>
14184 <p><span data-foo="bar">Baz</span>
14186 <p data-abc-def_hij="">Quuz</p>
14191 percent-encoding and + signs in internal links (Bug 26410)
14193 [[User:+%]] [[Page+title%]]
14194 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
14195 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
14196 [[%33%45]] [[%33%45+]]
14198 <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>
14199 <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>
14200 <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>
14201 <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>
14206 Special characters in embedded file links (bug 27679)
14208 [[File:Contains & ampersand.jpg]]
14209 [[File:Does not exist.jpg|Title with & ampersand]]
14211 <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>
14212 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
14218 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
14220 Text's been normalized?
14222 <p>Text's been normalized?
14227 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
14229 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
14231 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
14236 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
14238 [http://www.example.org/ ideograms]
14240 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
14245 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
14247 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
14249 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
14273 Bug 31098 Template which includes system messages which includes the template
14277 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
14278 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
14283 Bug31490 Turkish: ucfirst 'blah'
14294 Bug31490 Turkish: ucfirst 'ix'
14305 Bug31490 Turkish: lcfirst 'BLAH'
14316 Bug31490 Turkish: ucfırst (with a dotless i)
14322 <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>
14327 Bug31490 ucfırst (with a dotless i) with English language
14333 <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>
14338 Bug 26375: TOC with italics
14340 title=[[Main Page]]
14343 == ''Lost'' episodes ==
14345 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14347 <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>
14350 <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>
14355 Bug 26375: TOC with bold
14357 title=[[Main Page]]
14360 == '''should be bold''' then normal text ==
14362 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14364 <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>
14367 <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>
14372 Bug 33845: Headings become cursive in TOC when they contain an image
14374 title=[[Main Page]]
14377 == Image [[Image:foobar.jpg]] ==
14379 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14381 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
14384 <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>
14389 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
14391 title=[[Main Page]]
14394 == <blockquote>Quote</blockquote> ==
14396 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14398 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
14401 <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>
14406 Unclosed tags in TOC
14408 title=[[Main Page]]
14412 <small>Hanc marginis exiguitas non caperet.</small>
14415 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14417 <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>
14420 <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>
14421 <p><small>Hanc marginis exiguitas non caperet.</small>
14427 Multiple tags in TOC
14430 == <i>Foo</i> <b>Bar</b> ==
14432 == <i>Foo</i> <blockquote>Bar</blockquote> ==
14434 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14436 <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>
14437 <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>
14440 <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>
14441 <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>
14446 Tags with parameters in TOC
14449 == <sup class="in-h2">Hello</sup> ==
14451 == <sup class="a > b">Evilbye</sup> ==
14453 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14455 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
14456 <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>
14459 <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>
14460 <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>
14465 span tags with directionality in TOC
14468 == <span dir="ltr">C++</span> ==
14470 == <span dir="rtl">זבנג!</span> ==
14472 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
14474 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
14476 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
14478 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14480 <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>
14481 <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>
14482 <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>
14483 <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>
14484 <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>
14487 <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>
14488 <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>
14489 <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>
14490 <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>
14491 <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>
14498 == {{int:headline_sample}} ==
14502 Bug 32057: Title needed when expanding <h> nodes.
14504 title=[[Main Page]]
14508 <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>
14513 Strip marker in urlencode
14515 {{urlencode:x<nowiki/>y}}
14516 {{urlencode:x<nowiki/>y|wiki}}
14517 {{urlencode:x<nowiki/>y|path}}
14544 Strip marker in formatNum
14546 {{formatnum:1<nowiki/>2}}
14547 {{formatnum:1<nowiki/>2|R}}
14555 Check noCommafy in formatNum
14559 {{formatnum:123456.78}}
14560 {{formatnum:123456.78|NOSEP}}
14568 Strip marker in grammar
14572 {{grammar:elative|foo<nowiki/>bar}}
14579 Strip marker in padleft
14581 {{padleft:|2|x<nowiki/>y}}
14588 Strip marker in padright
14590 {{padright:|2|x<nowiki/>y}}
14597 Strip marker in anchorencode
14599 {{anchorencode:x<nowiki/>y}}
14606 nowiki inside link inside heading (bug 18295)
14608 ==[[foo|x<nowiki>y</nowiki>z]]==
14610 <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>
14615 new support for bdi element (bug 31817)
14617 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
14619 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
14624 Ignore pipe between table row attributes
14628 |- id=foo | style='color: red'
14636 <tr id="foo" style="color: red">
14643 Gallery override link with WikiLink (bug 34852)
14646 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
14649 <ul class="gallery">
14650 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14651 <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>
14652 <div class="gallerytext">
14662 Gallery override link with absolute external link (bug 34852)
14665 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
14668 <ul class="gallery">
14669 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14670 <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>
14671 <div class="gallerytext">
14681 Gallery override link with malicious javascript (bug 34852)
14684 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
14687 <ul class="gallery">
14688 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14689 <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>
14690 <div class="gallerytext">
14700 Gallery with invalid title as link (bug 43964)
14703 File:foobar.jpg|link=<
14706 <ul class="gallery">
14707 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14708 <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>
14709 <div class="gallerytext">
14717 Language parser function
14726 Padleft and padright as substr
14728 {{padleft:|3|abcde}}
14729 {{padright:|3|abcde}}
14737 Special parser function
14739 {{#special:RandomPage}}
14740 {{#special:BaDtItLe}}
14741 {{#special:Foobar}}
14750 Bug 34939 - Case insensitive link parsing ([HttP://])
14752 [HttP://MediaWiki.Org/]
14754 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
14759 Bug 34939 - Case insensitive link parsing ([HttP:// title])
14761 [HttP://MediaWiki.Org/ MediaWiki]
14763 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
14768 Bug 34939 - Case insensitive link parsing (HttP://)
14770 HttP://MediaWiki.Org/
14772 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
14778 ### Parsoids-specific tests
14779 ### Parsoid-PHP parser incompatibilities
14782 1. SOL-sensitive wikitext tokens as template-args
14784 parsoid=wt2html,wt2wt
14790 <span about="#mwt1" typeof="mw:Transclusion">
14791 </span><ul about="#mwt1"><li>a</li></ul>
14792 <span about="#mwt2" typeof="mw:Transclusion">
14793 </span><ol about="#mwt2"><li>a</li></ol>
14794 <span about="#mwt3" typeof="mw:Transclusion">
14795 </span><dl about="#mwt3"><dd>a</dd></dl>
14798 #### ----------------------------------------------------------------
14799 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
14800 #### tags. Parsoid's output for these tags differs from that of the
14802 #### ----------------------------------------------------------------
14805 Ref: 1. ref-location should be replaced with an index span
14810 B <ref name="x">foo</ref>
14813 <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>
14814 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>
14815 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>
14819 Ref: 2. ref-tags with identical names should all get the same index
14823 A <ref name="x">foo</ref>
14826 <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>
14827 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>
14831 Ref: 3. spaces in ref-names should be ignored
14835 A <ref name="x">foo</ref>
14836 B <ref name=" x " />
14839 <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>
14840 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>
14841 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>
14845 Ref: 4. 'constructor' should be accepted as a valid ref-name
14846 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
14850 A <ref name="constructor">foo</ref>
14852 <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>
14856 Ref: 5. body should accept generic wikitext
14861 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
14866 <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>
14868 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14869 <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>
14874 Ref: 6. indent-pres should not be output in ref-body
14886 <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>
14888 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14889 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
14896 Ref: 6. No p-wrapping in ref-body
14915 <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>
14917 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14918 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
14932 Ref: 8. transclusion wikitext has lower precedence
14936 A <ref> foo {{echo|</ref> B C}}
14940 <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>
14942 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14943 <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>
14947 Ref: 9. unclosed comments should not leak out of ref-body
14951 A <ref> foo <!--</ref> B C
14955 <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>
14957 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14958 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li></ol>
14962 Ref: 10. Unclosed HTML tags should not leak out of ref-body
14966 A <ref> <b> foo </ref> B C
14970 <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>
14972 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references">
14973 <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>
14977 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
14984 <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
14985 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>
14989 Ref: 12. ref-tags act as trailing newline migration barrier
14993 <!--the newline at the end of this line moves out of the p-tag-->a
14995 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
15000 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
15003 <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>
15004 <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>
15011 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
15019 <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
15020 <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>
15024 Ref: 14. A nested ref-tag should be emitted as plain text
15028 <ref>foo <ref>bar</ref> baz</ref>
15032 <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>
15034 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw="{"name":"references","attrs":{}}">
15035 <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>
15039 Ref: 15. ref-tags with identical names should get identical indexes
15043 A1 <ref name="a">foo</ref> A2 <ref name="a" />
15044 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
15048 <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>
15049 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>
15051 <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>
15055 References: 1. references tag without any refs should be handled properly
15061 <ol about="#mwt2" class="references" data-mw='{"name":"references","attrs":{}}' typeof="mw:Extension/references"></ol>
15065 References: 2. references tag with group only outputs references from that group
15069 A <ref group="a">foo</ref>
15070 B <ref group="b">bar</ref>
15072 <references group='a' />
15074 <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>
15075 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>
15077 <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>
15081 References: 3. ref list should be cleared after processing references
15093 <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>
15095 <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>
15097 <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>
15099 <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>
15103 References: 4. only referenced group should be cleared after processing references
15107 A <ref group="a">afoo</ref>
15110 <references group="a"/>
15116 <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>
15117 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>
15119 <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>
15121 <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>
15123 <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>
15127 References: 5. ref tags in references should be processed while ignoring all other content
15132 B <ref name="b">bar</ref>
15135 <ref name="a">foo</ref>
15136 This should just get lost.
15139 <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>
15140 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>
15142 <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>
15146 References: 6. <references /> from a transclusion
15150 {{echo|<references />}}
15152 <ol class="references" about="#mwt2" typeof="mw:Transclusion" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}'></ol>
15156 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
15160 A <ref>foo bar for a</ref>
15166 <ref name="b">foo</ref>
15169 <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>
15170 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>
15172 <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>
15174 <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>
15178 #### ----------------------------------------------------------------
15179 #### The following section of tests are primarily to test
15180 #### wikitext escaping capabilities of Parsoid. Given that
15181 #### escaping can be done any number of ways, the wikitext (input)
15182 #### is always adjusted to reflect how Parsoid adds nowiki
15185 #### We are marking several tests as parsoid-only since the
15186 #### HTML in the result section is different from what the
15187 #### PHP parser generates for it.
15188 #### ----------------------------------------------------------------
15191 #### --------------- Headings ---------------
15193 #### 1. Nested inside html <h1>=foo=</h1>
15194 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
15195 #### 3. Nested inside html with wikitext split by html tags
15196 #### 4. No escape needed
15197 #### 5. Empty headings <h1></h1>
15198 #### 6. Heading chars in SOL context
15199 #### ----------------------------------------
15201 Headings: 0. Unnested
15205 <nowiki>=foo=</nowiki>
15207 <nowiki> =foo= </nowiki>
15209 <nowiki>=foo=</nowiki>
15211 =foo''a''<nowiki>=</nowiki>
15213 <p><span typeof="mw:Nowiki">=foo=</span></p>
15215 <p><span typeof="mw:Nowiki"> =foo= </span>
15217 <span typeof="mw:Nowiki">=foo=</span></p>
15219 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
15223 Headings: 1. Nested inside html
15227 =<nowiki>=foo=</nowiki>=
15229 ==<nowiki>=foo=</nowiki>==
15231 ===<nowiki>=foo=</nowiki>===
15233 ====<nowiki>=foo=</nowiki>====
15235 =====<nowiki>=foo=</nowiki>=====
15237 ======<nowiki>=foo=</nowiki>======
15239 <h1><span typeof="mw:Nowiki">=foo=</span></h1>
15240 <h2><span typeof="mw:Nowiki">=foo=</span></h2>
15241 <h3><span typeof="mw:Nowiki">=foo=</span></h3>
15242 <h4><span typeof="mw:Nowiki">=foo=</span></h4>
15243 <h5><span typeof="mw:Nowiki">=foo=</span></h5>
15244 <h6><span typeof="mw:Nowiki">=foo=</span></h6>
15248 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
15253 <nowiki>*</nowiki>bar
15259 <nowiki>=bar=</nowiki>
15267 Headings: 3. Nested inside html with wikitext split by html tags
15271 =='''bold'''<nowiki>foo=</nowiki>=
15273 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
15277 Headings: 4a. No escaping needed (testing just h1 and h2)
15295 =<nowiki>=</nowiki>=
15303 <h1><i>=</i>foo=</h1>
15304 <h1><span typeof="mw:Nowiki">=</span></h1>
15308 Headings: 4b. No escaping needed (inside p-tags)
15323 Headings: 5. Empty headings
15335 =====<nowiki/>=====
15337 ======<nowiki/>======
15348 Headings: 6a. Heading chars in SOL context (with trailing spaces)
15352 <nowiki>=a=</nowiki>
15354 <nowiki>=a=</nowiki>
15356 <nowiki>=a=</nowiki>
15358 <nowiki>=a=</nowiki>
15367 Headings: 6b. Heading chars in SOL context (with trailing newlines)
15395 Headings: 6c. Heading chars in SOL context (leading newline break)
15400 <nowiki>=b=</nowiki>
15407 Headings: 6d. Heading chars in SOL context (with interspersed comments)
15411 <!--c0--><nowiki>=a=</nowiki>
15413 <nowiki>=a=</nowiki> <!--c2--> <!--c3-->
15415 <p><!--c0-->=a=</p>
15416 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
15420 Headings: 6d. Heading chars in SOL context (No escaping needed)
15429 #### --------------- Lists ---------------
15430 #### 0. Outside nests (*foo, etc.)
15431 #### 1. Nested inside html <ul><li>*foo</li></ul>
15432 #### 2. Inside definition lists
15433 #### 3. Only bullets at start should be escaped
15434 #### 4. No escapes needed
15435 #### 5. No unnecessary escapes
15436 #### 6. Escape bullets in SOL position
15437 #### 7. Escape bullets in a multi-line context
15438 #### ----------------------------------------
15441 Lists: 0. Outside nests
15443 <nowiki>*</nowiki>foo
15445 <nowiki>#</nowiki>foo
15453 Lists: 1. Nested inside html
15455 *<nowiki>*foo</nowiki>
15457 *<nowiki>#foo</nowiki>
15459 *<nowiki>:foo</nowiki>
15461 *<nowiki>;foo</nowiki>
15463 #<nowiki>*foo</nowiki>
15465 #<nowiki>#foo</nowiki>
15467 #<nowiki>:foo</nowiki>
15469 #<nowiki>;foo</nowiki>
15491 Lists: 2. Inside definition lists
15493 ;<nowiki>;foo</nowiki>
15495 ;<nowiki>:foo</nowiki>
15497 ;<nowiki>:foo</nowiki>
15500 :<nowiki>:foo</nowiki>
15515 Lists: 3. Only bullets at start of text should be escaped
15517 *<nowiki>*foo*bar</nowiki>
15519 *<nowiki>*foo</nowiki>''it''*bar
15523 <ul><li>*foo<i>it</i>*bar
15529 Lists: 4. No escapes needed
15541 <ul><li><i>foo</i>*bar
15543 <ul><li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
15548 Lists: 5. No unnecessary escapes
15550 * bar <span><nowiki>[[foo]]</nowiki></span>
15552 *=bar <span><nowiki>[[foo]]</nowiki></span>
15554 *[[bar <span><nowiki>[[foo]]</nowiki></span>
15556 *]]bar <span><nowiki>[[foo]]</nowiki></span>
15558 *=bar <span>foo]]</span>=
15562 <ul><li> bar <span>[[foo]]</span>
15564 <ul><li>=bar <span>[[foo]]</span>
15566 <ul><li>[[bar <span>[[foo]]</span>
15568 <ul><li>]]bar <span>[[foo]]</span>
15570 <ul><li>=bar <span>foo]]</span>=
15572 <ul><li> <s></s>: a
15578 Lists: 6. Escape bullets in SOL position
15582 <!--cmt--><nowiki>*foo</nowiki>
15584 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
15588 Lists: 7. Escape bullets in a multi-line context
15591 <nowiki>*</nowiki>b
15598 #### --------------- HRs ---------------
15599 #### 1. Single line
15600 #### -----------------------------------
15603 HRs: 1. Single line
15607 ----<nowiki>----</nowiki>
15611 <hr><span typeof="mw:Nowiki">----</span>
15616 #### --------------- Tables ---------------
15617 #### 1a. Simple example
15618 #### 1b. No escaping needed (!foo)
15619 #### 1c. No escaping needed (|foo)
15620 #### 1d. No escaping needed (|}foo)
15622 #### 2a. Nested in td (<td>foo|bar</td>)
15623 #### 2b. Nested in td (<td>foo||bar</td>)
15624 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
15626 #### 3a. Nested in th (<th>foo!bar</th>)
15627 #### 3b. Nested in th (<th>foo!!bar</th>)
15628 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
15632 #### 4c. No escaping needed
15633 #### --------------------------------------
15636 Tables: 1a. Simple example
15647 Tables: 1b. No escaping needed
15656 Tables: 1c. No escaping needed
15665 Tables: 1d. No escaping needed
15674 Tables: 2a. Nested in td
15679 |<nowiki>foo|bar</nowiki>
15683 <td><span typeof="mw:Nowiki">foo|bar</span></td></tr></tbody></table>
15687 Tables: 2b. Nested in td
15692 |<nowiki>foo||bar</nowiki>
15693 |''it''<nowiki>foo||bar</nowiki>
15697 <td><span typeof="mw:Nowiki">foo||bar</span></td>
15698 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
15702 Tables: 2c. Nested in td -- no escaping needed
15710 <table><tbody><tr><td>foo!!bar
15711 </td></tr></tbody></table>
15716 Tables: 3a. Nested in th
15724 <table><tbody><tr><th>foo!bar
15725 </th></tr></tbody></table>
15730 Tables: 3b. Nested in th
15735 !<nowiki>foo!!bar</nowiki>
15739 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
15744 Tables: 3c. Nested in th -- no escaping needed
15749 !<nowiki>foo||bar</nowiki>
15753 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
15757 Tables: 4a. Escape -
15765 |<nowiki>-bar</nowiki>
15769 <tr><th>-bar</th></tr>
15771 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
15775 Tables: 4b. Escape +
15783 |<nowiki>+bar</nowiki>
15787 <tr><th>+bar</th></tr>
15789 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
15793 Tables: 4c. No escaping needed
15812 <tr><td>foo-bar</td><td>foo+bar</td></tr>
15813 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
15821 ### SSS FIXME: Disabled right now because accurate html2wt
15822 ### on this snippet requires data-parsoid flags that we've
15823 ### stripped out of these tests. We should scheme how we
15824 ### we want to handle these kind of tests that require
15825 ### data-parsoid flags for accurate html2wt serialization
15828 Tables: 4d. No escaping needed
15846 #### --------------- Links ----------------
15847 #### 1. Quote marks in link text
15848 #### 2. Wikilinks: Escapes needed
15849 #### 3. Wikilinks: No escapes needed
15850 #### 4. Extlinks: Escapes needed
15851 #### 5. Extlinks: No escapes needed
15852 #### --------------------------------------
15854 Links 1. Quote marks in link text
15858 [[Foo|Foo<nowiki>''boo''</nowiki>]]
15860 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
15864 Links 2. WikiLinks: Escapes needed
15868 [[Foo|<nowiki>[Foobar]</nowiki>]]
15869 [[Foo|<nowiki>Foobar]</nowiki>]]
15870 [[Foo|x [Foobar] x]]
15871 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
15872 [[Foo|<nowiki>[[Bar]]</nowiki>]]
15873 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
15874 [[Foo|<nowiki>|Bar</nowiki>]]
15875 [[Foo|<nowiki>]]bar</nowiki>]]
15876 [[Foo|<nowiki>[[bar</nowiki>]]
15877 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
15879 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
15880 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
15881 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
15882 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
15883 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
15884 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
15885 <a href="Foo" rel="mw:WikiLink">|Bar</a>
15886 <a href="Foo" rel="mw:WikiLink">]]bar</a>
15887 <a href="Foo" rel="mw:WikiLink">[[bar</a>
15888 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
15892 Links 3. WikiLinks: No escapes needed
15899 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
15900 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
15904 Links 4. ExtLinks: Escapes needed
15908 [http://google.com <nowiki>[google]</nowiki>]
15909 [http://google.com <nowiki>google]</nowiki>]
15911 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
15912 <a href="http://google.com" rel="mw:ExtLink">google]</a>
15916 Links 5. ExtLinks: No escapes needed
15920 [http://google.com [google]
15922 <a href="http://google.com" rel="mw:ExtLink">[google</a>
15925 #### --------------- Quotes ---------------
15926 #### 1. Quotes inside <b> and <i>
15927 #### 2. Link fragments separated by <i> and <b> tags
15928 #### 3. Link fragments inside <i> and <b>
15929 #### 4. No escaping needed
15930 #### --------------------------------------
15932 1. Quotes inside <b> and <i>
15934 parsoid=html2wt,wt2wt
15936 ''<nowiki>'foo'</nowiki>''
15937 ''<nowiki>''foo''</nowiki>''
15938 ''<nowiki>'''foo'''</nowiki>''
15940 '''<nowiki>'foo'</nowiki>'''
15941 '''<nowiki>''foo''</nowiki>'''
15942 '''<nowiki>'''foo'''</nowiki>'''
15943 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
15944 '''foo'''<nowiki/>'s
15947 '<nowiki/>''foo''<nowiki/>'
15949 '''foo'''<nowiki/>'
15950 '<nowiki/>'''foo'''<nowiki/>'
15959 <b>foo'<i>bar'</i>baz</b>
15970 2. Link fragments separated by <i> and <b> tags
15972 [[''foo''<nowiki>hello]]</nowiki>
15974 [['''foo'''<nowiki>hello]]</nowiki>
15976 <p>[[<i>foo</i>hello]]
15977 </p><p>[[<b>foo</b>hello]]
15982 3. Link fragments inside <i> and <b>
15983 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
15984 this is one of the shortcomings of this format)
15986 ''[[foo''<nowiki>]]</nowiki>
15988 '''[[foo'''<nowiki>]]</nowiki>
15991 </p><p><b>[[foo</b>]]
15996 4. No escaping needed
15998 '<span>''bar''</span>'
15999 '<span>'''bar'''</span>'
16001 <p>'<span><i>bar</i></span>'
16002 '<span><b>bar</b></span>'
16006 #### ----------- Paragraphs ---------------
16007 #### 1. No unnecessary escapes
16008 #### --------------------------------------
16011 1. No unnecessary escapes
16013 bar <span><nowiki>[[foo]]</nowiki></span>
16015 =bar <span><nowiki>[[foo]]</nowiki></span>
16017 [[bar <span><nowiki>[[foo]]</nowiki></span>
16019 ]]bar <span><nowiki>[[foo]]</nowiki></span>
16021 =bar <span>foo]]</span><nowiki>=</nowiki>
16023 <p>bar <span>[[foo]]</span>
16024 </p><p>=bar <span>[[foo]]</span>
16025 </p><p>[[bar <span>[[foo]]</span>
16026 </p><p>]]bar <span>[[foo]]</span>
16027 </p><p>=bar <span>foo]]</span>=
16031 #### ----------------------- PRE --------------------------
16032 #### 1. Leading whitespace in SOL context should be escaped
16033 #### ------------------------------------------------------
16035 1. Leading whitespace in SOL context should be escaped
16039 <nowiki> </nowiki>a
16041 <nowiki> </nowiki> a
16043 <nowiki> </nowiki>a(tab)
16045 <nowiki> </nowiki> a
16047 <nowiki> </nowiki> a
16050 <nowiki> </nowiki>b
16053 <nowiki> </nowiki>b
16056 <nowiki> </nowiki> b
16062 <p><!--cmt--> a</p>
16071 #### --------------- HTML tags ---------------
16074 #### 3. multi-line html tag
16075 #### -----------------------------------------
16081 <a href="http://google.com">google</a>
16083 <a href="http://google.com">google</a>
16089 <nowiki><div>foo</div>
16090 <div style="color:red">foo</div></nowiki>
16092 <p><div>foo</div>
16093 <div style="color:red">foo</div>
16098 3. multi-line html tag
16113 <nowiki><ref>foo</ref></nowiki>
16115 <p><ref>foo</ref>
16119 #### --------------- Others ---------------
16123 <nowiki>foo</nowiki>
16125 <p><nowiki>foo</nowiki>
16129 ## The quote-char in the input is necessary for triggering the bug
16131 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
16133 parsoid=wt2wt,html2wt
16142 Tag-like HTML structures are passed through as text
16164 </p><p>1<d e>f
16169 # This was a bug in the PHP parser (see bug 17663 and its dups,
16170 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
16172 Tag names followed by punctuation should not be recognized as tags
16176 <p><s.ome> text
16181 HTML tag with necessary entities in attributes
16183 <span title="&amp;">foo</span>
16185 <p><span title="&amp;">foo</span>
16190 HTML tag with 'unnecessary' entity encoding in attributes
16192 <span title="&">foo</span>
16194 <p><span title="&">foo</span>
16199 HTML tag with broken attribute value quoting
16201 <span title="Hello world>Foo</span>
16203 <p><span>Foo</span>
16208 Parsoid-only: HTML tag with broken attribute value quoting
16212 <span title="Hello world>Foo</span>
16214 <p><span title="Hello world">Foo</span>
16219 Table with broken attribute value quoting
16222 | title="Hello world|Foo
16233 Table with broken attribute value quoting on consecutive lines
16236 | title="Hello world|Foo
16237 | style="color:red|Bar
16250 Parsoid-only: Table with broken attribute value quoting on consecutive lines
16255 | title="Hello world|Foo
16256 | style="color:red|Bar
16261 <td title="Hello world">Foo
16262 </td><td style="color: red">Bar
16263 </td></tr></tbody></table>
16268 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
16278 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
16288 Accept empty td cell attribute
16291 | align="center" | foo || |
16296 <td align="center"> foo </td>
16303 Non-empty attributes in th-cells
16306 ! Foo !! style="color: red" | Bar
16312 <th style="color: red"> Bar
16318 Accept empty attributes in th-cells
16333 Empty table rows go away
16354 ### Parsoid-centric tests for testing RTing of inter-element separators
16355 ### Edge cases not tested by existing parser tests and specific to
16356 ### Parsoid-specific serialization strategies.
16360 RT-ed inter-element separators should be valid separators
16373 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
16374 (Parsoid-only since PHP parser relies on Tidy for correct output)
16390 Empty TD followed by TD with tpl-generated attribute
16395 |{{echo|style='color:red'}}|foo
16409 Indented table with an empty td
16428 Empty TR followed by a template-generated TR
16429 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
16431 parsoid=wt2html,wt2wt
16435 {{echo|<tr><td>foo</td></tr>}}
16441 <tr typeof="mw:Transclusion">
16442 <td>foo</td></tr></tbody></table>
16445 ## PHP and parsoid output differ for this, and since this is primarily
16446 ## for testing Parsoid's serializer, marking this Parsoid only
16448 Empty TR followed by mixed-ws-comment line should RT correctly
16462 <td> <!--c--></td></tr>
16464 <td><!--c--> <!--d--></td></tr>
16470 Multi-line image caption generated by templates with/without trailing newlines
16474 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
16475 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
16477 <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>
16478 <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>
16482 ## PHP emits broken html for this, and since this is primarily
16483 ## a Parsoid serializer test, marking this Parsoid only
16485 Improperly nested inline or quotes tags with whitespace in between
16489 <span> <s>x</span> </s>
16492 <p><span> <s>x</s></span><s> </s>
16493 <b> <i>x</i></b><i> </i>
16498 Encapsulate protected attributes from wt
16502 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
16504 <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>
16508 # -----------------------------------------------------------------
16509 # The following section of tests are primarily to spec requirements
16510 # around serialization of new/edited content.
16512 # All these tests are marked Parsoid html2wt and html2html only
16513 # ----------------------------------------------------------------
16516 Image: Modifying size of an image
16520 [[Image:Wiki.png|230x230px]]
16522 <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>
16526 Image: New block level image should have \n before and after
16531 [[File:Wiki.png|right|thumb|150x150px]]
16534 <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>
16538 Lists: Add space after bullets
16545 * <span> baz</span>
16550 <li><span> baz</span></li>
16555 Parsoid: Serialize positional parameters with = in them as named parameter
16561 <p about="#mwt1" typeof="mw:Transclusion"
16562 data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}'
16566 # -----------------------------------------------------------------
16567 # End of section for Parsoid-only html2wt tests for serialization
16569 # -----------------------------------------------------------------
16576 Try for 100% code coverage