1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well formdness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-only test (not run by PHP parser)
25 # php php-only test (not run by the parsoid parser)
26 # showtitle make the first line the title
27 # comment run through Linker::formatComment() instead of main parser
28 # local format section links in edit comment text as local links
29 # notoc disable table of contents
31 # You can also set the following parser properties via test options:
32 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
33 # wgLinkHolderBatchSize, wgRawHtml
35 # For testing purposes, temporary articles can created:
36 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
37 # where '/' denotes a newline.
39 # This is the standard article assumed to exist.
64 MediaWiki:bad image list
66 * [[File:Bad.jpg]] except [[Nasty page]]
100 Template:echo_with_span
106 Template:echo_with_div
118 Template:table_attribs
121 |</noinclude>style="color: red"| Foo
127 {{table_attribs}} || Bar || Baz
131 Template:image_attribs
134 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
168 This is a simple paragraph.
170 <p>This is a simple paragraph.
175 Paragraphs with extra newline spacing
198 Paragraphs with newline spacing with comment lines in between
206 <!--foo--><!--More than 1 comment, still stripped-->
210 <!--foo--> <!----> <!-- bar -->
271 Paragraphs with newline spacing with non-empty white-space lines in between
298 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
306 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
345 Extra newlines: More paragraphs with indented comment
360 Extra newlines followed by heading
375 <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>
376 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
379 <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>
384 Extra newlines between heading and content are swallowed
392 <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>
393 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
400 http://fr.wikipedia.org/wiki/🍺
401 <!-- EasterEgg we love beer, better be able be able to link to it -->
403 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
426 * plain''italic''plain
427 * plain''italic''plain''italic''plain
428 * plain'''bold'''plain
429 * plain'''bold'''plain'''bold'''plain
430 * plain''italic''plain'''bold'''plain
431 * plain'''bold'''plain''italic''plain
432 * plain''italic'''bold-italic'''italic''plain
433 * plain'''bold''bold-italic''bold'''plain
434 * plain'''''bold-italic'''italic''plain
435 * plain'''''bold-italic''bold'''plain
436 * plain''italic'''bold-italic'''''plain
437 * plain'''bold''bold-italic'''''plain
438 * plain l'''italic''plain
439 * plain l''''bold''' plain
444 <li> plain<i>italic</i>plain
446 <li> plain<i>italic</i>plain<i>italic</i>plain
448 <li> plain<b>bold</b>plain
450 <li> plain<b>bold</b>plain<b>bold</b>plain
452 <li> plain<i>italic</i>plain<b>bold</b>plain
454 <li> plain<b>bold</b>plain<i>italic</i>plain
456 <li> plain<i>italic<b>bold-italic</b>italic</i>plain
458 <li> plain<b>bold<i>bold-italic</i>bold</b>plain
460 <li> plain<i><b>bold-italic</b>italic</i>plain
462 <li> plain<b><i>bold-italic</i>bold</b>plain
464 <li> plain<i>italic<b>bold-italic</b></i>plain
466 <li> plain<b>bold<i>bold-italic</i></b>plain
468 <li> plain l'<i>italic</i>plain
470 <li> plain l'<b>bold</b> plain
476 # this example taken from the [[simple:Moon]] article (bug 47326)
478 Italics and possessives (1)
480 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
482 <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
486 # this example taken from [[en:Flaming Pie]] (bug 49926)
488 Italics and possessives (2)
490 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
492 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
496 # this example taken from [[en:Dictionary]] (bug 49926)
498 Italics and possessives (3)
500 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
502 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
508 ### 2-quote opening sequence tests
511 Italics and bold: 2-quote opening sequence: (2,2)
521 Italics and bold: 2-quote opening sequence: (2,3)
531 Italics and bold: 2-quote opening sequence: (2,4)
540 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
542 Italics and bold: 2-quote opening sequence: (2,5)
555 ### 3-quote opening sequence tests
559 Italics and bold: 3-quote opening sequence: (3,2)
569 Italics and bold: 3-quote opening sequence: (3,3)
579 Italics and bold: 3-quote opening sequence: (3,4)
588 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
590 Italics and bold: 3-quote opening sequence: (3,5)
603 ### 4-quote opening sequence tests
607 Italics and bold: 4-quote opening sequence: (4,2)
617 Italics and bold: 4-quote opening sequence: (4,3)
627 Italics and bold: 4-quote opening sequence: (4,4)
636 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
638 Italics and bold: 4-quote opening sequence: (4,5)
645 <p>'<b>foo</b><i></i>
651 ### 5-quote opening sequence tests
655 Italics and bold: 5-quote opening sequence: (5,2)
666 Italics and bold: 5-quote opening sequence: (5,3)
676 Italics and bold: 5-quote opening sequence: (5,4)
680 <p><i><b>foo'</b></i>
686 Italics and bold: 5-quote opening sequence: (5,5)
695 ### multiple quote sequences in a line
698 Italics and bold: multiple quote sequences: (2,4,2)
702 <p><i>foo'<b>bar</b></i>
708 Italics and bold: multiple quote sequences: (2,4,3)
712 <p><i>foo'<b>bar</b></i>
718 Italics and bold: multiple quote sequences: (2,4,4)
722 <p><i>foo'<b>bar'</b></i>
727 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
729 Italics and bold: multiple quote sequences: (3,4,2)
736 <p><b>foo'</b>bar<i></i>
741 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
743 Italics and bold: multiple quote sequences: (3,4,3)
750 <p><b>foo'</b>bar<b></b>
755 ### other quote tests
758 Italics and bold: other quote tests: (2,3,5)
760 ''this is about '''foo's family'''''
762 <p><i>this is about <b>foo's family</b></i>
768 Italics and bold: other quote tests: (2,(3,3),2)
770 ''this is about '''foo's''' family''
772 <p><i>this is about <b>foo's</b> family</i>
778 Italics and bold: other quote tests: (3,2,3,2)
780 '''this is about ''foo'''s family''
782 <p><b>this is about <i>foo</i></b><i>s family</i>
788 Italics and bold: other quote tests: (3,2,3,3)
791 '''this is about ''foo'''s family'''
793 <p>'<i>this is about </i>foo<b>s family</b>
799 Italics and bold: other quote tests: (3,(2,2),3)
801 '''this is about ''foo's'' family'''
803 <p><b>this is about <i>foo's</i> family</b>
809 Italicized possessive
811 The ''[[Main Page]]'''s talk page.
813 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
818 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
819 (Requires tidy for PHP parser output to be fixed up)
821 parsoid=wt2html,wt2wt
829 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
830 <td><i>a</i></td><td><i>b</i></td></tr>
839 Non-html5 tags should be accepted
841 <center>''foo''</center>
844 <strike>''foo''</strike>
847 <center><i>foo</i></center>
848 <p><big><i>foo</i></big>
849 <font><i>foo</i></font>
850 <strike><i>foo</i></strike>
856 <wbr> is valid wikitext (bug 52468)
864 # <strike> is HTML4, <s> is HTML4/5.
866 <s> or <strike> for strikethrough
868 <strike>strike</strike>
872 <p><strike>strike</strike>
878 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
880 <b→> doesn't work! </b→>
882 <bä> doesn't work! </bä>
884 <boo> works fine </boo>
890 <p><b→> doesn't work! </b→>
891 </p><p><bä> doesn't work! </bä>
892 </p><p><boo> works fine </boo>
893 </p><p><s.foo>s.foo</s.foo>
894 </p><p><sub-ID#1>
899 Isolated close tags should be treated as literal text (bug 52760)
906 </p><p><s.foo>s</s>
911 ### Special characters
915 Bare pipe character (bug 52363)
924 Bare pipe character from a template (bug 52363)
933 ### <nowiki> test cases
937 <nowiki> unordered list
939 <nowiki>* This is not an unordered list item.</nowiki>
941 <p>* This is not an unordered list item.
948 <nowiki>Lorem ipsum dolor
969 :There is not nowiki.
970 :There is <nowiki>nowiki</nowiki>.
972 #There is not nowiki.
973 #There is <nowiki>nowiki</nowiki>.
975 *There is not nowiki.
976 *There is <nowiki>nowiki</nowiki>.
979 <dd>There is not nowiki.
985 <li>There is not nowiki.
991 <li>There is not nowiki.
1000 Entities inside <nowiki>
1002 <nowiki><</nowiki>
1009 Entities inside template parameters
1015 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span>
1023 Comments and Indent-Pre
1025 <!-- comment 1 --> asdf
1027 <!-- comment 1 --> asdf
1030 <!-- comment 1 --> asdf
1031 <!-- comment 2 -->xyz
1033 <!-- comment 1 --> asdf
1034 <!-- comment 2 --> xyz
1090 asdf<!-- comment 1 -->jkl
1100 <!-- foo --> b <!-- bar -->
1114 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1120 Comment semantics and delimiters
1122 <!-- --><!----><!-----><!------>
1128 Comment semantics and delimiters, redux
1130 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1131 -- foo -- funky huh? ... -->
1137 Comment semantics and delimiters: directors cut
1139 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1140 everything starting with < followed by !-- until the first -- and > we see,
1141 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1149 Comment semantics: nesting
1151 <!--<!-- no, we're not going to do anything fancy here -->-->
1158 Comment semantics: unclosed comment at end
1160 <!--This comment will run out to the end of the document
1166 Comment in template title
1175 Comment on its own line post-expand
1187 Comment on its own line post-expand with non-significant whitespace
1199 ### paragraph wrapping tests
1214 Block tag on one line (<div>)
1226 Block tag on one line (<blockquote>)
1228 a <blockquote>foo</blockquote>
1232 a <blockquote>foo</blockquote>
1238 Block tag on both lines (<div>)
1250 Block tag on both lines (<blockquote>)
1252 a <blockquote>foo</blockquote>
1254 b <blockquote>foo</blockquote>
1256 a <blockquote>foo</blockquote>
1257 b <blockquote>foo</blockquote>
1262 Multiple lines without block tags
1280 Empty lines between lines with block tags
1309 ## PHP parser emits output which is broken
1311 Unclosed HTML p-tags should be handled properly
1318 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1324 ### Preformatted text
1333 And a [[Main Page|link]]
1339 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1344 Tabs don't trigger preformatted text
1348 This is preformatted text.
1354 <pre>This is preformatted text.
1360 Ident preformatting with inline content
1371 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1388 Regression with preformatted in <center>
1402 Bug 52763: Preformatted in <blockquote>
1408 indented cell (no pre-wrapping!)
1418 <p> indented cell (no pre-wrapping!)
1426 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1443 Bug 15491: <ins>/<del> in blockquote
1446 Foo <del>bar</del> <ins>baz</ins> quux
1450 <p>Foo <del>bar</del> <ins>baz</ins> quux
1456 # Note that the p-wrapping is newline sensitive, which could be
1457 # considered a bug: tidy will wrap only the 'Foo' in the example
1458 # below in a <p> tag. (see comment 23-25 of bug #6200)
1460 Bug 15491: <ins>/<del> in blockquote (2)
1462 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1465 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1471 <pre> with attributes (bug 3202)
1473 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1475 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1480 <pre> with width attribute (bug 3202)
1482 <pre width="8">Narrow screen goodies</pre>
1484 <pre width="8">Narrow screen goodies</pre>
1489 <pre> with forbidden attribute (bug 3202)
1491 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1493 <pre width="8">Narrow screen goodies</pre>
1498 Entities inside <pre>
1507 <pre> with forbidden attribute values (bug 3202)
1509 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1511 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1516 <nowiki> inside <pre> (bug 13238)
1524 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1532 <pre><nowiki>Foo</nowiki></pre>
1537 <nowiki> and <pre> preference (first one wins)
1568 </pre> inside nowiki
1570 <nowiki></pre></nowiki>
1577 Empty pre; pre inside other HTML tags (bug 54946)
1596 HTML pre followed by indent-pre
1611 <p><pre>foo</pre></p>
1613 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
1617 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1625 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1635 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1647 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1668 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1672 {{echo| foo}}{{echo| bar}}
1677 {{echo|<!--cmt--> foo}}
1679 <!--cmt-->{{echo| foo}}
1681 {{echo|{{echo| }}bar}}
1699 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1736 Things that look like <pre> tags aren't treated as such
1738 Barack Obama <President> of the United States
1740 <p>Barack Obama <President> of the United States
1745 Parsoid: handle pre with space after attribute
1749 <pre style="width:50%;" >{{echo|foo}}</pre>
1751 <pre style="width:50%;">{{echo|foo}}</pre>
1754 # TODO / maybe: fix wt2wt for this
1756 Parsoid: Don't paragraph-wrap fosterable content
1782 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
1810 #--------------------------------------------------------------------
1811 # Transclusion parameter whitespace stripping tests
1812 # Behavior is different for positional and named parameters
1813 #--------------------------------------------------------------------
1815 Templates: Strip leading and trailing whitespace from named-param values
1819 {{echo|1= {{echo|b}} }}
1840 Templates: Don't strip whitespace from positional-param values
1844 {{echo|{{echo|b}} }}
1887 Templates: Handle empty comment-and-ws-only lines correctly
1890 <!--should be ignored-->
1891 <!--should be ignored as well-->
1899 #--------------------------------------------------------------------
1900 # Transclusion parameter escaping tests
1901 #--------------------------------------------------------------------
1903 Templates: Parsoid parameter escaping test 1
1907 {{echo|[foo]|{{echo|[bar]}}}}
1909 <p about="#mwt1" typeof="mw:Transclusion"
1910 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
1914 Parsoid: Pipes in external links in template parameter
1918 {{echo|[{{echo|http://example.com}} link]}}
1920 <p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
1924 Parsoid: pipe in transclusion parameter
1928 {{echo|http://foo.com/a|b}}
1930 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1931 typeof="mw:Transclusion"
1932 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a|b</a></p>
1936 Parsoid: Pipe in external link target and content in template parameter
1938 parsoid=html2wt,wt2wt
1940 {{echo|[http://foo.com/a|b a|b]}}
1942 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
1943 typeof="mw:Transclusion"
1944 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
1945 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
1949 Templates: Don't escape already nowiki-escaped text in template parameters
1951 parsoid=html2wt,wt2wt
1953 {{echo|foo<nowiki>|</nowiki>bar}}
1954 {{echo|<nowiki><div></nowiki>}}
1955 {{echo|<nowiki></nowiki>}}
1957 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
1958 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
1959 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
1965 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
1967 parsoid=html2wt,wt2wt
1969 {{echo|{{echo|1=bar}}}}
1971 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
1976 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
1982 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
1986 ### Parsoid-centric tests for testing RT edge cases for pre
1990 1a. Indent-Pre and Comments
2003 1b. Indent-Pre and Comments
2016 1c. Indent-Pre and Comments
2029 1d. Indent-Pre and Comments
2030 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2043 2a. Indent-Pre and tables
2064 2b. Indent-Pre and tables
2080 2c. Indent-Pre and tables (bug 42252)
2097 3a. Indent-Pre and block tags (single-line html)
2101 c <blockquote> foo </blockquote>
2106 c <blockquote> foo </blockquote>
2107 <pre><span> foo </span>
2112 3b. Indent-Pre and block tags (multi-line html)
2117 <pre>a <span>foo</span>
2124 3c. Indent-Pre and block tags (pre-content on separate line)
2188 4. Indent-Pre and extension tags
2194 a <ul class="gallery mw-gallery-traditional">
2195 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2196 <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>
2197 <div class="gallerytext">
2205 Leading pipes outside of tables
2215 Leading pipes outside of tables 2
2229 Leading pipes outside of tables 3
2234 | class="foo bar" | baz
2238 | class="foo bar" | baz
2243 Render paragraphs when indent-pre is suppressed in blocklevels
2260 4. Multiple spaces at start-of-line
2278 ## NOTE: the leading white-space chars on empty line are significant
2280 5a. White-space in indent-pre
2292 ## NOTE: the leading white-space chars on empty line are significant
2294 5b. White-space in indent-pre
2313 5c. White-space in indent-pre
2326 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2349 7a. Indent-pre and category links
2351 parsoid=wt2html,wt2wt
2353 [[Category:foo]] <!-- No pre-wrapping -->
2354 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2356 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2357 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span>
2358 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2362 7b. Indent-pre and category links
2364 parsoid=wt2html,wt2wt
2367 [[Category:foo]] {{echo|b}}
2370 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
2372 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
2376 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2380 HTML-pre: 1. embedded newlines
2416 HTML-pre: 2: indented text
2429 HTML-pre: 3: other wikitext
2450 ### Definition lists
2458 <dt> name </dt>
2466 Definition list for indentation only
2478 Definition list with no space
2491 Definition list with URL link
2493 ; http://example.com/ : definition
2496 <dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
2504 Definition list with bracketed URL link
2506 ;[http://www.example.com/ Example]:Something about it
2509 <dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
2510 <dd>Something about it
2517 Definition list with wikilink containing colon
2519 ; [[Help:FAQ]]: The least-read page on Wikipedia
2522 <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>
2523 <dd> The least-read page on Wikipedia
2529 # At Brion's and JeLuF's insistence... :)
2531 Definition list with news link containing colon
2533 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2536 <dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
2537 <dd> This isn't even a real newsgroup!
2544 Malformed definition list with colon
2546 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2549 <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
2556 Definition lists: colon in external link text
2558 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2561 <dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
2562 <dd> OK, I made that up
2569 Definition lists: colon in HTML attribute
2571 ;<b style="display: inline">bold</b>
2574 <dt><b style="display: inline">bold</b>
2581 Definition lists: self-closed tag
2583 ;one<br/>two : two-line fun
2586 <dt>one<br />two </dt>
2594 Bug 11748: Literal closing tags
2598 <dd>test test test test test</dd>
2600 <dd>test test test test test</dd>
2605 <dd>test test test test test</dd>
2607 <dd>test test test test test</dd>
2613 Definition and unordered list using wiki syntax nested in unordered list using html tags.
2616 ; term : description
2622 <dt> term </dt>
2636 Definition list with empty definition and following paragraph
2651 Nested definition lists using html syntax
2668 Definition Lists: No nesting: Multiple dd's
2686 Definition Lists: Indentation: Regular
2708 Definition Lists: Indentation: Missing 1st level
2728 Definition Lists: Indentation: Multi-level indent
2746 Definition Lists: Hacky use to indent tables
2753 should be left alone
2755 <dl><dd><dl><dd><table>
2760 </td></tr></table></dd></dl></dd></dl>
2762 should be left alone
2768 Definition Lists: Hacky use to indent tables (WS-insensitive)
2777 <dd> <table><tr><td>a</td></tr></table> </dd>
2780 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
2781 ## as an empty dt item. It also ignores all but the last ";" when followed
2782 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
2783 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
2786 ## Ex: ";;t2 ::d2" is transformed into:
2798 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
2799 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
2810 ## All Parsoid only definition list tests have this difference.
2812 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
2813 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
2816 Table / list interaction: indented table with lists in table contents
2842 </td></tr></table></dd></dl>
2847 Table / list interaction: lists nested in tables nested in indented lists
2878 </td></tr></table></dd></dl>
2889 Definition Lists: Nesting: Multi-level (Parsoid only)
2919 Definition Lists: Nesting: Test 2 (Parsoid only)
2939 Definition Lists: Nesting: Test 3 (Parsoid only)
2967 Definition Lists: Nesting: Test 4
2988 ## The Parsoid team believes the following three test exposes a
2989 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
2990 ## wrong to close the <dl> after the <dt> containing the <ul>.)
2992 Definition Lists: Mixed Lists: Test 1
3032 Definition Lists: Mixed Lists: Test 2
3051 Definition Lists: Mixed Lists: Test 3
3076 Definition Lists: Mixed Lists: Test 4
3097 Definition Lists: Mixed Lists: Test 5
3118 Definition Lists: Mixed Lists: Test 6
3145 Definition Lists: Mixed Lists: Test 7
3164 Definition Lists: Mixed Lists: Test 8
3188 Definition Lists: Mixed Lists: Test 9
3205 Definition Lists: Mixed Lists: Test 10
3223 # The Parsoid team disagrees with the PHP parser's seemingly-random
3224 # rules regarding dd/dt on the next two tests. Parsoid is more
3225 # consistent, and recognizes the shared nesting and keeps the
3226 # still-open tags around until the nesting is complete.
3229 Definition Lists: Mixed Lists: Test 11
3282 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3283 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3287 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3288 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3298 Definition Lists: Weird Ones: Test 1
3300 *#;*::;; foo : bar (who uses this?)
3311 <dt> bar (who uses this?)
3345 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3346 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3361 External links: non-bracketed
3363 Non-bracketed: http://example.com
3365 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3370 External links: numbered
3372 Numbered: [http://example.com]
3373 Numbered: [http://example.net]
3374 Numbered: [http://example.com]
3376 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
3377 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
3378 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
3383 External links: specified text
3385 Specified text: [http://example.com link]
3387 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
3392 External links: trail
3394 Linktrails should not work for external links: [http://example.com link]s
3396 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3401 External links: dollar sign in URL
3403 http://example.com/1$2345
3405 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3410 External links: dollar sign in URL (named)
3412 [http://example.com/1$2345]
3414 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3419 External links: open square bracket forbidden in URL (bug 4377)
3421 http://example.com/1[2345
3423 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3428 External links: open square bracket forbidden in URL (named) (bug 4377)
3430 [http://example.com/1[2345]
3432 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3437 External links: nowiki in URL link text (bug 6230)
3439 [http://example.com/ <nowiki>''example site''</nowiki>]
3441 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
3446 External links: newline forbidden in text (bug 6230 regression check)
3448 [http://example.com/ first
3451 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
3457 External links: Pipe char between url and text
3459 [http://example.com | link]
3461 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
3466 External links: protocol-relative URL in brackets
3468 [//example.com/ Test]
3470 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
3475 External links: protocol-relative URL in brackets without text
3479 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
3484 External links: protocol-relative URL in free text is left alone
3488 <p>//example.com/Foo
3493 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
3495 foo//example.com/Foo
3497 <p>foo//example.com/Foo
3504 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3506 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3511 External image from https
3513 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3515 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3520 External image (when not allowed)
3522 wgAllowExternalImages=0
3524 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3526 <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>
3531 Link to non-http image, no img tag
3533 Link to non-http image, no img tag: ftp://example.com/test.jpg
3535 <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>
3540 External links: terminating separator
3542 Terminating separator: http://example.com/thing,
3544 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
3549 External links: intervening separator
3551 Intervening separator: http://example.com/1,2,3
3553 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
3558 External links: old bug with URL in query
3560 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
3562 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
3567 External links: old URL-in-URL bug, mixed protocols
3569 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
3571 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
3576 External links: URL in text
3578 URL in text: [http://example.com http://example.com]
3580 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3585 External links: Clickable images
3587 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
3589 <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>
3594 External links: raw ampersand
3596 Old & use: http://x&y
3598 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3603 External links: encoded ampersand
3605 Old & use: http://x&y
3607 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3612 External links: encoded equals (bug 6102)
3614 http://example.com/?foo=bar
3616 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
3621 External links: [raw ampersand]
3623 Old & use: [http://x&y]
3625 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3630 External links: [encoded ampersand]
3632 Old & use: [http://x&y]
3634 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3639 External links: [encoded equals] (bug 6102)
3641 [http://example.com/?foo=bar]
3643 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3648 External links: [IDN ignored character reference in hostname; strip it right off]
3650 [http://e‌xample.com/]
3652 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
3656 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
3657 # Where an external link could easily circumvent the sanitization of the text of
3658 # a link like this (where an IDN-ignore character is in the URL somewhere), this
3659 # test demands a higher standard. That's a bit strange.
3663 # http://example.com -> [http://example.com|http://example.com]
3664 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
3666 # The first example is sanitized, but the second is not. Any security benefits
3667 # from this production are trivial to circumvent. Either remove this test and
3668 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
3669 # the test accordingly.
3674 External links: IDN ignored character reference in hostname; strip it right off
3676 http://e‌xample.com/
3678 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
3683 External links: www.jpeg.org (bug 554)
3687 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
3692 External links: URL within URL (original bug 2)
3694 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
3696 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
3701 BUG 361: URL inside bracketed URL
3703 [http://www.example.com/foo http://www.example.com/bar]
3705 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
3710 BUG 361: URL within URL, not bracketed
3712 http://www.example.com/foo?=http://www.example.com/bar
3714 <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>
3719 BUG 289: ">"-token in URL-tail
3721 http://www.example.com/<hello>
3723 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
3728 BUG 289: literal ">"-token in URL-tail
3730 http://www.example.com/<b>html</b>
3732 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
3737 BUG 289: ">"-token in bracketed URL
3739 [http://www.example.com/<hello> stuff]
3741 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
3746 BUG 289: literal ">"-token in bracketed URL
3748 [http://www.example.com/<b>html</b> stuff]
3750 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
3755 BUG 289: literal double quote at end of URL
3757 http://www.example.com/"hello"
3759 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
3764 BUG 289: literal double quote in bracketed URL
3766 [http://www.example.com/"hello" stuff]
3768 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
3773 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
3775 [http://www.example.com test]
3777 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
3782 External links: link text with spaces
3784 [http://www.example.com a b c]
3785 [http://www.example.com ''a'' ''b'']
3787 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
3788 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
3793 External links: wiki links within external link (Bug 3695)
3795 [http://example.com [[wikilink]] embedded in ext link]
3797 <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>
3800 <p><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink">wikilink</a><span> embedded in ext link</span></p>
3804 BUG 787: Links with one slash after the url protocol are invalid
3808 [http:/example.com title]
3810 <p>http:/example.com
3811 </p><p>[http:/example.com title]
3816 Bracketed external links with template-generated invalid target
3818 [{{echo|http:/example.com}} title]
3820 <p>[http:/example.com title]
3825 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
3827 ''[http://example.com text'']
3828 [http://example.com '''text]'''
3829 ''Something [http://example.com in italic'']
3830 ''Something [http://example.com mixed''''', even bold]'''
3831 '''''Now [http://example.com both''''']
3833 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
3834 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
3835 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
3836 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
3837 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
3843 Bug 4781: %26 in URL
3845 http://www.example.com/?title=AT%26T
3847 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
3851 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
3852 # % is actually legal in HTML5. Any change in output would need testing though.
3854 Bug 4781, 5267: %25 in URL
3856 http://www.example.com/?title=100%25_Bran
3858 <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>
3863 Bug 4781, 5267: %28, %29 in URL
3865 http://www.example.com/?title=Ben-Hur_%281959_film%29
3867 <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>
3873 Bug 4781: %26 in autonumber URL
3875 [http://www.example.com/?title=AT%26T]
3877 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
3882 Bug 4781, 5267: %26 in autonumber URL
3884 [http://www.example.com/?title=100%25_Bran]
3886 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
3891 Bug 4781, 5267: %28, %29 in autonumber URL
3893 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
3895 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
3901 Bug 4781: %26 in bracketed URL
3903 [http://www.example.com/?title=AT%26T link]
3905 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
3910 Bug 4781, 5267: %26 in bracketed URL
3912 [http://www.example.com/?title=100%25_Bran link]
3914 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
3919 Bug 4781, 5267: %28, %29 in bracketed URL
3921 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
3923 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
3928 External link containing double-single-quotes in text '' (bug 4598 sanity check)
3930 Some [http://example.com/ pretty ''italics'' and stuff]!
3932 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
3937 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
3939 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
3941 <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>
3946 External link containing double-single-quotes with no space separating the url from text in italics
3948 [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]].]
3950 <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>
3953 <p><a rel="mw:ExtLink" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)">Museo Picasso</a><span>.</span></p>
3957 External link with comments in link text
3959 [http://www.google.com Google <!-- comment -->]
3961 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
3966 URL-encoding in URL functions (single parameter)
3968 {{localurl:Some page|amp=&}}
3970 <p>/index.php?title=Some_page&amp=&
3975 URL-encoding in URL functions (multiple parameters)
3977 {{localurl:Some page|q=?&=&}}
3979 <p>/index.php?title=Some_page&q=?&amp=&
3986 http://example.com/index.php?foozoid%5B%5D=bar
3988 http://example.com/index.php?foozoid[]=bar
3990 <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>
3991 </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>
3996 IPv6 urls (bug 21261)
4000 http://[2404:130:0:1000::187:2]/index.php
4002 <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>
4007 Non-extlinks in brackets
4016 [{{echo|foo}} ''bar'']
4017 [{{echo|foo}}l's] errand
4018 [{{echo|foo}}l's errand]
4020 [url=http://example.com]
4033 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4038 Percent encoding in external links
4040 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4042 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4045 <p><a rel="mw:ExtLink"
4046 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4050 Use url link syntax for links where the content is equal the link target
4054 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4057 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4061 Parenthesis in external links, especially URL links
4065 http://example.com/test)
4067 http://example.com/(test)
4069 http://example.com/((test)
4071 (http://example.com/(test))
4073 (http://example.com/(test)))))
4075 http://example.com/a)b
4077 [http://example.com) foo]
4079 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4080 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4081 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4082 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4083 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4084 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4085 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4086 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4089 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4090 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4091 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4092 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4093 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4094 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4095 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4096 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4100 Parenthesis in external links, w/ transclusion or comment
4102 (http://example.com/{{echo|hi}})
4104 (http://example.com<!-- hi -->)
4106 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4107 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4110 <p>(<a data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;hi&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[20,31,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">hi</span>"}]]}' typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}'>http://example.com/hi</a>)</p>
4112 <p>(<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
4122 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4124 Normal text. '''''Bold italic text.''''' Normal text.
4126 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4127 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4132 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4133 # parser strips. The wikitext contains just the first half of the bold
4136 Unclosed and unmatched quotes
4138 '''''Bold italic text '''with bold deactivated''' in between.'''''
4140 '''''Bold italic text ''with italic deactivated'' in between.'''''
4144 ..spanning two paragraphs (should not work).'''
4146 '''Bold tag left open
4148 ''Italic tag left open
4152 <!-- Unmatching number of opening, closing tags: -->
4153 '''This year''''s election ''should'' beat '''last year''''s.
4155 ''Tom'''s car is bigger than ''Susan'''s.
4157 Plain ''italic'''s plain
4159 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4160 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4161 </p><p><b>Bold text..</b>
4162 </p><p>..spanning two paragraphs (should not work).
4163 </p><p><b>Bold tag left open</b>
4164 </p><p><i>Italic tag left open</i>
4166 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4167 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4168 </p><p>Plain <i>italic'</i>s plain
4171 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4172 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4173 </p><p><b>Bold text..</b>
4174 </p><p>..spanning two paragraphs (should not work).<b></b>
4175 </p><p><b>Bold tag left open</b>
4176 </p><p><i>Italic tag left open</i>
4178 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4179 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4180 </p><p>Plain <i>italic'</i>s plain
4187 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
4190 # This should not produce <table></table> as <table><tr><td></td></tr></table>
4191 # is the bare minimum required by the spec, see:
4192 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
4193 # Parsoid team replies: empty table tags are legal in HTML5
4195 A table with no data.
4208 A table with stray table end tags on start tag line (wt2html)
4212 {|style="color: red;"|}
4214 {|style="color: red;" |}
4218 {|style="color: red;"|} id="foo"
4222 {|style="color: red;" |} id="foo"
4226 <table style="color: red;"></table>
4228 <table style="color: red;">
4234 <table style="color: red;" id="foo">
4240 <table style="color: red;" id="foo">
4249 A table with no data (take 2)
4257 # A table with nothing but a caption is invalid XHTML, we might want to render
4258 # this as <p>caption</p>
4259 # Parsoid team replies: table with only a caption is legal in HTML5
4261 A table with nothing but a caption
4269 </caption><tr><td></td></tr></table>
4272 <table><caption> caption</caption></table>
4276 A table with caption with default-spaced attributes and a table row
4279 |+ style="color: red;" | caption1
4285 <caption style="color: red;"> caption1
4294 A table with captions with non-default spaced attributes and a table row
4297 |+style="color: red;"|caption2
4298 |+ style="color: red;"| caption3
4304 <caption style="color: red;">caption2
4306 <caption style="color: red;"> caption3
4315 Table td-cell syntax variations
4319 | foo bar foo || baz
4320 | style='color:red;' | baz
4321 | style='color:red;' || baz
4328 <td> foo bar foo </td>
4331 <td style="color:red;"> baz
4333 <td> style='color:red;' </td>
4361 Simple table but with multiple dashes for row wikitext
4379 Multiplication table
4381 {| border="1" cellpadding="2"
4382 |+Multiplication table
4384 ! × !! 1 !! 2 !! 3
4402 <table border="1" cellpadding="2">
4403 <caption>Multiplication table
4450 Accept "||" in table headings
4465 Accept "||" in indented table headings
4475 </th></tr></table></dd></dl>
4480 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
4497 Accept "| !" at start of line in tables (ignore !-attribute)
4501 | !style="color:red" | bar
4513 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 +/-
4517 |style='color:red;'|+1
4518 |style='color:blue;'|-1
4530 <td style="color:red;">+1
4532 <td style="color:blue;">-1
4556 |rowspan=2| Cell 2, row 1 (and 2)
4567 <td rowspan="2"> Cell 2, row 1 (and 2)
4585 {| bgcolor=#ABCDEF border=2
4590 |the original table again
4598 <table bgcolor="#ABCDEF" border="2">
4606 <td>the original table again
4612 Invalid attributes in table cell (bug 1830)
4627 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
4630 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
4634 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
4635 <td>]" onmouseover="alert(document.cookie)">test
4644 Indented table markup mixed with indented pre content (proposed in bug 6200)
4649 Text that should be rendered preformatted
4657 <pre>Text that should be rendered preformatted
4666 Template-generated table cell attributes and cell content
4675 <td style="color: red"> Foo
4677 <td style="color: red"> Foo
4683 Template-generated table cell attributes and cell content (2)
4686 |align=center {{table_attribs}}
4691 <td align="center" style="color: red"> Foo
4697 Template-generated table cell attributes and cell content (3)
4700 |align=center {{table_cells}}
4705 <td align="center" style="color: red"> Foo </td>
4713 Table with row followed by newlines and table heading
4731 Table with empty line following the start tag
4748 # FIXME: Preserve the attribute properly (with an empty string as value) in
4749 # the PHP parser. Parsoid implements the behavior below.
4751 Table attributes with empty value
4761 </td></tr></tbody></table>
4766 Wikitext table with a lot of comments
4789 Wikitext table with double-line table cell
4806 Table cell with a single comment
4822 # The expected HTML structure in this test is debatable. The PHP parser does
4823 # not parse this kind of table at all. The main focus for Parsoid is on
4824 # round-tripping, so this output is ok for now. TODO: revisit!
4826 Wikitext table with html-syntax row
4836 <td>foo</td></tr></tbody></table>
4840 Implicit <td> after a |-
4841 (PHP parser relies on Tidy to add the missing <td> tags)
4843 parsoid=wt2html,wt2wt
4856 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
4857 (PHP parser relies on Tidy to add the missing <td> tags)
4859 parsoid=wt2html,wt2wt
4871 <tr><td><pre>a</pre></td></tr>
4872 <tr><td> b</td></tr>
4878 Lists should be recognized in an implicit <td> context
4879 (PHP parser relies on Tidy to add the missing <td> tags)
4881 parsoid=wt2html,wt2wt
4898 Parsoid: Round-trip tables directly followed by content (bug 51219)
4900 parsoid=wt2html,wt2wt
4912 <td>foo</td></tr></tbody></table> bar
4916 <td>baz</td></tr></tbody></table><b>quux</b>
4920 Parsoid: Default to a newline after tables in new content (bug 51219)
4927 <nowiki> </nowiki>bar
4934 <tr><td>foo</td></tr></tbody></table> bar
4936 <tr><td>baz</td></tr></tbody></table><b>quux</b>
4940 Parsoid: newline inducing block nodes don't suppress <nowiki>
4955 Plain link, capitalized
4959 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
4964 Plain link, uncapitalized
4968 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
4975 [[Main Page|The Main Page]]
4977 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4982 Piped link with comment in link text
4984 [[Main Page|The Main<!--front--> Page]]
4986 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
4995 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
5000 Broken link with fragment
5002 [[Zigzagzogzagzig#zug]]
5004 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
5009 Special page link with fragment
5011 [[Special:Version#anchor]]
5013 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
5018 Nonexistent special page link with fragment
5020 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
5022 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
5029 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
5031 <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>
5038 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
5040 <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>!!!
5051 Bug 43661: Piped links with identical prefixes
5053 [[prefixed article|prefixed articles with spaces]]
5055 [[prefixed article|prefixed articlesaoeu]]
5057 [[Main Page|Main Page test]]
5059 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
5060 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
5061 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
5067 Link with HTML entity in suffix / tail
5069 [[Main Page]]", [[Main Page]]a
5071 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
5076 Link with 3 brackets
5085 Link with 4 brackets
5089 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
5094 Piped link with 3 brackets
5096 [[[main page|the main page]]]
5098 <p>[[[main page|the main page]]]
5103 Piped link with extlink-like text
5106 [[Main Page|This is a [bar]]]
5108 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
5109 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
5114 Link with multiple pipes
5116 [[Main Page|The|Main|Page]]
5118 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
5125 [[Talk:Parser testing]], [[Meta:Disclaimers]]
5127 <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>
5132 MemoryAlpha:AlphaTest
5134 This is an article in the MemoryAlpha namespace
5135 (which shadows the memoryalpha interwiki link).
5139 Namespace takes precedence over interwiki link (bug 51680)
5141 [[MemoryAlpha:AlphaTest]]
5143 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5147 # The previous test doesn't work correctly in html2*, due to not recognizing the
5148 # link as an internal one. This one checks for the correct behavior.
5150 Link to namespace preferred over interwiki with correct rel attribute
5152 parsoid=html2wt,html2html
5154 [[MemoryAlpha:AlphaTest]]
5156 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5161 Piped link to namespace
5163 [[Meta:Disclaimers|The disclaimers]]
5165 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
5172 [[Usually caused by a typo (oops}]]
5174 <p>[[Usually caused by a typo (oops}]]
5179 Link containing % (not as a hex sequence)
5183 <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>
5188 Link containing % as a single hex sequence interpreted to char
5192 <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>
5197 Link containing % as a double hex sequence interpreted to hex sequence
5201 <p>[[7%2525 Solution]]
5206 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
5207 Example for such a section: == < ==
5209 [[%23%3c]][[%23%3e]]
5211 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
5216 Link containing "<#" and ">#" as a hex sequences
5218 [[%3c%23]][[%3e%23]]
5220 <p>[[%3c%23]][[%3e%23]]
5225 Link containing an equals sign
5227 [[Special:BookSources/isbn=4-00-026157-6]]
5229 <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>
5236 Just a test of an article title containing a tilde.
5239 # note that links containing signatures, like [[Foo~~~~]], are
5240 # massaged by the pre-save transform (PST) and so the tildes are never
5241 # seen by the parser.
5243 Link containing a tilde
5247 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
5252 Link containing double-single-quotes '' (bug 4598)
5254 [[Lista d''e paise d''o munno]]
5256 <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>
5261 Link containing double-single-quotes '' in text (bug 4598 sanity check)
5263 Some [[Link|pretty ''italics'' and stuff]]!
5265 <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>!
5270 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
5272 ''Some [[Link|pretty ''italics'' and stuff]]!
5274 <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>
5279 Link with double quotes in title part (literal) and alternate part (interpreted)
5281 [[File:Denys Savchenko ''Pentecoste''.jpg]]
5285 [[''Pentecoste''|Pentecoste]]
5287 [[''Pentecoste''|''Pentecoste'']]
5289 <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>
5290 </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>
5291 </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>
5292 </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>
5297 Broken image links with HTML captions (bug 39700)
5299 [[File:Nonexistent|<script></script>]]
5300 [[File:Nonexistent|100px|<script></script>]]
5301 [[File:Nonexistent|<]]
5302 [[File:Nonexistent|a<i>b</i>c]]
5304 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5305 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5306 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
5307 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
5314 [[http://www.example.com]]
5316 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
5321 Plain link to URL with link text
5323 [[http://www.example.com Link text]]
5325 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
5330 Plain link to protocol-relative URL
5332 [[//www.example.com]]
5334 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
5339 Plain link to protocol-relative URL with link text
5341 [[//www.example.com Link text]]
5343 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
5348 Plain link to page with question mark in title
5354 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
5355 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
5360 # I'm fairly sure the expected result here is wrong.
5361 # We want these to be URL links, not pseudo-pages with URLs for titles....
5362 # However the current output is also pretty screwy.
5365 # I'm changing it to match the current output--it arguably makes more
5366 # sense in the light of the test above. Old expected result was:
5367 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
5369 # But I think this test is bordering on "garbage in, garbage out" anyway.
5374 Piped link to URL: [[http://www.example.com|an example URL]]
5376 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
5381 BUG 2: [[page|http://url/]] should link to page, not http://url/
5383 [[Main Page|http://url/]]
5385 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
5390 BUG 337: Escaped self-links should be bold
5394 [[Bug462]] [[Bug462]]
5396 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
5401 Self-link to section should not be bold
5405 [[Main Page#section]]
5407 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
5418 Self-link to numeric title
5424 <p><strong class="selflink">0</strong>
5429 Link to numeric-equivalent title
5435 <p><a href="/wiki/00" title="00">00</a>
5440 <nowiki> inside a link
5442 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
5444 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
5449 Non-breaking spaces in title
5451 [[ Main Page ]]
5453 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
5458 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
5464 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
5469 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
5475 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
5480 Internal link with en linktrail: no apostrophes (bug 27473)
5486 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
5491 Internal link with ca linktrail with apostrophes (bug 27473)
5497 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
5502 Internal link with kaa linktrail with apostrophes (bug 27473)
5508 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
5513 1. Interaction of linktrail and template encapsulation
5519 <p><a rel="mw:WikiLink" href="Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}},"l"]}'>Fool</a></p>
5523 2. Interaction of linktrail and template encapsulation
5527 {{echo|Some [[Fool]]}}s
5529 <p data-parsoid='{}'><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]"}},"i":0}},"s"]}' data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}'>Some </span><a rel="mw:WikiLink" href="./Fool" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a></p>
5533 3. Interaction of linktrail and template encapsulation
5537 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
5539 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]s are '''bold and foolish'''"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}'>Some <a rel="mw:WikiLink" href="./Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b data-parsoid="{}">bold and foolish</b></p>
5549 Internal link with is link prefix
5553 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
5555 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
5566 Internal link with is link trail and link prefix
5570 [[mótmælendatrú|xxx]]ar
5572 mótmælenda[[söfnuður]]
5573 mótmælenda[[söfnuður|söfnuðir]]
5574 mótmælenda[[söfnuður|söfnuðir]]xxx
5576 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
5577 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
5578 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
5579 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
5580 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
5585 Parsoid link trail escaping
5587 parsoid=html2wt,html2html
5591 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
5595 Parsoid link prefix escaping
5598 parsoid=html2wt,html2html
5600 Aðrir mótmælenda<nowiki/>[[söfnuður]]
5602 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
5606 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
5614 [http://wp.org ''foo'']
5616 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
5617 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
5618 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
5619 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
5624 Parsoid: Scoped parsing should handle mixed transclusions and plain text
5628 [[Foo|{{echo|a}} b {{echo|c}}]]
5630 <p><a rel="mw:WikiLink" href="Foo"><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span> b <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c"}},"i":0}}]}'>c</span></a></p>
5634 ### Interwiki links (see maintenance/interwiki.sql)
5638 Inline interwiki link
5640 [[MeatBall:SoftSecurity]]
5642 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
5647 Inline interwiki link with empty title (bug 2372)
5651 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
5656 Interwiki link encoding conversion (bug 1636)
5658 *[[Wikipedia:ro:Olteniţa]]
5659 *[[Wikipedia:ro:Olteniţa]]
5662 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a>
5664 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a>
5671 Interwiki link with fragment (bug 2130)
5673 [[MeatBall:SoftSecurity#foo]]
5675 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
5679 # Ideally the wikipedia: prefix here should be proto-relative too
5681 Different interwiki prefixes mapping to the same URL
5689 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}'>wikipedia:Foo</a></p>
5691 <p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'>en:Foo</a></p>
5695 Interwiki links that cannot be represented in wiki syntax
5700 [[meatball:ok#foo|ok with fragment]]
5701 [[meatball:ok_as_well?|ok ending with ? mark]]
5702 [http://de.wikipedia.org/wiki/Foo?action=history has query]
5703 [http://de.wikipedia.org/wiki/#foo is just fragment]
5706 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok">meatball:ok</a>
5707 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo">ok with fragment</a>
5708 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F">ok ending with ? mark</a>
5709 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
5710 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
5714 Interwiki links: trail
5718 [[wikipedia:Foo|Ba]]r
5720 <p data-parsoid='{}'><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}'>Bar</a></p>
5724 ### Interlanguage links
5725 ### Language links (so that searching for '### language' matches..)
5739 Double interlanguage link
5750 Interlanguage link, with prefix links
5762 Double interlanguage link, with prefix links (bug 8897)
5775 Parsoid-specific test: Wikilinks with should RT properly
5781 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
5786 Parsoid bug 53221: Wikilinks should be properly entity-escaped
5790 He&nbsp;llo [[Foo|He&nbsp;llo]]
5792 He&nbsp;llo [[He&nbsp;llo]]
5794 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
5795 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
5799 Parsoid: handle constructor well
5807 <p><a rel="mw:WikiLink" href="./Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
5809 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
5813 Parsoid: recognize interlanguage links without a target page
5820 <link rel="mw:PageProp/Language" href="http://ko.wikipedia.org/wiki/"></p>
5824 Parsoid: recognize interwiki links without a target page
5830 <p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/">ko:</a></p>
5834 Parsoid: Bug #45209, handle interwiki links pointing to the current wiki as plain wiki links
5840 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"en:Foo"}}'>Foo</a></p>
5844 ### Redirects, Parsoid-only
5847 1. Simple redirect to page
5851 #REDIRECT [[Main Page]]
5853 <link rel="mw:PageProp/redirect" href="./Main_Page">
5856 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
5858 2. Other redirect variants
5860 parsoid=wt2html,wt2wt
5862 #REDIRECT [[Main_Page]]
5863 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
5865 <link rel="mw:PageProp/redirect" href="./Main_Page">
5866 <link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
5870 Optional colon in #REDIRECT
5872 # the colon is archaic syntax. we support it for wt2html, but we
5873 # don't care that it roundtrips back to the modern syntax.
5874 parsoid=wt2html,html2html
5876 #REDIRECT:[[Main Page]]
5878 <link rel="mw:PageProp/redirect" href="./Main_Page">
5882 Whitespace in #REDIRECT with optional colon
5884 # the colon and gratuitous whitespace is archaic syntax. we support
5885 # it for wt2html, but we don't care that it roundtrips back to the
5886 # modern syntax (without extra whitespace)
5887 parsoid=wt2html,html2html
5894 <link rel="mw:PageProp/redirect" href="./Main_Page">
5898 Piped link in #REDIRECT
5900 # content after piped link is ignored. we support this syntax,
5901 # but don't care that the piped link is lost when we roundtrip this.
5904 #REDIRECT [[Main Page|bar]]
5906 <link rel="mw:PageProp/redirect" href="./Main_Page">
5910 Redirect to category
5914 #REDIRECT [[Category:Foo]]
5916 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
5920 Redirect to category with URL encoding
5924 #REDIRECT [[Category%3AFoo]]
5926 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
5930 Redirect to category page
5932 parsoid=wt2html,html2html
5934 #REDIRECT [[:Category:Foo]]
5936 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
5940 Redirect to image page (1)
5944 #REDIRECT [[File:Wiki.png]]
5946 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5950 Redirect to image page (2)
5954 #REDIRECT [[Image:Wiki.png]]
5956 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
5960 Redirect to language
5964 #REDIRECT [[en:File:Wiki.png]]
5966 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5970 Redirect to interwiki
5974 #REDIRECT [[meatball:File:Wiki.png]]
5976 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
5980 Non-English #REDIRECT
5985 #TILVÍSUN [[Main Page]]
5987 <link rel="mw:PageProp/redirect" href="./Main_Page">
5998 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
6015 Broken br tag sanitization
6023 # TODO: Fix html2html mode (bug 51055)!
6025 Parsoid: Broken br tag recognition
6035 Incorrecly removing closing slashes from correctly formed XHTML
6037 <br style="clear:both;" />
6039 <p><br style="clear:both;" />
6044 Failing to transform badly formed HTML into correct XHTML
6046 <br style="clear: left;">
6047 <br style="clear: right;">
6048 <br style="clear: both;">
6050 <p><br style="clear: left;" />
6051 <br style="clear: right;" />
6052 <br style="clear: both;" />
6057 Handling html with a div self-closing tag
6066 <p><div title />
6070 <p><div title=bar />
6071 <div title=bar/>
6073 <div title="bar/"></div>
6079 Handling html with a br self-closing tag
6088 <p><br title="title" />
6089 <br title="title" />
6098 Horizontal ruler (should it add that extra space?)
6112 Horizontal ruler -- 4+ dashes render hr
6121 Horizontal ruler -- eats additional dashes on the same line
6130 Horizontal ruler -- does not collapse dashes on consecutive lines
6141 Horizontal ruler -- <4 dashes render as plain text
6150 Horizontal ruler -- Supports content following dashes on same line
6159 ### Block-level elements
6207 ***#Number on level 4
6209 **#Number on level 3
6210 **#Number on level 3
6214 #** Level 3, but ordered
6237 <li>Number on level 4
6245 <li>Number on level 3
6247 <li>Number on level 3
6270 <li> Level 3, but ordered
6316 Nested lists 3 (first element empty)
6333 Nested lists 4 (first element empty)
6351 Nested lists 5 (both elements empty)
6369 Nested lists 6 (both elements empty)
6386 Nested lists 7 (skip initial nesting levels)
6404 Nested lists 8 (multiple nesting transitions)
6430 1. Lists with start-of-line-transparent tokens before bullets: Comments
6448 2. Lists with start-of-line-transparent tokens before bullets: Template close
6463 List items are not parsed correctly following a <pre> block (bug 785)
6481 List items from template
6492 * notSOL{{inner list}}
6523 List interrupted by empty line or heading
6542 <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>
6544 <li> Another list item
6551 Multiple list tags generated by templates
6566 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
6569 <!--This line will NOT split the list-->
6571 <!--This line will NOT split the list either-->
6573 <!--foo--> <!----> <!--This line NOT split the list either-->
6590 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
6593 <!--This line will NOT split the list-->
6595 <!--This line will NOT split the list either-->
6597 <!--foo--> <!----> <!--This line NOT split the list
6616 (Cannot test this with PHP parser since it relies on Tidy for the hack)
6618 parsoid=wt2html,wt2wt
6622 * {{echo|<li>templated li-hack}}
6623 * <!--foo--> <li> unsupported li-hack with preceding comments
6626 <li><li>not a li-hack
6633 <li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>templated li-hack"}}}}]}'>templated li-hack</li>
6634 <li> <!--foo--> </li>
6635 <li> li-hack with preceding comments</li>
6646 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
6673 Parsoid: Test of whitespace serialization with Templated bullets
6680 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
6684 # ------------------------------------------------------------------------
6685 # The next set of tests are about Parsoid's ability to handle badly nested
6686 # tags (parse, minimize scope of fixup, and roundtrip back)
6687 # ------------------------------------------------------------------------
6690 Unbalanced closing block tags break a list
6691 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
6709 Unbalanced closing non-block tags don't break a list
6710 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
6727 Unclosed formatting tags that straddle lists are closed and reopened
6728 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
6742 List embedded in a non-block tag
6743 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
6749 <p><small></small></p>
6755 <p><small></small></p>
6759 Table with missing opening <tr> tag
6761 parsoid=wt2html,wt2wt
6779 # Note that the current date is hard-coded as
6780 # 1970-01-01T00:02:03Z (a Thursday)
6781 # when running parser tests. The timezone is also fixed to GMT, so
6782 # local date will be identical to current date.
6785 Magic Word: {{CURRENTDAY}}
6794 Magic Word: {{CURRENTDAY2}}
6803 Magic Word: {{CURRENTDAYNAME}}
6812 Magic Word: {{CURRENTDOW}}
6821 Magic Word: {{CURRENTMONTH}}
6830 Magic Word: {{CURRENTMONTH1}}
6839 Magic Word: {{CURRENTMONTHABBREV}}
6841 {{CURRENTMONTHABBREV}}
6848 Magic Word: {{CURRENTMONTHNAME}}
6850 {{CURRENTMONTHNAME}}
6857 Magic Word: {{CURRENTMONTHNAMEGEN}}
6859 {{CURRENTMONTHNAMEGEN}}
6866 Magic Word: {{CURRENTTIME}}
6875 Magic Word: {{CURRENTHOUR}}
6884 Magic Word: {{CURRENTWEEK}} (@bug 4594)
6893 Magic Word: {{CURRENTYEAR}}
6902 Magic Word: {{CURRENTTIMESTAMP}}
6904 {{CURRENTTIMESTAMP}}
6911 Magic Words LOCAL (UTC)
6915 * {{LOCALMONTHNAME}}
6916 * {{LOCALMONTHNAMEGEN}}
6917 * {{LOCALMONTHABBREV}}
6926 * {{LOCALTIMESTAMP}}
6962 Magic Word: {{FULLPAGENAME}}
6964 title=[[User:Ævar Arnfjörð Bjarmason]]
6968 <p>User:Ævar Arnfjörð Bjarmason
6973 Magic Word: {{FULLPAGENAMEE}}
6975 title=[[User:Ævar Arnfjörð Bjarmason]]
6979 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
6984 Magic Word: {{TALKSPACE}}
6986 title=[[User:Ævar Arnfjörð Bjarmason]]
6995 Magic Word: {{TALKSPACE}}, same namespace
6997 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7006 Magic Word: {{TALKSPACE}}, main namespace
7008 title=[[Parser Test]]
7017 Magic Word: {{TALKSPACEE}}
7019 title=[[User:Ævar Arnfjörð Bjarmason]]
7028 Magic Word: {{SUBJECTSPACE}}
7030 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7039 Magic Word: {{SUBJECTSPACE}}, same namespace
7041 title=[[User:Ævar Arnfjörð Bjarmason]]
7050 Magic Word: {{SUBJECTSPACE}}, main namespace
7052 title=[[Parser Test]]
7060 Magic Word: {{SUBJECTSPACEE}}
7062 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7071 Magic Word: {{NAMESPACE}}
7073 title=[[User:Ævar Arnfjörð Bjarmason]]
7082 Magic Word: {{NAMESPACEE}}
7084 title=[[User:Ævar Arnfjörð Bjarmason]]
7093 Magic Word: {{NAMESPACENUMBER}}
7095 title=[[User:Ævar Arnfjörð Bjarmason]]
7104 Magic Word: {{SUBPAGENAME}}
7106 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7115 Magic Word: {{SUBPAGENAMEE}}
7117 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7126 Magic Word: {{ROOTPAGENAME}}
7128 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7132 <p>Ævar Arnfjörð Bjarmason
7137 Magic Word: {{ROOTPAGENAMEE}}
7139 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7143 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7148 Magic Word: {{BASEPAGENAME}}
7150 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7154 <p>Ævar Arnfjörð Bjarmason
7159 Magic Word: {{BASEPAGENAMEE}}
7161 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7165 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7170 Magic Word: {{TALKPAGENAME}}
7172 title=[[User:Ævar Arnfjörð Bjarmason]]
7176 <p>User talk:Ævar Arnfjörð Bjarmason
7181 Magic Word: {{TALKPAGENAMEE}}
7183 title=[[User:Ævar Arnfjörð Bjarmason]]
7187 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7192 Magic Word: {{SUBJECTPAGENAME}}
7194 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7198 <p>User:Ævar Arnfjörð Bjarmason
7203 Magic Word: {{SUBJECTPAGENAMEE}}
7205 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7207 {{SUBJECTPAGENAMEE}}
7209 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7214 Magic Word: {{NUMBEROFFILES}}
7223 Magic Word: {{PAGENAME}}
7225 title=[[User:Ævar Arnfjörð Bjarmason]]
7229 <p>Ævar Arnfjörð Bjarmason
7234 Magic Word: {{PAGENAME}} with metacharacters
7236 title=[['foo & bar = baz']]
7240 <p><i>'foo & bar = baz'</i>
7245 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
7247 title=[[*RFC 1234 http://example.com/]]
7251 <p>*RFC 1234 http://example.com/
7256 Magic Word: {{PAGENAMEE}}
7258 title=[[User:Ævar Arnfjörð Bjarmason]]
7262 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7267 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
7269 title=[[*RFC 1234 http://example.com/]]
7273 <p>*RFC_1234_http://example.com/
7278 Magic Word: {{REVISIONID}}
7287 Magic Word: {{SCRIPTPATH}}
7296 Magic Word: {{STYLEPATH}}
7305 Magic Word: {{SERVER}}
7309 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7314 Magic Word: {{SERVERNAME}}
7323 Magic Word: {{SITENAME}}
7332 Case-sensitive magic words, when cased differently, should just be template transclusions
7339 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
7340 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
7341 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
7342 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
7347 Case-insensitive magic words should still work with weird casing.
7357 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7362 Namespace 1 {{ns:1}}
7371 Namespace 1 {{ns:01}}
7380 Namespace 0 {{ns:0}} (bug 4783)
7388 Namespace 0 {{ns:00}} (bug 4783)
7396 Namespace -1 {{ns:-1}}
7405 Namespace User {{ns:User}}
7414 Namespace User talk {{ns:User_talk}}
7423 Namespace User talk {{ns:uSeR tAlK}}
7432 Namespace File {{ns:File}}
7441 Namespace File {{ns:Image}}
7450 Namespace (lang=de) Benutzer {{ns:User}}
7461 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
7467 <p>Benutzer Diskussion
7475 {{urlencode:hi world?!}}
7476 {{urlencode:hi world?!|WIKI}}
7477 {{urlencode:hi world?!|PATH}}
7478 {{urlencode:hi world?!|QUERY}}
7488 Magic Word: prioritize type info over data-parsoid
7494 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
7498 Magic Word: serialize on separate line (parsoid)
7500 parsoid=wt2wt,html2wt
7506 foo<meta property="mw:PageProp/notoc"/>bar
7510 Magic Word: rt non-english wikis
7517 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
7524 Magic links: internal link to RFC (bug 479)
7528 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
7533 Magic links: RFC (bug 479)
7537 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
7542 Magic links: ISBN (bug 1937)
7546 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
7551 Magic links: PMID incorrectly converts space to underscore
7555 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
7564 Nonexistent template
7566 {{thistemplatedoesnotexist}}
7568 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
7573 Template with invalid target containing tags
7575 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
7577 <p>{{a<b>b</b>|foo|a=b|a = b}}
7582 Template with invalid target containing unclosed tag
7584 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
7586 <p>{{a<b>|foo|a=b|a = b}}</b>
7591 Template with invalid target containing wikilink
7595 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
7598 <p><span typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"[[Main Page]]"},"params":{},"i":0}}]}'>{{</span><a rel="mw:WikiLink" href="./Main_Page" about="#mwt1">Main Page</a><span about="#mwt1">}}</span></p>
7604 This is a test template
7612 <p>This is a test template
7617 Template with explicit namespace
7621 <p>This is a test template
7629 This is a test template with parameter {{{param}}}
7635 {{paramtest|param=foo}}
7637 <p>This is a test template with parameter foo
7642 Template:paramtestnum
7648 Template unnamed parameter
7650 {{paramtestnum|Main Page|the main page}}
7652 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
7657 Template:templatesimple
7663 Template:templateredirect
7665 #redirect [[Template:templatesimple]]
7669 Template:templateasargtestnum
7675 Template:templateasargtest
7677 {{template{{{templ}}}}}
7681 Template:templateasargtest2
7687 Template with template name as unnamed argument
7689 {{templateasargtestnum|templatesimple}}
7696 Template with template name as argument
7698 {{templateasargtest|templ=simple}}
7705 Template with template name as argument (2)
7707 {{templateasargtest2|templ=templatesimple}}
7714 Template:templateasargtestdefault
7716 {{{{{templ|templatesimple}}}}}
7726 Template with default value
7728 {{templateasargtestdefault}}
7735 Template with default value (value set)
7737 {{templateasargtestdefault|templ=templa}}
7746 {{templateredirect}}
7753 Template with argument in separate line
7755 {{ templateasargtest |
7763 Template with complex template as argument
7766 param ={{ templateasargtest |
7769 <p>This is a test template with parameter (test)
7774 Template with thumb image (with link in description)
7777 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
7779 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>
7784 Template:complextemplate
7786 {{{1}}} {{paramtest|
7787 param ={{{param}}}}}
7791 Template with complex arguments
7794 param ={{ templateasargtest |
7795 templ = simple }}|[[Template:complextemplate|link]]}}
7797 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
7802 BUG 553: link with two variables in a piped link
7805 |[[{{{1}}}|{{{2}}}]]
7810 <td>[[{{{1}}}|{{{2}}}]]
7816 Magic variable as template parameter
7818 {{paramtest|param={{SITENAME}}}}
7820 <p>This is a test template with parameter MediaWiki
7827 [[{{{param}}}|link]]
7831 Template parameter as link source
7833 {{linktest|param=Main Page}}
7835 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
7840 Template-generated attribute string (k='v')
7842 <span {{attr_str|id|v1}}>bar</span>
7844 <p><span id="v1">bar</span>
7851 including another template, {{paramtest|param={{{arg}}}}}
7855 Template passing argument to another template
7857 {{paramtest2|arg='hmm'}}
7859 <p>including another template, This is a test template with parameter 'hmm'
7870 Template as link source
7874 [[{{linktest2}}|Main Page]]
7876 [[{{linktest2}}]]Page
7878 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7879 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7880 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
7898 Template infinite loop
7902 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
7907 Template from main namespace
7926 BUG 529: Template with table, not included at beginning of line
7945 BUG 523: Template shouldn't eat newline (or add an extra one before table)
7965 BUG 41: Template parameters shown as broken links
7974 Template with targets containing wikilinks
7978 {{[[{{echo|foo}}]]}}
7980 {{{{echo|[[foo}}]]}}
7982 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
7983 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
7991 ''None'' of '''this''' should be
7993 but rather passed unmodified
7997 # hmm, fix this or just deprecate msgnw and document its behavior?
8003 {{msgnw:MSGNW test}}
8005 <p>''None'' of '''this''' should be
8007 but rather passed unmodified
8015 {{int:youhavenewmessages|lots of money|not!}}
8017 <p>You have lots of money (not!).
8024 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8028 <includeonly> and <noinclude> being included
8039 <onlyinclude>Foo</onlyinclude>bar
8043 <onlyinclude> being included
8055 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
8059 <onlyinclude> and <includeonly> being included
8068 <includeonly> and <noinclude> on a page
8070 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8077 Un-closed <noinclude>
8084 <onlyinclude> on a page
8086 <onlyinclude>Foo</onlyinclude>bar
8093 Un-closed <onlyinclude>
8100 Self-closed noinclude, includeonly, onlyinclude tags
8111 Unbalanced includeonly and noinclude tags
8115 |b</noinclude></noinclude>
8116 |c</noinclude></includeonly>
8117 |d</includeonly></includeonly>
8126 <td>c</includeonly>
8128 <td>d</includeonly></includeonly>
8134 Template:Includeonly section
8137 ==Includeonly section==
8143 Bug 6563: Edit link generation for section shown by <includeonly>
8145 {{includeonly section}}
8147 <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>
8148 <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>
8152 # Uses same input as the contents of [[Template:Includeonly section]]
8154 Bug 6563: Section extraction for section shown by <includeonly>
8159 ==Includeonly section==
8167 Bug 6563: Edit link generation for section suppressed by <includeonly>
8170 ==Includeonly section==
8174 <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>
8179 Bug 6563: Section extraction for section suppressed by <includeonly>
8184 ==Includeonly section==
8192 Un-closed <includeonly>
8198 # TODO: test with DOM fragment reuse!
8200 Parsoid: DOM fragment reuse
8202 parsoid=wt2wt,wt2html
8204 a{{echo|b<table></table>c}}d
8216 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
8217 <table></table>c"}},"i":0}}]}'>b</span>
8218 <table about="#mwt1"></table><span about="#mwt1">c</span>d
8221 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n<table></table>\nc"}},"i":0}},"d"]}'>ab</p><span about="#mwt2">
8223 <table about="#mwt2"></table><span about="#mwt2">
8225 <p about="#mwt2">cd</p>
8228 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n\n<table></table>\n\nb"}},"i":0}}]}'>a</p><span about="#mwt3">
8231 <table about="#mwt3"></table><span about="#mwt3">
8234 <p about="#mwt3">b</p>
8238 Parsoid: Merge double tds (bug 50603)
8247 <tr><td about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":0}}]}'> foo</td></tr>
8252 Parsoid: Merge double tds in nested transclusion content (bug 50603)
8262 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\n{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":1}},"\n|}\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}'>
8264 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
8270 ### <includeonly> and <noinclude> in attributes
8273 0. includeonly around the entire attribute
8275 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
8277 <p><span id="v2">bar</span>
8282 1. includeonly in html attr key
8284 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
8286 <p><span id="foo">bar</span>
8291 2. includeonly in html attr value
8293 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
8294 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
8296 <p><span id="v1">bar</span>
8297 <span id="v1">bar</span>
8302 3. includeonly in part of an attr value
8304 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
8306 <p><span style="color:red;">bar</span>
8311 4. includeonly in table attributes
8335 ### Testing parsing of templates where a template arg
8336 ### has the same name as the template itself.
8346 Templates: Template Name/Arg clash: 1. Use of positional param
8355 Templates: Template Name/Arg clash: 2. Use of named param
8364 Templates: Template Name/Arg clash: 3. Use of named param with empty input
8373 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
8377 Templates: 1. Simple use
8386 Templates: 2. Inside a block tag
8388 <div>{{echo|Foo}}</div>
8389 <blockquote>{{echo|Foo}}</blockquote>
8392 <blockquote>Foo</blockquote>
8397 Templates: P-wrapping: 1a. Templates on consecutive lines
8408 Templates: P-wrapping: 1b. Templates on consecutive lines
8422 Templates: P-wrapping: 1c. Templates on consecutive lines
8425 {{echo|bar}} <div>baz</div>
8434 Templates: P-wrapping: 1d. Template preceded by comment-only line
8443 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
8447 Templates: Inline Text: 1. Multiple tmeplate uses
8449 {{echo|Foo}}bar{{echo|baz}}
8456 Templates: Inline Text: 2. Back-to-back template uses
8458 {{echo|Foo}}{{echo|bar}}
8465 Templates: Block Tags: 1. Multiple template uses
8467 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
8469 <div>Foo</div><div>bar</div><div>baz</div>
8474 Templates: Block Tags: 2. Back-to-back template uses
8476 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
8478 <div>Foo</div><div>bar</div>
8483 Templates: Links: 1. Simple example
8485 {{echo|[[Foo|bar]]}}
8487 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8492 Templates: Links: 2. Generation of link href
8494 [[{{echo|Foo}}|bar]]
8496 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8501 Templates: Links: 3. Generation of part of a link href
8503 [[Fo{{echo|o}}|bar]]
8507 [[Foo{{echo|bar}}baz]]
8509 [[Foo{{echo|bar}}|bar]]
8511 [[:Foo{{echo|bar}}]]
8513 [[:Foo{{echo|bar}}|bar]]
8515 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8516 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
8517 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
8518 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
8519 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
8520 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
8525 Templates: Links: 4. Multiple templates generating link href
8527 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
8529 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
8534 Templates: Links: 5. Generation of link text
8536 [[Foo|{{echo|bar}}]]
8538 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8543 Templates: Links: 5. Nested templates (only outermost template should be marked)
8545 {{echo|[[{{echo|Foo}}|bar]]}}
8547 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8552 Templates: HTML Tag: 1. Generation of HTML attr. key
8554 <div {{echo|style}}="color:red;">foo</div>
8556 <div style="color:red;">foo</div>
8561 Templates: HTML Tag: 2. Generation of HTML attr. value
8563 <div style={{echo|'color:red;'}}>foo</div>
8565 <div style="color:red;">foo</div>
8570 Templates: HTML Tag: 3. Generation of HTML attr key and value
8572 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
8574 <div style="color:red;">foo</div>
8579 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
8581 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
8583 <div title="This is a long title with just one piece templated">foo</div>
8588 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
8590 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
8592 <div title="This is a long title with just one piece templated">foo</div>
8597 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
8599 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
8601 <div title="This is a long title with just one piece templated">foo</div>
8606 Templates: HTML Tag: 7. Generation of partial attribute key string
8608 <div st{{echo|yle}}="color:red;">foo</div>
8610 <div style="color:red;">foo</div>
8615 Templates: HTML Tables: 1. Generating start of a HTML table
8617 {{echo|<table><tr><td>foo</td>}}</tr></table>
8619 <table><tr><td>foo</td></tr></table>
8624 Templates: HTML Tables: 2a. Generating middle of a HTML table
8626 <table><tr>{{echo|<td>foo</td>}}</tr></table>
8628 <table><tr><td>foo</td></tr></table>
8633 Templates: HTML Tables: 2b. Generating middle of a HTML table
8635 <table>{{echo|<tr><td>foo</td></tr>}}</table>
8637 <table><tr><td>foo</td></tr></table>
8642 Templates: HTML Tables: 3. Generating end of a HTML table
8644 <table><tr>{{echo|<td>foo</td></tr></table>}}
8646 <table><tr><td>foo</td></tr></table>
8651 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
8653 {{echo|<table>}}<tr><td>foo</td></tr></table>
8655 <table><tr><td>foo</td></tr></table>
8660 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
8662 <table>{{echo|<tr>}}<td>foo</td></tr></table>
8664 <table><tr><td>foo</td></tr></table>
8669 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
8671 <table><tr>{{echo|<td>}}foo</td></tr></table>
8673 <table><tr><td>foo</td></tr></table>
8678 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
8680 <table><tr><td>foo{{echo|</td>}}</tr></table>
8682 <table><tr><td>foo</td></tr></table>
8687 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
8689 <table><tr><td>foo</td>{{echo|</tr>}}</table>
8691 <table><tr><td>foo</td></tr></table>
8696 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
8698 <table><tr><td>foo</td></tr>{{echo|</table>}}
8700 <table><tr><td>foo</td></tr></table>
8705 Templates: HTML Tables: 5. Proper fostering of categories from inside
8707 parsoid=wt2html,wt2wt
8709 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
8710 <!--Two categories (Bug 50330)-->
8711 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
8713 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
8714 <!--Two categories (Bug 50330)-->
8715 <link rel="mw:PageProp/Category" href="./Category:Bar1"><link rel="mw:PageProp/Category" href="./Category:Bar2"><table><tbody><tr><td>foo</td></tr></tbody></table>
8719 Templates: Wiki Tables: 1a. Fostering of entire template content
8727 <tr><td></td></tr></table>
8732 Templates: Wiki Tables: 1b. Fostering of entire template content
8745 <tr><td></td></tr></table>
8750 Templates: Wiki Tables: 2. Fostering of partial template content
8760 <tr><td></td></tr></table>
8765 Templates: Wiki Tables: 3. td-content via multiple templates
8768 {{echo|{{pipe}}a}}{{echo|b}}
8779 Templates: Wiki Tables: 4. Templated tags, no content
8785 <tr><td></td></tr></table>
8790 Templates: Wiki Tables: 5. Templated tags, regular td-tags
8804 Templates: Wiki Tables: 6. Templated tags, templated td-tags
8818 Templates: Lists: Multi-line list-items via templates
8820 *{{echo|a {{nonexistent|
8822 *{{echo|b {{nonexistent|
8826 <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>
8828 <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>
8835 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
8837 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
8839 <p><i>ab</i>c<i>d</i>e
8844 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
8845 (PHP parser generates misnested html)
8847 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
8849 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></span><i about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"b''c''d"}},"i":0}},{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''e"}},"i":1}}]}"><span>b</span></i><span about="#mwt2">c</span><i about="#mwt2">d<span></span></i><span about="#mwt2">e</span></p>
8853 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
8854 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
8856 parsoid=wt2html,wt2wt
8858 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
8860 <div about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></div>
8861 <div about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"b''c''d"}},"i":0}}]}"><i>b</i>c<i>d</i></div>
8862 <div about="#mwt3" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''e"}},"i":0}}]}">e</div>
8866 Templates: Ugly nesting: 4. Divs opened/closed across templates
8868 a<div>b{{echo|c</div>d}}e
8875 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
8881 |{{echo|foo</table>}}
8885 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</table>"}},"i":0}},"\n|bar\n|}"]}'>
8889 <td>foo</td></tr></tbody></table><span about="#mwt1">
8890 </span><span about="#mwt1">|bar</span><span about="#mwt1">
8895 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
8905 <td>1. {{echo|foo </table>}}</td>
8907 <td>2. {{echo|baz </table>}}</td>
8920 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n <tr>\n <td>\n <table>\n <tr>\n <td>1. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo </table>"}},"i":0}},"</td>\n <td> bar </td>\n <td>2. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"baz </table>"}},"i":1}},"</td>\n </tr>\n <tr>\n <td>abc</td>\n </tr>\n </table>\n </td>\n </tr>\n <tr>\n <td>xyz</td>\n </tr>\n</table>"]}'>
8925 <td>1. foo </td></tr></tbody></table></td>
8927 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
8928 </span><span about="#mwt2">
8929 </span><span about="#mwt2">
8930 </span><span about="#mwt2">abc</span><span about="#mwt2">
8931 </span><span about="#mwt2">
8932 </span><span about="#mwt2">
8933 </span><span about="#mwt2">
8934 </span><span about="#mwt2">
8935 </span><span about="#mwt2">
8936 </span><span about="#mwt2">xyz</span><span about="#mwt2">
8937 </span><span about="#mwt2">
8942 Templates: Ugly templates: 3. newline-only template parameter
8951 # This looks like a bug: a single newline triggers p/br for some reason.
8953 Templates: Ugly templates: 4. newline-only template parameter inconsistency
8964 Parser Functions: 1. Simple example
8973 Parser Functions: 2. Nested use (only outermost should be marked up)
8982 ### Pre-save transform tests
8985 pre-save transform: subst:
8991 This is a test template
8995 pre-save transform: normal template
9005 pre-save transform: nonexistent template
9009 {{thistemplatedoesnotexist}}
9011 {{thistemplatedoesnotexist}}
9016 pre-save transform: subst magic variables
9025 # This is bug 89, which I fixed. -- wtm
9027 pre-save transform: subst: templates with parameters
9031 {{subst:paramtest|param="something else"}}
9033 This is a test template with parameter "something else"
9039 <nowiki>'''not wiki'''</nowiki>
9043 pre-save transform: nowiki in subst (bug 1188)
9047 {{subst:nowikitest}}
9049 <nowiki>'''not wiki'''</nowiki>
9054 Template:commenttest
9056 This template has <!-- a comment --> in it.
9060 pre-save transform: comment in subst (bug 1936)
9064 {{subst:commenttest}}
9066 This template has <!-- a comment --> in it.
9070 pre-save transform: unclosed tag
9074 <nowiki>'''not wiki'''
9076 <nowiki>'''not wiki'''
9080 pre-save transform: mixed tag case
9084 <NOwiki>'''not wiki'''</noWIKI>
9086 <NOwiki>'''not wiki'''</noWIKI>
9090 pre-save transform: unclosed comment in <nowiki>
9094 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9096 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9099 # Leading @ in this template definition works around a limitation
9100 # in parsoid's parserTests which otherwise strips the <span> from the
9101 # result (confusing it for a template wrapper)
9105 @<span onmouseover="alert('crap')">Oh no</span>
9109 (confirming safety of fix for subst bug 1936)
9111 {{Template:dangerous}}
9113 <p>@<span>Oh no</span>
9118 pre-save transform: comment containing gallery (bug 5024)
9122 <!-- <gallery>data</gallery> -->
9124 <!-- <gallery>data</gallery> -->
9128 pre-save transform: comment containing extension
9132 <!-- <tag>data</tag> -->
9134 <!-- <tag>data</tag> -->
9138 pre-save transform: comment containing nowiki
9142 <!-- <nowiki>data</nowiki> -->
9144 <!-- <nowiki>data</nowiki> -->
9148 pre-save transform: <noinclude> in subst (bug 3298)
9158 pre-save transform: <onlyinclude> in subst (bug 3298)
9170 {{<includeonly>subst:</includeonly>Includes}}
9174 Template:SafeSubstTest
9176 {{<includeonly>safesubst:</includeonly>Includes}}
9180 bug 22297: safesubst: works during PST
9184 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
9190 bug 22297: safesubst: works during normal parse
9199 subst: does not work during normal parse
9203 <p>{{subst:Includes}}
9208 pre-save transform: context links ("pipe trick")
9212 [[Article (context)|]]
9215 [[Bar:Article (context)|]]
9216 [[:Bar:Article (context)|]]
9218 [[|Article (context)]]
9222 [[Article (context)|Article]]
9223 [[Bar:Article|Article]]
9224 [[:Bar:Article|Article]]
9225 [[Bar:Article (context)|Article]]
9226 [[:Bar:Article (context)|Article]]
9228 [[Article (context)]]
9229 [[Bar:X (Y) Z|X (Y) Z]]
9230 [[:Bar:X (Y) Z|X (Y) Z]]
9234 pre-save transform: context links ("pipe trick") with interwiki prefix
9238 [[interwiki:Article|]]
9239 [[:interwiki:Article|]]
9240 [[interwiki:Bar:Article|]]
9241 [[:interwiki:Bar:Article|]]
9243 [[interwiki:Article|Article]]
9244 [[:interwiki:Article|Article]]
9245 [[interwiki:Bar:Article|Bar:Article]]
9246 [[:interwiki:Bar:Article|Bar:Article]]
9250 pre-save transform: context links ("pipe trick") with parens in title
9252 pst title=[[Somearticle (context)]]
9256 [[Article (context)|Article]]
9260 pre-save transform: context links ("pipe trick") with comma in title
9262 pst title=[[Someplace, Somewhere]]
9265 [[Otherplace, Elsewhere|]]
9266 [[Otherplace, Elsewhere, Anywhere|]]
9268 [[Otherplace, Somewhere|Otherplace]]
9269 [[Otherplace, Elsewhere|Otherplace]]
9270 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
9274 pre-save transform: context links ("pipe trick") with parens and comma
9276 pst title=[[Someplace (IGNORED), Somewhere]]
9279 [[Otherplace (place), Elsewhere|]]
9281 [[Otherplace, Somewhere|Otherplace]]
9282 [[Otherplace (place), Elsewhere|Otherplace]]
9286 pre-save transform: context links ("pipe trick") with comma and parens
9288 pst title=[[Who, me? (context)]]
9291 [[Me, Myself, and I (1937 song)|]]
9293 [[Yes, you. (context)|Yes, you.]]
9294 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
9298 pre-save transform: context links ("pipe trick") with namespace
9300 pst title=[[Ns:Somearticle]]
9304 [[Ns:Article|Article]]
9308 pre-save transform: context links ("pipe trick") with namespace and parens
9310 pst title=[[Ns:Somearticle (context)]]
9314 [[Ns:Article (context)|Article]]
9318 pre-save transform: context links ("pipe trick") with namespace and comma
9320 pst title=[[Ns:Somearticle, Context, Whatever]]
9324 [[Ns:Article, Context, Whatever|Article]]
9328 pre-save transform: context links ("pipe trick") with namespace, comma and parens
9330 pst title=[[Ns:Somearticle, Context (context)]]
9334 [[Ns:Article (context)|Article]]
9338 pre-save transform: context links ("pipe trick") with namespace, parens and comma
9340 pst title=[[Ns:Somearticle (IGNORED), Context]]
9344 [[Ns:Article, Context|Article]]
9348 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
9352 [[Article(context)|]]
9353 [[Bar:Article(context)|]]
9354 [[:Bar:Article(context)|]]
9355 [[|Article(context)]]
9359 [[Article(context)|Article]]
9360 [[Bar:Article(context)|Article]]
9361 [[:Bar:Article(context)|Article]]
9362 [[Article(context)]]
9364 [[:Bar:X(Y)Z|X(Y)Z]]
9368 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
9372 [[Article (context)|]]
9373 [[Bar:Article (context)|]]
9374 [[:Bar:Article (context)|]]
9375 [[|Article (context)]]
9379 [[Article (context)|Article]]
9380 [[Bar:Article (context)|Article]]
9381 [[:Bar:Article (context)|Article]]
9382 [[Article (context)]]
9383 [[Bar:X (Y) Z|X (Y) Z]]
9384 [[:Bar:X (Y) Z|X (Y) Z]]
9388 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
9392 [[Article(context)|]]
9393 [[Bar:Article(context)|]]
9394 [[:Bar:Article(context)|]]
9395 [[|Article(context)]]
9399 [[Article(context)|Article]]
9400 [[Bar:Article(context)|Article]]
9401 [[:Bar:Article(context)|Article]]
9402 [[Article(context)]]
9404 [[:Bar:X(Y)Z|X(Y)Z]]
9408 pre-save transform: context links ("pipe trick") with commas (bug 21660)
9412 [[Article (context), context|]]
9413 [[Article (context),context|]]
9414 [[Bar:Article (context), context|]]
9415 [[Bar:Article (context),context|]]
9416 [[:Bar:Article (context), context|]]
9417 [[:Bar:Article (context),context|]]
9419 [[Article (context), context|Article]]
9420 [[Article (context),context|Article]]
9421 [[Bar:Article (context), context|Article]]
9422 [[Bar:Article (context),context|Article]]
9423 [[:Bar:Article (context), context|Article]]
9424 [[:Bar:Article (context),context|Article]]
9428 pre-save transform: trim trailing empty lines
9432 Empty lines are trimmed
9438 Empty lines are trimmed
9442 pre-save transform: Signature expansion
9447 * <noinclude>~~~</noinclude>
9448 * <includeonly>~~~</includeonly>
9449 * <onlyinclude>~~~</onlyinclude>
9451 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
9452 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
9453 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
9454 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
9459 pre-save transform: Signature expansion in nowiki tags (bug 93)
9465 <nowiki>~~~~</nowiki>
9467 <includeonly><nowiki>~~~~</nowiki></includeonly>
9469 <noinclude><nowiki>~~~~</nowiki></noinclude>
9471 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
9473 {{subst:Foo}} shall be converted to FOO
9475 As well as inside noinclude/onlyinclude
9476 <noinclude>{{subst:Foo}}</noinclude>
9477 <onlyinclude>{{subst:Foo}}</onlyinclude>
9479 But not inside includeonly
9480 <includeonly>{{subst:Foo}}</includeonly>
9484 <nowiki>~~~~</nowiki>
9486 <includeonly><nowiki>~~~~</nowiki></includeonly>
9488 <noinclude><nowiki>~~~~</nowiki></noinclude>
9490 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
9492 FOO shall be converted to FOO
9494 As well as inside noinclude/onlyinclude
9495 <noinclude>FOO</noinclude>
9496 <onlyinclude>FOO</onlyinclude>
9498 But not inside includeonly
9499 <includeonly>{{subst:Foo}}</includeonly>
9503 Parsoid: Recognize nowiki with trailing space in tags
9507 <nowiki ><div>[[foo]]</nowiki >
9515 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
9522 Parsoid: Recognize nowiki with odd capitalization
9526 <noWikI ><div>[[foo]]</Nowiki >
9528 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
9533 Parsoid: Escape nowiki with trailing space in tags
9537 <nowiki > foo </nowiki >
9543 <p><nowiki > foo </nowiki ></p>
9544 <p>a<nowiki />b</p>
9545 <p>c<nowiki/ >d</p>
9549 Parsoid: Escape weird noWikI capitalizations
9553 <noWikI > foo </NoWikI >
9555 <p><noWikI > foo </NoWikI ></p>
9559 ### Message transform tests
9562 message transform: magic variables
9572 message transform: should not transform wiki markup
9582 message transform: <noinclude> in transcluded template (bug 4926)
9592 message transform: <onlyinclude> in transcluded template (bug 4926)
9602 {{#special:}} page name, known
9606 {{#special:Recentchanges}}
9608 Special:RecentChanges
9612 {{#special:}} page name with subpage, known
9616 {{#special:Recentchanges/param}}
9618 Special:RecentChanges/param
9622 {{#special:}} page name, unknown
9626 {{#special:foobar nonexistent}}
9628 Special:Foobar nonexistent
9632 {{#speciale:}} page name, known
9636 {{#speciale:Recentchanges}}
9638 Special:RecentChanges
9642 {{#speciale:}} page name with subpage, known
9646 {{#speciale:Recentchanges/param}}
9648 Special:RecentChanges/param
9652 {{#speciale:}} page name, unknown
9656 {{#speciale:foobar nonexistent}}
9658 Special:Foobar_nonexistent
9664 ### For Parsoid-specific tests, see
9665 #### http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
9670 parsoid=wt2html,wt2wt,html2html
9672 [[Image:foobar.jpg]]
9674 <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>
9677 <p><span class="mw-default-size" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span>
9682 Simple image (using File: namespace, now canonical)
9686 <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>
9689 <p><span class="mw-default-size" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span>
9696 [[File:Foobar.jpg|right]]
9698 <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>
9701 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></figure>
9707 [[File:Foobar.jpg|right|Caption text]]
9709 <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>
9712 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption>Caption text</figcaption></figure>
9716 Image with caption, bug 53312 #1
9718 [[File:Foobar.jpg|right|Caption page stuff]]
9720 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page stuff"><img alt="Caption page stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
9723 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption>Caption page stuff</figcaption></figure>
9727 Image with caption, bug 53312 #2
9729 [[File:Foobar.jpg|right|Caption page=]]
9731 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page="><img alt="Caption page=" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
9734 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption>Caption page=</figcaption></figure>
9738 Image with caption, bug 53312 #3
9740 [[File:Foobar.jpg|right|Caption page=stuff]]
9742 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page=stuff"><img alt="Caption page=stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
9745 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption>Caption page=stuff</figcaption></figure>
9749 Allow empty links in image captions (Bug 60753)
9751 [[File:Foobar.jpg|thumb|Caption [[Link1]]
9756 <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>Caption <a href="/index.php?title=Link1&action=edit&redlink=1" class="new" title="Link1 (page does not exist)">Link1</a> [[]] <a href="/index.php?title=Link2&action=edit&redlink=1" class="new" title="Link2 (page does not exist)">Link2</a></div></div></div>
9759 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption [[Link1]]\n[[]]\n[[Link2]]\n"}],"dsr":[0,59,2,2]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"dsr":[2,null,null,null]}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption data-parsoid='{"dsr":[null,57,null,null]}'>Caption <a rel="mw:WikiLink" href="./Link1" data-parsoid='{"stx":"simple","a":{"href":"./Link1"},"sa":{"href":"Link1"},"dsr":[32,41,2,2]}'>Link1</a>
9761 <a rel="mw:WikiLink" href="./Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"},"dsr":[47,56,2,2]}'>Link2</a>
9762 </figcaption></figure>
9766 Link with empty target
9775 Image with empty attribute
9777 parsoid=wt2html,wt2wt,html2html
9779 [[File:Foobar.jpg|right||Caption text]]
9781 <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>
9784 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption>Caption text</figcaption></figure>
9788 1. Block image with individual attributes from templates
9790 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
9792 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-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</div></div></div>
9795 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[24,38,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">137px</span>"}]]}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
9799 2. Block Image with individual attributes from templates
9801 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
9803 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-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</div></div></div>
9806 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;thumb&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[18,32,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[33,47,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">137px</span>"}]]}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
9810 3. Inline image with individual attributes from templates
9812 [[File:Foobar.jpg|{{echo|50px}}]]
9814 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
9817 <p><span typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;50px&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[18,31,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">50px</span>"}]]}' data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
9820 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
9821 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
9823 Image with multiple attributes from the same template
9825 [[File:Foobar.jpg|{{image_attribs}}]]
9827 <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>
9830 <figure class="mw-default-size mw-halign-right" typeof="mw:Image mw:Placeholder"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption>Caption text</figcaption></figure>
9834 Image with link tails
9836 123[[File:Foobar.jpg]]456
9837 123[[File:Foobar.jpg|right]]456
9838 123[[File:Foobar.jpg|thumb]]456
9840 <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
9842 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
9843 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
9846 <p>123<span class="mw-default-size" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span>456</p>
9847 123<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></figure>456
9848 123<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220"></a></figure>456
9852 Image with multiple captions -- only last one is accepted
9854 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
9856 <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>
9859 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption>Caption3 - accepted</figcaption></figure>
9863 Image with multiple widths -- use last
9865 [[File:Foobar.jpg|200px|300px|caption]]
9867 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a>
9870 <p><span typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="34" width="300"/></a></span></p>
9874 Image with multiple alignments -- use first (bug 48664)
9876 [[File:Foobar.jpg|thumb|left|right|center|caption]]
9878 [[File:Foobar.jpg|middle|text-top|caption]]
9880 <div class="thumb tleft"><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>caption</div></div></div>
9881 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" style="vertical-align: middle" /></a>
9884 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
9885 <p><span class="mw-default-size mw-valign-middle" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
9889 Image with width attribute at different positions
9891 [[File:Foobar.jpg|200px|right|Caption]]
9892 [[File:Foobar.jpg|right|200px|Caption]]
9893 [[File:Foobar.jpg|right|Caption|200px]]
9895 <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>
9896 <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>
9897 <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>
9900 <figure class="mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" height="23" width="200"></a><figcaption>Caption</figcaption></figure>
9901 <figure class="mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" height="23" width="200"></a><figcaption>Caption</figcaption></figure>
9902 <figure class="mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" height="23" width="200"></a><figcaption>Caption</figcaption></figure>
9905 # a sad bit of backward-compatibility
9907 Image with size specified with pxpx (bug 13500, 51628)
9909 parsoid=wt2html,wt2wt,html2html
9911 [[File:Foobar.jpg|20pxpx]]
9912 [[File:Foobar.jpg|200x20pxpx]]
9914 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" 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>
9915 <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" width="177" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/265px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/353px-Foobar.jpg 2x" /></a>
9918 <p><span typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="2" width="20"/></a></span><span typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="20" width="177"/></a></span></p>
9922 Image with link parameter, wiki target
9924 [[File:Foobar.jpg|link=Main Page]]
9926 <p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9929 <p><span class="mw-default-size" typeof="mw:Image"><a href="Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span></p>
9932 # parsoid bug 49293 (part 1)
9934 Image with link parameter, URL target
9936 [[File:Foobar.jpg|link=http://example.com/]]
9938 <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>
9941 <p><span class="mw-default-size" typeof="mw:Image"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span></p>
9944 # parsoid bug 49293 (part 2)
9946 Image with link parameter, protocol-less URL target
9948 [[File:Foobar.jpg|link=//example.com/]]
9950 <p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9953 <p><span class="mw-default-size" typeof="mw:Image"><a href="//example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span></p>
9957 Image with link parameter, wgExternalLinkTarget
9959 [[Image:foobar.jpg|link=http://example.com/]]
9961 wgExternalLinkTarget='foobar'
9963 <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>
9968 Image with link parameter, wgNoFollowLinks set to false
9970 [[Image:foobar.jpg|link=http://example.com/]]
9972 wgNoFollowLinks=false
9974 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9979 Image with link parameter, wgNoFollowDomainExceptions
9981 [[Image:foobar.jpg|link=http://example.com/]]
9983 wgNoFollowDomainExceptions='example.com'
9985 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
9990 Image with link parameter, wgExternalLinkTarget, unnamed parameter
9992 [[Image:foobar.jpg|link=http://example.com/|Title]]
9994 wgExternalLinkTarget='foobar'
9996 <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>
10001 Image with empty link parameter
10003 [[File:Foobar.jpg|link=]]
10005 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
10008 <p><span class="mw-default-size" typeof="mw:Image"><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></span></span></p>
10012 Image with link parameter (wiki target) and unnamed parameter
10014 [[File:Foobar.jpg|link=Main_Page|Title]]
10016 <p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10019 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span></p>
10023 Image with link parameter (URL target) and unnamed parameter
10025 [[File:Foobar.jpg|link=http://example.com/|Title]]
10027 <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>
10030 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span></p>
10034 Thumbnail image with link parameter
10036 parsoid=wt2html,wt2wt,html2html
10038 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
10040 <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>
10043 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>Title</figcaption></figure>
10047 Manually-specified thumbnail image
10049 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
10051 <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>
10054 XXX NOT IMPLEMENTED XXX
10058 Manually-specified thumbnail image with explicit link to wiki page
10060 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
10062 <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>
10065 XXX NOT IMPLEMENTED XXX
10069 Manually-specified thumbnail image with explicit link to url
10071 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
10073 <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>
10076 XXX NOT IMPLEMENTED XXX
10080 Manually-specified thumbnail image with explicit no link
10082 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
10084 <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>
10087 XXX NOT IMPLEMENTED XXX
10091 Manually-specified thumbnail image with explicit link and alt text
10093 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
10095 <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>
10098 XXX NOT IMPLEMENTED XXX
10102 Image with frame and link
10104 parsoid=wt2html,wt2wt,html2html
10106 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
10108 <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>
10111 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="Main_Page">Main Page</a></figcaption></figure>
10115 Image with frame and link and explicit alt
10117 parsoid=wt2html,wt2wt,html2html
10119 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
10121 <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>
10124 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img alt="Altitude" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="Main_Page">Main Page</a></figcaption></figure>
10128 Image with wiki markup in implicit alt
10130 parsoid=wt2html,wt2wt,html2html
10132 [[Image:Foobar.jpg|testing '''bold''' in alt]]
10134 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
10136 <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>
10137 </p><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>
10140 <p><span class="mw-default-size" typeof="mw:Image" data-mw="{"caption":"testing '''bold''' in alt"}"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
10141 <p><span class="mw-default-size" typeof="mw:Image"><a href="File:Foobar.jpg"><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
10144 ###################
10145 # Conflicting image format options.
10146 # First option specified should 'win'.
10147 # All three cases in each test should be identical.
10150 Image with 'frameless' first.
10152 [[File:Foobar.jpg|frameless|caption]]
10154 [[File:Foobar.jpg|frameless|frame|caption]]
10156 [[File:Foobar.jpg|frameless|thumb|caption]]
10158 <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" 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>
10159 </p><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" 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>
10160 </p><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" 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>
10165 Image with 'frame' first.
10167 [[File:Foobar.jpg|frame|caption]]
10168 [[File:Foobar.jpg|frame|frameless|caption]]
10169 [[File:Foobar.jpg|frame|thumb|caption]]
10171 <div class="thumb tright"><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">caption</div></div></div>
10172 <div class="thumb tright"><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">caption</div></div></div>
10173 <div class="thumb tright"><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">caption</div></div></div>
10178 Image with 'thumb' first.
10180 [[File:Foobar.jpg|thumb|caption]]
10181 [[File:Foobar.jpg|thumb|frameless|caption]]
10182 [[File:Foobar.jpg|thumb|frame|caption]]
10184 <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>caption</div></div></div>
10185 <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>caption</div></div></div>
10186 <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>caption</div></div></div>
10190 ###################
10192 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
10193 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
10194 # Foobar has actual size of 1941x220
10195 # 1. Thumbs & frameless always reduce, can't be enlarged
10196 # 2. Framed images ignore width; always render at default size.
10197 # If given a height, they respect height but continue to ignore width.
10198 # 3. "Unspecified format" and border are the only types which can be
10202 Image: "unspecified format" and border enlarge
10204 parsoid=wt2html,wt2wt,html2html
10206 [[File:Foobar.jpg|2000px]]
10208 [[File:Foobar.jpg|border|2000px]]
10210 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" /></a>
10211 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" class="thumbborder" /></a>
10214 <p><span typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="227" width="2000"/></a></span></p>
10215 <p><span class="mw-image-border" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="227" width="2000"/></a></span></p>
10219 Image: "unspecified format" and border reduce
10221 parsoid=wt2html,wt2wt,html2html
10223 [[File:Foobar.jpg|1000px]]
10225 [[File:Foobar.jpg|border|1000px]]
10227 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
10228 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" class="thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
10231 <p><span typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="113" width="1000"/></a></span></p>
10232 <p><span class="mw-image-border" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="113" width="1000"/></a></span></p>
10236 Image: thumbs reduce
10238 parsoid=wt2html,wt2wt,html2html
10240 [[File:Foobar.jpg|thumb|50px]]
10242 <div class="thumb tright"><div class="thumbinner" style="width:52px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-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>
10245 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="6" width="50"/></a></figure>
10249 Image: thumbs can't be enlarged past original size
10251 parsoid=wt2html,wt2wt,html2html
10253 [[File:Foobar.jpg|thumb|2000px]]
10255 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><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" 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></div></div></div>
10258 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></figure>
10262 Image: frameless can reduce in size
10264 parsoid=wt2html,wt2wt,html2html
10266 [[File:Foobar.jpg|frameless|50px]]
10268 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
10271 <p><span typeof="mw:Image/Frameless"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="6" width="50"/></a></span></p>
10275 Image: frameless can't be enlarged past original size
10277 parsoid=wt2html,wt2wt,html2html
10279 [[File:Foobar.jpg|frameless|2000px]]
10281 <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>
10284 <p><span typeof="mw:Image/Frameless"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
10288 Image: framed images ignore size if only width is given
10290 parsoid=wt2html,wt2wt,html2html
10292 [[File:Foobar.jpg|frame]]
10294 [[File:Foobar.jpg|frame|50px]]
10296 [[File:Foobar.jpg|frame|2000px]]
10298 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><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" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
10299 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><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" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
10300 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><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" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
10303 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></figure><figure typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></figure><figure typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></figure>
10307 Image: framed images respect size if given a height, but ignore width.
10309 [[File:Foobar.jpg|frame|50x50px]]
10311 <div class="thumb tright"><div class="thumbinner" style="width:444px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" width="442" height="50" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
10314 <figure typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="50" width="442"/></a></figure>
10317 ###################
10320 Link to image page- image page normally doesn't exists, hence edit link
10321 Add test with existing image page
10322 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
10326 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
10331 bug 18784 Link to non-existent image page with caption should use caption as link text
10333 [[:Image:test|caption]]
10335 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
10340 Frameless image caption with a free URL
10342 [[File:Foobar.jpg|http://example.com]]
10344 <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>
10347 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"http://example.com"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
10351 Thumbnail image caption with a free URL
10353 [[File:Foobar.jpg|thumb|http://example.com]]
10355 <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>
10358 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
10362 Thumbnail image caption with a free URL and explicit alt
10364 parsoid=wt2html,wt2wt,html2html
10366 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
10368 <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>
10371 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img alt="Alteration" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
10375 SVG thumbnails with no language set
10378 [[File:Foobar.svg|thumb|caption]]
10380 <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="135" 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>caption</div></div></div>
10385 SVG thumbnails with language de
10388 [[File:Foobar.svg|thumb|caption|lang=de]]
10390 <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="135" 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>caption</div></div></div>
10395 SVG thumbnails with invalid language code
10398 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
10400 <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="135" 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>
10405 BUG 1887: A ISBN with a thumbnail
10407 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
10409 <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>
10414 BUG 1887: A RFC with a thumbnail
10416 [[Image:foobar.jpg|thumb|This is RFC 12354]]
10418 <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>
10423 BUG 1887: A mailto link with a thumbnail
10425 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
10427 <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>
10431 # Pending resolution to bug 368
10433 BUG 648: Frameless image caption with a link
10435 [[Image:foobar.jpg|text with a [[link]] in it]]
10437 <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>
10442 BUG 648: Frameless image caption with a link (suffix)
10444 [[Image:foobar.jpg|text with a [[link]]foo in it]]
10446 <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>
10451 BUG 648: Frameless image caption with an interwiki link
10453 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
10455 <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>
10460 BUG 648: Frameless image caption with a piped interwiki link
10462 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
10464 <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>
10469 Escape HTML special chars in image alt text
10471 [[Image:foobar.jpg|& < > "]]
10473 <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>
10478 BUG 499: Alt text should have Ӓ, not &1234;
10480 [[Image:foobar.jpg|♀]]
10482 <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>
10487 Broken image caption with link
10489 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
10491 <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.
10496 Image caption containing another image
10498 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
10500 <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>
10505 Image caption containing a newline
10507 [[Image:Foobar.jpg|This
10510 <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>
10515 Parsoid: Image caption containing leading space
10516 (The leading space should not trigger nowiki escaping in wt2wt mode)
10518 [[Image:Foobar.jpg|thumb| bar]]
10520 <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>
10525 Images: caption containing a table
10527 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
10533 and some more text.]]
10535 <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 is an example image thumbnail caption with a table <table> <tr> <th> Foo </th> <th> Bar </th></tr> <tr> <td> Foo1 </td> <td> Bar1 </td></tr></table> and some more text.</div></div></div>
10538 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
10541 <tr><th>Foo </th><th>Bar</th></tr>
10544 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
10548 Bug 3090: External links other than http: in image captions
10550 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
10552 <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>
10555 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
10561 parsoid=wt2html,wt2wt,html2html
10563 [[Image:foobar.jpg|a|class=b]]
10565 <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>
10568 <p><span class="mw-default-size b" typeof="mw:Image" data-mw='{"caption":"a"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
10572 Localized image handling (1).
10574 parsoid=wt2html,wt2wt,html2html
10577 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
10579 <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>
10582 <figure class="mw-default-size mw-halign-left" typeof="mw:Image"><a href="./Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
10586 Localized image handling (2).
10588 parsoid=wt2html,wt2wt,html2html
10591 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
10593 <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>
10596 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
10600 "border", "frameless" and "class" attributes on an image.
10602 parsoid=wt2html,wt2wt,html2html
10604 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
10606 <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>
10609 <p><span class="mw-default-size mw-image-border extra" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a></span></p>
10612 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
10614 Invalid image attributes (bug 62500)
10616 parsoid=wt2html,wt2wt,html2html
10618 [[File:Foobar.jpg|thumb|float|left|caption]]
10620 [[File:Foobar.jpg|thumb|righ|caption]]
10622 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
10624 <div class="thumb tleft"><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>caption</div></div></div>
10625 <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>caption</div></div></div>
10626 <div class="thumb tleft"><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>caption</div></div></div>
10629 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure><figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
10635 #REDIRECT [[File:Barfoo.jpg]]
10641 [[Image:Barfoo.jpg]]
10643 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
10648 Missing image with uploads disabled
10652 [[Image:Foobaz.jpg]]
10654 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
10658 # Parsoid-specific testing for images
10659 # http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
10660 # Currently imperfect due to a flaw in the Parsoid testrunner
10662 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
10666 Parsoid-specific image handling - simple image with size and middle alignment
10668 [[File:Foobar.jpg|middle|50px]]
10670 <p><span class="mw-valign-middle" typeof="mw:Image">
10671 <a href="File:Foobar.jpg">
10672 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
10679 Parsoid-specific image handling - simple image with size, middle alignment,
10680 non-standard namespace alias
10682 parsoid=wt2wt,wt2html,html2html
10684 [[Image:Foobar.jpg|middle|50px]]
10686 <p><span class="mw-valign-middle" typeof="mw:Image">
10687 <a href="File:Foobar.jpg">
10688 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
10695 Parsoid-specific image handling - simple image with size and middle alignment
10698 [[File:Foobar.jpg|50px|middle]]
10700 <p><span class="mw-valign-middle" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"middle","ak":"middle"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
10704 Parsoid-specific image handling - simple image with size and middle alignment
10705 and non-standard namespace name
10707 parsoid=wt2html,wt2wt,html2html
10709 [[Image:Foobar.jpg|50px|middle]]
10711 <p><span class="mw-valign-middle" typeof="mw:Image">
10712 <a href="File:Foobar.jpg">
10713 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
10720 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
10722 [[File:Foobar.jpg|500x10px|baseline|caption]]
10724 <p><span class="mw-valign-baseline" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"500x10px"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption"}],"size":"500x10"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/89px-Foobar.jpg" height="10" width="89" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"10","width":"89"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
10728 Parsoid-specific image handling - simple image with border and size spec
10730 [[File:Foobar.jpg|50px|border|caption]]
10732 <p><span class="mw-image-border" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
10736 Parsoid-specific image handling - thumbnail with halign, valign, and caption
10738 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
10740 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
10741 <a href="File:Foobar.jpg">
10742 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
10744 <figcaption>caption content</figcaption>
10749 Parsoid-specific image handling - thumbnail with halign, valign, and caption
10752 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
10754 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"left","ak":"left"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption content"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption content</figcaption></figure>
10758 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
10760 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
10762 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
10763 <a href="File:Foobar.jpg">
10764 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
10766 <figcaption>caption</figcaption>
10771 Parsoid-specific image handling - thumbnail with specific size, halign,
10772 valign, and caption (existing content)
10774 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
10776 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"50x50px"},{"ck":"right","ak":"right"},{"ck":"middle","ak":"middle"},{"ck":"caption","ak":"caption"}],"size":"50x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption</figcaption></figure>
10780 Parsoid-specific image handling - framed image with specific size and caption
10782 [[Image:Foobar.jpg|frame|500x50px|caption]]
10784 <figure typeof="mw:Image/Frame">
10785 <a href="File:Foobar.jpg">
10786 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
10788 <figcaption>caption</figcaption>
10793 Parsoid-specific image handling - framed image with specific size and caption
10796 [[File:Foobar.jpg|442x50px|frame|caption]]
10798 <figure typeof="mw:Image/Frame" data-parsoid='{"optList":[{"ck":"width","ak":"442x50px"},{"ck":"framed","ak":"frame"},{"ck":"caption","ak":"caption"}],"size":"442x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"50","width":"442"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption</figcaption></figure>
10802 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
10804 [[Image:Foobar.jpg|left|baseline|frame|500x50px|caption]]
10806 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
10807 <a href="File:Foobar.jpg">
10808 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" />
10810 <figcaption>caption</figcaption>
10815 Parsoid-specific image handling - framed image with specific size, halign,
10816 valign, and caption (existing content)
10818 [[File:Foobar.jpg|442x50px|frame|left|baseline|caption]]
10820 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame" data-parsoid='{"optList":[{"ck":"width","ak":"442x50px"},{"ck":"framed","ak":"frame"},{"ck":"left","ak":"left"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption"}],"size":"442x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"50","width":"442"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption</figcaption></figure>
10824 Parsoid-specific image handling - frameless image with specific size, border, and caption
10826 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
10828 <p><span class="mw-image-border" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"frameless","ak":"frameless"},{"ck":"width","ak":"442x50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}],"size":"442x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" height="50" width="442" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"50","width":"442"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
10832 Parsoid-specific image handling - simple image with a formatted caption
10834 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
10836 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}'>
10837 <a href="File:Foobar.jpg">
10838 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
10843 Parsoid-specific image handling - caption with a template in it
10845 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
10847 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" height="23" width="200"></a><figcaption>This caption has a <span about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}">transclusion</span> in it.</figcaption></figure>
10851 Parsoid-specific image handling - caption with unbalanced tags in it
10853 parsoid=wt2html,wt2wt,html2html
10856 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
10860 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="23" width="200"></a><figcaption>This caption has a <center>unbalanced tag in it.</center></figcaption></figure>
10865 Parsoid-specific image handling - empty caption
10867 [[File:Foobar.jpg|thumb|]]
10869 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption></figcaption></figure>
10873 Parsoid-specific image handling - whitespace caption
10875 [[File:Foobar.jpg|thumb| ]]
10877 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption> </figcaption></figure>
10881 Parsoid-specific image handling - lang option
10884 [[File:Foobar.svg|lang=de|caption]]
10888 <span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" lang="de" height="180" width="240"/></a></span>
10897 Subpage test/subpage
10905 subpage title=[[Subpage test]]
10909 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
10914 Subpage noslash link
10916 subpage title=[[Subpage test]]
10920 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
10924 # TODO: make this PHP-parser compatible!
10926 Relative subpage noslash link
10928 parsoid=wt2wt,wt2html,html2html
10929 subpage title=[[Subpage test/1/2/3/4]]
10935 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
10936 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
10939 # TODO: make this PHP-parser compatible!
10941 Parsoid: dot-slash prefixed wikilinks
10943 parsoid=wt2wt,wt2html,html2html
10951 <p><a rel="mw:WikiLink" href="./Foo">foo</a></p>
10952 <p><a rel="mw:WikiLink" href="./Bar">bar</a></p>
10953 <p><a rel="mw:WikiLink" href="./Baz/">baz/</a></p>
10961 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
10966 BUG 561: {{/Subpage}}
10968 subpage title=[[Page]]
10972 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
10980 Category:MediaWiki User's Guide
10988 [[:Category:MediaWiki User's Guide]]
10990 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
10999 [[Category:MediaWiki User's Guide]]
11001 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11005 PAGESINCATEGORY invalid title fatal (r33546 fix)
11007 {{PAGESINCATEGORY:<bogus>}}
11014 Category with different sort key
11018 [[Category:MediaWiki User's Guide|Foo]]
11020 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11024 Category with identical sort key
11028 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11030 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11034 Category with empty sort key
11039 [[Category:MediaWiki User's Guide|]]
11041 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11045 Category with empty sort key and parentheses
11050 [[Category:Foo (bar)|]]
11052 [[Category:Foo (bar)|Foo]]
11056 Category with link tail
11061 123[[Category:Foo]]456
11063 123[[Category:Foo]]456
11067 Category with template
11072 [[Category:{{echo|Foo}}]]
11074 [[Category:{{echo|Foo}}]]
11078 Category with template in sort key
11083 [[Category:Foo|{{echo|Bar}}]]
11085 [[Category:Foo|{{echo|Bar}}]]
11089 Category with template in sort key and title
11094 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11096 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11100 Category / paragraph interactions
11102 Foo [[Category:Baz]] Bar
11104 Foo [[Category:Baz]]
11112 [[Category:Baz]] Bar
11125 {{echo|[[Category:Baz]]}}
11140 Parsoid: Serialize link to category page with colon escape
11146 [[:Category:Foo|Bar]]
11149 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
11150 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
11155 Parsoid: Link prefix/suffixes aren't applied to category links
11157 parsoid=wt2html,wt2wt,html2html
11162 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
11166 Parsoid: Serialize link to file page with colon escape
11172 [[:File:Foo.png|Bar]]
11175 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
11176 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
11181 Parsoid: Serialize a genuine category link without colon escape
11186 [[Category:Foo|Bar]]
11188 <link rel="mw:PageProp/Category" href="Category:Foo">
11189 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
11193 Parsoid: Defaultsort
11197 {{DEFAULTSORT:Foo}}
11199 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
11203 ### Inter-language links
11206 Inter-language links
11212 [[zh:食品]]
11214 es:Alimento fr:Nourriture zh:食品
11218 Duplicate interlanguage links (bug 24502)
11234 Basic section headings
11241 ===Smaller headline===
11244 <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>
11247 <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>
11250 <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>
11256 Section headings with TOC
11259 === Subheadline 1 ===
11260 ===== Skipping a level =====
11261 ====== Skipping a level ======
11265 ===Another headline===
11267 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11269 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
11271 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
11273 <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>
11275 <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>
11282 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
11284 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
11290 <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>
11291 <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>
11292 <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>
11293 <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>
11294 <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>
11297 <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>
11301 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
11303 Handling of sections up to level 6 and beyond
11306 == Level 2 Heading==
11307 === Level 3 Heading===
11308 ==== Level 4 Heading====
11309 ===== Level 5 Heading=====
11310 ====== Level 6 Heading======
11311 ======= Level 7 Heading=======
11312 ======== Level 8 Heading========
11313 ========= Level 9 Heading=========
11314 ========== Level 10 Heading==========
11316 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11318 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
11320 <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>
11322 <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>
11324 <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>
11326 <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>
11328 <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>
11329 <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>
11330 <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>
11331 <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>
11332 <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>
11346 <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>
11347 <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>
11348 <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>
11349 <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>
11350 <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>
11351 <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>
11352 <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>
11353 <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>
11354 <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>
11355 <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>
11360 TOC regression (bug 9764)
11364 ==== title 1.1.1 ====
11369 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11371 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
11373 <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>
11375 <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>
11378 <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>
11381 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
11383 <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>
11389 <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>
11390 <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>
11391 <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>
11392 <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>
11393 <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>
11394 <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>
11399 TOC with wgMaxTocLevel=3 (bug 6204)
11405 ==== title 1.1.1 ====
11410 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11412 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
11414 <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>
11415 <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>
11418 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
11420 <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>
11426 <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>
11427 <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>
11428 <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>
11429 <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>
11430 <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>
11431 <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>
11436 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
11442 ====Section 1.1.1====
11443 ====Section 1.1.1.1====
11446 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11448 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
11450 <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>
11453 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
11457 <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>
11458 <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>
11459 <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>
11460 <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>
11461 <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>
11467 Resolving duplicate section names
11472 <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>
11473 <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>
11478 Resolving duplicate section names with differing case (bug 10721)
11483 <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>
11484 <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>
11496 Template with sections, __NOTOC__
11503 <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>
11504 <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>
11505 <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>
11506 <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>
11511 __NOEDITSECTION__ keyword
11517 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
11518 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
11523 Link inside a section heading
11525 ==Section with a [[Main Page|link]] in it==
11527 <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>
11532 TOC regression (bug 12077)
11539 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11541 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
11543 <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>
11546 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
11550 <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>
11551 <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>
11552 <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>
11557 BUG 1219 URL next to image (good)
11559 http://example.com [[Image:foobar.jpg]]
11561 <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>
11566 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
11569 The line above must have a trailing space!
11572 But just in case it doesn't...
11574 <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>
11575 <p>The line above must have a trailing space!
11577 <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>
11578 <p>But just in case it doesn't...
11583 Header with special characters (bug 25462)
11585 The tooltips shall not show entities to the user (ie. be double escaped)
11602 <p>The tooltips shall not show entities to the user (ie. be double escaped)
11604 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11606 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
11607 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
11608 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
11609 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
11610 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
11614 <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>
11617 <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>
11620 <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>
11623 <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>
11626 <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>
11632 Headers with excess '=' characters
11633 (Are similar tests necessary beyond the 1st level?)
11637 =''italic'' heading==
11638 ==''italic'' heading=
11640 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11642 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
11643 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
11644 <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>
11645 <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>
11649 <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>
11650 <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>
11651 <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>
11652 <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>
11657 HTML headers vs TOC (bug 23393)
11658 (__NOEDITSECTION__ for clearer output, doesn't matter here)
11670 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11672 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
11674 <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>
11675 <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>
11678 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
11680 <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>
11681 <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>
11687 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
11688 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
11689 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
11690 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
11691 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
11692 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
11697 BUG 1219 URL next to image (broken)
11699 http://example.com[[Image:foobar.jpg]]
11701 <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>
11706 Bug 1186 news: in the middle of text
11708 http://en.wikinews.org/wiki/Wikinews:Workplace
11710 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
11716 Namespaced link must have a title
11725 Namespaced link must have a title (bad fragment version)
11727 [[Project:#fragment]]
11729 <p>[[Project:#fragment]]
11735 ### HTML tags and HTML attributes
11739 div with no attributes
11741 <div>HTML rocks</div>
11743 <div>HTML rocks</div>
11748 div with double-quoted attribute
11750 <div id="rock">HTML rocks</div>
11752 <div id="rock">HTML rocks</div>
11757 div with single-quoted attribute
11759 <div id='rock'>HTML rocks</div>
11761 <div id="rock">HTML rocks</div>
11766 div with unquoted attribute
11768 <div id=rock>HTML rocks</div>
11770 <div id="rock">HTML rocks</div>
11775 div with illegal double attributes
11777 <div id="a" id="b">HTML rocks</div>
11779 <div id="b">HTML rocks</div>
11783 # FIXME: produce empty string instead of "class" in the PHP parser, following
11786 div with empty attribute value, space before equals
11790 <div class =>HTML rocks</div>
11792 <div class="">HTML rocks</div>
11796 # The PHP parser escapes the opening brace to { for some reason, so
11797 # disabled this test for it.
11799 div with braces in attribute value
11803 <div title="{}">Foo</div>
11805 <div title="{}">Foo</div>
11808 # This it very inconsistent in the PHP parser: it returns
11809 # class="class" if there is a space between the name and the equal sign (see
11810 # 'div with empty attribute value, space before equals'), but strips the
11811 # attribute completely if the space is missing. We hope that not much content
11812 # depends on this, so are implementing the behavior below in Parsoid for
11813 # consistencies' sake. Disabled for the PHP parser.
11814 # FIXME: fix this behavior in the PHP parser?
11816 div with empty attribute value, no space before equals
11820 <div class=>HTML rocks</div>
11822 <div class="">HTML rocks</div>
11827 HTML multiple attributes correction
11829 <p class="error" class="awesome">Awesome!</p>
11831 <p class="awesome">Awesome!</p>
11836 Table multiple attributes correction
11839 !+ class="error" class="awesome"| status
11844 <th class="awesome"> status
11852 <DIV ID="x">HTML ROCKS</DIV>
11854 <div id="x">HTML ROCKS</div>
11859 Non-ASCII pseudo-tags are rendered as text
11868 Pseudo-tag with URL 'name' renders as url link
11870 <http://example.com/>
11872 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
11877 text with amp in the middle of nowhere
11881 <p>Remember AT&T?
11886 text with character entity: eacute
11888 I always thought é was a cute letter.
11890 <p>I always thought é was a cute letter.
11895 text with entity-escaped character entity-like string: eacute
11897 I always thought &eacute; was a cute letter.
11899 <p>I always thought &eacute; was a cute letter.
11904 text with undefined character entity: xacute
11906 I always thought &xacute; was a cute letter.
11908 <p>I always thought &xacute; was a cute letter.
11912 # TODO: generalize to PHP parser?
11918 <data value="5">five</data>
11919 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
11920 <mark>This highlighted text</mark>
11922 <p><data value="5">five</data>
11923 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
11924 <mark>This highlighted text</mark></p>
11928 HTML tag with leading space is parsed as text
11932 <p>< div>foo< /div>
11937 ### Nesting tests (see bug 41545, 50604, 51081)
11940 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
11941 # Note that html2wt is considerably more difficult if we use <b> in
11942 # the test case, instead of <big>
11944 Ensure that HTML adoption agency algorithm is properly implemented.
11946 <big>X<big>Y</big>Z</big>
11948 <p><big>X<big>Y</big>Z</big>
11952 # This was bug 41545 in the PHP parser.
11956 <kbd>X<kbd>Y</kbd>Z</kbd>
11958 <p><kbd>X<kbd>Y</kbd>Z</kbd>
11962 # The following cases were bug 51081 in the PHP parser.
11963 # Note that there are some other nestable tags (b, i, etc) which are
11964 # not covered; see bug 51081 for discussion.
11968 <em>X<em>Y</em>Z</em>
11970 <p><em>X<em>Y</em>Z</em>
11975 Nesting of <strong>
11977 <strong>X<strong>Y</strong>Z</strong>
11979 <p><strong>X<strong>Y</strong>Z</strong>
11988 <p><q>X<q>Y</q>Z</q>
11995 <ruby>X<ruby>Y</ruby>Z</ruby>
11997 <p><ruby>X<ruby>Y</ruby>Z</ruby>
12004 <bdo>X<bdo>Y</bdo>Z</bdo>
12006 <p><bdo>X<bdo>Y</bdo>Z</bdo>
12018 [[Media:Foobar.jpg]]
12020 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
12025 Media link with text
12027 [[Media:Foobar.jpg|A neat file to look at]]
12029 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
12033 # FIXME: this is still bad HTML tag nesting
12035 Media link with nasty text
12036 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
12038 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
12040 <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>
12045 Media link to nonexistent file (bug 1702)
12047 [[Media:No such.jpg]]
12049 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
12054 Image link to nonexistent file (bug 1850 - good)
12056 [[Image:No such.jpg]]
12058 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
12063 :Image link to nonexistent file (bug 1850 - bad)
12065 [[:Image:No such.jpg]]
12067 <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>
12074 Character reference normalization in link text (bug 1938)
12076 [[Main Page|this&that]]
12078 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
12085 Test for unicode normalization
12087 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
12091 (bug 19451) Links should refer to the normalized form.
12099 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12100 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12101 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12102 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12103 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12108 Empty attribute crash test (bug 2067)
12110 <font color="">foo</font>
12112 <p><font color="">foo</font>
12117 Empty attribute crash test single-quotes (bug 2067)
12119 <font color=''>foo</font>
12121 <p><font color="">foo</font>
12126 Attribute test: equals, then nothing
12128 <font color=>foo</font>
12130 <p><font>foo</font>
12135 Attribute test: unquoted value
12137 <font color=x>foo</font>
12139 <p><font color="x">foo</font>
12144 Attribute test: unquoted but illegal value (hash)
12146 <font color=#x>foo</font>
12148 <p><font color="#x">foo</font>
12153 Attribute test: no value
12155 <font color>foo</font>
12157 <p><font color="color">foo</font>
12162 Bug 2095: link with three closing brackets
12166 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
12171 Bug 2095: link with pipe and three closing brackets
12173 [[Main Page|link]]]
12175 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
12180 Bug 2095: link with pipe and three closing brackets, version 2
12182 [[Main Page|[http://example.com/]]]
12184 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
12194 Template:Dangerous attribute
12196 " onmouseover="alert(document.cookie)
12200 Template:Dangerous style attribute
12202 border-size: expression(alert(document.cookie))
12208 <div style="float: right; {{{1}}}">Magic div</div>
12212 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
12214 <div title="{{test}}"></div>
12216 <div title="This is a test template"></div>
12221 Bug 2304: HTML attribute safety (dangerous template; 2309)
12223 <div title="{{dangerous attribute}}"></div>
12225 <div title=""></div>
12230 Bug 2304: HTML attribute safety (dangerous style template; 2309)
12232 <div style="{{dangerous style attribute}}"></div>
12234 <div style="/* insecure input */"></div>
12239 Bug 2304: HTML attribute safety (safe parameter; 2309)
12241 {{div style|width: 200px}}
12243 <div style="float: right; width: 200px">Magic div</div>
12248 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
12250 {{div style|width: expression(alert(document.cookie))}}
12252 <div style="/* insecure input */">Magic div</div>
12257 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
12259 {{div style|"><script>alert(document.cookie)</script>}}
12261 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12266 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
12268 {{div style|" ><script>alert(document.cookie)</script>}}
12270 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12275 Bug 2304: HTML attribute safety (link)
12277 <div title="[[Main Page]]"></div>
12279 <div title="[[Main Page]]"></div>
12284 Bug 2304: HTML attribute safety (italics)
12286 <div title="''foobar''"></div>
12288 <div title="''foobar''"></div>
12293 Bug 2304: HTML attribute safety (bold)
12295 <div title="'''foobar'''"></div>
12297 <div title="'''foobar'''"></div>
12303 Bug 2304: HTML attribute safety (ISBN)
12305 <div title="ISBN 1234567890"></div>
12307 <div title="ISBN 1234567890"></div>
12312 Bug 2304: HTML attribute safety (RFC)
12314 <div title="RFC 1234"></div>
12316 <div title="RFC 1234"></div>
12321 Bug 2304: HTML attribute safety (PMID)
12323 <div title="PMID 1234567890"></div>
12325 <div title="PMID 1234567890"></div>
12330 Bug 2304: HTML attribute safety (web link)
12332 <div title="http://example.com/"></div>
12334 <div title="http://example.com/"></div>
12339 Bug 2304: HTML attribute safety (named web link)
12341 <div title="[http://example.com/ link]"></div>
12343 <div title="[http://example.com/ link]"></div>
12348 Bug 3244: HTML attribute safety (extension; safe)
12350 <div style="<nowiki>background:blue</nowiki>"></div>
12352 <div style="background:blue"></div>
12357 Bug 3244: HTML attribute safety (extension; unsafe)
12359 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
12361 <div style="/* insecure input */"></div>
12365 # More MSIE fun discovered by Tom Gilder
12368 MSIE CSS safety test: spurious slash
12370 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
12372 <div style="/* insecure input */">evil</div>
12377 MSIE CSS safety test: hex code
12379 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
12381 <div style="/* insecure input */">evil</div>
12386 MSIE CSS safety test: comment in url
12388 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
12390 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
12395 MSIE CSS safety test: comment in expression
12397 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
12399 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
12404 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
12406 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
12408 <p style="/* invalid control char */">A</p>
12413 MSIE 6 CSS safety test: Fullwidth (bug 55332)
12415 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
12416 <div style="top:EXPRESSION(alert())">B</div>
12418 <p style="/* insecure input */">A</p>
12419 <div style="/* insecure input */">B</div>
12424 MSIE 6 CSS safety test: IPA extensions (bug 55332)
12426 <div style="background-image:uʀʟ(javascript:alert())">A</div>
12427 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
12429 <div style="/* insecure input */">A</div>
12430 <p style="/* insecure input */">B</p>
12435 MSIE 6 CSS safety test: sup/sub script (bug 55332)
12437 <div style="background-image:url⁽javascript:alert())">A</div>
12438 <div style="background-image:url₍javascript:alert())">B</div>
12439 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
12441 <div style="/* insecure input */">A</div>
12442 <div style="/* insecure input */">B</div>
12443 <p style="/* insecure input */">C</p>
12451 title="data:text/html,<img src=1 onerror=alert(1)>"
12452 style="-o-link:attr(title);-o-link-source:current">X</div>
12454 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
12459 MSIE 6 CSS safety test: Repetition markers (bug 55332)
12461 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
12462 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
12463 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
12464 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
12465 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
12466 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
12467 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
12469 <p style="/* insecure input */">A</p>
12470 <p style="/* insecure input */">B</p>
12471 <p style="/* insecure input */">C</p>
12472 <p style="/* insecure input */">D</p>
12473 <p style="/* insecure input */">E</p>
12474 <p style="/* insecure input */">F</p>
12475 <p style="/* insecure input */">G</p>
12480 Table attribute legitimate extension
12483 !+ style="<nowiki>color:blue</nowiki>"| status
12488 <th style="color:blue"> status
12494 Table attribute safety
12497 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
12502 <th style="/* insecure input */"> status
12508 CSS line continuation 1
12510 <div style="background-image: u\ rl(test.jpg);"></div>
12512 <div style="/* insecure input */"></div>
12517 CSS line continuation 2
12519 <div style="background-image: u\ rl(test.jpg); "></div>
12521 <div style="/* insecure input */"></div>
12532 Expansion of multi-line templates in attribute values (bug 6255)
12534 <div style="background: {{identity|#00FF00}}">-</div>
12536 <div style="background: #00FF00">-</div>
12542 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
12544 <div style="background:
12547 <div style="background: #00FF00">-</div>
12552 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
12554 <div style="background: #00FF00">-</div>
12556 <div style="background: #00FF00">-</div>
12561 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
12564 Parser hook: empty input
12577 Parser hook: empty input using terminated empty elements
12590 Parser hook: empty input using terminated empty elements (space before)
12603 Parser hook: basic input
12617 Parser hook: case insensitive
12631 Parser hook: case insensitive, redux
12644 Parser hook: nested tags
12648 <tag><tag></tag></tag>
12659 Parser hook: basic arguments
12661 <tag width=200 height = "100" depth = '50' square></tag>
12669 'square' => 'square',
12676 Parser hook: argument containing a forward slash (bug 5344)
12678 <tag filename='/tmp/bla'></tag>
12683 'filename' => '/tmp/bla',
12690 Parser hook: empty input using terminated empty elements (bug 2374)
12703 # </tag> should be output literally since there is no matching tag that begins it
12705 Parser hook: basic arguments using terminated empty elements (bug 2374)
12707 <tag width=200 height = "100" depth = '50' square/>
12717 'square' => 'square',
12726 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
12730 Parser hook: static parser hook not inside a comment
12732 <statictag>hello, world</statictag>
12733 <statictag action=flush/>
12741 Parser hook: static parser hook inside a comment
12743 <!-- <statictag>hello, world</statictag> -->
12744 <statictag action=flush/>
12750 # Nested template calls; this case was broken by Parser.php rev 1.506,
12754 Template:One-parameter
12756 (My parameter is: {{{1}}})
12760 Template:Map-one-parameter
12762 {{{{{1}}}|{{{2}}}}}
12766 Nested template calls
12768 {{Map-one-parameter|One-parameter|param}}
12770 <p>(My parameter is: param)
12779 Sanitizer: Closing of open tags
12781 <s></s><table></table>
12783 <s></s><table></table>
12788 Sanitizer: Closing of open but not closed tags
12797 Sanitizer: Closing of closed but not open tags
12806 Sanitizer: Closing of closed but not open table tags
12808 Table not started</td></tr></table>
12810 <p>Table not started</td></tr></table>
12815 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
12817 <span id="æ: v">byte</span>[[#æ: v|backlink]]
12819 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
12824 Sanitizer: Validating the contents of the id attribute (bug 4515)
12830 Something, but definitely not <br id="9" />...
12834 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
12838 <br id="foo" /><br id="foo" />
12840 Something need to be done. foo-2 ?
12844 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
12847 <meta itemprop="hello" content="world">
12848 <meta http-equiv="refresh" content="5">
12849 <meta itemprop="hello" http-equiv="refresh" content="5">
12850 <link itemprop="hello" href="{{SERVER}}">
12851 <link rel="stylesheet" href="{{SERVER}}">
12852 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
12855 <div itemscope="itemscope">
12856 <p> <meta itemprop="hello" content="world" />
12857 <meta http-equiv="refresh" content="5">
12858 <meta itemprop="hello" content="5" />
12860 <link itemprop="hello" href="http://example.org" />
12861 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
12862 <link itemprop="hello" href="http://example.org" />
12868 Language converter: output gets cut off unexpectedly (bug 5757)
12872 this bit is safe: }-
12874 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
12876 then we get cut off here: }-
12878 all additional text is vanished
12880 <p>this bit is safe: }-
12881 </p><p>but if we add a conversion instance: xxx
12882 </p><p>then we get cut off here: }-
12883 </p><p>all additional text is vanished
12888 Self closed html pairs (bug 5487)
12891 <center><font id="bug" />Centered text</center>
12892 <div><font id="bug2" />In div text</div>
12894 <center><font id="bug" />Centered text</center>
12895 <div><font id="bug2" />In div text</div>
12904 Punctuation: nbsp before exclamation
12908 <p>C'est grave !
12913 Punctuation: CSS !important (bug 11874)
12915 <div style="width:50% !important">important</div>
12917 <div style="width:50% !important">important</div>
12922 Punctuation: CSS ! important (bug 11874; with space after)
12924 <div style="width:50% ! important">important</div>
12926 <div style="width:50% ! important">important</div>
12932 HTML bullet list, closed tags (bug 5497)
12947 HTML bullet list, unclosed tags (bug 5497)
12966 HTML ordered list, closed tags (bug 5497)
12981 HTML ordered list, unclosed tags (bug 5497)
13000 HTML nested bullet list, closed tags (bug 5497)
13025 HTML nested bullet list, open tags (bug 5497)
13054 HTML nested ordered list, closed tags (bug 5497)
13079 HTML nested ordered list, open tags (bug 5497)
13108 HTML ordered list item with parameters oddity
13110 <ol><li id="fragment">One</li>
13113 <ol><li id="fragment">One</li>
13119 bug 5918: autonumbering
13121 [http://first/] [http://second] [ftp://ftp]
13125 [mailto:enclosed@mail.tld With target]
13127 [mailto:enclosed@mail.tld]
13129 mailto:inline@mail.tld
13131 <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>
13132 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
13133 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
13134 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
13135 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
13141 # Security and HTML correctness
13142 # From Nick Jenkins' fuzz testing
13146 Fuzz testing: Parser13
13161 Fuzz testing: Parser14
13166 <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>
13167 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13169 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
13177 Fuzz testing: Parser14-table
13182 <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>
13183 <table style="__TOC__">
13189 # Known to produce bogus xml (extra </td>)
13191 Fuzz testing: Parser16
13211 Fuzz testing: Parser21
13214 ! irc://{{ftp://a" onmouseover="alert('hello world');"
13219 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
13229 Fuzz testing: Parser22
13231 http://===r:::https://b
13235 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
13243 # Known to produce bad XML for now
13245 Fuzz testing: Parser24
13252 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
13253 <br style="onmouseover='alert(document.cookie);' " />
13255 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13260 <u class="|">}}}} >
13261 <br style="onmouseover='alert(document.cookie);'" />
13263 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13272 # Note: the current result listed for this is not what the original one was,
13273 # but the original bug was JavaScript injection, which is fixed in any case.
13274 # It's not clear that the original result listed was any more correct than the
13275 # current one. Original result:
13278 # <li class="||">
13279 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
13281 Fuzz testing: Parser25 (bug 6055)
13287 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
13289 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
13294 Fuzz testing: URL adjacent extension (with space, clean)
13297 http://example.com <nowiki>junk</nowiki>
13299 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
13304 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
13307 http://example.com<nowiki>junk</nowiki>
13309 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
13314 Fuzz testing: URL adjacent extension (no space, dirty; pre)
13317 http://example.com<pre>junk</pre>
13319 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
13324 Fuzz testing: image with bogus manual thumbnail
13326 [[Image:foobar.jpg|thumbnail= ]]
13328 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
13333 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
13335 <pre dir=" "></pre>
13337 <pre dir=" "></pre>
13342 Parsing optional HTML elements (Bug 6171)
13347 <td> Some tabular data</td>
13348 <td> More tabular data ...
13349 <td> And yet som tabular data</td>
13355 <td> Some tabular data</td>
13356 <td> More tabular data ...
13357 </td><td> And yet som tabular data</td>
13364 Correct handling of <td>, <tr> (Bug 6171)
13369 <td> Some tabular data</td>
13370 <td> More tabular data ...</td>
13371 <td> And yet som tabular data</td>
13377 <td> Some tabular data</td>
13378 <td> More tabular data ...</td>
13379 <td> And yet som tabular data</td>
13387 Parsing crashing regression (fr:JavaScript)
13391 <p></body></x>
13396 Inline wiki vs wiki block nesting
13402 <p><b>Bold paragraph</b>
13403 </p><p>New wiki paragraph
13408 Inline HTML vs wiki block nesting
13416 <p><b>Bold paragraph</b>
13417 </p><p>New wiki paragraph
13421 # Original result was this:
13422 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
13424 # While that might be marginally more intuitive, maybe, the six-apostrophe
13425 # construct is clearly pathological and the result stated here (which is what
13426 # the parser actually does) is about as reasonable as anything.
13428 Mixing markup for italics and bold
13431 '''bold''''''bold''bolditalics'''''
13433 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
13441 Article for special page transclusion test
13445 Special page transclusion
13448 {{Special:Prefixindex/Xyzzyx}}
13450 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
13455 Special page transclusion twice (bug 5021)
13458 {{Special:Prefixindex/Xyzzyx}}
13459 {{Special:Prefixindex/Xyzzyx}}
13461 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
13462 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
13467 Transclusion of default MediaWiki message
13469 {{MediaWiki:Mainpage}}
13476 Transclusion of nonexistent MediaWiki message
13478 {{MediaWiki:Mainpagexxx}}
13480 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
13485 Transclusion of MediaWiki message with underscore
13487 {{MediaWiki:history_short}}
13494 Transclusion of MediaWiki message with space
13496 {{MediaWiki:history short}}
13503 Invalid header with following text
13513 Section extraction test (section 0)
13533 Section extraction test (section 1)
13555 Section extraction test (section 2)
13576 Section extraction test (section 3)
13596 Section extraction test (section 4)
13620 Section extraction test (section 5)
13640 Section extraction test (section 6)
13661 Section extraction test (section 7)
13681 Section extraction test (section 8)
13701 Section extraction test (section 9)
13722 Section extraction test (section 10)
13742 Section extraction test (nonexistent section 11)
13761 Section extraction test with bogus heading (section 1)
13766 ==bogus== not a legal section
13770 ==bogus== not a legal section
13774 Section extraction test with bogus heading (section 2)
13779 ==bogus== not a legal section
13786 Section extraction test with comment after heading (section 1)
13798 Section extraction test with comment after heading (section 2)
13810 Section extraction test with bogus <nowiki> heading (section 1)
13815 ==bogus== <nowiki>not a legal section</nowiki>
13819 ==bogus== <nowiki>not a legal section</nowiki>
13823 Section extraction test with bogus <nowiki> heading (section 2)
13828 ==bogus== <nowiki>not a legal section</nowiki>
13835 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
13836 # instead of respecting commented sections
13838 Section extraction prefixed by comment (section 1)
13849 Section extraction prefixed by comment (section 2)
13860 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
13861 # instead of respecting HTML-style headings
13863 Section extraction, mixed wiki and html (section 1)
13879 Section extraction, mixed wiki and html (section 2)
13895 # Formerly testing for bug 3342
13897 Section extraction, heading surrounded by <noinclude>
13901 <noinclude>==unmarked==</noinclude>
13907 # Test behavior of bug 19910
13909 Sectiion with all-equals
13914 The line above must have a trailing space
13917 But just in case it doesn't...
13921 But just in case it doesn't...
13925 Section replacement test (section 0)
13956 Section replacement test (section 1)
13985 Section replacement test (section 2)
14015 Section replacement test (section 3)
14046 Section replacement test (section 4)
14073 Section replacement test (section 5)
14104 Section replacement test (section 6)
14134 Section replacement test (section 7)
14165 Section replacement test (section 8)
14196 Section replacement test (section 9)
14225 Section replacement test (section 10)
14255 Section replacement test with initial whitespace (bug 13728)
14259 Preformatted initial line
14263 Preformatted initial line
14270 Section extraction, heading followed by pre with 20 spaces (bug 6398)
14282 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
14295 Section extraction, <pre> around bogus header (bug 10309)
14312 Section replacement, <pre> around bogus header (bug 10309)
14314 noxml replace=2,"xxx"
14335 Handling of 
 in URLs
14341 <li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
14349 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
14351 5 quotes, code coverage +1 line
14356 <p><b><i></i></b></p>
14360 Special:Search page linking.
14364 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
14371 title=[[Parser test]]
14376 * {{FULLPAGENAMEE}}
14378 * {{BASEPAGENAMEE}}
14382 * {{ROOTPAGENAMEE}}
14384 * {{TALKPAGENAMEE}}
14385 * {{SUBJECTPAGENAME}}
14386 * {{SUBJECTPAGENAMEE}}
14389 * {{NAMESPACENUMBER}}
14393 * {{SUBJECTSPACEE}}
14394 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
14417 <li> Talk:Parser test
14419 <li> Talk:Parser_test
14439 <li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a>
14444 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
14454 image4 |300px| centre
14455 image5.svg| http://///////
14460 <ul class="gallery mw-gallery-traditional">
14461 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14462 <div class="thumb" style="height: 150px;">Image1.png</div>
14463 <div class="gallerytext">
14466 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14467 <div class="thumb" style="height: 150px;">Image2.gif</div>
14468 <div class="gallerytext">
14473 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14474 <div class="thumb" style="height: 150px;">Image3</div>
14475 <div class="gallerytext">
14478 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14479 <div class="thumb" style="height: 150px;">Image4</div>
14480 <div class="gallerytext">
14485 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14486 <div class="thumb" style="height: 150px;">Image5.svg</div>
14487 <div class="gallerytext">
14488 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
14492 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14493 <div class="thumb" style="height: 150px;">* image6</div>
14494 <div class="gallerytext">
14502 Gallery (with options)
14504 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
14505 File:Nonexistant.jpg|caption
14506 File:Nonexistant.jpg
14507 image:foobar.jpg|some '''caption''' [[Main Page]]
14509 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
14512 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
14513 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
14514 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
14515 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
14516 <div class="gallerytext">
14521 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
14522 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
14523 <div class="gallerytext">
14526 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
14527 <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>
14528 <div class="gallerytext">
14529 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
14533 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
14534 <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>
14535 <div class="gallerytext">
14538 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
14539 <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>
14540 <div class="gallerytext">
14550 Gallery with wikitext inside caption
14553 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
14554 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
14557 <ul class="gallery mw-gallery-traditional">
14558 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14559 <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>
14560 <div class="gallerytext">
14561 <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>
14565 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14566 <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>
14567 <div class="gallerytext">
14568 <p>This is a test template
14577 gallery (with showfilename option)
14579 <gallery showfilename>
14580 File:Nonexistant.jpg|caption
14581 File:Nonexistant.jpg
14582 image:foobar.jpg|some '''caption''' [[Main Page]]
14586 <ul class="gallery mw-gallery-traditional">
14587 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14588 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
14589 <div class="gallerytext">
14590 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
14595 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14596 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
14597 <div class="gallerytext">
14598 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
14602 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14603 <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>
14604 <div class="gallerytext">
14605 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
14606 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
14610 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14611 <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>
14612 <div class="gallerytext">
14613 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
14622 Gallery (with namespace-less filenames)
14625 File:Nonexistant.jpg
14631 <ul class="gallery mw-gallery-traditional">
14632 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14633 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
14634 <div class="gallerytext">
14637 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14638 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
14639 <div class="gallerytext">
14642 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14643 <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>
14644 <div class="gallerytext">
14647 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14648 <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>
14649 <div class="gallerytext">
14657 HTML Hex character encoding (spells the word "JavaScript")
14659 JavaScript
14661 <p>JavaScript
14666 HTML Hex character encoding bogus encoding (bug 26437 regression check)
14670 <p>&#xsee;&#XSEE;
14675 HTML Hex character encoding mixed case
14684 __FORCETOC__ override
14696 ISBN 978-0-1234-56 789
14698 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
14703 ISBN followed by 5 spaces
14714 ISBN ISBN 1234567890
14716 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
14725 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
14730 Bug 22905: <abbr> followed by ISBN followed by </a>
14732 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
14734 <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>
14743 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
14748 Double RFC with a wiki link
14752 <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>
14761 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
14766 Centre-aligned image
14768 [[Image:foobar.jpg|centre]]
14770 <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>
14777 [[Image:foobar.jpg|none]]
14779 <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>
14784 Width + Height sized image (using px) (height is ignored)
14786 [[Image:foobar.jpg|640x480px]]
14788 <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>
14793 Width-sized image (using px, no following whitespace)
14795 [[Image:foobar.jpg|640px]]
14797 <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>
14802 Width-sized image (using px, with following whitespace - test regression from r39467)
14804 [[Image:foobar.jpg|640px ]]
14806 <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>
14811 Width-sized image (using px, with preceding whitespace - test regression from r39467)
14813 [[Image:foobar.jpg| 640px]]
14815 <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>
14820 Another italics / bold test
14828 # Note the results may be incorrect, as parserTest output included this:
14829 # XML error: Mismatched tag at byte 6120:
14830 # ...<dd> </dt></dl> </dd...
14861 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
14863 Images with the "|" character in the comment
14865 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
14867 <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>
14872 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
14874 <html><script>alert(1);</script></html>
14876 <p><html><script>alert(1);</script></html>
14881 HTML with raw HTML ($wgRawHtml==true)
14885 <html><script>alert(1);</script></html>
14887 <p><script>alert(1);</script>
14892 Parents of subpages, one level up
14894 subpage title=[[Subpage test/L1/L2/L3]]
14898 <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>
14904 Parents of subpages, one level up, not named
14906 subpage title=[[Subpage test/L1/L2/L3]]
14910 <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>
14917 Parents of subpages, two levels up
14919 subpage title=[[Subpage test/L1/L2/L3]]
14925 <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
14926 </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>
14931 Parents of subpages, two levels up, without trailing slash or name.
14933 subpage title=[[Subpage test/L1/L2/L3]]
14942 Parents of subpages, two levels up, with lots of extra trailing slashes.
14944 subpage title=[[Subpage test/L1/L2/L3]]
14948 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
14953 Subpage test/L1/L2/L3Sibling
14959 Transclusion of a sibling page (one level up)
14961 subpage title=[[Subpage test/L1/L2/L3]]
14970 Transclusion of a child page
14972 subpage title=[[Subpage test/L1/L2]]
14981 Non-transclusion because of too many up levels
14983 subpage title=[[Subpage test/L1/L2/L3]]
14985 {{../../../../More than parent}}
14987 <p>{{../../../../More than parent}}
14992 Definition list code coverage
14999 <dt> title  </dt>
15002 <dt> title </dt>
15013 Don't fall for the self-closing div
15015 <div>hello world</div/>
15017 <div>hello world</div>
15026 <p>[[:Template:Msg]]
15035 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
15039 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
15041 Always escape literal '>' in output, not just after '<'
15055 <p>This is a test template
15056 This is a test template
15068 Inclusion of !userCanEdit() content
15072 <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>
15078 Out-of-order TOC heading levels
15087 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15089 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
15091 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
15092 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
15095 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
15097 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
15098 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
15104 <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>
15105 <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>
15106 <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>
15107 <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>
15108 <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>
15109 <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>
15115 ISBN with a dummy number
15125 ISBN with space-delimited number
15129 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
15135 ISBN with multiple spaces, no number
15154 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15155 </p><p>ISBN 12345678901
15161 ISBN with trailing year (bug 8110)
15163 ISBN 1-234-56789-0 - 2006
15165 ISBN 1 234 56789 0 - 2006
15167 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
15168 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
15176 {{anchorencode:foo bar©#%n}}
15178 <p>foo_bar.C2.A9.23.25n
15183 anchorencode trims spaces
15185 {{anchorencode: __pretty__please__}}
15192 anchorencode deals with links
15194 {{anchorencode: [[hello|world]] [[hi]]}}
15201 anchorencode deals with templates
15203 {{anchorencode: {{Foo}} }}
15210 anchorencode encodes like the TOC generator: (bug 18431)
15212 === _ +:.3A%3A&&]] ===
15213 {{anchorencode: _ +:.3A%3A&&]] }}
15216 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
15217 <p>.2B:.3A.253A.26.26.5D.5D
15222 Bug 6200: blockquotes and paragraph formatting
15243 Bug 8293: Use of center tag ruins paragraph formatting
15264 Parsing of overlapping (improperly nested) inline html tags
15266 <span><s>x</span></s>
15268 <p><span><s>x</span></s></span>
15271 <p><span><s>x</s></span>
15276 ### Language variants related tests
15279 Self-link in language variants
15281 title=[[Dunav]] language=sr
15283 Both [[Dunav]] and [[Дунав]] are names for this river.
15285 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
15296 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
15298 title=[[Duna]] language=sr
15300 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
15302 <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.
15307 Link to a section of a variant of this title shouldn't be parsed as self-link
15309 title=[[Duna]] language=sr
15311 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
15313 <p><strong class="selflink">Dуна</strong> is a self-link while <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dunа#Foo</a> and <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dуна#Foo</a> are not self-links.
15318 Link to pages in language variants
15322 Main Page can be written as [[Маин Паге]]
15324 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
15330 Multiple links to pages in language variants
15334 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
15336 <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>.
15342 Simple template in language variants
15348 <p>This is a test template
15354 Template with explicit namespace in language variants
15360 <p>This is a test template
15366 Basic test for template parameter in language variants
15370 {{парамтест|param=foo}}
15372 <p>This is a test template with parameter foo
15378 Simple category in language variants
15382 [[Category:МедиаWики Усер'с Гуиде]]
15384 <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>
15401 Don't convert blue categorylinks to another variant (bug 33210)
15405 [[A]][[Category:分类]]
15407 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
15412 Stripping -{}- tags (language variants)
15416 Latin proverb: -{Ne nuntium necare}-
15418 <p>Latin proverb: Ne nuntium necare
15424 Prevent conversion with -{}- tags (language variants)
15426 language=sr variant=sr-ec
15428 Latinski: -{Ne nuntium necare}-
15430 <p>Латински: Ne nuntium necare
15436 Prevent conversion of text with -{}- tags (language variants)
15438 language=sr variant=sr-ec
15440 Latinski: -{Ne nuntium necare}-
15442 <p>Латински: Ne nuntium necare
15448 Prevent conversion of links with -{}- tags (language variants)
15450 language=sr variant=sr-ec
15454 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15460 -{}- tags within headlines (within html for parserConvert())
15462 language=sr variant=sr-ec
15466 <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>
15472 Explicit definition of language variant alternatives
15474 language=zh variant=zh-tw
15476 -{zh:China;zh-tw:Taiwan}-, not China
15478 <p>Taiwan, not China
15484 Conversion around HTML tags
15486 language=sr variant=sr-ec
15488 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
15489 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
15492 <span title="ЛаCтин">ски</span>
15498 Explicit session-wise language variant mapping (A flag and - flag)
15500 language=zh variant=zh-tw
15502 Taiwan is not China.
15503 But -{A|zh:China;zh-tw:Taiwan}- is China,
15504 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
15505 and -{China}- is China.
15507 <p>Taiwan is not China.
15508 But Taiwan is Taiwan,
15509 (This should be stripped!)
15510 and China is China.
15515 Explicit session-wise language variant mapping (H flag for hide)
15517 language=zh variant=zh-tw
15519 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
15522 <p>(This should be stripped!)
15528 Adding explicit conversion rule for title (T flag)
15530 language=zh variant=zh-tw showtitle
15532 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
15535 <p>Should be stripped!
15540 Testing that changing the language variant here in the tests actually works
15542 language=zh variant=zh showtitle
15544 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
15547 <p>Should be stripped!
15552 Recursive conversion of alt and title attrs shouldn't clear converter state
15554 language=zh variant=zh-cn showtitle
15556 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
15557 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
15561 Should be stripped<span title="Exclamation">!</span>
15566 Bug 24072: more test on conversion rule for title
15568 language=zh variant=zh-tw showtitle
15570 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
15571 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
15574 <p>This should be stripped!
15575 This won't take interferes with the title rule.
15580 Partly disable title conversion if variant == main language code
15582 language=zh variant=zh title=[[ZH]] showtitle
15584 -{T|zh-cn:CN;zh-tw:TW}-
15592 Partly disable title conversion if variant == main language code, more
15594 language=zh variant=zh title=[[ZH]] showtitle
15604 Raw output of variant escape tags (R flag)
15606 language=zh variant=zh-tw
15608 Raw: -{R|zh:China;zh-tw:Taiwan}-
15610 <p>Raw: zh:China;zh-tw:Taiwan
15615 Nested using of manual convert syntax
15617 language=zh variant=zh-hk
15619 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
15621 <p>Nested: Hello Hong Kong!
15626 Proper conversion of text in external links
15628 language=sr variant=sr-ec
15630 http://www.google.com
15631 gopher://www.google.com
15632 [http://www.google.com http://www.google.com]
15633 [gopher://www.google.com gopher://www.google.com]
15634 [https://www.google.com irc://www.google.com]
15635 [ftp://www.google.com www.google.com/ftp://dir]
15636 [//www.google.com www.google.com]
15638 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
15639 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
15640 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
15641 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
15642 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
15643 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
15644 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
15649 Do not convert roman numbers to language variants
15651 language=sr variant=sr-ec
15655 <p>Фридрих IV је цар.
15660 Unclosed language converter markup "-{"
15671 Don't convert raw rule "-{R|=>}-" to "=>"
15682 Don't break link parsing if language converter markup is in the caption.
15684 language=sr variant=sr-ec
15686 [[Main Page|-{R|main page}-]]
15688 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
15692 # This test is currently broken in the PHP parser (bug 52661)
15694 Don't break image parsing if language converter markup is in the caption.
15699 [[File:Foobar.jpg|-{R|caption}-]]
15701 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15705 # This test is currently broken in the PHP parser (bug 52661)
15707 Don't break list handling if language converter markup is in the item.
15709 language=zh variant=zh-cn
15712 ;-{zh-cn:AAA;zh-tw:BBB}-
15719 # This test is currently broken in the PHP parser (bug 52661)
15721 Don't break table handling if language converter markup is in the cell.
15723 language=sr variant=sr-ec
15740 Bug 529: Uncovered bullet
15753 # Plain MediaWiki does not remove empty lists, but tidy actually does.
15754 # Templates in Wikipedia rely on this behavior, as tidy has always been
15755 # enabled there. These tests are normally run *without* tidy, so specify the
15756 # full output here.
15757 # To test realistic parsing behavior, apply a tidy-like transformation to both
15758 # the expected output and your parser's output.
15760 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
15762 ******* Foo {{bullet}}
15792 Bug 529: Uncovered table already at line-start
15815 Bug 529: Uncovered bullet in parser function result
15817 * Foo {{lc:{{bullet}} }}
15829 Bug 5678: Double-parsed template argument
15831 {{lc:{{{1}}}|hello}}
15838 Bug 5678: Double-parsed template invocation
15840 {{lc:{{paramtest {{!}} param = hello }} }}
15842 <p>{{paramtest | param = hello }}
15847 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
15850 title=[[Main Page]]
15852 {{PRVNÍVELKÉ:ěščř}}
15853 {{prvnívelké:ěščř}}
15873 Morwen/13: Unclosed link followed by heading
15880 <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>
15885 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
15892 <h1><span class="mw-headline" id="heading">heading</span></h1>
15897 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
15904 <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>
15919 Paragraphs inside divs (no extra line breaks)
15931 Paragraphs inside divs (extra line break on open)
15946 Paragraphs inside divs (extra line break on close)
15961 Paragraphs inside divs (extra line break on open and close)
15978 Nesting tags, paragraphs on lines which begin with <div>
15982 <div></div><strong>A
15991 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
15993 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
15995 <blockquote>Line one
15997 Line two</blockquote>
15999 <blockquote>Line one
16000 Line two</blockquote>
16005 Bug 6200: paragraphs inside blockquotes (extra line break on open)
16010 Line two</blockquote>
16015 Line two</blockquote>
16020 Bug 6200: paragraphs inside blockquotes (extra line break on close)
16022 <blockquote>Line one
16027 <blockquote>Line one
16035 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
16052 Paragraphs inside blockquotes/divs (no extra line breaks)
16054 <blockquote><div>Line one
16056 Line two</div></blockquote>
16058 <blockquote><div>Line one
16059 Line two</div></blockquote>
16064 Paragraphs inside blockquotes/divs (extra line break on open)
16069 Line two</div></blockquote>
16074 Line two</div></blockquote>
16079 Paragraphs inside blockquotes/divs (extra line break on close)
16081 <blockquote><div>Line one
16084 </div></blockquote>
16086 <blockquote><div>Line one
16089 </div></blockquote>
16094 Paragraphs inside blockquotes/divs (extra line break on open and close)
16100 </div></blockquote>
16106 </div></blockquote>
16111 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
16113 wgLinkHolderBatchSize=0
16119 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
16120 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
16121 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
16126 Free external link invading image caption
16128 [[Image:Foobar.jpg|thumb|http://x|hello]]
16130 <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>
16135 Bug 15196: localised external link numbers
16139 [http://en.wikipedia.org/]
16141 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
16146 Multibyte character in padleft
16148 {{padleft:-Hello|7|Æ}}
16155 Multibyte character in padright
16157 {{padright:Hello-|7|Æ}}
16164 formatdate parser function
16166 {{#formatdate:2009-03-24}}
16168 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
16173 formatdate parser function, with default format
16175 {{#formatdate:2009-03-24|mdy}}
16177 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
16182 Spacing of numbers in formatted dates
16184 {{#formatdate:January 15}}
16186 <p><span class="mw-formatted-date" title="01-15">January 15</span>
16191 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
16193 language=nl title=[[MediaWiki:Common.css]]
16195 {{#formatdate:2009-03-24|dmy}}
16197 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
16210 Edit comment with link
16214 I like the [[Main Page]] a lot
16216 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
16220 Edit comment with link and link text
16224 I like the [[Main Page|best pages]] a lot
16226 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16230 Edit comment with link and link text with suffix
16234 I like the [[Main Page|best page]]s a lot
16236 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16240 Edit comment with section link (non-local, eg in history list)
16242 comment title=[[Main Page]]
16244 /* External links */ removed bogus entries
16246 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
16250 Edit comment with section link and text before it (non-local, eg in history list)
16252 comment title=[[Main Page]]
16254 pre-comment text /* External links */ removed bogus entries
16256 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>
16260 Edit comment with section link (local, eg in diff view)
16262 comment local title=[[Main Page]]
16264 /* External links */ removed bogus entries
16266 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
16270 Edit comment with subpage link (bug 14080)
16274 title=[[Subpage test]]
16276 Poked at a [[/subpage]] here...
16278 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
16282 Edit comment with subpage link and link text (bug 14080)
16286 title=[[Subpage test]]
16288 Poked at a [[/subpage|neat little page]] here...
16290 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
16294 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
16297 title=[[Subpage test]]
16299 Poked at a [[/subpage]] here...
16301 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
16305 Edit comment with bare anchor link (local, as on diff)
16309 title=[[Main Page]]
16313 <a href="#section">#section</a>
16317 Edit comment with bare anchor link (non-local, as on history)
16320 title=[[Main Page]]
16324 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
16328 Anchor starting with underscore
16332 <p><a href="#_ref">One</a>
16337 Id starting with underscore
16339 <div id="_ref"></div>
16341 <div id="_ref"></div>
16346 Space normalisation on autocomment (bug 22784)
16349 title=[[Main Page]]
16351 /* __hello__world__ */
16353 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
16357 percent-encoding and + signs in comments (Bug 26410)
16361 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
16363 <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>
16367 Bad images - basic functionality
16376 Bad images - bug 16039: text after bad image disappears
16390 Verify that displaytitle works (bug #22501) no displaytitle
16394 wgAllowDisplayTitle=true
16395 wgRestrictDisplayTitle=false
16397 this is not the the title
16400 <p>this is not the the title
16405 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
16410 wgAllowDisplayTitle=true
16411 wgRestrictDisplayTitle=false
16413 this is not the the title
16414 {{DISPLAYTITLE:whatever}}
16417 <p>this is not the the title
16422 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
16427 wgAllowDisplayTitle=true
16428 wgRestrictDisplayTitle=true
16430 this is not the the title
16431 {{DISPLAYTITLE:whatever}}
16434 <p>this is not the the title
16439 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
16444 wgAllowDisplayTitle=true
16445 wgRestrictDisplayTitle=true
16447 this is not the the title
16448 {{DISPLAYTITLE:screen}}
16451 <p>this is not the the title
16456 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
16461 wgAllowDisplayTitle=false
16463 this is not the the title
16464 {{DISPLAYTITLE:screen}}
16467 <p>this is not the the title
16468 <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>
16473 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
16478 wgAllowDisplayTitle=false
16480 this is not the the title
16483 <p>this is not the the title
16488 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
16493 wgAllowDisplayTitle=true
16494 wgRestrictDisplayTitle=true
16496 this is not the the title
16497 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
16499 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
16500 <p>this is not the the title
16505 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
16510 wgAllowDisplayTitle=true
16511 wgRestrictDisplayTitle=true
16513 this is not the the title
16514 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
16516 <span style="color: red;">s</span>creen
16517 <p>this is not the the title
16522 preload: check <noinclude> and <includeonly>
16526 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
16532 preload: check <onlyinclude>
16536 Goodbye <onlyinclude>Hello world</onlyinclude>
16542 preload: can pass tags through if we want to
16546 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
16548 <includeonly>Hello world</includeonly>
16552 preload: check that it doesn't try to do tricks
16556 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
16558 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
16562 Play a bit with r67090 and bug 3158
16566 <div style="width:50% !important"> </div>
16567 <div style="width:50% !important"> </div>
16568 <div style="width:50% !important"> </div>
16569 <div style="border : solid;"> </div>
16571 <div style="width:50% !important"> </div>
16572 <div style="width:50% !important"> </div>
16573 <div style="width:50% !important"> </div>
16574 <div style="border : solid;"> </div>
16579 HTML5 data attributes
16581 <span data-foo="bar">Baz</span>
16582 <p data-abc-def_hij="">Quuz</p>
16584 <p><span data-foo="bar">Baz</span>
16586 <p data-abc-def_hij="">Quuz</p>
16591 percent-encoding and + signs in internal links (Bug 26410)
16593 [[User:+%]] [[Page+title%]]
16594 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
16595 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
16596 [[%33%45]] [[%33%45+]]
16598 <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>
16599 <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>
16600 <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>
16601 <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>
16606 Special characters in embedded file links (bug 27679)
16608 [[File:Contains & ampersand.jpg]]
16609 [[File:Does not exist.jpg|Title with & ampersand]]
16611 <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>
16612 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
16618 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
16620 Text's been normalized?
16622 <p>Text's been normalized?
16627 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
16629 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
16631 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
16636 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
16638 [http://www.example.org/ ideograms]
16640 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
16645 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
16647 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
16649 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
16673 Bug 31098 Template which includes system messages which includes the template
16677 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
16678 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
16683 Bug31490 Turkish: ucfirst 'blah'
16694 Bug31490 Turkish: ucfirst 'ix'
16705 Bug31490 Turkish: lcfirst 'BLAH'
16716 Bug31490 Turkish: ucfırst (with a dotless i)
16722 <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>
16727 Bug31490 ucfırst (with a dotless i) with English language
16733 <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>
16738 Bug 26375: TOC with italics
16740 title=[[Main Page]]
16743 == ''Lost'' episodes ==
16745 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16747 <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>
16751 <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>
16756 Bug 26375: TOC with bold
16758 title=[[Main Page]]
16761 == '''should be bold''' then normal text ==
16763 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16765 <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>
16769 <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>
16774 Bug 33845: Headings become cursive in TOC when they contain an image
16776 title=[[Main Page]]
16779 == Image [[Image:foobar.jpg]] ==
16781 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16783 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
16787 <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>
16792 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
16794 title=[[Main Page]]
16797 == <blockquote>Quote</blockquote> ==
16799 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16801 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
16805 <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>
16810 Unclosed tags in TOC
16812 title=[[Main Page]]
16816 <small>Hanc marginis exiguitas non caperet.</small>
16819 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16821 <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>
16825 <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>
16826 <p><small>Hanc marginis exiguitas non caperet.</small>
16832 Multiple tags in TOC
16835 == <i>Foo</i> <b>Bar</b> ==
16837 == <i>Foo</i> <blockquote>Bar</blockquote> ==
16839 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16841 <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>
16842 <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>
16846 <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>
16847 <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>
16852 Tags with parameters in TOC
16855 == <sup class="in-h2">Hello</sup> ==
16857 == <sup class="a > b">Evilbye</sup> ==
16859 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16861 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
16862 <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>
16866 <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>
16867 <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>
16872 span tags with directionality in TOC
16875 == <span dir="ltr">C++</span> ==
16877 == <span dir="rtl">זבנג!</span> ==
16879 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
16881 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
16883 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
16885 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16887 <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>
16888 <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>
16889 <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>
16890 <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>
16891 <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>
16895 <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>
16896 <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>
16897 <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>
16898 <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>
16899 <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>
16906 == {{int:headline_sample}} ==
16910 Bug 32057: Title needed when expanding <h> nodes.
16912 title=[[Main Page]]
16916 <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>
16921 Strip marker in urlencode
16923 {{urlencode:x<nowiki/>y}}
16924 {{urlencode:x<nowiki/>y|wiki}}
16925 {{urlencode:x<nowiki/>y|path}}
16952 Strip marker in formatNum
16954 {{formatnum:1<nowiki/>2}}
16955 {{formatnum:1<nowiki/>2|R}}
16963 Check noCommafy in formatNum
16967 {{formatnum:123456.78}}
16968 {{formatnum:123456.78|NOSEP}}
16976 Wrong option for formatNum (bug 56199)
16978 {{formatnum:1,234.56|Random}}
16979 {{formatnum:1,234.56|EVERYTHING}}
16980 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
16989 Strip marker in grammar
16993 {{grammar:elative|foo<nowiki/>bar}}
17000 Strip marker in padleft
17002 {{padleft:|2|x<nowiki/>y}}
17009 Strip marker in padright
17011 {{padright:|2|x<nowiki/>y}}
17018 Strip marker in anchorencode
17020 {{anchorencode:x<nowiki/>y}}
17027 nowiki inside link inside heading (bug 18295)
17029 ==[[foo|x<nowiki>y</nowiki>z]]==
17031 <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>
17036 new support for bdi element (bug 31817)
17038 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17040 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17045 Ignore pipe between table row attributes
17049 |- id=foo | style='color: red'
17057 <tr id="foo" style="color: red">
17064 Gallery override link with WikiLink (bug 34852)
17067 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
17070 <ul class="gallery mw-gallery-traditional">
17071 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17072 <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>
17073 <div class="gallerytext">
17083 Gallery override link with absolute external link (bug 34852)
17086 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
17089 <ul class="gallery mw-gallery-traditional">
17090 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17091 <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>
17092 <div class="gallerytext">
17102 Gallery override link with malicious javascript (bug 34852)
17105 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
17108 <ul class="gallery mw-gallery-traditional">
17109 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17110 <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>
17111 <div class="gallerytext">
17121 Gallery with invalid title as link (bug 43964)
17124 File:foobar.jpg|link=<
17127 <ul class="gallery mw-gallery-traditional">
17128 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17129 <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>
17130 <div class="gallerytext">
17138 Language parser function
17147 Padleft and padright as substr
17149 {{padleft:|3|abcde}}
17150 {{padright:|3|abcde}}
17158 Special parser function
17160 {{#special:RandomPage}}
17161 {{#special:BaDtItLe}}
17162 {{#special:Foobar}}
17171 Bug 34939 - Case insensitive link parsing ([HttP://])
17173 [HttP://MediaWiki.Org/]
17175 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
17180 Bug 34939 - Case insensitive link parsing ([HttP:// title])
17182 [HttP://MediaWiki.Org/ MediaWiki]
17184 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
17189 Bug 34939 - Case insensitive link parsing (HttP://)
17191 HttP://MediaWiki.Org/
17193 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
17212 <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>
17213 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17214 <h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17215 <h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17216 <h2><span class="mw-headline" id="Section_5">Section 5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 5">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17222 ### Parsoids-specific tests
17223 ### Parsoid-PHP parser incompatibilities
17226 1. SOL-sensitive wikitext tokens as template-args
17228 parsoid=wt2html,wt2wt
17234 <span about="#mwt1" typeof="mw:Transclusion">
17235 </span><ul about="#mwt1"><li>a</li>
17237 <span about="#mwt2" typeof="mw:Transclusion">
17238 </span><ol about="#mwt2"><li>a</li>
17240 <span about="#mwt3" typeof="mw:Transclusion">
17241 </span><dl about="#mwt3"><dd>a</dd>
17245 #### ----------------------------------------------------------------
17246 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
17247 #### tags. Parsoid's output for these tags differs from that of the
17249 #### ----------------------------------------------------------------
17252 Ref: 1. ref-location should be replaced with an index span
17257 B <ref name="x">foo</ref>
17260 <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>
17261 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>
17262 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>
17266 Ref: 2. ref-tags with identical names should all get the same index
17270 A <ref name="x">foo</ref>
17273 <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>
17274 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>
17278 Ref: 3. spaces in ref-names should be ignored
17282 A <ref name="x">foo</ref>
17283 B <ref name=" x " />
17286 <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>
17287 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>
17288 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>
17292 Ref: 4. 'constructor' should be accepted as a valid ref-name
17293 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
17297 A <ref name="constructor">foo</ref>
17299 <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>
17303 Ref: 5. body should accept generic wikitext
17308 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
17313 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"This is a <b data-parsoid='{\"dsr\":[19,40,3,3]}'><a rel=\"mw:WikiLink\" href=\"./Bolded_link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bolded_link\"},\"sa\":{\"href\":\"bolded link\"},\"dsr\":[22,37,2,2]}'>bolded link</a></b> and this is a <span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"transclusion\"}},\"i\":0}}]}' data-parsoid='{\"dsr\":[55,76,null,null],\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]]}'>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>
17315 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
17316 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> This is a <b><a rel="mw:WikiLink" href="./Bolded_link">bolded link</a></b> and this is a <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}'>transclusion</span>
17322 Ref: 6. indent-pres should not be output in ref-body
17334 <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>
17336 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
17337 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
17345 Ref: 7. No p-wrapping in ref-body
17364 <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>
17366 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
17367 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
17382 Ref: 8. transclusion wikitext has lower precedence
17386 A <ref> foo {{echo|</ref> B C}}
17390 <p>A <span class="reference" data-mw="{"name":"ref","body":{"html":"foo <span typeof=\"mw:Nowiki\" data-parsoid='{\"src\":\"{{\",\"dsr\":[12,14,0,0]}'>{{</span>echo|"},"attrs":{}}" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> B C<span typeof="mw:Nowiki">}}</span></p>
17391 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
17392 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <span typeof="mw:Nowiki">{{</span>echo|</li>
17397 Ref: 9. unclosed comments should not leak out of ref-body
17401 A <ref> foo <!--</ref> B C
17404 <p>A <span 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>
17405 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
17406 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
17411 Ref: 10. Unclosed HTML tags should not leak out of ref-body
17415 A <ref> <b> foo </ref> B C
17419 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"<b data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[8,16,3,0]}'> foo </b>"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref> <b> foo </ref>"}'><a href="#cite_note-1">[1]</a></span> B C</p>
17422 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
17423 <li about="#cite_note-1" id="cite_note-1" data-parsoid="{}"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> <b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></li>
17428 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
17435 <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" data-parsoid='{"src":"<ref>foo</ref>"}'><a href="#cite_note-1">[1]</a></span> B
17436 C <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>bar</ref>"}'><a href="#cite_note-2">[2]</a></span> D</p>
17440 Ref: 12. ref-tags act as trailing newline migration barrier
17444 <!--the newline at the end of this line moves out of the p-tag-->a
17446 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
17451 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
17454 <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>
17455 <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>
17462 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
17470 <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
17471 <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>
17475 Ref: 14. A nested ref-tag should be emitted as plain text
17479 <ref>foo <ref>bar</ref> baz</ref>
17483 <p><span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo &lt;ref>bar&lt;/ref> baz"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>foo <ref>bar</ref> baz</ref>"}'><a href="#cite_note-1">[1]</a></span></p>
17485 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
17486 <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>
17491 Ref: 15. ref-tags with identical names should get identical indexes
17495 A1 <ref name="a">foo</ref> A2 <ref name="a" />
17496 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
17500 <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>
17501 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>
17503 <ol about="#mwt10" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-a-1-0">1.0</a> <a href="#cite_ref-a-1-1">1.1</a></span> foo</li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy">↑ <a href="#cite_ref-b-2-0">2.0</a> <a href="#cite_ref-b-2-1">2.1</a></span> bar</li>
17507 ## We don't bother wt2wt-ing non-standard whitespace
17509 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
17517 <p>A <span 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>
17519 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
17520 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
17524 References: 1. references tag without any refs should be handled properly
17530 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
17534 References: 2. references tag with group only outputs references from that group
17538 A <ref group="a">foo</ref>
17539 B <ref group="b">bar</ref>
17541 <references group="a" />
17543 <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>
17544 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"group":"b"}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2">[b 1]</a></span></p>
17546 <ol about="#mwt6" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li>
17551 References: 3. ref list should be cleared after processing references
17563 <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>
17565 <ol about="#mwt4" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li>
17568 <p>B <span about="#mwt6" 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">[1]</a></span></p>
17570 <ol about="#mwt8" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2-0">↑</a></span> bar</li>
17575 References: 4. only referenced group should be cleared after processing references
17579 A <ref group="a">afoo</ref>
17582 <references group="a" />
17588 <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>
17589 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bfoo"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>bfoo</ref>"}'><a href="#cite_note-2">[1]</a></span></p>
17591 <ol about="#mwt6" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> afoo</li>
17594 <p>C <span about="#mwt8" class="reference" data-mw='{"name":"ref","body":{"html":"cfoo"},"attrs":{}}' id="cite_ref-3-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-3">[2]</a></span></p>
17596 <ol about="#mwt10" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2-0">↑</a></span> bfoo</li><li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3-0">↑</a></span> cfoo</li>
17601 References: 5. ref tags in references should be processed while ignoring all other content
17606 B <ref name="b">bar</ref>
17609 <ref name="a">foo</ref>
17610 This should just get lost.
17613 <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" data-parsoid='{"src":"<ref name=\"a\" />"}'><a href="#cite_note-a-1">[1]</a></span>
17614 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" data-parsoid='{"src":"<ref name=\"b\">bar</ref>"}'><a href="#cite_note-b-2">[2]</a></span></p>
17617 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-parsoid='{"src":"<references>\n<ref name=\"a\">foo</ref>\nThis should just get lost.\n</references>"}' data-mw='{"name":"references","body":{"extsrc":"<ref name=\"a\">foo</ref>\nThis should just get lost.","html":"\n<span about=\"#mwt8\" class=\"reference\" data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"a\"}}' rel=\"dc:references\" typeof=\"mw:Extension/ref\"><a href=\"#cite_note-a-1\">[1]</a></span>\n"},"attrs":{}}'>
17618 <li about="#cite_note-a-1" id="cite_note-a-1" data-parsoid="{}"><span rel="mw:referencedBy"><a href="#cite_ref-a-1-0">↑</a></span> foo</li>
17619 <li about="#cite_note-b-2" id="cite_note-b-2" data-parsoid="{}"><span rel="mw:referencedBy"><a href="#cite_ref-b-2-0">↑</a></span> bar</li>
17624 References: 6. <references /> from a transclusion
17628 <ref>Foo</ref> {{echo|<references />}}
17630 <span about="#mwt3" 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> <ol class="references" typeof="mw:Extension/references mw:Transclusion" about="#mwt4" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}}]}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> Foo</li></ol>
17634 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
17638 A <ref>foo bar for a</ref>
17639 B <ref group="X" name="b" />
17643 <references group="X">
17644 <ref name="b">foo</ref>
17647 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo bar for a"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>foo bar for a</ref>"}'><a href="#cite_note-2" data-parsoid="{}">[2]</a></span>
17648 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}' id="cite_ref-b-3-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref name=\"b\" group=\"X\" />"}'><a href="#cite_note-b-3" data-parsoid="{}">[X 1]</a></span></p>
17650 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-b-1" id="cite_note-b-1" data-parsoid="{}"><span rel="mw:referencedBy" data-parsoid="{}">↑</span> foo</li><li about="#cite_note-2" id="cite_note-2" data-parsoid="{}"><span rel="mw:referencedBy" data-parsoid="{}"><a href="#cite_ref-2-0" data-parsoid="{}">↑</a></span> foo bar for a</li></ol>
17652 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-parsoid='{"src":"<references group=\"X\">\n<ref name=\"b\">foo</ref>\n</references>","group":"X"}' data-mw='{"name":"references","body":{"extsrc":"<ref name=\"b\">foo</ref>","html":"\n<span about=\"#mwt10\" class=\"reference\" data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"b\"}}' rel=\"dc:references\" typeof=\"mw:Extension/ref\"><a href=\"#cite_note-b-1\">[1]</a></span>\n"},"attrs":{"group":"X"}}'><li about="#cite_note-b-3" id="cite_note-b-3" data-parsoid="{}"><span rel="mw:referencedBy" data-parsoid="{}"><a href="#cite_ref-b-3-0" data-parsoid="{}">↑</a></span> </li></ol>
17655 # This test is wt2html only because we're permitting the serializer to produce
17656 # dirty diffs, normalizing the unclosed references to the self-closed version.
17658 Generate references for unclosed references tag
17666 <p data-parsoid='{}'>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" data-parsoid='{"src":"<ref>foo</ref>"}'><a href="#cite_note-1" data-parsoid="{}">[1]</a></span></p>
17669 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
17670 <li about="#cite_note-1" id="cite_note-1" data-parsoid="{}"><span rel="mw:referencedBy" data-parsoid="{}"><a href="#cite_ref-1-0" data-parsoid="{}">↑</a></span> foo</li></ol>
17674 New reference serializes on its own line
17676 parsoid=wt2wt,html2wt
17681 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
17684 #### ----------------------------------------------------------------
17685 #### The following section of tests are primarily to test
17686 #### wikitext escaping capabilities of Parsoid. Given that
17687 #### escaping can be done any number of ways, the wikitext (input)
17688 #### is always adjusted to reflect how Parsoid adds nowiki
17691 #### We are marking several tests as parsoid-only since the
17692 #### HTML in the result section is different from what the
17693 #### PHP parser generates for it.
17694 #### ----------------------------------------------------------------
17697 #### --------------- Headings ---------------
17699 #### 1. Nested inside html <h1>=foo=</h1>
17700 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
17701 #### 3. Nested inside html with wikitext split by html tags
17702 #### 4. No escape needed
17703 #### 5. Empty headings <h1></h1>
17704 #### 6. Heading chars in SOL context
17705 #### ----------------------------------------
17707 Headings: 0. Unnested
17711 <nowiki>=foo=</nowiki>
17713 <nowiki> =foo= </nowiki>
17715 <nowiki>=foo=</nowiki>
17717 =foo''a''<nowiki>=</nowiki>
17719 <p><span typeof="mw:Nowiki">=foo=</span></p>
17721 <p><span typeof="mw:Nowiki"> =foo= </span>
17723 <span typeof="mw:Nowiki">=foo=</span></p>
17725 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
17729 Headings: 1. Nested inside html
17730 (New headings and existing headings are handled differently)
17740 =<nowiki>=foo=</nowiki>=
17741 ==<nowiki>=foo=</nowiki>==
17742 ===<nowiki>=foo=</nowiki>===
17743 ====<nowiki>=foo=</nowiki>====
17744 =====<nowiki>=foo=</nowiki>=====
17745 ======<nowiki>=foo=</nowiki>======
17752 <h1 data-parsoid='{}'>=foo=</h1>
17753 <h2 data-parsoid='{}'>=foo=</h2>
17754 <h3 data-parsoid='{}'>=foo=</h3>
17755 <h4 data-parsoid='{}'>=foo=</h4>
17756 <h5 data-parsoid='{}'>=foo=</h5>
17757 <h6 data-parsoid='{}'>=foo=</h6>
17761 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
17766 <nowiki>*</nowiki>bar
17772 <nowiki>=bar=</nowiki>
17780 Headings: 3. Nested inside html with wikitext split by html tags
17784 = ='''bold'''<nowiki>foo=</nowiki> =
17786 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
17790 Headings: 4a. No escaping needed (testing just h1 and h2)
17808 = <nowiki>=</nowiki> =
17816 <h1><i>=</i>foo=</h1>
17817 <h1><span typeof="mw:Nowiki">=</span></h1>
17821 Headings: 4b. No escaping needed (inside p-tags)
17836 Headings: 5. Empty headings
17848 =====<nowiki/>=====
17850 ======<nowiki/>======
17861 Headings: 6a. Heading chars in SOL context (with trailing spaces)
17865 <nowiki>=a=</nowiki>
17867 <nowiki>=a=</nowiki>
17869 <nowiki>=a=</nowiki>
17871 <nowiki>=a=</nowiki>
17880 Headings: 6b. Heading chars in SOL context (with trailing newlines)
17908 Headings: 6c. Heading chars in SOL context (leading newline break)
17913 <nowiki>=b=</nowiki>
17920 Headings: 6d. Heading chars in SOL context (with interspersed comments)
17924 <!--c0--><nowiki>=a=</nowiki>
17926 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
17928 <p><!--c0-->=a=</p>
17929 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
17933 Headings: 6d. Heading chars in SOL context (No escaping needed)
17942 #### --------------- Lists ---------------
17943 #### 0. Outside nests (*foo, etc.)
17944 #### 1. Nested inside html <ul><li>*foo</li></ul>
17945 #### 2. Inside definition lists
17946 #### 3. Only bullets at start should be escaped
17947 #### 4. No escapes needed
17948 #### 5. No unnecessary escapes
17949 #### 6. Escape bullets in SOL position
17950 #### 7. Escape bullets in a multi-line context
17951 #### ----------------------------------------
17954 Lists: 0. Outside nests
17956 <nowiki>*</nowiki>foo
17958 <nowiki>#</nowiki>foo
17966 Lists: 1. Nested inside html
17968 *<nowiki>*foo</nowiki>
17970 *<nowiki>#foo</nowiki>
17972 *<nowiki>:foo</nowiki>
17974 *<nowiki>;foo</nowiki>
17976 #<nowiki>*foo</nowiki>
17978 #<nowiki>#foo</nowiki>
17980 #<nowiki>:foo</nowiki>
17982 #<nowiki>;foo</nowiki>
18020 Lists: 2. Inside definition lists
18022 ;<nowiki>;foo</nowiki>
18024 ;<nowiki>:foo</nowiki>
18026 ;<nowiki>:foo</nowiki>
18029 :<nowiki>:foo</nowiki>
18053 Lists: 3. Only bullets at start of text should be escaped
18055 *<nowiki>*foo*bar</nowiki>
18057 *<nowiki>*foo</nowiki>''it''*bar
18064 <li>*foo<i>it</i>*bar
18071 Lists: 4. No escapes needed
18092 <li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
18096 <li><a rel="mw:WikiLink" href="Foo">Foo</a>*bar
18102 Lists: 5. No unnecessary escapes
18104 * bar <span><nowiki>[[foo]]</nowiki></span>
18106 *=bar <span><nowiki>[[foo]]</nowiki></span>
18108 *[[bar <span><nowiki>[[foo]]</nowiki></span>
18110 *]]bar <span><nowiki>[[foo]]</nowiki></span>
18112 *=bar <span>foo]]</span>=
18117 <li> bar <span>[[foo]]</span>
18121 <li>=bar <span>[[foo]]</span>
18125 <li>[[bar <span>[[foo]]</span>
18129 <li>]]bar <span>[[foo]]</span>
18133 <li>=bar <span>foo]]</span>=
18144 Lists: 6. Escape bullets in SOL position
18148 <!--cmt--><nowiki>*foo</nowiki>
18150 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
18154 Lists: 7. Escape bullets in a multi-line context
18157 <nowiki>*</nowiki>b
18164 #### --------------- HRs ---------------
18165 #### 1. Single line
18166 #### -----------------------------------
18169 HRs: 1. Single line
18173 ----<nowiki>----</nowiki>
18177 <hr><span typeof="mw:Nowiki">----</span>
18182 #### --------------- Tables ---------------
18183 #### 1a. Simple example
18184 #### 1b. No escaping needed (!foo)
18185 #### 1c. No escaping needed (|foo)
18186 #### 1d. No escaping needed (|}foo)
18188 #### 2a. Nested in td (<td>foo|bar</td>)
18189 #### 2b. Nested in td (<td>foo||bar</td>)
18190 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
18192 #### 3a. Nested in th (<th>foo!bar</th>)
18193 #### 3b. Nested in th (<th>foo!!bar</th>)
18194 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
18198 #### 4c. No escaping needed
18199 #### --------------------------------------
18202 Tables: 1a. Simple example
18213 Tables: 1b. No escaping needed
18222 Tables: 1c. No escaping needed
18231 Tables: 1d. No escaping needed
18240 Tables: 2a. Nested in td
18245 |<nowiki>foo|bar</nowiki>
18247 |x<div><nowiki>a|b</nowiki></div>
18251 <td>foo|bar</td></tr>
18252 <tr><td>x<div>a|b</div></td>
18257 Tables: 2b. Nested in td
18262 |<nowiki>foo||bar</nowiki>
18263 |''it''<nowiki>foo||bar</nowiki>
18267 <td><span typeof="mw:Nowiki">foo||bar</span></td>
18268 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
18272 Tables: 2c. Nested in td -- no escaping needed
18280 <table><tbody><tr><td>foo!!bar
18281 </td></tr></tbody></table>
18286 Tables: 3a. Nested in th
18294 <table><tbody><tr><th>foo!bar
18295 </th></tr></tbody></table>
18300 Tables: 3b. Nested in th
18305 !<nowiki>foo!!bar</nowiki>
18309 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
18314 Tables: 3c. Nested in th -- no escaping needed
18319 !<nowiki>foo||bar</nowiki>
18323 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
18327 Tables: 4a. Escape -
18334 |<nowiki>-bar</nowiki>
18338 <tr><th>-bar</th></tr>
18340 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
18344 Tables: 4b. Escape +
18351 |<nowiki>+bar</nowiki>
18355 <tr><th>+bar</th></tr>
18357 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
18361 Tables: 4c. No escaping needed
18382 <tr><td>foo-bar</td><td>foo+bar</td></tr>
18383 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
18389 <div>a|b</div></td>
18394 Tables: 4d. No escaping needed
18405 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo">Foo</a>-bar</td>
18406 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
18407 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
18412 Tables: Digest broken attributes on table and tr tag
18428 #### --------------- Links ----------------
18429 #### 1. Quote marks in link text
18430 #### 2. Wikilinks: Escapes needed
18431 #### 3. Wikilinks: No escapes needed
18432 #### 4. Extlinks: Escapes needed
18433 #### 5. Extlinks: No escapes needed
18434 #### --------------------------------------
18436 Links 1. Quote marks in link text
18440 [[Foo|Foo<nowiki>''boo''</nowiki>]]
18442 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
18446 Links 2. WikiLinks: Escapes needed
18451 [[Foo|<nowiki>Foobar]</nowiki>]]
18452 [[Foo|x [Foobar] x]]
18453 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
18454 [[Foo|<nowiki>[[Bar]]</nowiki>]]
18455 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
18456 [[Foo|<nowiki>|Bar</nowiki>]]
18457 [[Foo|<nowiki>]]bar</nowiki>]]
18458 [[Foo|<nowiki>[[bar</nowiki>]]
18459 [[Foo|<nowiki>x [[ y</nowiki>]]
18460 [[Foo|<nowiki>x ]] y</nowiki>]]
18461 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
18463 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
18464 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
18465 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
18466 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
18467 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
18468 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
18469 <a href="Foo" rel="mw:WikiLink">|Bar</a>
18470 <a href="Foo" rel="mw:WikiLink">]]bar</a>
18471 <a href="Foo" rel="mw:WikiLink">[[bar</a>
18472 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
18473 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
18474 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
18478 Links 3. WikiLinks: No escapes needed
18485 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
18486 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
18490 Links 4. ExtLinks: Escapes needed
18494 [http://google.com <nowiki>[google]</nowiki>]
18495 [http://google.com <nowiki>google]</nowiki>]
18497 <nowiki>[http://google.com]</nowiki>
18499 <nowiki>[http://google.com google]</nowiki>
18502 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
18503 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
18504 <p>[http://google.com]</p>
18505 <p>[http://google.com google]</p>
18509 Links 5. ExtLinks: No escapes needed
18513 [http://google.com [google]
18515 <a href="http://google.com" rel="mw:ExtLink">[google</a>
18518 #### --------------- Quotes ---------------
18519 #### 1. Quotes inside <b> and <i>
18520 #### 2. Link fragments separated by <i> and <b> tags
18521 #### 3. Link fragments inside <i> and <b>
18522 #### 4. No escaping needed
18523 #### --------------------------------------
18525 1. Quotes inside <b> and <i>
18527 parsoid=html2wt,wt2wt
18529 ''<nowiki>'foo'</nowiki>''
18530 ''<nowiki>''foo''</nowiki>''
18531 ''<nowiki>'''foo'''</nowiki>''
18533 '''<nowiki>'foo'</nowiki>'''
18534 '''<nowiki>''foo''</nowiki>'''
18535 '''<nowiki>'''foo'''</nowiki>'''
18536 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
18537 '''foo'''<nowiki/>'s
18540 '<nowiki/>''foo''<nowiki/>'
18542 '''foo'''<nowiki/>'
18543 '<nowiki/>'''foo'''<nowiki/>'
18544 ''fools'<span> errand</span>''
18545 ''<span>fool</span>'s errand''
18554 <b>foo'<i>bar'</i>baz</b>
18562 <i>fools'<span> errand</span></i>
18563 <i><span>fool</span>'s errand</i>
18567 2. Link fragments separated by <i> and <b> tags
18569 [[''foo''<nowiki>hello]]</nowiki>
18571 [['''foo'''<nowiki>hello]]</nowiki>
18573 <p>[[<i>foo</i>hello]]
18574 </p><p>[[<b>foo</b>hello]]
18579 3. Link fragments inside <i> and <b>
18580 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
18581 this is one of the shortcomings of this format)
18583 ''[[foo''<nowiki>]]</nowiki>
18585 '''[[foo'''<nowiki>]]</nowiki>
18588 </p><p><b>[[foo</b>]]
18593 4. No escaping needed
18595 '<span>''bar''</span>'
18596 '<span>'''bar'''</span>'
18598 <p>'<span><i>bar</i></span>'
18599 '<span><b>bar</b></span>'
18603 #### ----------- Paragraphs ---------------
18604 #### 1. No unnecessary escapes
18605 #### --------------------------------------
18608 1. No unnecessary escapes
18610 bar <span><nowiki>[[foo]]</nowiki></span>
18612 =bar <span><nowiki>[[foo]]</nowiki></span>
18614 [[bar <span><nowiki>[[foo]]</nowiki></span>
18616 ]]bar <span><nowiki>[[foo]]</nowiki></span>
18618 =bar <span>foo]]</span><nowiki>=</nowiki>
18620 <p>bar <span>[[foo]]</span>
18621 </p><p>=bar <span>[[foo]]</span>
18622 </p><p>[[bar <span>[[foo]]</span>
18623 </p><p>]]bar <span>[[foo]]</span>
18624 </p><p>=bar <span>foo]]</span>=
18628 #### ----------------------- PRE --------------------------
18629 #### 1. Leading whitespace in SOL context should be escaped
18630 #### ------------------------------------------------------
18632 1. Leading whitespace in SOL context should be escaped
18636 <nowiki> </nowiki>a
18638 <nowiki> </nowiki> a
18640 <nowiki> </nowiki>a(tab)
18642 <nowiki> </nowiki> a
18644 <nowiki> </nowiki> a
18647 <nowiki> </nowiki>b
18650 <nowiki> </nowiki>b
18653 <nowiki> </nowiki> b
18659 <p><!--cmt--> a</p>
18668 #### --------------- Behavior Switches --------------------
18670 1. Valid behavior switches should be escaped
18674 <nowiki>__TOC__</nowiki>
18680 2. Invalid behavior switches should not be escaped
18691 #### --------------- HTML tags ---------------
18694 #### 3. multi-line html tag
18695 #### 4. extension tags
18696 #### -----------------------------------------
18702 <a href="http://google.com">google</a>
18704 <a href="http://google.com">google</a>
18710 <nowiki><div>foo</div>
18711 <div style="color:red">foo</div></nowiki>
18713 <p><div>foo</div>
18714 <div style="color:red">foo</div>
18719 3. multi-line html tag
18734 <nowiki><ref>foo</ref></nowiki>
18736 <nowiki><ref>bar</nowiki>
18738 baz<nowiki></ref></nowiki>
18740 <p><ref>foo</ref>
18741 </p><p><ref>bar
18742 </p><p>baz</ref>
18746 #### --------------- Others ---------------
18750 <nowiki>foo</nowiki>
18752 <p><nowiki>foo</nowiki>
18756 ## The quote-char in the input is necessary for triggering the bug
18758 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
18760 parsoid=wt2wt,html2wt
18769 Tag-like HTML structures are passed through as text
18791 </p><p>1<d e>f
18796 # This was a bug in the PHP parser (see bug 17663 and its dups,
18797 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
18799 Tag names followed by punctuation should not be recognized as tags
18803 <p><s.ome> text
18808 HTML tag with necessary entities in attributes
18810 <span title="&amp;">foo</span>
18812 <p><span title="&amp;">foo</span>
18817 HTML tag with 'unnecessary' entity encoding in attributes
18819 <span title="&">foo</span>
18821 <p><span title="&">foo</span>
18826 HTML tag with broken attribute value quoting
18828 <span title="Hello world>Foo</span>
18830 <p><span>Foo</span>
18835 Parsoid-only: HTML tag with broken attribute value quoting
18839 <span title="Hello world>Foo</span>
18841 <p><span title="Hello world">Foo</span>
18846 Table with broken attribute value quoting
18849 | title="Hello world|Foo
18860 Table with broken attribute value quoting on consecutive lines
18863 | title="Hello world|Foo
18864 | style="color:red|Bar
18877 Parsoid-only: Table with broken attribute value quoting on consecutive lines
18882 | title="Hello world|Foo
18883 | style="color:red|Bar
18888 <td title="Hello world">Foo
18889 </td><td style="color: red">Bar
18890 </td></tr></tbody></table>
18895 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
18905 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
18915 Accept empty td cell attribute
18918 | align="center" | foo || |
18923 <td align="center"> foo </td>
18930 Non-empty attributes in th-cells
18933 ! Foo !! style="color: red" | Bar
18939 <th style="color: red"> Bar
18945 Accept empty attributes in th-cells
18960 Empty table rows go away
18981 ### Parsoid-centric tests for testing RTing of inter-element separators
18982 ### Edge cases not tested by existing parser tests and specific to
18983 ### Parsoid-specific serialization strategies.
18987 RT-ed inter-element separators should be valid separators
19000 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
19001 (Parsoid-only since PHP parser relies on Tidy for correct output)
19017 Empty TD followed by TD with tpl-generated attribute
19022 |{{echo|style='color:red'}}|foo
19036 Indented table with an empty td
19055 Empty TR followed by a template-generated TR
19056 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
19062 {{echo|<tr><td>foo</td></tr>}}
19068 <tr about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr><td>foo</td></tr>"}},"i":0}}]}'>
19073 ## PHP and parsoid output differ for this, and since this is primarily
19074 ## for testing Parsoid's serializer, marking this Parsoid only
19076 Empty TR followed by mixed-ws-comment line should RT correctly
19092 <!--c--> </tr><!--d-->
19098 Multi-line image caption generated by templates with/without trailing newlines
19102 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
19103 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
19105 <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>
19106 <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>
19110 ## PHP emits broken html for this, and since this is primarily
19111 ## a Parsoid serializer test, marking this Parsoid only
19113 Improperly nested inline or quotes tags with whitespace in between
19117 <span> <s>x</span> </s>
19120 <p><span> <s>x</s></span><s> </s>
19121 <b> <i>x</i></b><i> </i>
19126 Encapsulate protected attributes from wt
19130 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
19132 <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>
19136 ## Currently the p-wrapper is fragile in how adds / removes transformations.
19137 ## Having nested or stray pre tags results in the attempt to add duplicates,
19138 ## causing an assertion fail. This test tries to prevent that situation.
19140 Ensure ParagraphWrapper can deal with stray closing pre tags
19150 1. Ensure fostered text content is wrapped in spans
19154 <table>hi</table><table>ho</table>
19163 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
19165 parsoid=wt2html,wt2wt
19172 <span> || ||</span>
19181 Encapsulation properly handles null DSR information from foster box
19183 parsoid=wt2html,wt2wt
19185 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
19187 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
19190 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
19194 <td>bar</td></tr></tbody></table>
19198 1. Encapsulate foster-parented transclusion content
19200 parsoid=wt2wt,wt2html
19202 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
19204 <span typeof="mw:Transclusion" data-mw="{"parts":["
19205 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
19207 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
19211 <td>bar</td></tr></tbody></table>
19215 2. Encapsulate foster-parented transclusion content
19217 parsoid=wt2wt,wt2html
19219 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
19221 <div typeof="mw:Transclusion" data-mw="{"parts":["
19223 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
19225 <td>bar</td></tr></table>"]}">foo</div>
19229 <td>bar</td></tr></tbody></table>
19233 3. Encapsulate foster-parented transclusion content
19235 parsoid=wt2wt,wt2html
19237 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
19239 <div typeof="mw:Transclusion" data-mw="{"parts":["
19242 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
19244 <td>"}},"i":0}},"bar</td></tr></table>"]}">
19249 <td>bar</td></tr></tbody></table>
19253 4. Encapsulate foster-parented transclusion content
19255 parsoid=wt2wt,wt2html
19257 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
19259 <div typeof="mw:Transclusion" data-mw="{"parts":["
19262 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
19264 <td>"}},"i":0}},"bar</td></tr></table>"]}">
19269 <td>bar</td></tr></tbody></table>
19273 5. Encapsulate foster-parented transclusion content
19275 parsoid=wt2wt,wt2html
19277 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
19279 <span typeof="mw:Transclusion" data-mw="{"parts":["
19284 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
19290 <p>foo</p></div></td></tr></tbody></table>
19294 6. Encapsulate foster-parented transclusion content
19296 parsoid=wt2wt,wt2html
19298 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
19300 <span typeof="mw:Transclusion" data-mw="{"parts":["
19305 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
19311 <p>foo</p></div></td></tr></tbody></table>
19316 7. Encapsulate foster-parented transclusion content
19318 parsoid=wt2wt,wt2html
19320 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
19322 <p typeof="mw:Transclusion" data-mw="{"parts":["
19323 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
19324 <p>foo</p>"}},"i":0}},"
19325 <td>bar</td></table>"]}">foo</p>
19329 <td>bar</td></tr></tbody></table>
19333 8. Encapsulate foster-parented transclusion content
19335 parsoid=wt2wt,wt2html
19338 }}{|{{echo|style='color:red'}}
19343 <p typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}">a</p><span typeof="mw:Transclusion" data-mw="{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}">{{{1}}}</span>
19347 <td>b</td></tr></tbody></table>
19351 Table in fosterable position
19353 parsoid=wt2html,wt2wt
19362 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n<div>"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1" data-parsoid="{}">
19364 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
19371 Support <object> element with .data attribute
19375 <object data="test.swf"></object>
19377 <object data="test.swf"></object>
19380 # -----------------------------------------------------------------
19381 # The following section of tests are primarily to spec requirements
19382 # around serialization of new/edited content.
19384 # All these tests are marked Parsoid html2wt and html2html only
19385 # ----------------------------------------------------------------
19388 Image: Modifying size of an image (1)
19392 [[Image:Foobar.jpg|200x200px]]
19394 <p><span typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"230x230px"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/230px-Foobar.jpg" height="22" width="200" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"26","width":"230"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
19398 Image: Modifying size of an image (2)
19402 [[Image:Foobar.jpg|500x500px]]
19404 <p><span typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"230x230px"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/230px-Foobar.jpg" height="100" width="500" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"26","width":"230"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
19407 # note that the data-parsoid value conflicts with the figure's class
19409 Image: Modifying alignment of an image (bug 48665)
19413 [[Image:Foobar.jpg|thumb|caption|left]]
19415 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"caption"},{"ck":"right","ak":"right"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="20" width="180" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"20","width":"180"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a><figcaption>caption</figcaption></figure>
19419 Image: Modifying valign of an image (bug 49221)
19423 [[File:Foobar.jpg|20px|text-top]]
19425 <p><span class="mw-valign-text-top" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"20px"},{"ck":"text_top","ak":"text-top"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" height="2" width="20" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"2","width":"20"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
19429 Image: Modifying alt attribute of an image (bug 56400)
19433 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
19435 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"some caption"},{"ck":"alt","ak":"alt=some alternate text"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img alt="some alternate edited text" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="20" width="180" data-parsoid='{"a":{"alt":"some alternate edited text","resource":"./File:Foobar.jpg","height":"20","width":"180"},"sa":{"alt":"alt=some alternate edited text","resource":"File:Foobar.jpg"}}'/></a><figcaption>some caption</figcaption></figure>
19439 Image: Modifying caption of an image
19443 [[Image:Foobar.jpg|thumb|new caption]]
19445 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"original caption"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="20" width="180" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"20","width":"180"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a><figcaption>new caption</figcaption></figure>
19449 Image: empty alt attribute (bug 48924)
19453 [[File:Foobar.jpg|thumb|alt=|bar]]
19455 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"alt","ak":"alt="},{"ck":"caption","ak":"bar"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img alt="" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" height="25" width="220" data-parsoid='{"a":{"alt":"","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=","resource":"File:Foobar.jpg"}}'/></a><figcaption>bar</figcaption></figure>
19459 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
19464 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
19466 #<figure class="mw-default-size mw-halign-right" typeof="mw:Image/Thumb"><a href="Imagen:Foobar.jpg"><img resource="./Imagen:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="20" width="180"/></a></figure>
19470 Image: Block level image should have \n before and after
19475 [[File:Foobar.jpg|right|thumb|150x150px]]
19478 <p>123</p><figure typeof="mw:Image/Thumb" class="mw-halign-right"><a href="./File:Foobar.png"><img src="http://192.168.142.128/mw/images/thumb/b/bc/Foobar.png/131px-Foobar.png" width="131" height="150" resource="./File:Foobar.png" data-parsoid='{"a":{"resource":"./File:Foobar.png","width":"131"},"sa":{"resource":"File:Foobar.png","width":"150"}}'></a></figure><p>456</p>
19482 Image: New block level image should have \n before and after (existing
19488 [[File:Foobar.jpg|right|thumb|150x150px]]
19491 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
19492 <figure class="mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"right","ak":"right"},{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"150x150px"}],"dsr":[4,45,2,2]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"dsr":[6,43,null,null]}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" height="17" width="150" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"17","width":"150"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure>
19493 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
19497 Images: upright option (parsoid)
19501 [[File:Foobar.jpg|thumb|upright|caption]]
19502 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
19503 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
19505 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="19" width="170"/></a><figcaption>caption</figcaption></figure><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="19" width="170"/></a><figcaption>caption</figcaption></figure><figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="57" width="500"/></a><figcaption>caption</figcaption></figure>
19509 Images: upright option is ignored on inline and frame images (parsoid)
19513 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
19515 <p><span typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="57" width="500"/></a></span></p>
19519 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
19526 <li><p>foo</p></li>
19531 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
19537 <ul> <li>foo</li></ul>
19541 Don't strip leading whitespace when handling indent-pre suppressing tags
19549 '''This is very bold of you!'''
19553 indented cell (no pre-wrapping!)
19560 <tr><td> indented row</td></tr>
19563 <b>This is very bold of you!</b>
19566 indented cell (no pre-wrapping!)
19574 Strip leading whitespace when handling indent-pre inducing tags
19606 Lists: Add space after bullets
19612 * <span> baz</span>
19617 <li><span> baz</span></li>
19622 Lists: Dont insert newlines in a serialized list item.
19629 <ul><li>a<br>b</li><li>c</li></ul>
19633 Headings: Add space before/after == (Bug 51744)
19643 == <span> baz</span> ==
19648 <h2><span> baz</span></h2>
19652 Parsoid: Serialize positional parameters with = in them as named parameter
19658 {{echo|1 = f=oo|2 = bar}}
19660 <!--Orig params with data-parsoid has heuristics for handling = chars-->
19661 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
19662 {{echo|<nowiki>f=oo</nowiki>|bar}}
19664 <p about="#mwt1" typeof="mw:Transclusion"
19665 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
19667 <p about="#mwt1" typeof="mw:Transclusion"
19668 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
19670 <!--Orig params with data-parsoid has heuristics for handling = chars-->
19671 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
19672 <p data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]},{"k":"2","spc":["","","",""]}]]}' about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"},"2":{"wt":"bar"}},"i":0}}]}'>foo</p>
19676 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
19692 <div>a<p>b</p></div>
19700 #-----------------------------
19701 # I/B quote minimization tests
19702 #-----------------------------
19705 1. I/B quote minimization: wikitext-only tags should be combined
19725 <p><i>A</i><i>B</i></p>
19726 <p><b>A</b><b>B</b></p>
19727 <p><i>A</i><b><i>B</i></b></p>
19728 <p><b>A</b><i><b>B</b></i></p>
19729 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
19730 <p><i><b>A</b></i><i><b>B</b></i></p>
19731 <p><i><b>A</b></i><b><i>B</i></b></p>
19732 <p><b><i>A</i></b><i><b>B</b></i></p>
19736 2. I/B quote minimization: wikitext and html tags should not be combined
19742 ''A'''''<i>B</i>'''
19744 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
19745 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
19749 3. I/B quote minimization: templated content stops minimization
19753 ''A''{{echo|''B''}}
19755 ''A''{{echo|'''''B'''''}}
19757 <p><i>A</i><i about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''B''"}},"i":0}}]}'>B</i>
19758 <p><i>A</i><b about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"'''''B'''''"}},"i":0}}]}'><i>B</i></b>
19762 4. I/B quote minimization: new content should be mimimized with adjacent old content
19772 <p><i>A</i><i data-parsoid='{}'>B</i></p>
19773 <p><b data-parsoid='{}'>A</b><b>B</b></p>
19774 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
19777 #------------------------------------
19778 # End of I/B quote minimization tests
19779 #------------------------------------
19782 Bug 54262: New entities
19788 <span typeof="mw:Entity">foo</span>
19791 ## Note that there is no wikitext output for 'unknownproperty' ##
19792 ## Unknown magic words are silently dropped ##
19807 __NOCONTENTCONVERT__
19809 <meta property='mw:PageProp/toc' />
19810 <meta property='mw:PageProp/notoc' />
19811 <meta property='mw:PageProp/forcetoc' />
19812 <meta property='mw:PageProp/index' />
19813 <meta property='mw:PageProp/noindex' />
19814 <meta property='mw:PageProp/nogallery' />
19815 <meta property='mw:PageProp/noeditsection' />
19816 <meta property='mw:PageProp/notitleconvert' />
19817 <meta property='mw:PageProp/nocontentconvert' />
19818 <meta property='mw:PageProp/unknownproperty' />
19822 Consecutive <pre>s should not get merged
19824 parsoid=html2wt,html2html
19840 <pre>a</pre><pre>b</pre>
19854 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
19858 [[Special:BookSources/1234567890|ISBN 1234567895]]
19860 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
19864 Edited RFC links not serializable as RFC links should serialize as extlinks
19868 [//tools.ietf.org/html/rfc123 New RFC]
19870 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
19874 Edited PMID links not serializable as PMID links should serialize as extlinks
19878 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
19880 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
19884 Edited Redirect link should emit a non-piped wikitext link
19890 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
19893 # -----------------------------------------------------------------
19894 # End of section for Parsoid-only html2wt tests for serialization
19896 # -----------------------------------------------------------------
19903 Try for 100% code coverage