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-specific options (not run by PHP parser unless
25 # the test includes an html/php section)
26 # php php-only test (not run by the parsoid parser unless
27 # the test includes an html/parsoid section)
28 # showtitle make the first line the title
29 # comment run through Linker::formatComment() instead of main parser
30 # local format section links in edit comment text as local links
31 # notoc disable table of contents
32 # thumbsize=NNN set the default thumb size to NNNpx for this test
34 # You can also set the following parser properties via test options:
35 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
36 # wgLinkHolderBatchSize, wgRawHtml
38 # For testing purposes, temporary articles can created:
39 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
40 # where '/' denotes a newline.
42 # This is the standard article assumed to exist.
67 MediaWiki:bad image list
69 * [[File:Bad.jpg]] except [[Nasty page]]
97 Template:echo_with_span
103 Template:echo_with_div
115 Template:table_attribs
118 |</noinclude>style="color: red"| Foo
124 {{table_attribs}} || Bar || Baz
128 Template:image_attribs
131 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
165 This is a simple paragraph.
167 <p>This is a simple paragraph.
172 Paragraphs with extra newline spacing
195 Paragraphs with newline spacing with comment lines in between
203 <!--foo--><!--More than 1 comment, still stripped-->
207 <!--foo--> <!----> <!-- bar -->
268 Paragraphs with newline spacing with non-empty white-space lines in between
295 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
303 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
342 Extra newlines: More paragraphs with indented comment
357 Extra newlines followed by heading
372 <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>
373 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
376 <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>
381 Extra newlines between heading and content are swallowed
389 <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>
390 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
397 http://fr.wikipedia.org/wiki/🍺
398 <!-- EasterEgg we love beer, better be able be able to link to it -->
400 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
411 <li> Item 2</li></ul>
419 * plain''italic''plain
420 * plain''italic''plain''italic''plain
421 * plain'''bold'''plain
422 * plain'''bold'''plain'''bold'''plain
423 * plain''italic''plain'''bold'''plain
424 * plain'''bold'''plain''italic''plain
425 * plain''italic'''bold-italic'''italic''plain
426 * plain'''bold''bold-italic''bold'''plain
427 * plain'''''bold-italic'''italic''plain
428 * plain'''''bold-italic''bold'''plain
429 * plain''italic'''bold-italic'''''plain
430 * plain'''bold''bold-italic'''''plain
431 * plain l'''italic''plain
432 * plain l''''bold''' plain
435 <li> plain<i>italic</i>plain</li>
436 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
437 <li> plain<b>bold</b>plain</li>
438 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
439 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
440 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
441 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
442 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
443 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
444 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
445 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
446 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
447 <li> plain l'<i>italic</i>plain</li>
448 <li> plain l'<b>bold</b> plain</li></ul>
452 # this example taken from the [[simple:Moon]] article (bug 47326)
454 Italics and possessives (1)
456 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
458 <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
462 # this example taken from [[en:Flaming Pie]] (bug 49926)
464 Italics and possessives (2)
466 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
468 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
472 # this example taken from [[en:Dictionary]] (bug 49926)
474 Italics and possessives (3)
476 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''.
478 <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>.
484 ### 2-quote opening sequence tests
487 Italics and bold: 2-quote opening sequence: (2,2)
497 Italics and bold: 2-quote opening sequence: (2,3)
508 # same html as previous, but wikitext adjusted to match parsoid html2wt
510 Italics and bold: 2-quote opening sequence: (2,3) w/ nowiki
512 ''<nowiki>foo'</nowiki>''
520 Italics and bold: 2-quote opening sequence: (2,4)
531 # same html as previous, but wikitext adjusted to match parsoid html2wt
533 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
535 ''<nowiki>foo''</nowiki>''
542 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
544 Italics and bold: 2-quote opening sequence: (2,5)
557 # same html as previous, but wikitext adjusted to match parsoid html2wt
559 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
561 ''foo'''''<nowiki/>'''
572 ### 3-quote opening sequence tests
576 Italics and bold: 3-quote opening sequence: (3,2)
586 Italics and bold: 3-quote opening sequence: (3,3)
596 Italics and bold: 3-quote opening sequence: (3,4)
607 # same html as previous, but wikitext adjusted to match parsoid html2wt
609 Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki
611 '''<nowiki>foo'</nowiki>'''
618 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
620 Italics and bold: 3-quote opening sequence: (3,5)
633 # same html as previous, but wikitext adjusted to match parsoid html2wt
635 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
637 '''foo'''''<nowiki/>''
648 ### 4-quote opening sequence tests
652 Italics and bold: 4-quote opening sequence: (4,2)
663 # same html as previous, but wikitext adjusted to match parsoid html2wt
665 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
667 <nowiki>''</nowiki>''foo''
675 Italics and bold: 4-quote opening sequence: (4,3)
685 Italics and bold: 4-quote opening sequence: (4,4)
696 # same html as previous, but wikitext adjusted to match parsoid html2wt
698 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
700 ''''<nowiki>foo'</nowiki>'''
707 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
709 Italics and bold: 4-quote opening sequence: (4,5)
718 <p>'<b>foo</b><i></i>
722 # same html as previous, but wikitext adjusted to match parsoid html2wt
724 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
726 ''''foo'''''<nowiki/>''
731 <p>'<b>foo</b><i></i>
737 ### 5-quote opening sequence tests
741 Italics and bold: 5-quote opening sequence: (5,2)
752 # same html as previous, but wikitext adjusted to match parsoid html2wt
753 # skipping wt2html and html2html because it wants to put <i> before <b>
755 Italics and bold: 5-quote opening sequence: (5,2+3)
757 parsoid=wt2wt,html2wt
766 Italics and bold: 5-quote opening sequence: (5,3)
777 # same html as previous, but wikitext adjusted to match parsoid html2wt
779 Italics and bold: 5-quote opening sequence: (5,3+2)
789 Italics and bold: 5-quote opening sequence: (5,4)
795 <p><i><b>foo'</b></i>
800 # same html as previous, but wikitext adjusted to match parsoid html2wt
802 Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki
804 '''''<nowiki>foo'</nowiki>'''''
806 <p><i><b>foo'</b></i>
812 Italics and bold: 5-quote opening sequence: (5,5)
821 ### multiple quote sequences in a line
824 Italics and bold: multiple quote sequences: (2,4,2)
830 <p><i>foo'<b>bar</b></i>
835 # same html as previous, but wikitext adjusted to match parsoid html2wt
837 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
839 ''<nowiki>foo'</nowiki>'''bar'''''
841 <p><i>foo'<b>bar</b></i>
847 Italics and bold: multiple quote sequences: (2,4,3)
853 <p><i>foo'<b>bar</b></i>
858 # same html as previous, but wikitext adjusted to match parsoid html2wt
860 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
862 ''<nowiki>foo'</nowiki>'''bar'''''
864 <p><i>foo'<b>bar</b></i>
870 Italics and bold: multiple quote sequences: (2,4,4)
876 <p><i>foo'<b>bar'</b></i>
881 # same html as previous, but wikitext adjusted to match parsoid html2wt
883 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
885 ''<nowiki>foo'</nowiki>'''<nowiki>bar'</nowiki>'''''
887 <p><i>foo'<b>bar'</b></i>
892 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
894 Italics and bold: multiple quote sequences: (3,4,2)
903 <p><b>foo'</b>bar<i></i>
907 # same html as previous, but wikitext adjusted to match parsoid html2wt
909 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
913 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
918 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
923 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
925 Italics and bold: multiple quote sequences: (3,4,3)
934 <p><b>foo'</b>bar<b></b>
938 # same html as previous, but wikitext adjusted to match parsoid html2wt
940 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
942 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
947 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
952 ### other quote tests
955 Italics and bold: other quote tests: (2,3,5)
957 ''this is about '''foo's family'''''
959 <p><i>this is about <b>foo's family</b></i>
965 Italics and bold: other quote tests: (2,(3,3),2)
967 ''this is about '''foo's''' family''
969 <p><i>this is about <b>foo's</b> family</i>
975 Italics and bold: other quote tests: (3,2,3,2)
979 '''this is about ''foo'''s family''
981 <p><b>this is about <i>foo</i></b><i>s family</i>
986 # same html as previous, but wikitext adjusted to match parsoid html2wt
987 # add 'parsoid' option to use 'parsoid' normalization of the placeholder
989 Italics and bold: other quote tests: (3,2,3+2+2,2)
993 '''this is about ''foo'''''<nowiki/>''s family''
995 <p><b>this is about <i>foo</i></b><i>s family</i>
1001 Italics and bold: other quote tests: (3,2,3,3)
1004 '''this is about ''foo'''s family'''
1006 <p>'<i>this is about </i>foo<b>s family</b>
1012 Italics and bold: other quote tests: (3,(2,2),3)
1014 '''this is about ''foo's'' family'''
1016 <p><b>this is about <i>foo's</i> family</b>
1022 Italicized possessive
1024 The ''[[Main Page]]'''s talk page.
1026 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1031 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1032 (Requires tidy for PHP parser output to be fixed up)
1034 parsoid=wt2html,wt2wt
1042 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1043 <td><i>a</i></td><td><i>b</i></td></tr>
1052 Non-html5 tags should be accepted
1054 <center>''foo''</center>
1056 <font>''foo''</font>
1057 <strike>''foo''</strike>
1060 <center><i>foo</i></center>
1061 <p><big><i>foo</i></big>
1062 <font><i>foo</i></font>
1063 <strike><i>foo</i></strike>
1069 <wbr> is valid wikitext (bug 52468)
1077 # <strike> is HTML4, <s> is HTML4/5.
1079 <s> or <strike> for strikethrough
1081 <strike>strike</strike>
1085 <p><strike>strike</strike>
1090 ## a,rtc not permitted
1093 Text-level semantic html elements in wikitext
1096 <strong>text</strong>
1112 <ruby><rb>明日<rp>(</rp><rt>Ashita</rt><rp>)</rp></rb></ruby>
1119 <strong>text</strong>
1135 <ruby><rb>明日<rp>(</rp><rt>Ashita</rt><rp>)</rp></rb></ruby>
1144 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1146 <b→> doesn't work! </b→>
1148 <bä> doesn't work! </bä>
1150 <boo> works fine </boo>
1152 <s.foo>s.foo</s.foo>
1156 <p><b→> doesn't work! </b→>
1157 </p><p><bä> doesn't work! </bä>
1158 </p><p><boo> works fine </boo>
1159 </p><p><s.foo>s.foo</s.foo>
1160 </p><p><sub-ID#1>
1165 Isolated close tags should be treated as literal text (bug 52760)
1172 </p><p><s.foo>s</s>
1177 ### Special characters
1181 Bare pipe character (bug 52363)
1190 Bare pipe character from a template (bug 52363)
1199 ### <nowiki> test cases
1203 <nowiki> unordered list
1205 <nowiki>* This is not an unordered list item.</nowiki>
1207 <p>* This is not an unordered list item.
1214 <nowiki>Lorem ipsum dolor
1222 <p>Lorem ipsum dolor
1235 :There is not nowiki.
1236 :There is <nowiki>nowiki</nowiki>.
1238 #There is not nowiki.
1239 #There is <nowiki>nowiki</nowiki>.
1241 *There is not nowiki.
1242 *There is <nowiki>nowiki</nowiki>.
1244 <dl><dd>There is not nowiki.</dd>
1245 <dd>There is nowiki.</dd></dl>
1246 <ol><li>There is not nowiki.</li>
1247 <li>There is nowiki.</li></ol>
1248 <ul><li>There is not nowiki.</li>
1249 <li>There is nowiki.</li></ul>
1254 Entities inside <nowiki>
1256 <nowiki><</nowiki>
1263 Entities inside template parameters
1269 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span>
1274 Properly escape nowiki when combined with other wiki markup
1278 <nowiki>* </nowiki></nowiki> tag
1280 <p>* </nowiki> tag</p>
1287 Comments and Indent-Pre
1289 <!-- comment 1 --> asdf
1291 <!-- comment 1 --> asdf
1294 <!-- comment 1 --> asdf
1295 <!-- comment 2 -->xyz
1297 <!-- comment 1 --> asdf
1298 <!-- comment 2 --> xyz
1354 asdf<!-- comment 1 -->jkl
1364 <!-- foo --> b <!-- bar -->
1378 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1384 Comment semantics and delimiters
1386 <!-- --><!----><!-----><!------>
1392 Comment semantics and delimiters, redux
1394 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1395 -- foo -- funky huh? ... -->
1401 Comment semantics and delimiters: directors cut
1403 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1404 everything starting with < followed by !-- until the first -- and > we see,
1405 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1413 Comment semantics: nesting
1415 <!--<!-- no, we're not going to do anything fancy here -->-->
1422 Comment semantics: unclosed comment at end
1424 <!--This comment will run out to the end of the document
1430 Comment in template title
1439 Comment on its own line post-expand
1451 Comment on its own line post-expand with non-significant whitespace
1463 Multiple comments should still parse as SOL-transparent
1465 parsoid=wt2html,wt2wt
1468 <!--c2--><!--c3--><!--c4-->*b
1479 ### paragraph wrapping tests
1494 Block tag on one line (<div>)
1506 Block tag on one line (<blockquote>)
1508 a <blockquote>foo</blockquote>
1512 a <blockquote>foo</blockquote>
1518 Block tag on both lines (<div>)
1530 Block tag on both lines (<blockquote>)
1532 a <blockquote>foo</blockquote>
1534 b <blockquote>foo</blockquote>
1536 a <blockquote>foo</blockquote>
1537 b <blockquote>foo</blockquote>
1542 Multiple lines without block tags
1560 Empty lines between lines with block tags
1589 ## PHP parser emits output which is broken
1591 Unclosed HTML p-tags should be handled properly
1598 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1604 ### Preformatted text
1613 And a [[Main Page|link]]
1619 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1624 Tabs don't trigger preformatted text
1628 This is preformatted text.
1634 <pre>This is preformatted text.
1640 Ident preformatting with inline content
1651 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1668 Regression with preformatted in <center>
1682 Bug 52763: Preformatted in <blockquote>
1688 indented cell (no pre-wrapping!)
1698 <p> indented cell (no pre-wrapping!)
1706 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1723 Bug 15491: <ins>/<del> in blockquote
1726 Foo <del>bar</del> <ins>baz</ins> quux
1730 <p>Foo <del>bar</del> <ins>baz</ins> quux
1736 # Note that the p-wrapping is newline sensitive, which could be
1737 # considered a bug: tidy will wrap only the 'Foo' in the example
1738 # below in a <p> tag. (see comment 23-25 of bug #6200)
1740 Bug 15491: <ins>/<del> in blockquote (2)
1742 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1745 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1751 <pre> with attributes (bug 3202)
1753 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1755 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1760 <pre> with width attribute (bug 3202)
1762 <pre width="8">Narrow screen goodies</pre>
1764 <pre width="8">Narrow screen goodies</pre>
1769 <pre> with forbidden attribute (bug 3202)
1771 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1773 <pre width="8">Narrow screen goodies</pre>
1778 Entities inside <pre>
1787 <pre> with forbidden attribute values (bug 3202)
1789 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1791 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1796 <nowiki> inside <pre> (bug 13238)
1804 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1812 <pre><nowiki>Foo</nowiki></pre>
1817 <nowiki> and <pre> preference (first one wins)
1848 </pre> inside nowiki
1850 <nowiki></pre></nowiki>
1857 Empty pre; pre inside other HTML tags (bug 54946)
1876 HTML pre followed by indent-pre
1891 <p><pre>foo</pre></p>
1893 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
1897 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1905 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1915 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1927 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1948 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1952 {{echo| foo}}{{echo| bar}}
1957 {{echo|<!--cmt--> foo}}
1959 <!--cmt-->{{echo| foo}}
1961 {{echo|{{echo| }}bar}}
1979 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2016 Things that look like <pre> tags aren't treated as such
2018 Barack Obama <President> of the United States
2019 <President></President>
2021 <p>Barack Obama <President> of the United States
2022 <President></President>
2026 ## PHP parser discards the "<pre " string
2028 Handle broken pre-like tags (bug 64025)
2032 {{echo|<pre <pre>x</pre>}}
2034 <table><pre </table>
2037 <table><pre></pre></table>
2040 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'><pre </span>
2043 <span><pre </span>
2048 Parsoid: handle pre with space after attribute
2052 <pre style="width:50%;" >{{echo|foo}}</pre>
2054 <pre style="width:50%;">{{echo|foo}}</pre>
2057 # TODO / maybe: fix wt2wt for this
2059 Parsoid: Don't paragraph-wrap fosterable content
2085 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2113 #--------------------------------------------------------------------
2114 # Transclusion parameter whitespace stripping tests
2115 # Behavior is different for positional and named parameters
2116 #--------------------------------------------------------------------
2118 Templates: Strip leading and trailing whitespace from named-param values
2122 {{echo|1= {{echo|b}} }}
2135 <ul><li> d</li></ul>
2140 Templates: Don't strip whitespace from positional-param values
2144 {{echo|{{echo|b}} }}
2176 <ul><li> f</li></ul>
2184 Templates: Handle empty comment-and-ws-only lines correctly
2187 <!--should be ignored-->
2188 <!--should be ignored as well-->
2197 Templates: Handle comments in the target
2200 <!-- should be ignored -->
2203 {{echo<!-- should be ignored -->
2206 {{echo<!-- should be ignored -->|foo}}
2208 {{<!-- should be ignored -->echo|foo}}
2210 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2212 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2214 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2216 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2219 #--------------------------------------------------------------------
2220 # Transclusion parameter escaping tests
2221 #--------------------------------------------------------------------
2223 Templates: Parsoid parameter escaping test 1
2227 {{echo|[foo]|{{echo|[bar]}}}}
2229 <p about="#mwt1" typeof="mw:Transclusion"
2230 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2234 Parsoid: Pipes in external links in template parameter
2238 {{echo|[{{echo|http://example.com}} link]}}
2240 <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>
2244 Parsoid: pipe in transclusion parameter
2248 {{echo|http://foo.com/a|b}}
2250 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2251 typeof="mw:Transclusion"
2252 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>
2256 Parsoid: Pipe in external link target and content in template parameter
2258 parsoid=html2wt,wt2wt
2260 {{echo|[http://foo.com/a|b a|b]}}
2262 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2263 typeof="mw:Transclusion"
2264 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2265 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2269 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2273 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2275 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
2279 Templates: Don't escape already nowiki-escaped text in template parameters
2281 parsoid=html2wt,wt2wt
2283 {{echo|foo<nowiki>|</nowiki>bar}}
2284 {{echo|<nowiki><div></nowiki>}}
2285 {{echo|<nowiki></nowiki>}}
2287 <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>
2288 <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>
2289 <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>
2295 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2297 parsoid=html2wt,wt2wt
2299 {{echo|{{echo|1=bar}}}}
2301 <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>
2306 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2312 <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>
2316 ### Parsoid-centric tests for testing RT edge cases for pre
2320 1a. Indent-Pre and Comments
2333 1b. Indent-Pre and Comments
2346 1c. Indent-Pre and Comments
2359 1d. Indent-Pre and Comments
2360 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2373 2a. Indent-Pre and tables
2394 2b. Indent-Pre and tables
2410 2c. Indent-Pre and tables (bug 42252)
2427 2d. Indent-Pre and tables
2453 2e. Indent-Pre and table-line syntax
2465 2f. Indent-pre started by table-line syntax
2478 3a. Indent-Pre and block tags (single-line html)
2482 c <blockquote> foo </blockquote>
2487 c <blockquote> foo </blockquote>
2488 <pre><span> foo </span>
2493 3b. Indent-Pre and block tags (multi-line html)
2498 <pre>a <span>foo</span>
2505 3c. Indent-Pre and block tags (pre-content on separate line)
2569 4. Indent-Pre and extension tags
2575 a <ul class="gallery mw-gallery-traditional">
2576 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2577 <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>
2578 <div class="gallerytext">
2586 Leading pipes outside of tables
2596 Leading pipes outside of tables 2
2610 Leading pipes outside of tables 3
2615 | class="foo bar" | baz
2619 | class="foo bar" | baz
2624 Render paragraphs when indent-pre is suppressed in blocklevels
2641 4. Multiple spaces at start-of-line
2659 ## NOTE: the leading white-space chars on empty line are significant
2661 5a. White-space in indent-pre
2673 ## NOTE: the leading white-space chars on empty line are significant
2675 5b. White-space in indent-pre
2694 5c. White-space in indent-pre
2707 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2730 7a. Indent-pre and category links
2732 parsoid=wt2html,wt2wt
2734 [[Category:foo]] <!-- No pre-wrapping -->
2735 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2737 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2738 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span>
2739 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2743 7b. Indent-pre and category links
2745 parsoid=wt2html,wt2wt
2748 [[Category:foo]] {{echo|b}}
2751 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
2753 <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>
2757 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2761 HTML-pre: 1. embedded newlines
2795 <pre data-parsoid='{"stx":"html"}'>foo</pre>
2797 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
2801 <pre data-parsoid='{"stx":"html"}'>
2806 <pre data-parsoid='{"stx":"html"}'>
2814 HTML-pre: big spaces
2851 <pre data-parsoid='{"stx":"html"}'>
2870 HTML-pre: 2: indented text
2883 HTML-pre: 3: other wikitext
2904 ### Definition lists
2911 <dl><dt> name </dt>
2912 <dd> Definition</dd></dl>
2917 Definition list for indentation only
2921 <dl><dd> Indented text</dd></dl>
2926 Definition list with no space
2931 <dd>Definition</dd></dl>
2936 Definition list with URL link
2938 ; http://example.com/ : definition
2940 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
2941 <dd> definition</dd></dl>
2946 Definition list with bracketed URL link
2948 ;[http://www.example.com/ Example]:Something about it
2950 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
2951 <dd>Something about it</dd></dl>
2956 Definition list with wikilink containing colon
2958 ; [[Help:FAQ]]: The least-read page on Wikipedia
2960 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
2961 <dd> The least-read page on Wikipedia</dd></dl>
2965 # At Brion's and JeLuF's insistence... :)
2967 Definition list with news link containing colon
2969 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2971 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
2972 <dd> This isn't even a real newsgroup!</dd></dl>
2977 Malformed definition list with colon
2979 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2981 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
2986 Definition lists: colon in external link text
2988 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2990 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
2991 <dd> OK, I made that up</dd></dl>
2996 Definition lists: colon in HTML attribute
2998 ;<b style="display: inline">bold</b>
3000 <dl><dt><b style="display: inline">bold</b></dt></dl>
3005 Definition lists: self-closed tag
3007 ;one<br/>two : two-line fun
3009 <dl><dt>one<br />two </dt>
3010 <dd> two-line fun</dd></dl>
3015 Bug 11748: Literal closing tags
3019 <dd>test test test test test</dd>
3021 <dd>test test test test test</dd>
3026 <dd>test test test test test</dd>
3028 <dd>test test test test test</dd>
3034 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3037 ; term : description
3042 <dl><dt> term </dt>
3043 <dd> description</dd></dl>
3044 <ul><li> unordered</li></ul>
3051 Definition list with empty definition and following paragraph
3063 Nested definition lists using html syntax
3072 Definition Lists: No nesting: Multiple dd's
3085 Definition Lists: Indentation: Regular
3093 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3098 Definition Lists: Indentation: Missing 1st level
3104 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3109 Definition Lists: Indentation: Multi-level indent
3113 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3118 Definition Lists: Hacky use to indent tables
3125 should be left alone
3127 <dl><dd><dl><dd><table>
3132 </td></tr></table></dd></dl></dd></dl>
3134 should be left alone
3139 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3147 should be left alone
3150 <dl><dd><dl><dd><table><tr>
3153 </tr></table><!-- bar --></dd></dl></dd></dl>
3155 should be left alone</p>
3159 Definition Lists: Hacky use to indent tables, with comment before table
3165 <dl><dd><dl><dd><!-- foo --><table><tr>
3167 </tr></table></dd></dl></dd></dl>
3172 Definition Lists: Hacky use to indent tables (WS-insensitive)
3181 <dd> <table><tr><td>a</td></tr></table> </dd>
3184 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3185 ## as an empty dt item. It also ignores all but the last ";" when followed
3186 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3187 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3190 ## Ex: ";;t2 ::d2" is transformed into:
3202 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3203 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3214 ## All Parsoid only definition list tests have this difference.
3216 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3217 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3220 Table / list interaction: indented table with lists in table contents
3235 <ul><li> b</li></ul>
3239 <ul><li> d</li></ul>
3240 </td></tr></table></dd></dl>
3245 Table / list interaction: lists nested in tables nested in indented lists
3268 </td></tr></table></dd></dl>
3275 Definition Lists: Nesting: Multi-level (Parsoid only)
3305 Definition Lists: Nesting: Test 2 (Parsoid only)
3325 Definition Lists: Nesting: Test 3 (Parsoid only)
3353 Definition Lists: Nesting: Test 4
3358 <dl><dd><dl><dd><dl><dt>t3</dt>
3359 <dd>d3</dd></dl></dd></dl></dd></dl>
3364 ## The Parsoid team believes the following three test exposes a
3365 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3366 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3368 Definition Lists: Mixed Lists: Test 1
3374 <dl><dd><dl><dt><ul><li> foo</li>
3375 <li> bar</li></ul></dt></dl>
3376 <dl><dt> baz</dt></dl></dd></dl>
3395 Definition Lists: Mixed Lists: Test 2
3400 <ul><li><dl><dd> d1</dd>
3401 <dd> d2</dd></dl></li></ul>
3407 Definition Lists: Mixed Lists: Test 3
3412 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3413 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3419 Definition Lists: Mixed Lists: Test 4
3424 <ul><li><dl><dt>d1 </dt>
3427 <dd>d4</dd></dl></li></ul>
3433 Definition Lists: Mixed Lists: Test 5
3439 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3445 Definition Lists: Mixed Lists: Test 6
3450 <ol><li><ul><li><dl><dd>d1
3451 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3457 Definition Lists: Mixed Lists: Test 7
3462 <dl><dd><ul><li> d1</li>
3463 <li> d2</li></ul></dd></dl>
3469 Definition Lists: Mixed Lists: Test 8
3474 <dl><dd><ul><li> d1</li></ul>
3475 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3481 Definition Lists: Mixed Lists: Test 9
3485 <ul><li><dl><dt>foo </dt>
3486 <dd>bar</dd></dl></li></ul>
3492 Definition Lists: Mixed Lists: Test 10
3496 <ul><li><ol><li><dl><dt>foo </dt>
3497 <dd>bar</dd></dl></li></ol></li></ul>
3501 # The Parsoid team disagrees with the PHP parser's seemingly-random
3502 # rules regarding dd/dt on the next two tests. Parsoid is more
3503 # consistent, and recognizes the shared nesting and keeps the
3504 # still-open tags around until the nesting is complete.
3507 Definition Lists: Mixed Lists: Test 11
3512 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3513 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3514 <dl><dt>boo </dt>
3515 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3533 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3534 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3538 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3539 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3549 Definition Lists: Weird Ones: Test 1
3551 *#;*::;; foo : bar (who uses this?)
3553 <ul><li><ol><li><dl><dt> foo </dt>
3554 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
3572 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3573 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3588 External links: non-bracketed
3590 Non-bracketed: http://example.com
3592 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3596 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3598 External links: numbered
3600 Numbered: [http://example.com]
3601 Numbered: [http://example.net]
3602 Numbered: [http://example.com]
3604 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
3605 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
3606 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
3609 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
3610 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
3611 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
3615 External links: specified text
3617 Specified text: [http://example.com link]
3619 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
3624 External links: trail
3626 Linktrails should not work for external links: [http://example.com link]s
3628 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3633 External links: dollar sign in URL
3635 http://example.com/1$2345
3637 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3641 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3643 External links: dollar sign in URL (autonumber)
3645 [http://example.com/1$2345]
3647 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3650 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
3654 External links: open square bracket forbidden in URL (bug 4377)
3656 parsoid=wt2html,wt2wt,html2html
3658 http://example.com/1[2345
3660 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3663 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
3667 External links: open square bracket forbidden in URL (named) (bug 4377)
3669 parsoid=wt2html,html2html
3671 [http://example.com/1[2345]
3673 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3676 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
3679 # parsoid adds a space before the link name
3681 External links: open square bracket forbidden in URL (named) (bug 4377)
3684 [http://example.com/1 [2345]
3686 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3691 External links: nowiki in URL link text (bug 6230)
3693 [http://example.com/ <nowiki>''example site''</nowiki>]
3695 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
3700 External links: newline forbidden in text (bug 6230 regression check)
3702 [http://example.com/ first
3705 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
3711 External links: Pipe char between url and text
3713 [http://example.com | link]
3715 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
3720 External links: protocol-relative URL in brackets
3722 [//example.com/ Test]
3724 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
3728 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3730 External links: protocol-relative URL in brackets without text
3734 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
3737 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
3741 External links: protocol-relative URL in free text is left alone
3745 <p>//example.com/Foo
3750 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
3752 foo//example.com/Foo
3754 <p>foo//example.com/Foo
3759 External links: with no contents
3761 [http://en.wikipedia.org/wiki/Foo]
3763 [[wikipedia:Foo|Bar]]
3765 [[wikipedia:Foo|<span>Bar</span>]]
3767 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
3768 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo">Bar</a></p>
3769 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"><span>Bar</span></a></p>
3775 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3777 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3782 External image from https
3784 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3786 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3791 External image (when not allowed)
3793 wgAllowExternalImages=0
3795 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3797 <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>
3802 Link to non-http image, no img tag
3804 Link to non-http image, no img tag: ftp://example.com/test.jpg
3806 <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>
3811 External links: terminating separator
3813 Terminating separator: http://example.com/thing,
3815 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
3820 External links: intervening separator
3822 Intervening separator: http://example.com/1,2,3
3824 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
3829 External links: old bug with URL in query
3831 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
3833 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
3838 External links: old URL-in-URL bug, mixed protocols
3840 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
3842 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
3847 External links: URL in text
3849 URL in text: [http://example.com http://example.com]
3851 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3856 External links: Clickable images
3858 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
3860 <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>
3865 External links: raw ampersand
3867 Old & use: http://x&y
3869 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3874 External links: encoded ampersand
3876 Old & use: http://x&y
3878 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3881 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
3885 External links: encoded equals (bug 6102)
3887 http://example.com/?foo=bar
3889 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
3892 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
3896 ## Note that parsoid doesn't explicit mark autonumbered links, nor
3897 ## does it number them. As discussed in bug 53505, we can identify
3898 ## autonumbered links via CSS.
3902 External links: [raw ampersand]
3904 Old & use: [http://x&y]
3906 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3909 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
3912 # note that parsoid html is identical to [raw ampersand] case; so html2wt
3913 # mode will return the [raw ampersand] wikitext
3915 External links: [encoded ampersand]
3917 parsoid=wt2html,wt2wt,html2html
3919 Old & use: [http://x&y]
3921 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3924 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
3928 External links: [raw equals]
3930 [http://example.com/?foo=bar]
3932 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3935 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
3938 # note that parsoid html is identical to [raw equals] case; so html2wt
3939 # mode will return the [raw equals] wikitext
3941 External links: [encoded equals] (bug 6102)
3943 parsoid=wt2html,wt2wt,html2html
3945 [http://example.com/?foo=bar]
3947 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3950 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
3953 # xxx parsoid strips the IDN character, so the round-trip tests will
3954 # obviously fail and are disabled. --cscott
3956 External links: [IDN ignored character reference in hostname; strip it right off]
3958 parsoid=wt2html,wt2wt,html2html
3960 [http://e‌xample.com/]
3962 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
3965 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
3968 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
3969 # Where an external link could easily circumvent the sanitization of the text of
3970 # a link like this (where an IDN-ignore character is in the URL somewhere), this
3971 # test demands a higher standard. That's a bit strange.
3975 # http://example.com -> [http://example.com|http://example.com]
3976 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
3978 # The first example is sanitized, but the second is not. Any security benefits
3979 # from this production are trivial to circumvent. Either remove this test and
3980 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
3981 # the test accordingly.
3985 # xxx parsoid strips the IDN character, so the round-trip tests will
3986 # obviously fail and are disabled. --cscott
3988 External links: IDN ignored character reference in hostname; strip it right off
3990 parsoid=wt2html,html2html
3992 http://e‌xample.com/
3994 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
3997 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4001 External links: www.jpeg.org (bug 554)
4005 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4009 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4011 External links: URL within URL (original bug 2)
4013 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4015 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4018 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4022 BUG 361: URL inside bracketed URL
4024 [http://www.example.com/foo http://www.example.com/bar]
4026 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4031 BUG 361: URL within URL, not bracketed
4033 http://www.example.com/foo?=http://www.example.com/bar
4035 <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>
4040 BUG 289: ">"-token in URL-tail
4042 http://www.example.com/<hello>
4044 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4049 BUG 289: literal ">"-token in URL-tail
4051 http://www.example.com/<b>html</b>
4053 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4058 BUG 289: ">"-token in bracketed URL
4060 [http://www.example.com/<hello> stuff]
4062 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4067 BUG 289: literal ">"-token in bracketed URL
4069 [http://www.example.com/<b>html</b> stuff]
4071 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4076 BUG 289: literal double quote at end of URL
4078 http://www.example.com/"hello"
4080 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4085 BUG 289: literal double quote in bracketed URL
4087 [http://www.example.com/"hello" stuff]
4089 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4094 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4096 [http://www.example.com test]
4098 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4103 External links: link text with spaces
4105 [http://www.example.com a b c]
4106 [http://www.example.com ''a'' ''b'']
4108 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4109 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4114 External links: wiki links within external link (Bug 3695)
4116 [http://example.com [[wikilink]] embedded in ext link]
4118 <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>
4121 <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>
4125 BUG 787: Links with one slash after the url protocol are invalid
4129 [http:/example.com title]
4131 <p>http:/example.com
4132 </p><p>[http:/example.com title]
4137 Bracketed external links with template-generated invalid target
4139 [{{echo|http:/example.com}} title]
4141 <p>[http:/example.com title]
4146 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4148 ''[http://example.com text'']
4149 [http://example.com '''text]'''
4150 ''Something [http://example.com in italic'']
4151 ''Something [http://example.com mixed''''', even bold]'''
4152 '''''Now [http://example.com both''''']
4154 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4155 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4156 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4157 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4158 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4164 Bug 4781: %26 in URL
4166 http://www.example.com/?title=AT%26T
4168 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4171 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4174 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4175 # % is actually legal in HTML5. Any change in output would need testing though.
4177 Bug 4781, 5267: %25 in URL
4179 http://www.example.com/?title=100%25_Bran
4181 <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>
4184 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4188 Bug 4781, 5267: %28, %29 in URL
4190 http://www.example.com/?title=Ben-Hur_%281959_film%29
4192 <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>
4195 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
4200 Bug 4781: %26 in autonumber URL
4202 [http://www.example.com/?title=AT%26T]
4204 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4207 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4211 Bug 4781, 5267: %26 in autonumber URL
4213 [http://www.example.com/?title=100%25_Bran]
4215 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4218 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4222 Bug 4781, 5267: %28, %29 in autonumber URL
4224 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4226 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4229 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4234 Bug 4781: %26 in bracketed URL
4236 [http://www.example.com/?title=AT%26T link]
4238 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4241 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4245 Bug 4781, 5267: %25 in bracketed URL
4247 [http://www.example.com/?title=100%25_Bran link]
4249 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4254 Bug 4781, 5267: %28, %29 in bracketed URL
4256 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4258 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4261 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4265 External link containing a period in the anchor. (bug 63947)
4267 [//foo.org/bar#baz. bang]
4269 [//foo.org/bar. bang]
4271 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4272 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4275 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4276 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4280 External link containing a single quote. (bug 63947)
4284 [//foo.org/bar'baz bang]
4286 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4287 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4290 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4291 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4296 External link containing a period in the anchor. (bug 63947)
4298 [//foo.org/bar#baz. bang]
4300 [//foo.org/bar. bang]
4302 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4303 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4306 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4307 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4311 External link containing a single quote. (bug 63947)
4315 [//foo.org/bar'baz bang]
4317 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4318 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4321 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4322 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4327 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4329 Some [http://example.com/ pretty ''italics'' and stuff]!
4331 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4336 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4338 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4340 <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>
4345 External link containing double-single-quotes with no space separating the url from text in italics
4347 [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]].]
4349 <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>
4352 <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>
4356 External link with comments in link text
4358 [http://www.google.com Google <!-- comment -->]
4360 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4365 URL-encoding in URL functions (single parameter)
4367 {{localurl:Some page|amp=&}}
4369 <p>/index.php?title=Some_page&amp=&
4374 URL-encoding in URL functions (multiple parameters)
4376 {{localurl:Some page|q=?&=&}}
4378 <p>/index.php?title=Some_page&q=?&amp=&
4385 http://example.com/index.php?foozoid%5B%5D=bar
4387 http://example.com/index.php?foozoid[]=bar
4389 <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>
4390 </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>
4393 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
4395 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4399 IPv6 urls (bug 21261)
4403 http://[2404:130:0:1000::187:2]/index.php
4405 <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>
4410 Non-extlinks in brackets
4419 [{{echo|foo}} ''bar'']
4420 [{{echo|foo}}l's] errand
4421 [{{echo|foo}}l's errand]
4423 [url=http://example.com]
4436 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4441 Percent encoding in external links
4443 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4445 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4448 <p><a rel="mw:ExtLink"
4449 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4453 Use url link syntax for links where the content is equal the link target
4457 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4460 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4464 Parenthesis in external links, especially URL links
4468 http://example.com/test)
4470 http://example.com/(test)
4472 http://example.com/((test)
4474 (http://example.com/(test))
4476 (http://example.com/(test)))))
4478 http://example.com/a)b
4480 [http://example.com) foo]
4482 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4483 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4484 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4485 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4486 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4487 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4488 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4489 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4492 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4493 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4494 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4495 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4496 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4497 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4498 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4499 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4503 Parenthesis in external links, w/ transclusion or comment
4505 (http://example.com/{{echo|hi}})
4507 (http://example.com<!-- hi -->)
4509 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4510 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4513 <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;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[20,31,null,null]}\">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>
4515 <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>
4519 Replace invalid link targets when serializing
4523 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
4525 [[MediaWiki:Badtitletext|Manual]]
4535 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4537 Normal text. '''''Bold italic text.''''' Normal text.
4539 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4540 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4545 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4546 # parser strips. The wikitext contains just the first half of the bold
4549 Unclosed and unmatched quotes
4551 '''''Bold italic text '''with bold deactivated''' in between.'''''
4553 '''''Bold italic text ''with italic deactivated'' in between.'''''
4557 ..spanning two paragraphs (should not work).'''
4559 '''Bold tag left open
4561 ''Italic tag left open
4565 <!-- Unmatching number of opening, closing tags: -->
4566 '''This year''''s election ''should'' beat '''last year''''s.
4568 ''Tom'''s car is bigger than ''Susan'''s.
4570 Plain ''italic'''s plain
4572 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4573 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4574 </p><p><b>Bold text..</b>
4575 </p><p>..spanning two paragraphs (should not work).
4576 </p><p><b>Bold tag left open</b>
4577 </p><p><i>Italic tag left open</i>
4579 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4580 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4581 </p><p>Plain <i>italic'</i>s plain
4584 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4585 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4586 </p><p><b>Bold text..</b>
4587 </p><p>..spanning two paragraphs (should not work).<b></b>
4588 </p><p><b>Bold tag left open</b>
4589 </p><p><i>Italic tag left open</i>
4591 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4592 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4593 </p><p>Plain <i>italic'</i>s plain
4600 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
4603 # This should not produce <table></table> as <table><tr><td></td></tr></table>
4604 # is the bare minimum required by the spec, see:
4605 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
4606 # Parsoid team replies: empty table tags are legal in HTML5
4608 A table with no data.
4621 A table with stray table end tags on start tag line (wt2html)
4625 {|style="color: red;"|}
4627 {|style="color: red;" |}
4631 {|style="color: red;"|} id="foo"
4635 {|style="color: red;" |} id="foo"
4639 <table style="color: red;"></table>
4641 <table style="color: red;">
4647 <table style="color: red;" id="foo">
4653 <table style="color: red;" id="foo">
4662 A table with no data (take 2)
4670 # A table with nothing but a caption is invalid XHTML, we might want to render
4671 # this as <p>caption</p>
4672 # Parsoid team replies: table with only a caption is legal in HTML5
4674 A table with nothing but a caption
4682 </caption><tr><td></td></tr></table>
4685 <table><caption> caption</caption></table>
4689 A table with caption with default-spaced attributes and a table row
4692 |+ style="color: red;" | caption1
4698 <caption style="color: red;"> caption1
4707 A table with captions with non-default spaced attributes and a table row
4710 |+style="color: red;"|caption2
4711 |+ style="color: red;"| caption3
4717 <caption style="color: red;">caption2
4719 <caption style="color: red;"> caption3
4728 Table td-cell syntax variations
4732 | foo bar foo || baz
4733 | style='color:red;' | baz
4734 | style='color:red;' || baz
4741 <td> foo bar foo </td>
4744 <td style="color:red;"> baz
4746 <td> style='color:red;' </td>
4774 Simple table but with multiple dashes for row wikitext
4792 Multiplication table
4794 {| border="1" cellpadding="2"
4795 |+Multiplication table
4797 ! × !! 1 !! 2 !! 3
4815 <table border="1" cellpadding="2">
4816 <caption>Multiplication table
4863 Accept "||" in table headings
4878 Accept "!!" in table data
4884 <table data-parsoid='{}'>
4885 <tbody data-parsoid='{}'><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
4890 Accept "||" in indented table headings
4900 </th></tr></table></dd></dl>
4905 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
4922 Accept "| !" at start of line in tables (ignore !-attribute)
4926 | !style="color:red" | bar
4938 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 +/-
4942 |style='color:red;'|+1
4943 |style='color:blue;'|-1
4955 <td style="color:red;">+1
4957 <td style="color:blue;">-1
4981 |rowspan=2| Cell 2, row 1 (and 2)
4992 <td rowspan="2"> Cell 2, row 1 (and 2)
5010 {| bgcolor=#ABCDEF border=2
5015 |the original table again
5023 <table bgcolor="#ABCDEF" border="2">
5031 <td>the original table again
5037 Invalid attributes in table cell (bug 1830)
5051 # The "|}" to close the table is missing from the input, so parsoid's
5052 # *2wt modes will fail.
5054 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5056 parsoid=wt2html,html2html
5059 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5063 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5064 <td>]" onmouseover="alert(document.cookie)">test
5072 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5077 Indented table markup mixed with indented pre content (proposed in bug 6200)
5082 Text that should be rendered preformatted
5090 <pre>Text that should be rendered preformatted
5099 Template-generated table cell attributes and cell content
5108 <td style="color: red"> Foo
5110 <td style="color: red"> Foo
5116 Template-generated table cell attributes and cell content (2)
5119 |align=center {{table_attribs}}
5124 <td align="center" style="color: red"> Foo
5130 Template-generated table cell attributes and cell content (3)
5133 |align=center {{table_cells}}
5138 <td align="center" style="color: red"> Foo </td>
5146 Table with row followed by newlines and table heading
5164 Table with empty line following the start tag
5181 # FIXME: Preserve the attribute properly (with an empty string as value) in
5182 # the PHP parser. Parsoid implements the behavior below.
5184 Table attributes with empty value
5194 </td></tr></tbody></table>
5199 Wikitext table with a lot of comments
5222 Wikitext table with double-line table cell
5239 Table cell with a single comment
5256 Table-cell after a comment-only-empty-line
5265 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5267 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5272 # The expected HTML structure in this test is debatable. The PHP parser does
5273 # not parse this kind of table at all. The main focus for Parsoid is on
5274 # round-tripping, so this output is ok for now. TODO: revisit!
5276 Wikitext table with html-syntax row
5286 <td>foo</td></tr></tbody></table>
5290 Implicit <td> after a |-
5291 (PHP parser relies on Tidy to add the missing <td> tags)
5293 parsoid=wt2html,wt2wt
5306 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
5307 (PHP parser relies on Tidy to add the missing <td> tags)
5309 parsoid=wt2html,wt2wt
5321 <tr><td><pre>a</pre></td></tr>
5322 <tr><td> b</td></tr>
5328 Lists should be recognized in an implicit <td> context
5329 (PHP parser relies on Tidy to add the missing <td> tags)
5331 parsoid=wt2html,wt2wt
5348 Parsoid: Round-trip tables directly followed by content (bug 51219)
5350 parsoid=wt2html,wt2wt
5362 <td>foo</td></tr></tbody></table> bar
5366 <td>baz</td></tr></tbody></table><b>quux</b>
5370 Parsoid: Default to a newline after tables in new content (bug 51219)
5377 <nowiki> </nowiki>bar
5384 <tr><td>foo</td></tr></tbody></table> bar
5386 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5390 Parsoid: newline inducing block nodes don't suppress <nowiki>
5402 Parsoid: Row-syntax table headings followed by comment & table cells
5404 parsoid=wt2html,wt2wt
5408 <!-- foo --> || baz || quux
5413 <tr><th>foo </th><th>bar </th>
5415 <td>quux</td></tr></tbody></table>
5420 Parsoid: Recover better from broken table attributes
5432 <p>foo</p></td></tr>
5437 Strip unsupported table tags
5488 Plain link, capitalized
5492 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5497 Plain link, uncapitalized
5501 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
5508 [[Main Page|The Main Page]]
5510 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5515 Piped link with comment in link text
5517 [[Main Page|The Main<!--front--> Page]]
5519 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5524 Piped link with multiple pipe characters in link text
5526 [[Main Page||The|Main|Page|]]
5528 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
5531 <p><a rel="mw:WikiLink" href="Main_Page">|The|Main|Page|</a></p>
5539 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
5544 Broken link with fragment
5546 [[Zigzagzogzagzig#zug]]
5548 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
5553 Special page link with fragment
5555 [[Special:Version#anchor]]
5557 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
5562 Nonexistent special page link with fragment
5564 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
5566 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
5573 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
5575 <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>
5582 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
5584 <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>!!!
5595 Bug 43661: Piped links with identical prefixes
5597 [[prefixed article|prefixed articles with spaces]]
5599 [[prefixed article|prefixed articlesaoeu]]
5601 [[Main Page|Main Page test]]
5603 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
5604 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
5605 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
5611 Link with HTML entity in suffix / tail
5613 [[Main Page]]", [[Main Page]]a
5615 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
5620 Link with 3 brackets
5629 Link with 4 brackets
5633 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
5638 Piped link with 3 brackets
5640 [[[main page|the main page]]]
5642 <p>[[[main page|the main page]]]
5647 Piped link with extlink-like text
5650 [[Main Page|This is a [bar]]]
5652 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
5653 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
5658 Link with multiple pipes
5660 [[Main Page|The|Main|Page]]
5662 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
5666 # Note that parsoid does not munge anchor text; all non-space
5667 # characters are valid in HTML5 ids.
5669 Anchor containing a #. (bug 63430)
5671 [[Main Page#And#Link]]
5673 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
5676 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link">Main Page#And#Link</a></p>
5682 [[Talk:Parser testing]], [[Meta:Disclaimers]]
5684 <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>
5689 Link with space in namespace
5691 [[User talk:Foo bar]]
5693 <p><a href="/index.php?title=User_talk:Foo_bar&action=edit&redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
5698 MemoryAlpha:AlphaTest
5700 This is an article in the MemoryAlpha namespace
5701 (which shadows the memoryalpha interwiki link).
5705 Namespace takes precedence over interwiki link (bug 51680)
5707 [[MemoryAlpha:AlphaTest]]
5709 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5713 # The previous test doesn't work correctly in html2*, due to not recognizing the
5714 # link as an internal one. This one checks for the correct behavior.
5716 Link to namespace preferred over interwiki with correct rel attribute
5718 parsoid=html2wt,html2html
5720 [[MemoryAlpha:AlphaTest]]
5722 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5727 Piped link to namespace
5729 [[Meta:Disclaimers|The disclaimers]]
5731 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
5738 [[Usually caused by a typo (oops}]]
5740 <p>[[Usually caused by a typo (oops}]]
5747 Just a test of an article title containing a percent.
5751 Link containing % (not as a hex sequence)
5755 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
5758 <p><a rel="mw:WikiLink" href="./7%25_Solution">7% Solution</a></p>
5761 # note that the parsoid HTML is identical to the previous test output,
5762 # so the previous test ensures that the html2wt mode will generate the
5763 # "not as a hex sequence" wikitext.
5765 Link containing % as a single hex sequence interpreted to char
5767 parsoid=wt2wt,wt2html,html2html
5771 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
5774 <p><a rel="mw:WikiLink" href="./7%25_Solution">7% Solution</a></p>
5778 Link containing % as a double hex sequence interpreted to hex sequence
5782 <p>[[7%2525 Solution]]
5786 # note that parsoid does not munge anchor text; all non-space
5787 # characters are valid in HTML5 anchors.
5789 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
5790 Example for such a section: == < ==
5792 [[%23%3c]][[%23%3e]]
5794 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
5797 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E">#></a></p>
5801 Link containing "<#" and ">#" as a hex sequences
5803 [[%3c%23]][[%3e%23]]
5805 <p>[[%3c%23]][[%3e%23]]
5810 Link containing an equals sign
5812 [[Special:BookSources/isbn=4-00-026157-6]]
5814 <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>
5817 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
5823 Just a test of an article title containing a tilde.
5826 # note that links containing signatures, like [[Foo~~~~]], are
5827 # massaged by the pre-save transform (PST) and so the tildes are never
5828 # seen by the parser.
5830 Link containing a tilde
5834 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
5837 <p><a rel="mw:WikiLink" href="./Foo~bar">Foo~bar</a></p>
5841 Link containing double-single-quotes '' (bug 4598)
5843 [[Lista d''e paise d''o munno]]
5845 <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>
5848 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno">Lista d''e paise d''o munno</a></p>
5852 Link containing double-single-quotes '' in text (bug 4598 sanity check)
5854 Some [[Link|pretty ''italics'' and stuff]]!
5856 <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>!
5859 <p>Some <a rel="mw:WikiLink" href="Link">pretty <i>italics</i> and stuff</a>!</p>
5863 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
5865 ''Some [[Link|pretty ''italics'' and stuff]]!''
5867 <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>
5872 Link with double quotes in title part (literal) and alternate part (interpreted)
5874 [[File:Denys Savchenko ''Pentecoste''.jpg]]
5878 [[''Pentecoste''|Pentecoste]]
5880 [[''Pentecoste''|''Pentecoste'']]
5882 <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>
5883 </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>
5884 </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>
5885 </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>
5888 <meta typeof="mw:Placeholder"/>
5889 <p><a rel="mw:WikiLink" href="''Pentecoste''">''Pentecoste''</a></p>
5890 <p><a rel="mw:WikiLink" href="''Pentecoste''">Pentecoste</a></p>
5891 <p><a rel="mw:WikiLink" href="''Pentecoste''"><i>Pentecoste</i></a></p>
5895 Broken image links with HTML captions (bug 39700)
5897 [[File:Nonexistent|<script></script>]]
5898 [[File:Nonexistent|100px|<script></script>]]
5899 [[File:Nonexistent|<]]
5900 [[File:Nonexistent|a<i>b</i>c]]
5902 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5903 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5904 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
5905 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
5912 [[http://www.example.com]]
5914 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
5917 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
5921 Plain link to URL with link text
5923 [[http://www.example.com Link text]]
5925 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
5930 Plain link to protocol-relative URL
5932 [[//www.example.com]]
5934 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
5937 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
5941 Plain link to protocol-relative URL with link text
5943 [[//www.example.com Link text]]
5945 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
5950 Plain link to page with question mark in title
5956 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
5957 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
5962 # I'm fairly sure the expected result here is wrong.
5963 # We want these to be URL links, not pseudo-pages with URLs for titles....
5964 # However the current output is also pretty screwy.
5967 # I'm changing it to match the current output--it arguably makes more
5968 # sense in the light of the test above. Old expected result was:
5969 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
5971 # But I think this test is bordering on "garbage in, garbage out" anyway.
5976 Piped link to URL: [[http://www.example.com|an example URL]]
5978 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
5981 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
5985 BUG 2: [[page|http://url/]] should link to page, not http://url/
5987 [[Main Page|http://url/]]
5989 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
5992 <p><a rel="mw:WikiLink" href="./Main_Page">http://url/</a></p>
5995 # Parsoid does not mark self-links, by design.
5997 BUG 337: Escaped self-links should be bold
6001 [[Bug462]] [[Bug462]]
6003 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6006 <p><a rel="mw:WikiLink" href="./Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462">Bug462</a></p>
6010 Self-link to section should not be bold
6014 [[Main Page#section]]
6016 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6027 Self-link to numeric title
6033 <p><strong class="selflink">0</strong>
6038 Link to numeric-equivalent title
6044 <p><a href="/wiki/00" title="00">00</a>
6049 <nowiki> inside a link
6051 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6053 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6058 Non-breaking spaces in title
6060 [[ Main Page ]]
6062 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6067 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6073 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6078 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6084 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6089 Internal link with en linktrail: no apostrophes (bug 27473)
6095 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6100 Internal link with ca linktrail with apostrophes (bug 27473)
6106 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6111 Internal link with kaa linktrail with apostrophes (bug 27473)
6117 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6122 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6124 [[User:Foo/Test/63636:Bar|Test]]
6126 <p><a href="/index.php?title=User:Foo/Test/63636:Bar&action=edit&redlink=1" class="new" title="User:Foo/Test/63636:Bar (page does not exist)">Test</a>
6129 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar">Test</a></p>
6133 1. Interaction of linktrail and template encapsulation
6139 <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>
6143 2. Interaction of linktrail and template encapsulation
6147 {{echo|Some [[Fool]]}}s
6149 <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>
6153 3. Interaction of linktrail and template encapsulation
6157 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6159 <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>
6169 Internal link with is link prefix
6173 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6175 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6186 Internal link with is link trail and link prefix
6190 [[mótmælendatrú|xxx]]ar
6192 mótmælenda[[söfnuður]]
6193 mótmælenda[[söfnuður|söfnuðir]]
6194 mótmælenda[[söfnuður|söfnuðir]]xxx
6196 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6197 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6198 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6199 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6200 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6205 Parsoid link trail escaping
6207 parsoid=html2wt,html2html
6211 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
6215 Parsoid link prefix escaping
6218 parsoid=html2wt,html2html
6220 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6222 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
6226 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6234 [http://wp.org ''foo'']
6236 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
6237 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
6238 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6239 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6244 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6248 [[Foo|{{echo|a}} b {{echo|c}}]]
6250 <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>
6254 Link with angle bracket after anchor
6258 <p><a rel="mw:WikiLink" href="./Foo#%3Cbar%3E" data-parsoid='{"stx":"simple","a":{"href":"./Foo#%3Cbar%3E"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
6262 ### Interwiki links (see maintenance/interwiki.sql)
6266 Inline interwiki link
6268 [[MeatBall:SoftSecurity]]
6270 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6275 Inline interwiki link with empty title (bug 2372)
6279 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6284 Interwiki link encoding conversion (bug 1636)
6286 *[[Wikipedia:ro:Olteniţa]]
6287 *[[Wikipedia:ro:Olteniţa]]
6289 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
6290 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
6295 Interwiki link with fragment (bug 2130)
6297 [[MeatBall:SoftSecurity#foo]]
6299 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6303 # Ideally the wikipedia: prefix here should be proto-relative too
6305 Different interwiki prefixes mapping to the same URL
6313 [[:wikipedia:Foo|Foo]]
6315 [[wikipedia:en:Foo]]
6317 [[:wikipedia:en:Foo]]
6319 <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>
6321 <p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'>Foo</a></p>
6323 <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>
6325 <p><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}'>Foo</a></p>
6327 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}'>wikipedia:en:Foo</a></p>
6329 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}'>wikipedia:en:Foo</a></p>
6333 Interwiki links that cannot be represented in wiki syntax
6336 [[meatball:ok#foo|ok with fragment]]
6337 [[meatball:ok_as_well?|ok ending with ? mark]]
6338 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6339 [http://de.wikipedia.org/wiki/#foo is just fragment]
6342 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok">meatball:ok</a>
6343 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo">ok with fragment</a>
6344 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?">ok ending with ? mark</a>
6345 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6346 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6350 Interwiki links: trail
6354 [[wikipedia:Foo|Ba]]r
6356 <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>
6360 ### Interlanguage links
6361 ### Language links (so that searching for '### language' matches..)
6375 Double interlanguage link
6386 Interlanguage link, with prefix links
6398 Double interlanguage link, with prefix links (bug 8897)
6411 Parsoid-specific test: Wikilinks with should RT properly
6417 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
6422 Parsoid bug 53221: Wikilinks should be properly entity-escaped
6426 He&nbsp;llo [[Foo|He&nbsp;llo]]
6428 He&nbsp;llo [[He&nbsp;llo]]
6430 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6431 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6435 Parsoid: handle constructor well
6443 <p><a rel="mw:WikiLink" href="./Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
6445 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
6449 Parsoid: recognize interlanguage links without a target page
6455 <p><link rel="mw:PageProp/Language" href="http://ko.wikipedia.org/wiki/"></p>
6459 Parsoid: recognize interwiki links without a target page
6465 <p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/">ko:</a></p>
6469 Parsoid: Bug #45209, handle interwiki links pointing to the current wiki as plain wiki links
6475 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"en:Foo"}}'>Foo</a></p>
6479 ### Redirects, Parsoid-only
6482 1. Simple redirect to page
6486 #REDIRECT [[Main Page]]
6488 <link rel="mw:PageProp/redirect" href="./Main_Page">
6491 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
6493 2. Other redirect variants
6495 parsoid=wt2html,wt2wt
6497 #REDIRECT [[Main_Page]]
6498 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
6500 <link rel="mw:PageProp/redirect" href="./Main_Page">
6501 <link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
6507 parsoid=wt2html,wt2wt
6512 <li>REDIRECT [[]]</li></ol>
6516 Optional colon in #REDIRECT
6518 # the colon is archaic syntax. we support it for wt2html, but we
6519 # don't care that it roundtrips back to the modern syntax.
6520 parsoid=wt2html,html2html
6522 #REDIRECT:[[Main Page]]
6524 <link rel="mw:PageProp/redirect" href="./Main_Page">
6528 Whitespace in #REDIRECT with optional colon
6530 # the colon and gratuitous whitespace is archaic syntax. we support
6531 # it for wt2html, but we don't care that it roundtrips back to the
6532 # modern syntax (without extra whitespace)
6533 parsoid=wt2html,html2html
6540 <link rel="mw:PageProp/redirect" href="./Main_Page">
6544 Piped link in #REDIRECT
6546 # content after piped link is ignored. we support this syntax,
6547 # but don't care that the piped link is lost when we roundtrip this.
6550 #REDIRECT [[Main Page|bar]]
6552 <link rel="mw:PageProp/redirect" href="./Main_Page">
6556 Redirect to category
6560 #REDIRECT [[Category:Foo]]
6562 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6566 Redirect to category with URL encoding
6570 #REDIRECT [[Category%3AFoo]]
6572 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6576 Redirect to category page
6578 parsoid=wt2html,html2html
6580 #REDIRECT [[:Category:Foo]]
6582 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
6586 Redirect to image page (1)
6590 #REDIRECT [[File:Wiki.png]]
6592 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6596 Redirect to image page (2)
6600 #REDIRECT [[Image:Wiki.png]]
6602 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6606 Redirect to language
6610 #REDIRECT [[en:File:Wiki.png]]
6612 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6616 Redirect to interwiki
6620 #REDIRECT [[meatball:File:Wiki.png]]
6622 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6626 Non-English #REDIRECT
6631 #TILVÍSUN [[Main Page]]
6633 <link rel="mw:PageProp/redirect" href="./Main_Page">
6644 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
6661 Broken br tag sanitization
6669 # TODO: Fix html2html mode (bug 51055)!
6671 Parsoid: Broken br tag recognition
6684 Incorrecly removing closing slashes from correctly formed XHTML
6686 <br style="clear:both;" />
6688 <p><br style="clear:both;" />
6693 Failing to transform badly formed HTML into correct XHTML
6695 <br style="clear: left;">
6696 <br style="clear: right;">
6697 <br style="clear: both;">
6699 <p><br style="clear: left;" />
6700 <br style="clear: right;" />
6701 <br style="clear: both;" />
6706 Handling html with a div self-closing tag
6715 <p><div title />
6719 <p><div title=bar />
6720 <div title=bar/>
6722 <div title="bar/"></div>
6728 Handling html with a br self-closing tag
6737 <p><br title="title" />
6738 <br title="title" />
6747 Horizontal ruler (should it add that extra space?)
6761 Horizontal ruler -- 4+ dashes render hr
6770 Horizontal ruler -- eats additional dashes on the same line
6779 Horizontal ruler -- does not collapse dashes on consecutive lines
6790 Horizontal ruler -- <4 dashes render as plain text
6799 Horizontal ruler -- Supports content following dashes on same line
6808 ### Block-level elements
6817 <ul><li>Common list</li>
6819 <li>item 3</li></ul>
6830 <ol><li>Numbered list</li>
6832 <li> item 3</li></ol>
6846 ***#Number on level 4
6848 **#Number on level 3
6849 **#Number on level 3
6853 #** Level 3, but ordered
6856 <ol><li> with numbers</li></ol>
6857 <ul><li> and bullets</li></ul>
6858 <ol><li> and numbers</li></ol></li>
6860 <ul><li>bullet level 2
6861 <ul><li>bullet level 3
6862 <ol><li>Number on level 4</li></ol></li></ul></li>
6864 <ol><li>Number on level 3</li>
6865 <li>Number on level 3</li></ol></li></ul>
6866 <ol><li>number level 2</li></ol></li>
6868 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
6869 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
6880 <ul><li>bar</li></ul></li></ul>
6890 <ul><li><ul><li>foo</li></ul></li>
6896 Nested lists 3 (first element empty)
6902 <ul><li>bar</li></ul></li></ul>
6907 Nested lists 4 (first element empty)
6912 <ul><li><ul><li></li></ul></li>
6918 Nested lists 5 (both elements empty)
6923 <ul><li><ul><li></li></ul></li>
6929 Nested lists 6 (both elements empty)
6935 <ul><li></li></ul></li></ul>
6940 Nested lists 7 (skip initial nesting levels)
6944 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
6949 Nested lists 8 (multiple nesting transitions)
6957 <ul><li><ul><li> bar</li></ul></li>
6958 <li> baz</li></ul></li>
6964 1. Lists with start-of-line-transparent tokens before bullets: Comments
6977 2. Lists with start-of-line-transparent tokens before bullets: Template close
6982 <ul><li>foo bar</li>
6988 List items are not parsed correctly following a <pre> block (bug 785)
6994 <ul><li> <pre>foo</pre></li>
6995 <li> <pre>bar</pre></li>
7001 List items from template
7012 * notSOL{{inner list}}
7015 <ul><li> item 1</li>
7016 <li> item 2</li></ul>
7017 <ul><li> item 0</li>
7019 <li> item 2</li></ul>
7020 <ul><li> item 0</li>
7023 <li> item 2</li></ul>
7028 List interrupted by empty line or heading
7036 <ul><li> foo</li></ul>
7037 <ul><li><ul><li> bar</li></ul></li></ul>
7038 <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>
7039 <ul><li> Another list item</li></ul>
7044 Multiple list tags generated by templates
7059 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7062 <!--This line will NOT split the list-->
7064 <!--This line will NOT split the list either-->
7066 <!--foo--> <!----> <!--This line NOT split the list either-->
7077 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7080 <!--This line will NOT split the list-->
7082 <!--This line will NOT split the list either-->
7084 <!--foo--> <!----> <!--This line NOT split the list
7097 (Cannot test this with PHP parser since it relies on Tidy for the hack)
7099 parsoid=wt2html,wt2wt
7103 * {{echo|<li>templated li-hack}}
7104 * <!--foo--> <li> unsupported li-hack with preceding comments
7107 <li><li>not a li-hack
7114 <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>
7115 <li> <!--foo--> </li>
7116 <li> li-hack with preceding comments</li>
7127 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7154 Parsoid: Test of whitespace serialization with Templated bullets
7161 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7165 # ------------------------------------------------------------------------
7166 # The next set of tests are about Parsoid's ability to handle badly nested
7167 # tags (parse, minimize scope of fixup, and roundtrip back)
7168 # ------------------------------------------------------------------------
7171 Unbalanced closing block tags break a list
7172 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7190 Unbalanced closing non-block tags don't break a list
7191 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7208 Unclosed formatting tags that straddle lists are closed and reopened
7209 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7223 List embedded in a non-block tag
7224 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
7230 <p><small></small></p>
7236 <p><small></small></p>
7240 Table with missing opening <tr> tag
7242 parsoid=wt2html,wt2wt
7260 # Note that the current date is hard-coded as
7261 # 1970-01-01T00:02:03Z (a Thursday)
7262 # when running parser tests. The timezone is also fixed to GMT, so
7263 # local date will be identical to current date.
7266 Magic Word: {{CURRENTDAY}}
7275 Magic Word: {{CURRENTDAY2}}
7284 Magic Word: {{CURRENTDAYNAME}}
7293 Magic Word: {{CURRENTDOW}}
7302 Magic Word: {{CURRENTMONTH}}
7311 Magic Word: {{CURRENTMONTH1}}
7320 Magic Word: {{CURRENTMONTHABBREV}}
7322 {{CURRENTMONTHABBREV}}
7329 Magic Word: {{CURRENTMONTHNAME}}
7331 {{CURRENTMONTHNAME}}
7338 Magic Word: {{CURRENTMONTHNAMEGEN}}
7340 {{CURRENTMONTHNAMEGEN}}
7347 Magic Word: {{CURRENTTIME}}
7356 Magic Word: {{CURRENTHOUR}}
7365 Magic Word: {{CURRENTWEEK}} (@bug 4594)
7374 Magic Word: {{CURRENTYEAR}}
7383 Magic Word: {{CURRENTTIMESTAMP}}
7385 {{CURRENTTIMESTAMP}}
7392 Magic Words LOCAL (UTC)
7396 * {{LOCALMONTHNAME}}
7397 * {{LOCALMONTHNAMEGEN}}
7398 * {{LOCALMONTHABBREV}}
7407 * {{LOCALTIMESTAMP}}
7422 <li> 19700101000203</li></ul>
7427 Magic Word: {{FULLPAGENAME}}
7429 title=[[User:Ævar Arnfjörð Bjarmason]]
7433 <p>User:Ævar Arnfjörð Bjarmason
7438 Magic Word: {{FULLPAGENAMEE}}
7440 title=[[User:Ævar Arnfjörð Bjarmason]]
7444 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7449 Magic Word: {{TALKSPACE}}
7451 title=[[User:Ævar Arnfjörð Bjarmason]]
7460 Magic Word: {{TALKSPACE}}, same namespace
7462 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7471 Magic Word: {{TALKSPACE}}, main namespace
7473 title=[[Parser Test]]
7482 Magic Word: {{TALKSPACEE}}
7484 title=[[User:Ævar Arnfjörð Bjarmason]]
7493 Magic Word: {{SUBJECTSPACE}}
7495 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7504 Magic Word: {{SUBJECTSPACE}}, same namespace
7506 title=[[User:Ævar Arnfjörð Bjarmason]]
7515 Magic Word: {{SUBJECTSPACE}}, main namespace
7517 title=[[Parser Test]]
7525 Magic Word: {{SUBJECTSPACEE}}
7527 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7536 Magic Word: {{NAMESPACE}}
7538 title=[[User:Ævar Arnfjörð Bjarmason]]
7547 Magic Word: {{NAMESPACEE}}
7549 title=[[User:Ævar Arnfjörð Bjarmason]]
7558 Magic Word: {{NAMESPACENUMBER}}
7560 title=[[User:Ævar Arnfjörð Bjarmason]]
7569 Magic Word: {{SUBPAGENAME}}
7571 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7580 Magic Word: {{SUBPAGENAMEE}}
7582 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7591 Magic Word: {{ROOTPAGENAME}}
7593 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7597 <p>Ævar Arnfjörð Bjarmason
7602 Magic Word: {{ROOTPAGENAMEE}}
7604 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7608 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7613 Magic Word: {{BASEPAGENAME}}
7615 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7619 <p>Ævar Arnfjörð Bjarmason
7624 Magic Word: {{BASEPAGENAMEE}}
7626 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7630 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7635 Magic Word: {{TALKPAGENAME}}
7637 title=[[User:Ævar Arnfjörð Bjarmason]]
7641 <p>User talk:Ævar Arnfjörð Bjarmason
7646 Magic Word: {{TALKPAGENAMEE}}
7648 title=[[User:Ævar Arnfjörð Bjarmason]]
7652 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7657 Magic Word: {{SUBJECTPAGENAME}}
7659 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7663 <p>User:Ævar Arnfjörð Bjarmason
7668 Magic Word: {{SUBJECTPAGENAMEE}}
7670 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7672 {{SUBJECTPAGENAMEE}}
7674 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7679 Magic Word: {{NUMBEROFFILES}}
7688 Magic Word: {{PAGENAME}}
7690 title=[[User:Ævar Arnfjörð Bjarmason]]
7694 <p>Ævar Arnfjörð Bjarmason
7699 Magic Word: {{PAGENAME}} with metacharacters
7701 title=[['foo & bar = baz']]
7705 <p><i>'foo & bar = baz'</i>
7710 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
7712 title=[[*RFC 1234 http://example.com/]]
7716 <p>*RFC 1234 http://example.com/
7721 Magic Word: {{PAGENAMEE}}
7723 title=[[User:Ævar Arnfjörð Bjarmason]]
7727 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7732 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
7734 title=[[*RFC 1234 http://example.com/]]
7738 <p>*RFC_1234_http://example.com/
7743 Magic Word: {{REVISIONID}}
7752 Magic Word: {{SCRIPTPATH}}
7761 Magic Word: {{STYLEPATH}}
7770 Magic Word: {{SERVER}}
7774 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7779 Magic Word: {{SERVERNAME}}
7788 Magic Word: {{SITENAME}}
7797 Case-sensitive magic words, when cased differently, should just be template transclusions
7804 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
7805 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
7806 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
7807 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
7812 Case-insensitive magic words should still work with weird casing.
7822 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7827 Namespace 1 {{ns:1}}
7836 Namespace 1 {{ns:01}}
7845 Namespace 0 {{ns:0}} (bug 4783)
7853 Namespace 0 {{ns:00}} (bug 4783)
7861 Namespace -1 {{ns:-1}}
7870 Namespace User {{ns:User}}
7879 Namespace User talk {{ns:User_talk}}
7888 Namespace User talk {{ns:uSeR tAlK}}
7897 Namespace File {{ns:File}}
7906 Namespace File {{ns:Image}}
7915 Namespace (lang=de) Benutzer {{ns:User}}
7926 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
7932 <p>Benutzer Diskussion
7940 {{urlencode:hi world?!}}
7941 {{urlencode:hi world?!|WIKI}}
7942 {{urlencode:hi world?!|PATH}}
7943 {{urlencode:hi world?!|QUERY}}
7953 Magic Word: prioritize type info over data-parsoid
7959 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
7963 Magic Word: serialize on separate line (parsoid)
7965 parsoid=wt2wt,html2wt
7971 foo<meta property="mw:PageProp/notoc"/>bar
7975 Magic Word: rt non-english wikis
7982 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
7989 Magic links: internal link to RFC (bug 479)
7993 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
7998 Magic links: RFC (bug 479)
8002 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8007 Magic links: ISBN (bug 1937)
8011 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8016 Magic links: PMID incorrectly converts space to underscore
8020 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8029 Nonexistent template
8031 {{thistemplatedoesnotexist}}
8033 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8038 Template with invalid target containing tags
8040 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8042 <p>{{a<b>b</b>|foo|a=b|a = b}}
8047 Template with invalid target containing unclosed tag
8049 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8051 <p>{{a<b>|foo|a=b|a = b}}</b>
8056 Template with invalid target containing wikilink
8060 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8063 <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>
8069 This is a test template
8077 <p>This is a test template
8082 Template with explicit namespace
8086 <p>This is a test template
8094 This is a test template with parameter {{{param}}}
8100 {{paramtest|param=foo}}
8102 <p>This is a test template with parameter foo
8107 Template:paramtestnum
8113 Template unnamed parameter
8115 {{paramtestnum|Main Page|the main page}}
8117 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8122 Template:templatesimple
8128 Template:templateredirect
8130 #redirect [[Template:templatesimple]]
8134 Template:templateasargtestnum
8140 Template:templateasargtest
8142 {{template{{{templ}}}}}
8146 Template:templateasargtest2
8152 Template with template name as unnamed argument
8154 {{templateasargtestnum|templatesimple}}
8161 Template with template name as argument
8163 {{templateasargtest|templ=simple}}
8170 Template with template name as argument (2)
8172 {{templateasargtest2|templ=templatesimple}}
8179 Template:templateasargtestdefault
8181 {{{{{templ|templatesimple}}}}}
8191 Template with default value
8193 {{templateasargtestdefault}}
8200 Template with default value (value set)
8202 {{templateasargtestdefault|templ=templa}}
8211 {{templateredirect}}
8218 Template with argument in separate line
8220 {{ templateasargtest |
8228 Template with complex template as argument
8231 param ={{ templateasargtest |
8234 <p>This is a test template with parameter (test)
8239 Template with thumb image (with link in description)
8242 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
8244 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>
8249 Template:complextemplate
8251 {{{1}}} {{paramtest|
8252 param ={{{param}}}}}
8256 Template with complex arguments
8259 param ={{ templateasargtest |
8260 templ = simple }}|[[Template:complextemplate|link]]}}
8262 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
8267 BUG 553: link with two variables in a piped link
8270 |[[{{{1}}}|{{{2}}}]]
8275 <td>[[{{{1}}}|{{{2}}}]]
8281 Magic variable as template parameter
8283 {{paramtest|param={{SITENAME}}}}
8285 <p>This is a test template with parameter MediaWiki
8292 [[{{{param}}}|link]]
8296 Template parameter as link source
8298 {{linktest|param=Main Page}}
8300 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
8305 Template-generated attribute string (k='v')
8307 <span {{attr_str|id|v1}}>bar</span>
8309 <p><span id="v1">bar</span>
8316 including another template, {{paramtest|param={{{arg}}}}}
8320 Template passing argument to another template
8322 {{paramtest2|arg='hmm'}}
8324 <p>including another template, This is a test template with parameter 'hmm'
8335 Template as link source
8339 [[{{linktest2}}|Main Page]]
8341 [[{{linktest2}}]]Page
8343 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8344 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8345 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
8363 Template infinite loop
8367 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
8372 Template from main namespace
8391 BUG 529: Template with table, not included at beginning of line
8410 BUG 523: Template shouldn't eat newline (or add an extra one before table)
8430 BUG 41: Template parameters shown as broken links
8439 Template with targets containing wikilinks
8443 {{[[{{echo|foo}}]]}}
8445 {{{{echo|[[foo}}]]}}
8447 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8448 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8456 ''None'' of '''this''' should be
8458 but rather passed unmodified
8465 # hmm, fix this or just deprecate msgnw and document its behavior?
8469 {{msgnw:MSGNW test}}
8471 <p>''None'' of '''this''' should be
8473  but rather passed unmodified
8474 {{test}}
8484 {{int:youhavenewmessages|lots of money|not!}}
8486 <p>You have lots of money (not!).
8493 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8497 <includeonly> and <noinclude> being included
8508 <onlyinclude>Foo</onlyinclude>bar
8512 <onlyinclude> being included
8524 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
8528 <onlyinclude> and <includeonly> being included
8537 <includeonly> and <noinclude> on a page
8539 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8546 Un-closed <noinclude>
8553 <onlyinclude> on a page
8555 <onlyinclude>Foo</onlyinclude>bar
8562 Un-closed <onlyinclude>
8569 Self-closed noinclude, includeonly, onlyinclude tags
8580 Unbalanced includeonly and noinclude tags
8584 |b</noinclude></noinclude>
8585 |c</noinclude></includeonly>
8586 |d</includeonly></includeonly>
8595 <td>c</includeonly>
8597 <td>d</includeonly></includeonly>
8603 Template:Includeonly section
8606 ==Includeonly section==
8612 Bug 6563: Edit link generation for section shown by <includeonly>
8614 {{includeonly section}}
8616 <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>
8617 <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>
8621 # Uses same input as the contents of [[Template:Includeonly section]]
8623 Bug 6563: Section extraction for section shown by <includeonly>
8628 ==Includeonly section==
8636 Bug 6563: Edit link generation for section suppressed by <includeonly>
8639 ==Includeonly section==
8643 <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>
8648 Bug 6563: Section extraction for section suppressed by <includeonly>
8653 ==Includeonly section==
8661 Un-closed <includeonly>
8667 # TODO: test with DOM fragment reuse!
8669 Parsoid: DOM fragment reuse
8671 parsoid=wt2wt,wt2html
8673 a{{echo|b<table></table>c}}d
8685 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
8686 <table></table>c"}},"i":0}}]}'>b</span>
8687 <table about="#mwt1"></table><span about="#mwt1">c</span>d
8690 <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">
8692 <table about="#mwt2"></table><span about="#mwt2">
8694 <p about="#mwt2">cd</p>
8697 <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">
8700 <table about="#mwt3"></table><span about="#mwt3">
8703 <p about="#mwt3">b</p>
8707 Parsoid: Merge double tds (bug 50603)
8716 <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>
8721 Parsoid: Merge double tds in nested transclusion content (bug 50603)
8731 <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}}]}'>
8733 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
8739 ### <includeonly> and <noinclude> in attributes
8742 0. includeonly around the entire attribute
8744 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
8746 <p><span id="v2">bar</span>
8751 1. includeonly in html attr key
8753 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
8755 <p><span id="foo">bar</span>
8760 2. includeonly in html attr value
8762 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
8763 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
8765 <p><span id="v1">bar</span>
8766 <span id="v1">bar</span>
8771 3. includeonly in part of an attr value
8773 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
8775 <p><span style="color:red;">bar</span>
8780 4. includeonly in table attributes
8804 ### Token Stream Patcher tests
8806 ### These tests won't always pass wt2wt and other modes because
8807 ### on serialization, the table will be output on a new line.
8808 ### For now, we are blacklisting them, and using this to test selser.
8812 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
8814 parsoid=wt2html,wt2wt
8816 {{echo|}}{| width = '100%'
8820 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
8821 <table width="100%">
8824 <td>foo</td></tr></tbody></table>
8828 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
8830 parsoid=wt2html,wt2wt
8832 <includeonly>a</includeonly>{| {{{b}}}
8836 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":"</includeonly>"}'/><span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>{{{b}}}</span><table about="#mwt1" typeof="mw:Param" data-parsoid='{"a":{" ":null},"sa":{" ":""},"src":"{| {{{b}}}\n|c\n|}"}'>
8837 <tbody><tr><td>c</td></tr>
8842 ### Testing parsing of templates where a template arg
8843 ### has the same name as the template itself.
8853 Templates: Template Name/Arg clash: 1. Use of positional param
8862 Templates: Template Name/Arg clash: 2. Use of named param
8871 Templates: Template Name/Arg clash: 3. Use of named param with empty input
8880 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
8884 Templates: 1. Simple use
8893 Templates: 2. Inside a block tag
8895 <div>{{echo|Foo}}</div>
8896 <blockquote>{{echo|Foo}}</blockquote>
8899 <blockquote>Foo</blockquote>
8904 Templates: P-wrapping: 1a. Templates on consecutive lines
8915 Templates: P-wrapping: 1b. Templates on consecutive lines
8929 Templates: P-wrapping: 1c. Templates on consecutive lines
8932 {{echo|bar}} <div>baz</div>
8941 Templates: P-wrapping: 1d. Template preceded by comment-only line
8950 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
8954 Templates: Inline Text: 1. Multiple template uses
8956 {{echo|Foo}}bar{{echo|baz}}
8963 Templates: Inline Text: 2. Back-to-back template uses
8965 {{echo|Foo}}{{echo|bar}}
8972 Templates: Block Tags: 1. Multiple template uses
8974 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
8976 <div>Foo</div><div>bar</div><div>baz</div>
8981 Templates: Block Tags: 2. Back-to-back template uses
8983 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
8985 <div>Foo</div><div>bar</div>
8990 Templates: Links: 1. Simple example
8992 {{echo|[[Foo|bar]]}}
8994 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8999 Templates: Links: 2. Generation of link href
9001 [[{{echo|Foo}}|bar]]
9003 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9008 Templates: Links: 3. Generation of part of a link href
9010 [[Fo{{echo|o}}|bar]]
9014 [[Foo{{echo|bar}}baz]]
9016 [[Foo{{echo|bar}}|bar]]
9018 [[:Foo{{echo|bar}}]]
9020 [[:Foo{{echo|bar}}|bar]]
9022 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9023 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9024 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9025 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9026 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9027 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9032 Templates: Links: 4. Multiple templates generating link href
9034 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9036 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9041 Templates: Links: 5. Generation of link text
9043 [[Foo|{{echo|bar}}]]
9045 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9050 Templates: Links: 5. Nested templates (only outermost template should be marked)
9052 {{echo|[[{{echo|Foo}}|bar]]}}
9054 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9059 Templates: HTML Tag: 1. Generation of HTML attr. key
9061 <div {{echo|style}}="color:red;">foo</div>
9063 <div style="color:red;">foo</div>
9068 Templates: HTML Tag: 2. Generation of HTML attr. value
9070 <div style={{echo|'color:red;'}}>foo</div>
9072 <div style="color:red;">foo</div>
9077 Templates: HTML Tag: 3. Generation of HTML attr key and value
9079 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9081 <div style="color:red;">foo</div>
9086 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9088 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9090 <div title="This is a long title with just one piece templated">foo</div>
9095 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9097 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9099 <div title="This is a long title with just one piece templated">foo</div>
9104 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9106 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9108 <div title="This is a long title with just one piece templated">foo</div>
9113 Templates: HTML Tag: 7. Generation of partial attribute key string
9115 <div st{{echo|yle}}="color:red;">foo</div>
9117 <div style="color:red;">foo</div>
9122 Templates: HTML Tables: 1. Generating start of a HTML table
9124 {{echo|<table><tr><td>foo</td>}}</tr></table>
9126 <table><tr><td>foo</td></tr></table>
9131 Templates: HTML Tables: 2a. Generating middle of a HTML table
9133 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9135 <table><tr><td>foo</td></tr></table>
9140 Templates: HTML Tables: 2b. Generating middle of a HTML table
9142 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9144 <table><tr><td>foo</td></tr></table>
9149 Templates: HTML Tables: 3. Generating end of a HTML table
9151 <table><tr>{{echo|<td>foo</td></tr></table>}}
9153 <table><tr><td>foo</td></tr></table>
9158 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9160 {{echo|<table>}}<tr><td>foo</td></tr></table>
9162 <table><tr><td>foo</td></tr></table>
9167 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9169 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9171 <table><tr><td>foo</td></tr></table>
9176 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9178 <table><tr>{{echo|<td>}}foo</td></tr></table>
9180 <table><tr><td>foo</td></tr></table>
9185 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9187 <table><tr><td>foo{{echo|</td>}}</tr></table>
9189 <table><tr><td>foo</td></tr></table>
9194 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9196 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9198 <table><tr><td>foo</td></tr></table>
9203 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
9205 <table><tr><td>foo</td></tr>{{echo|</table>}}
9207 <table><tr><td>foo</td></tr></table>
9212 Templates: HTML Tables: 5. Proper fostering of categories from inside
9214 parsoid=wt2html,wt2wt
9216 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
9217 <!--Two categories (Bug 50330)-->
9218 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
9220 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
9221 <!--Two categories (Bug 50330)-->
9222 <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>
9226 Templates: Wiki Tables: 1a. Fostering of entire template content
9234 <tr><td></td></tr></table>
9239 Templates: Wiki Tables: 1b. Fostering of entire template content
9252 <tr><td></td></tr></table>
9257 Templates: Wiki Tables: 2. Fostering of partial template content
9267 <tr><td></td></tr></table>
9272 Templates: Wiki Tables: 3. td-content via multiple templates
9275 {{echo|{{pipe}}a}}{{echo|b}}
9286 Templates: Wiki Tables: 4. Templated tags, no content
9292 <tr><td></td></tr></table>
9297 Templates: Wiki Tables: 5. Templated tags, regular td-tags
9311 Templates: Wiki Tables: 6. Templated tags, templated td-tags
9325 Templates: Lists: Multi-line list-items via templates
9327 *{{echo|a {{nonexistent|
9329 *{{echo|b {{nonexistent|
9332 <ul><li>a <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li>
9333 <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></li></ul>
9338 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
9340 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
9342 <p><i>ab</i>c<i>d</i>e
9347 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
9348 (PHP parser generates misnested html)
9350 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
9352 <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>
9356 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
9357 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
9359 parsoid=wt2html,wt2wt
9361 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
9363 <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>
9364 <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>
9365 <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>
9369 Templates: Ugly nesting: 4. Divs opened/closed across templates
9371 a<div>b{{echo|c</div>d}}e
9378 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
9384 |{{echo|foo</table>}}
9388 <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|}"]}'>
9392 <td>foo</td></tr></tbody></table><span about="#mwt1">
9393 </span><span about="#mwt1">|bar</span><span about="#mwt1">
9398 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
9408 <td>1. {{echo|foo </table>}}</td>
9410 <td>2. {{echo|baz </table>}}</td>
9423 <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>"]}'>
9428 <td>1. foo </td></tr></tbody></table></td>
9430 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
9431 </span><span about="#mwt2">
9432 </span><span about="#mwt2">
9433 </span><span about="#mwt2">abc</span><span about="#mwt2">
9434 </span><span about="#mwt2">
9435 </span><span about="#mwt2">
9436 </span><span about="#mwt2">
9437 </span><span about="#mwt2">
9438 </span><span about="#mwt2">
9439 </span><span about="#mwt2">xyz</span><span about="#mwt2">
9440 </span><span about="#mwt2">
9445 Templates: Ugly templates: 3. newline-only template parameter
9454 # This looks like a bug: a single newline triggers p/br for some reason.
9456 Templates: Ugly templates: 4. newline-only template parameter inconsistency
9465 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
9466 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
9468 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
9474 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>foo"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</table>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}]]}'>foo
9475 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9479 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
9480 # that are "identical" and generate nesting cycles in the algorithm
9482 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
9484 {{echo|<table><tr><td><table>}}
9488 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table><tr><td><table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
9489 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9490 </table></td></tr></tbody></table>
9494 Parser Functions: 1. Simple example
9503 Parser Functions: 2. Nested use (only outermost should be marked up)
9512 ### Pre-save transform tests
9515 pre-save transform: subst:
9521 This is a test template
9525 pre-save transform: normal template
9535 pre-save transform: nonexistent template
9539 {{thistemplatedoesnotexist}}
9541 {{thistemplatedoesnotexist}}
9546 pre-save transform: subst magic variables
9555 # This is bug 89, which I fixed. -- wtm
9557 pre-save transform: subst: templates with parameters
9561 {{subst:paramtest|param="something else"}}
9563 This is a test template with parameter "something else"
9569 <nowiki>'''not wiki'''</nowiki>
9573 pre-save transform: nowiki in subst (bug 1188)
9577 {{subst:nowikitest}}
9579 <nowiki>'''not wiki'''</nowiki>
9584 Template:commenttest
9586 This template has <!-- a comment --> in it.
9590 pre-save transform: comment in subst (bug 1936)
9594 {{subst:commenttest}}
9596 This template has <!-- a comment --> in it.
9600 pre-save transform: unclosed tag
9604 <nowiki>'''not wiki'''
9606 <nowiki>'''not wiki'''
9610 pre-save transform: mixed tag case
9614 <NOwiki>'''not wiki'''</noWIKI>
9616 <NOwiki>'''not wiki'''</noWIKI>
9620 pre-save transform: unclosed comment in <nowiki>
9624 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9626 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9629 # Leading @ in this template definition works around a limitation
9630 # in parsoid's parserTests which otherwise strips the <span> from the
9631 # result (confusing it for a template wrapper)
9635 @<span onmouseover="alert('crap')">Oh no</span>
9639 (confirming safety of fix for subst bug 1936)
9641 {{Template:dangerous}}
9643 <p>@<span>Oh no</span>
9648 pre-save transform: comment containing gallery (bug 5024)
9652 <!-- <gallery>data</gallery> -->
9654 <!-- <gallery>data</gallery> -->
9658 pre-save transform: comment containing extension
9662 <!-- <tag>data</tag> -->
9664 <!-- <tag>data</tag> -->
9668 pre-save transform: comment containing nowiki
9672 <!-- <nowiki>data</nowiki> -->
9674 <!-- <nowiki>data</nowiki> -->
9678 pre-save transform: <noinclude> in subst (bug 3298)
9688 pre-save transform: <onlyinclude> in subst (bug 3298)
9700 {{<includeonly>subst:</includeonly>Includes}}
9704 Template:SafeSubstTest
9706 {{<includeonly>safesubst:</includeonly>Includes}}
9710 bug 22297: safesubst: works during PST
9714 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
9720 bug 22297: safesubst: works during normal parse
9729 subst: does not work during normal parse
9733 <p>{{subst:Includes}}
9738 pre-save transform: context links ("pipe trick")
9742 [[Article (context)|]]
9745 [[Bar:Article (context)|]]
9746 [[:Bar:Article (context)|]]
9748 [[|Article (context)]]
9752 [[Article (context)|Article]]
9753 [[Bar:Article|Article]]
9754 [[:Bar:Article|Article]]
9755 [[Bar:Article (context)|Article]]
9756 [[:Bar:Article (context)|Article]]
9758 [[Article (context)]]
9759 [[Bar:X (Y) Z|X (Y) Z]]
9760 [[:Bar:X (Y) Z|X (Y) Z]]
9764 pre-save transform: context links ("pipe trick") with interwiki prefix
9768 [[interwiki:Article|]]
9769 [[:interwiki:Article|]]
9770 [[interwiki:Bar:Article|]]
9771 [[:interwiki:Bar:Article|]]
9773 [[interwiki:Article|Article]]
9774 [[:interwiki:Article|Article]]
9775 [[interwiki:Bar:Article|Bar:Article]]
9776 [[:interwiki:Bar:Article|Bar:Article]]
9780 pre-save transform: context links ("pipe trick") with parens in title
9782 pst title=[[Somearticle (context)]]
9786 [[Article (context)|Article]]
9790 pre-save transform: context links ("pipe trick") with comma in title
9792 pst title=[[Someplace, Somewhere]]
9795 [[Otherplace, Elsewhere|]]
9796 [[Otherplace, Elsewhere, Anywhere|]]
9798 [[Otherplace, Somewhere|Otherplace]]
9799 [[Otherplace, Elsewhere|Otherplace]]
9800 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
9804 pre-save transform: context links ("pipe trick") with parens and comma
9806 pst title=[[Someplace (IGNORED), Somewhere]]
9809 [[Otherplace (place), Elsewhere|]]
9811 [[Otherplace, Somewhere|Otherplace]]
9812 [[Otherplace (place), Elsewhere|Otherplace]]
9816 pre-save transform: context links ("pipe trick") with comma and parens
9818 pst title=[[Who, me? (context)]]
9821 [[Me, Myself, and I (1937 song)|]]
9823 [[Yes, you. (context)|Yes, you.]]
9824 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
9828 pre-save transform: context links ("pipe trick") with namespace
9830 pst title=[[Ns:Somearticle]]
9834 [[Ns:Article|Article]]
9838 pre-save transform: context links ("pipe trick") with namespace and parens
9840 pst title=[[Ns:Somearticle (context)]]
9844 [[Ns:Article (context)|Article]]
9848 pre-save transform: context links ("pipe trick") with namespace and comma
9850 pst title=[[Ns:Somearticle, Context, Whatever]]
9854 [[Ns:Article, Context, Whatever|Article]]
9858 pre-save transform: context links ("pipe trick") with namespace, comma and parens
9860 pst title=[[Ns:Somearticle, Context (context)]]
9864 [[Ns:Article (context)|Article]]
9868 pre-save transform: context links ("pipe trick") with namespace, parens and comma
9870 pst title=[[Ns:Somearticle (IGNORED), Context]]
9874 [[Ns:Article, Context|Article]]
9878 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
9882 [[Article(context)|]]
9883 [[Bar:Article(context)|]]
9884 [[:Bar:Article(context)|]]
9885 [[|Article(context)]]
9889 [[Article(context)|Article]]
9890 [[Bar:Article(context)|Article]]
9891 [[:Bar:Article(context)|Article]]
9892 [[Article(context)]]
9894 [[:Bar:X(Y)Z|X(Y)Z]]
9898 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
9902 [[Article (context)|]]
9903 [[Bar:Article (context)|]]
9904 [[:Bar:Article (context)|]]
9905 [[|Article (context)]]
9909 [[Article (context)|Article]]
9910 [[Bar:Article (context)|Article]]
9911 [[:Bar:Article (context)|Article]]
9912 [[Article (context)]]
9913 [[Bar:X (Y) Z|X (Y) Z]]
9914 [[:Bar:X (Y) Z|X (Y) Z]]
9918 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
9922 [[Article(context)|]]
9923 [[Bar:Article(context)|]]
9924 [[:Bar:Article(context)|]]
9925 [[|Article(context)]]
9929 [[Article(context)|Article]]
9930 [[Bar:Article(context)|Article]]
9931 [[:Bar:Article(context)|Article]]
9932 [[Article(context)]]
9934 [[:Bar:X(Y)Z|X(Y)Z]]
9938 pre-save transform: context links ("pipe trick") with commas (bug 21660)
9942 [[Article (context), context|]]
9943 [[Article (context),context|]]
9944 [[Bar:Article (context), context|]]
9945 [[Bar:Article (context),context|]]
9946 [[:Bar:Article (context), context|]]
9947 [[:Bar:Article (context),context|]]
9949 [[Article (context), context|Article]]
9950 [[Article (context),context|Article]]
9951 [[Bar:Article (context), context|Article]]
9952 [[Bar:Article (context),context|Article]]
9953 [[:Bar:Article (context), context|Article]]
9954 [[:Bar:Article (context),context|Article]]
9958 pre-save transform: trim trailing empty lines
9962 Empty lines are trimmed
9968 Empty lines are trimmed
9972 pre-save transform: Signature expansion
9977 * <noinclude>~~~</noinclude>
9978 * <includeonly>~~~</includeonly>
9979 * <onlyinclude>~~~</onlyinclude>
9981 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
9982 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
9983 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
9984 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
9989 pre-save transform: Signature expansion in nowiki tags (bug 93)
9995 <nowiki>~~~~</nowiki>
9997 <includeonly><nowiki>~~~~</nowiki></includeonly>
9999 <noinclude><nowiki>~~~~</nowiki></noinclude>
10001 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10003 {{subst:Foo}} shall be converted to FOO
10005 As well as inside noinclude/onlyinclude
10006 <noinclude>{{subst:Foo}}</noinclude>
10007 <onlyinclude>{{subst:Foo}}</onlyinclude>
10009 But not inside includeonly
10010 <includeonly>{{subst:Foo}}</includeonly>
10014 <nowiki>~~~~</nowiki>
10016 <includeonly><nowiki>~~~~</nowiki></includeonly>
10018 <noinclude><nowiki>~~~~</nowiki></noinclude>
10020 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10022 FOO shall be converted to FOO
10024 As well as inside noinclude/onlyinclude
10025 <noinclude>FOO</noinclude>
10026 <onlyinclude>FOO</onlyinclude>
10028 But not inside includeonly
10029 <includeonly>{{subst:Foo}}</includeonly>
10033 Parsoid: Recognize nowiki with trailing space in tags
10037 <nowiki ><div>[[foo]]</nowiki >
10045 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10052 Parsoid: Recognize nowiki with odd capitalization
10056 <noWikI ><div>[[foo]]</Nowiki >
10058 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10063 Parsoid: Escape nowiki with trailing space in tags
10067 <nowiki > foo </nowiki >
10073 <p><nowiki > foo </nowiki ></p>
10074 <p>a<nowiki />b</p>
10075 <p>c<nowiki/ >d</p>
10079 Parsoid: Escape weird noWikI capitalizations
10083 <noWikI > foo </NoWikI >
10085 <p><noWikI > foo </NoWikI ></p>
10089 ### Message transform tests
10092 message transform: magic variables
10102 message transform: should not transform wiki markup
10112 message transform: <noinclude> in transcluded template (bug 4926)
10122 message transform: <onlyinclude> in transcluded template (bug 4926)
10132 {{#special:}} page name, known
10136 {{#special:Recentchanges}}
10138 Special:RecentChanges
10142 {{#special:}} page name with subpage, known
10146 {{#special:Recentchanges/param}}
10148 Special:RecentChanges/param
10152 {{#special:}} page name, unknown
10156 {{#special:foobar nonexistent}}
10158 Special:Foobar nonexistent
10162 {{#speciale:}} page name, known
10166 {{#speciale:Recentchanges}}
10168 Special:RecentChanges
10172 {{#speciale:}} page name with subpage, known
10176 {{#speciale:Recentchanges/param}}
10178 Special:RecentChanges/param
10182 {{#speciale:}} page name, unknown
10186 {{#speciale:foobar nonexistent}}
10188 Special:Foobar_nonexistent
10194 ### For Parsoid-specific tests, see
10195 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
10200 parsoid=wt2html,wt2wt,html2html
10202 [[Image:foobar.jpg]]
10204 <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>
10207 <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>
10212 Simple image (using File: namespace, now canonical)
10214 [[File:Foobar.jpg]]
10216 <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>
10219 <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>
10224 Right-aligned image
10226 [[File:Foobar.jpg|right]]
10228 <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>
10231 <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>
10237 [[File:Foobar.jpg|right|Caption text]]
10239 <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>
10242 <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>
10246 Image with caption, bug 53312 #1
10248 [[File:Foobar.jpg|right|Caption page stuff]]
10250 <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>
10253 <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>
10257 Image with caption, bug 53312 #2
10259 [[File:Foobar.jpg|right|Caption page=]]
10261 <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>
10264 <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>
10268 Image with caption, bug 53312 #3
10270 [[File:Foobar.jpg|right|Caption page=stuff]]
10272 <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>
10275 <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>
10279 Allow empty links in image captions (Bug 60753)
10283 [[File:Foobar.jpg|thumb|Caption [[Link1]]
10288 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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>
10291 <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>
10293 <a rel="mw:WikiLink" href="./Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"},"dsr":[47,56,2,2]}'>Link2</a>
10294 </figcaption></figure>
10298 Link with empty target
10307 Image with empty attribute
10309 parsoid=wt2html,wt2wt,html2html
10311 [[File:Foobar.jpg|right||Caption text]]
10313 <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>
10316 <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>
10320 1. Block image with individual attributes from templates
10322 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
10324 <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>
10327 <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;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[24,38,null,null]}\">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>
10331 2. Block Image with individual attributes from templates
10333 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
10335 <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>
10338 <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;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,32,null,null]}\">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;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[33,47,null,null]}\">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>
10342 3. Inline image with individual attributes from templates
10344 [[File:Foobar.jpg|{{echo|50px}}]]
10346 <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>
10349 <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;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,31,null,null]}\">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>
10352 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
10353 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
10355 Image with multiple attributes from the same template
10357 [[File:Foobar.jpg|{{image_attribs}}]]
10359 <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>
10362 <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>
10366 Image with link tails
10370 123[[File:Foobar.jpg]]456
10371 123[[File:Foobar.jpg|right]]456
10372 123[[File:Foobar.jpg|thumb]]456
10374 <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
10376 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
10377 123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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
10380 <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>
10381 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
10382 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
10386 Image with multiple captions -- only last one is accepted
10388 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
10390 <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>
10393 <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>
10397 Image with multiple widths -- use last
10399 [[File:Foobar.jpg|200px|300px|caption]]
10401 <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>
10404 <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>
10408 Image with multiple alignments -- use first (bug 48664)
10412 [[File:Foobar.jpg|thumb|left|right|center|caption]]
10414 [[File:Foobar.jpg|middle|text-top|caption]]
10416 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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>
10417 <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>
10420 <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>
10421 <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>
10425 Image with width attribute at different positions
10427 [[File:Foobar.jpg|200px|right|Caption]]
10428 [[File:Foobar.jpg|right|200px|Caption]]
10429 [[File:Foobar.jpg|right|Caption|200px]]
10431 <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>
10432 <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>
10433 <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>
10436 <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>
10437 <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>
10438 <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>
10441 # a sad bit of backward-compatibility
10443 Image with size specified with pxpx (bug 13500, 51628)
10445 parsoid=wt2html,wt2wt,html2html
10447 [[File:Foobar.jpg|20pxpx]]
10448 [[File:Foobar.jpg|200x20pxpx]]
10450 <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>
10451 <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>
10454 <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>
10458 Image with link parameter, wiki target
10460 [[File:Foobar.jpg|link=Main Page]]
10462 <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>
10465 <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>
10468 # parsoid bug 49293 (part 1)
10470 Image with link parameter, URL target
10472 [[File:Foobar.jpg|link=http://example.com/]]
10474 <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>
10477 <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>
10480 # parsoid bug 49293 (part 2)
10482 Image with link parameter, protocol-less URL target
10484 [[File:Foobar.jpg|link=//example.com/]]
10486 <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>
10489 <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>
10493 Image with link parameter, wgExternalLinkTarget
10495 [[Image:foobar.jpg|link=http://example.com/]]
10497 wgExternalLinkTarget='foobar'
10499 <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>
10504 Image with link parameter, wgNoFollowLinks set to false
10506 [[Image:foobar.jpg|link=http://example.com/]]
10508 wgNoFollowLinks=false
10510 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10515 Image with link parameter, wgNoFollowDomainExceptions
10517 [[Image:foobar.jpg|link=http://example.com/]]
10519 wgNoFollowDomainExceptions='example.com'
10521 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10526 Image with link parameter, wgExternalLinkTarget, unnamed parameter
10528 [[Image:foobar.jpg|link=http://example.com/|Title]]
10530 wgExternalLinkTarget='foobar'
10532 <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>
10537 Image with empty link parameter
10539 [[File:Foobar.jpg|link=]]
10541 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
10544 <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>
10548 Image with link parameter (wiki target) and unnamed parameter
10550 [[File:Foobar.jpg|link=Main_Page|Title]]
10552 <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>
10555 <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>
10559 Image with link parameter (URL target) and unnamed parameter
10561 [[File:Foobar.jpg|link=http://example.com/|Title]]
10563 <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>
10566 <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>
10570 Thumbnail image with link parameter
10573 parsoid=wt2html,wt2wt,html2html
10575 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
10577 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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>
10580 <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>
10584 Manually-specified thumbnail image
10588 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
10590 <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>
10593 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
10597 Manually-specified thumbnail image with explicit link to wiki page
10600 parsoid=wt2html,wt2wt,html2html
10602 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
10604 <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>
10607 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
10611 Manually-specified thumbnail image with explicit link to url
10614 parsoid=wt2html,wt2wt,html2html
10616 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
10618 <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>
10621 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="http://example.com"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
10625 Manually-specified thumbnail image with explicit no link
10628 parsoid=wt2html,wt2wt,html2html
10630 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
10632 <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>
10635 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" height="135" width="135"/></span><figcaption>Title</figcaption></figure>
10639 Manually-specified thumbnail image with explicit link and alt text
10642 parsoid=wt2html,wt2wt,html2html
10644 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
10646 <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>
10649 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="Main_Page"><img alt="alttext" resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
10653 Image with frame and link
10655 parsoid=wt2html,wt2wt,html2html
10657 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
10659 <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>
10662 <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>
10666 Image with frame and link and explicit alt
10668 parsoid=wt2html,wt2wt,html2html
10670 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
10672 <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>
10675 <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>
10679 Image with wiki markup in implicit alt
10681 parsoid=wt2html,wt2wt,html2html
10683 [[Image:Foobar.jpg|testing '''bold''' in alt]]
10685 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
10687 <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>
10688 </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>
10691 <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>
10692 <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>
10695 ###################
10696 # Conflicting image format options.
10697 # First option specified should 'win'.
10698 # All three cases in each test should be identical.
10701 Image with 'frameless' first.
10703 parsoid=wt2html,wt2wt,html2html
10705 [[File:Foobar.jpg|frameless|caption]]
10707 [[File:Foobar.jpg|frameless|frame|caption]]
10709 [[File:Foobar.jpg|frameless|thumb|caption]]
10711 <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>
10712 </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>
10713 </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>
10716 <p><span class="mw-default-size" 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>
10717 <p><span class="mw-default-size" 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>
10718 <p><span class="mw-default-size" 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>
10722 Image with 'frame' first.
10724 parsoid=wt2html,wt2wt,html2html
10726 [[File:Foobar.jpg|frame|caption]]
10727 [[File:Foobar.jpg|frame|frameless|caption]]
10728 [[File:Foobar.jpg|frame|thumb|caption]]
10730 <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>
10731 <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>
10732 <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>
10735 <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><figcaption>caption</figcaption></figure><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><figcaption>caption</figcaption></figure><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><figcaption>caption</figcaption></figure>
10739 Image with 'thumb' first.
10741 parsoid=wt2html,wt2wt,html2html
10743 [[File:Foobar.jpg|thumb|caption]]
10744 [[File:Foobar.jpg|thumb|frameless|caption]]
10745 [[File:Foobar.jpg|thumb|frame|caption]]
10747 <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>
10748 <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>
10749 <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>
10752 <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" 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>
10755 ###################
10757 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
10758 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
10759 # Foobar has actual size of 1941x220
10760 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
10761 # a scalable format.
10762 # 2. Framed images always ignore size options; always render at default size.
10763 # 3. "Unspecified format" and border are the only types which can be
10767 Image: "unspecified format" and border enlarge
10769 parsoid=wt2html,wt2wt,html2html
10771 [[File:Foobar.jpg|2000px]]
10773 [[File:Foobar.jpg|border|2000px]]
10775 <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>
10776 </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>
10779 <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>
10780 <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>
10784 Image: "unspecified format" and border reduce
10786 parsoid=wt2html,wt2wt,html2html
10788 [[File:Foobar.jpg|1000px]]
10790 [[File:Foobar.jpg|border|1000px]]
10792 <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>
10793 </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>
10796 <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>
10797 <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>
10801 Image: thumbs reduce
10803 parsoid=wt2html,wt2wt,html2html
10805 [[File:Foobar.jpg|thumb|50px]]
10807 <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>
10810 <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>
10814 Image: bitmap thumbs can't be enlarged past original size, but vector can.
10816 parsoid=wt2html,wt2wt,html2html
10818 [[File:Foobar.jpg|thumb|2000px]]
10820 [[File:Foobar.svg|thumb|2000px]]
10822 <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>
10823 <div class="thumb tright"><div class="thumbinner" style="width:2002px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-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></div></div></div>
10826 <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>
10827 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" height="1500" width="2000"/></a></figure>
10831 Image: frameless can reduce in size
10833 parsoid=wt2html,wt2wt,html2html
10835 [[File:Foobar.jpg|frameless|50px]]
10837 <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>
10840 <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>
10844 Image: bitmap frameless can't be enlarged past original size, but vector can
10846 parsoid=wt2html,wt2wt,html2html
10848 [[File:Foobar.jpg|frameless|2000px]]
10850 [[File:Foobar.svg|frameless|2000px]]
10852 <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>
10853 </p><p><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a>
10856 <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>
10857 <p><span typeof="mw:Image/Frameless"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" height="1500" width="2000"/></a></span></p>
10861 Image: framed images are always unscaled.
10863 parsoid=wt2html,wt2wt,html2html
10865 [[File:Foobar.jpg|frame]]
10867 [[File:Foobar.jpg|frame|50px]]
10869 [[File:Foobar.jpg|frame|50x50px]]
10871 [[File:Foobar.jpg|frame|2000px]]
10873 <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>
10874 <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>
10875 <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>
10876 <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>
10879 <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><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>
10882 ###################
10885 Link to image page- image page normally doesn't exists, hence edit link
10886 Add test with existing image page
10887 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
10891 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
10896 bug 18784 Link to non-existent image page with caption should use caption as link text
10898 [[:Image:test|caption]]
10900 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
10905 Frameless image caption with a free URL
10907 [[File:Foobar.jpg|http://example.com]]
10909 <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>
10912 <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>
10916 Thumbnail image caption with a free URL
10920 [[File:Foobar.jpg|thumb|http://example.com]]
10922 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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>
10925 <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>
10929 Thumbnail image caption with a free URL and explicit alt
10932 parsoid=wt2html,wt2wt,html2html
10934 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
10936 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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>
10939 <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>
10943 SVG thumbnails with no language set
10946 [[File:Foobar.svg|thumb|caption]]
10948 <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>
10951 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
10955 SVG thumbnails with language de
10957 parsoid=wt2html,wt2wt,html2html
10959 [[File:Foobar.svg|thumb|caption|lang=de]]
10961 <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>
10964 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" lang="de" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
10968 SVG thumbnails with invalid language code
10970 parsoid=wt2html,wt2wt,html2html
10972 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
10974 <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>
10977 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" height="165" width="220"/></a><figcaption>lang=invalid.language.code</figcaption></figure>
10981 BUG 1887: A ISBN with a thumbnail
10983 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
10985 <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>
10988 <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 href="Special:BookSources/1235467890" rel="mw:ExtLink">ISBN 1235467890</a></figcaption></figure>
10992 BUG 1887: A RFC with a thumbnail
10994 [[File:Foobar.jpg|thumb|This is RFC 12354]]
10996 <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>
10999 <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>This is <a href="//tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
11003 BUG 1887: A mailto link with a thumbnail
11005 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11007 <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>
11010 <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>Please <a rel="mw:ExtLink" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
11013 # Pending resolution to bug 368
11015 BUG 648: Frameless image caption with a link
11017 [[File:Foobar.jpg|text with a [[link]] in it]]
11019 <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>
11022 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]] in it"}'><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>
11026 BUG 648: Frameless image caption with a link (suffix)
11028 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11030 <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>
11033 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]]foo in it"}'><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>
11037 BUG 648: Frameless image caption with an interwiki link
11039 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11041 <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>
11044 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link]] in it"}'><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>
11048 BUG 648: Frameless image caption with a piped interwiki link
11050 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11052 <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>
11055 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link|link]] in it"}'><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>
11059 Escape HTML special chars in image alt text
11061 [[File:Foobar.jpg|& < > "]]
11063 <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>
11066 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"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>
11070 BUG 499: Alt text should have Ӓ, not &1234;
11072 [[File:Foobar.jpg|♀]]
11074 <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>
11077 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"&#9792;"}'><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>
11081 Broken image caption with link
11083 parsoid=wt2html,wt2wt,html2html
11085 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11087 <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.
11090 <p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a rel="mw:WikiLink" href="Main_Page">this</a> is just an ordinary link.</p>
11094 Image caption containing another image
11096 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
11098 <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="/wiki/File:Thumb.png" class="image" title="image"><img alt="image" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" /></a> inside it!</div></div></div>
11101 <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>This is a caption with another <span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"image"}'><a href="File:Thumb.png"><img resource="./File:Thumb.png" src="//example.com/images/e/ea/Thumb.png" height="135" width="135"/></a></span> inside it!</figcaption></figure>
11105 Image: caption containing a newline
11107 [[File:Foobar.jpg|This
11110 <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>
11113 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"This\n*is some text"}'><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>
11117 Image: caption containing leading space
11118 (The leading space should not trigger nowiki escaping in wt2wt mode)
11120 [[File:Foobar.jpg|thumb| bar]]
11122 <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>
11125 <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> bar</figcaption></figure>
11129 Image: caption containing a table
11131 parsoid=wt2html,wt2wt,html2html
11133 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11139 and some more text.]]
11141 <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>
11144 <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
11147 <tr><th>Foo </th><th>Bar</th></tr>
11150 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11154 Bug 3090: External links other than http: in image captions
11156 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11158 <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>
11161 <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>
11167 parsoid=wt2html,wt2wt,html2html
11169 [[Image:foobar.jpg|a|class=b]]
11171 <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>
11174 <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>
11178 Localized image handling (1).
11180 parsoid=wt2html,wt2wt,html2html
11183 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
11185 <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>
11188 <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>
11192 Localized image handling (2).
11195 parsoid=wt2html,wt2wt,html2html
11198 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
11200 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/Foo" title="Foo"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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>
11203 <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>
11207 "border", "frameless" and "class" attributes on an image.
11210 parsoid=wt2html,wt2wt,html2html
11212 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
11214 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="extra thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
11217 <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>
11220 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
11222 Invalid image attributes (bug 62500)
11225 parsoid=wt2html,wt2wt,html2html
11227 [[File:Foobar.jpg|thumb|float|left|caption]]
11229 [[File:Foobar.jpg|thumb|righ|caption]]
11231 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
11233 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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>
11234 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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>
11235 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-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>
11238 <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>
11244 #REDIRECT [[File:Barfoo.jpg]]
11250 [[Image:Barfoo.jpg]]
11252 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
11257 Missing image with uploads disabled
11261 [[Image:Foobaz.jpg]]
11263 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
11267 # Parsoid-specific testing for images
11268 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11269 # Currently imperfect due to a flaw in the Parsoid testrunner
11271 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
11275 Parsoid-specific image handling - simple image with size and middle alignment
11277 [[File:Foobar.jpg|middle|50px]]
11279 <p><span class="mw-valign-middle" typeof="mw:Image">
11280 <a href="File:Foobar.jpg">
11281 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11288 Parsoid-specific image handling - simple image with size, middle alignment,
11289 non-standard namespace alias
11291 parsoid=wt2wt,wt2html,html2html
11293 [[Image:Foobar.jpg|middle|50px]]
11295 <p><span class="mw-valign-middle" typeof="mw:Image">
11296 <a href="File:Foobar.jpg">
11297 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11304 Parsoid-specific image handling - simple image with size and middle alignment
11307 [[File:Foobar.jpg|50px|middle]]
11309 <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>
11313 Parsoid-specific image handling - simple image with size and middle alignment
11314 and non-standard namespace name
11316 parsoid=wt2html,wt2wt,html2html
11318 [[Image:Foobar.jpg|50px|middle]]
11320 <p><span class="mw-valign-middle" typeof="mw:Image">
11321 <a href="File:Foobar.jpg">
11322 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11329 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
11331 [[File:Foobar.jpg|500x10px|baseline|caption]]
11333 <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>
11337 Parsoid-specific image handling - simple image with border and size spec
11339 [[File:Foobar.jpg|50px|border|caption]]
11341 <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>
11345 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11347 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
11349 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
11350 <a href="File:Foobar.jpg">
11351 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
11353 <figcaption>caption content</figcaption>
11358 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11361 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
11363 <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>
11367 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
11369 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
11371 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
11372 <a href="File:Foobar.jpg">
11373 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
11375 <figcaption>caption</figcaption>
11380 Parsoid-specific image handling - thumbnail with specific size, halign,
11381 valign, and caption (existing content)
11383 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
11385 <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>
11389 Parsoid-specific image handling - framed image with specific size and caption
11392 parsoid=wt2html,wt2wt,html2html
11394 [[File:Foobar.jpg|frame|500x50px|caption]]
11396 <figure typeof="mw:Image/Frame">
11397 <a href="File:Foobar.jpg">
11398 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11400 <figcaption>caption</figcaption>
11405 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
11408 parsoid=wt2html,wt2wt,html2html
11410 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
11412 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
11413 <a href="File:Foobar.jpg">
11414 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11416 <figcaption>caption</figcaption>
11421 Parsoid-specific image handling - frameless image with specific size, border, and caption
11423 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
11425 <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>
11429 Parsoid-specific image handling - simple image with a formatted caption
11431 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
11433 <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>"}'>
11434 <a href="File:Foobar.jpg">
11435 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
11440 Parsoid-specific image handling - caption with a template in it
11442 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
11444 <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>
11448 Parsoid-specific image handling - caption with unbalanced tags in it
11450 parsoid=wt2html,wt2wt,html2html
11453 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
11457 <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>
11462 Parsoid-specific image handling - empty caption (1)
11464 parsoid=wt2html,wt2wt
11466 [[File:Foobar.jpg|thumb|]]
11468 <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>
11471 # empty captions don't get serialized unless we're in the "round trip" case
11473 Parsoid-specific image handling - empty caption (2)
11477 <figure class="mw-default-size" typeof="mw:Image/Thumb">
11478 <a href="File:Foobar.jpg">
11479 <img resource="./File:Foobar.jpg"
11480 src="//example.com/images/3/3a/Foobar.jpg"
11481 height="25" width="220"/>
11483 <figcaption></figcaption>
11486 [[File:Foobar.jpg|thumb]]
11490 Parsoid-specific image handling - whitespace caption
11492 [[File:Foobar.jpg|thumb| ]]
11494 <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>
11498 Parsoid-specific image handling - lang option
11501 [[File:Foobar.svg|lang=de|caption]]
11505 <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>
11514 Subpage test/subpage
11522 subpage title=[[Subpage test]]
11526 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
11531 Subpage noslash link
11533 subpage title=[[Subpage test]]
11537 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
11541 # TODO: make this PHP-parser compatible!
11543 Relative subpage noslash link
11545 parsoid=wt2wt,wt2html,html2html
11546 subpage title=[[Subpage test/1/2/3/4]]
11552 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
11553 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
11557 Parsoid: dot-slash prefixed wikilinks
11567 </p><p>[[././baz/]]
11572 </p><p>[[././baz/]]
11577 Render invalid page names as plain text (bug 51090)
11590 [[{{echo|./../foo}}|bar]]
11591 [[{{echo|foo/.}}|bar]]
11592 [[{{echo|foo/..}}|bar]]
11593 [[{{echo|foo~~~~bar}}]]
11594 [[{{echo|foo>bar}}]]
11595 [[{{echo|foo././bar}}]]
11596 [[{{echo|foo{bar}}]]
11597 [[{{echo|foo}bar}}]]
11598 [[{{echo|foo[bar}}]]
11599 [[{{echo|foo]bar}}]]
11600 [[{{echo|foo<bar}}]]
11602 <p>[[./../foo|bar]]
11612 </p><p>[[./../foo|bar]]
11625 <p>[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]</p>
11626 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<bar"}},"i":0}}]}'>foo<bar</span>]]</p>
11634 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
11639 BUG 561: {{/Subpage}}
11641 subpage title=[[Page]]
11645 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
11653 Category:MediaWiki User's Guide
11661 [[:Category:MediaWiki User's Guide]]
11663 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
11672 [[Category:MediaWiki User's Guide]]
11674 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11678 PAGESINCATEGORY invalid title fatal (r33546 fix)
11680 {{PAGESINCATEGORY:<bogus>}}
11687 Category with different sort key
11691 [[Category:MediaWiki User's Guide|Foo]]
11693 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11697 Category with identical sort key
11701 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11703 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11707 Category with empty sort key
11712 [[Category:MediaWiki User's Guide|]]
11714 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11718 Category with empty sort key and parentheses
11723 [[Category:Foo (bar)|]]
11725 [[Category:Foo (bar)|Foo]]
11729 Category with link tail
11734 123[[Category:Foo]]456
11736 123[[Category:Foo]]456
11740 Category with template
11745 [[Category:{{echo|Foo}}]]
11747 [[Category:{{echo|Foo}}]]
11751 Category with template in sort key
11756 [[Category:Foo|{{echo|Bar}}]]
11758 [[Category:Foo|{{echo|Bar}}]]
11762 Category with template in sort key and title
11767 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11769 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11773 Category / paragraph interactions
11775 Foo [[Category:Baz]] Bar
11777 Foo [[Category:Baz]]
11785 [[Category:Baz]] Bar
11798 {{echo|[[Category:Baz]]}}
11813 Parsoid: Serialize link to category page with colon escape
11819 [[:Category:Foo|Bar]]
11822 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
11823 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
11828 Parsoid: Link prefix/suffixes aren't applied to category links
11830 parsoid=wt2html,wt2wt,html2html
11835 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
11839 Parsoid: Serialize link to file page with colon escape
11845 [[:File:Foo.png|Bar]]
11848 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
11849 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
11854 Parsoid: Serialize a genuine category link without colon escape
11859 [[Category:Foo|Bar]]
11861 <link rel="mw:PageProp/Category" href="Category:Foo">
11862 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
11866 Parsoid: Defaultsort
11870 {{DEFAULTSORT:Foo}}
11872 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
11876 ### Inter-language links
11879 Inter-language links
11885 [[zh:食品]]
11887 es:Alimento fr:Nourriture zh:食品
11891 Duplicate interlanguage links (bug 24502)
11907 Basic section headings
11914 ===Smaller headline===
11917 <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>
11920 <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>
11923 <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>
11929 Section headings with TOC
11932 === Subheadline 1 ===
11933 ===== Skipping a level =====
11934 ====== Skipping a level ======
11938 ===Another headline===
11940 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11942 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
11944 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
11946 <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>
11948 <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>
11955 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
11957 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
11963 <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>
11964 <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>
11965 <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>
11966 <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>
11967 <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>
11970 <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>
11974 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
11976 Handling of sections up to level 6 and beyond
11979 == Level 2 Heading==
11980 === Level 3 Heading===
11981 ==== Level 4 Heading====
11982 ===== Level 5 Heading=====
11983 ====== Level 6 Heading======
11984 ======= Level 7 Heading=======
11985 ======== Level 8 Heading========
11986 ========= Level 9 Heading=========
11987 ========== Level 10 Heading==========
11989 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11991 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
11993 <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>
11995 <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>
11997 <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>
11999 <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>
12001 <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>
12002 <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>
12003 <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>
12004 <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>
12005 <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>
12019 <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>
12020 <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>
12021 <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>
12022 <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>
12023 <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>
12024 <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>
12025 <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>
12026 <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>
12027 <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>
12028 <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>
12033 TOC regression (bug 9764)
12037 ==== title 1.1.1 ====
12042 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12044 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12046 <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>
12048 <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>
12051 <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>
12054 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12056 <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>
12062 <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>
12063 <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>
12064 <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>
12065 <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>
12066 <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>
12067 <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>
12072 TOC with wgMaxTocLevel=3 (bug 6204)
12078 ==== title 1.1.1 ====
12083 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12085 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12087 <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>
12088 <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>
12091 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12093 <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>
12099 <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>
12100 <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>
12101 <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>
12102 <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>
12103 <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>
12104 <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>
12109 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
12115 ====Section 1.1.1====
12116 ====Section 1.1.1.1====
12119 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12121 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
12123 <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>
12126 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
12130 <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>
12131 <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>
12132 <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>
12133 <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>
12134 <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>
12140 Resolving duplicate section names
12145 <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>
12146 <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>
12151 Resolving duplicate section names with differing case (bug 10721)
12156 <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>
12157 <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>
12169 Template with sections, __NOTOC__
12176 <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>
12177 <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>
12178 <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>
12179 <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>
12184 __NOEDITSECTION__ keyword
12190 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
12191 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
12196 Link inside a section heading
12198 ==Section with a [[Main Page|link]] in it==
12200 <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>
12205 TOC regression (bug 12077)
12212 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12214 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12216 <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>
12219 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
12223 <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>
12224 <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>
12225 <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>
12230 BUG 1219 URL next to image (good)
12232 http://example.com [[Image:foobar.jpg]]
12234 <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>
12239 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
12242 The line above must have a trailing space!
12245 But just in case it doesn't...
12247 <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>
12248 <p>The line above must have a trailing space!
12250 <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>
12251 <p>But just in case it doesn't...
12256 Header with special characters (bug 25462)
12258 The tooltips shall not show entities to the user (ie. be double escaped)
12275 <p>The tooltips shall not show entities to the user (ie. be double escaped)
12277 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12279 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
12280 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
12281 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
12282 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
12283 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
12287 <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>
12290 <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>
12293 <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>
12296 <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>
12299 <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>
12305 Headers with excess '=' characters
12306 (Are similar tests necessary beyond the 1st level?)
12310 =''italic'' heading==
12311 ==''italic'' heading=
12313 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12315 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
12316 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
12317 <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>
12318 <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>
12322 <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>
12323 <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>
12324 <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>
12325 <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>
12330 HTML headers vs TOC (bug 23393)
12331 (__NOEDITSECTION__ for clearer output, doesn't matter here)
12343 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12345 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
12347 <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>
12348 <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>
12351 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
12353 <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>
12354 <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>
12360 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
12361 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
12362 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
12363 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
12364 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
12365 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
12370 Single-line or multiline-comments can follow headings
12372 parsoid=wt2html,wt2wt
12380 <h2><span class="mw-headline" id="foo">foo</span></h2>
12381 <h2><span class="mw-headline" id="bar">bar</span></h2>
12382 <h2><span class="mw-headline" id="baz">baz</span></h2>
12387 BUG 1219 URL next to image (broken)
12389 http://example.com[[Image:foobar.jpg]]
12391 <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>
12396 Bug 1186 news: in the middle of text
12398 http://en.wikinews.org/wiki/Wikinews:Workplace
12400 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
12406 Namespaced link must have a title
12415 Namespaced link must have a title (bad fragment version)
12417 [[Project:#fragment]]
12419 <p>[[Project:#fragment]]
12425 ### HTML tags and HTML attributes
12429 div with no attributes
12431 <div>HTML rocks</div>
12433 <div>HTML rocks</div>
12438 div with double-quoted attribute
12440 <div id="rock">HTML rocks</div>
12442 <div id="rock">HTML rocks</div>
12447 div with single-quoted attribute
12449 <div id='rock'>HTML rocks</div>
12451 <div id="rock">HTML rocks</div>
12456 div with unquoted attribute
12458 <div id=rock>HTML rocks</div>
12460 <div id="rock">HTML rocks</div>
12465 div with illegal double attributes
12467 <div id="a" id="b">HTML rocks</div>
12469 <div id="b">HTML rocks</div>
12473 # FIXME: produce empty string instead of "class" in the PHP parser, following
12476 div with empty attribute value, space before equals
12480 <div class =>HTML rocks</div>
12482 <div class="">HTML rocks</div>
12486 # The PHP parser escapes the opening brace to { for some reason, so
12487 # disabled this test for it.
12489 div with braces in attribute value
12493 <div title="{}">Foo</div>
12495 <div title="{}">Foo</div>
12498 # This it very inconsistent in the PHP parser: it returns
12499 # class="class" if there is a space between the name and the equal sign (see
12500 # 'div with empty attribute value, space before equals'), but strips the
12501 # attribute completely if the space is missing. We hope that not much content
12502 # depends on this, so are implementing the behavior below in Parsoid for
12503 # consistencies' sake. Disabled for the PHP parser.
12504 # FIXME: fix this behavior in the PHP parser?
12506 div with empty attribute value, no space before equals
12510 <div class=>HTML rocks</div>
12512 <div class="">HTML rocks</div>
12517 HTML multiple attributes correction
12519 <p class="error" class="awesome">Awesome!</p>
12521 <p class="awesome">Awesome!</p>
12526 Table multiple attributes correction
12529 !+ class="error" class="awesome"| status
12534 <th class="awesome"> status
12542 <DIV ID="x">HTML ROCKS</DIV>
12544 <div id="x">HTML ROCKS</div>
12549 Non-ASCII pseudo-tags are rendered as text
12558 Pseudo-tag with URL 'name' renders as url link
12560 <http://example.com/>
12562 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
12567 text with amp in the middle of nowhere
12571 <p>Remember AT&T?
12576 text with character entity: eacute
12578 I always thought é was a cute letter.
12580 <p>I always thought é was a cute letter.
12585 text with entity-escaped character entity-like string: eacute
12587 I always thought &eacute; was a cute letter.
12589 <p>I always thought &eacute; was a cute letter.
12594 text with undefined character entity: xacute
12596 I always thought &xacute; was a cute letter.
12598 <p>I always thought &xacute; was a cute letter.
12602 # TODO: generalize to PHP parser?
12608 <data value="5">five</data>
12609 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12610 <mark>This highlighted text</mark>
12612 <p><data value="5">five</data>
12613 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12614 <mark>This highlighted text</mark></p>
12618 HTML tag with leading space is parsed as text
12622 <p>< div>foo< /div>
12627 ### Nesting tests (see bug 41545, 50604, 51081)
12630 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
12631 # Note that html2wt is considerably more difficult if we use <b> in
12632 # the test case, instead of <big>
12634 Ensure that HTML adoption agency algorithm is properly implemented.
12636 <big>X<big>Y</big>Z</big>
12638 <p><big>X<big>Y</big>Z</big>
12642 # This was bug 41545 in the PHP parser.
12646 <kbd>X<kbd>Y</kbd>Z</kbd>
12648 <p><kbd>X<kbd>Y</kbd>Z</kbd>
12652 # The following cases were bug 51081 in the PHP parser.
12653 # Note that there are some other nestable tags (b, i, etc) which are
12654 # not covered; see bug 51081 for discussion.
12658 <em>X<em>Y</em>Z</em>
12660 <p><em>X<em>Y</em>Z</em>
12665 Nesting of <strong>
12667 <strong>X<strong>Y</strong>Z</strong>
12669 <p><strong>X<strong>Y</strong>Z</strong>
12678 <p><q>X<q>Y</q>Z</q>
12685 <ruby>X<ruby>Y</ruby>Z</ruby>
12687 <p><ruby>X<ruby>Y</ruby>Z</ruby>
12694 <bdo>X<bdo>Y</bdo>Z</bdo>
12696 <p><bdo>X<bdo>Y</bdo>Z</bdo>
12708 [[Media:Foobar.jpg]]
12710 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
12715 Media link with text
12717 [[Media:Foobar.jpg|A neat file to look at]]
12719 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
12723 # FIXME: this is still bad HTML tag nesting
12725 Media link with nasty text
12726 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
12728 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
12730 <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>
12735 Media link to nonexistent file (bug 1702)
12737 [[Media:No such.jpg]]
12739 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
12744 Image link to nonexistent file (bug 1850 - good)
12746 [[Image:No such.jpg]]
12748 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
12753 :Image link to nonexistent file (bug 1850 - bad)
12755 [[:Image:No such.jpg]]
12757 <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>
12764 Character reference normalization in link text (bug 1938)
12766 [[Main Page|this&that]]
12768 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
12775 Test for unicode normalization
12777 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
12781 (bug 19451) Links should refer to the normalized form.
12789 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12790 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12791 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12792 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12793 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12798 Empty attribute crash test (bug 2067)
12800 <font color="">foo</font>
12802 <p><font color="">foo</font>
12807 Empty attribute crash test single-quotes (bug 2067)
12809 <font color=''>foo</font>
12811 <p><font color="">foo</font>
12816 Attribute test: equals, then nothing
12818 <font color=>foo</font>
12820 <p><font>foo</font>
12825 Attribute test: unquoted value
12827 <font color=x>foo</font>
12829 <p><font color="x">foo</font>
12834 Attribute test: unquoted but illegal value (hash)
12836 <font color=#x>foo</font>
12838 <p><font color="#x">foo</font>
12843 Attribute test: no value
12845 <font color>foo</font>
12847 <p><font color="color">foo</font>
12852 Bug 2095: link with three closing brackets
12856 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
12859 <p><a rel="mw:WikiLink" href="./Main_Page">Main Page</a>]</p>
12863 Bug 2095: link with pipe and three closing brackets
12865 [[Main Page|link]]]
12867 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
12870 <p><a rel="mw:WikiLink" href="./Main_Page">link</a>]</p>
12874 Bug 2095: link with pipe and three closing brackets, version 2
12876 [[Main Page|[http://example.com/]]]
12878 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
12881 <p><a rel="mw:WikiLink" href="./Main_Page">[http://example.com/]</a></p>
12890 Template:Dangerous attribute
12892 " onmouseover="alert(document.cookie)
12896 Template:Dangerous style attribute
12898 border-size: expression(alert(document.cookie))
12904 <div style="float: right; {{{1}}}">Magic div</div>
12908 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
12910 <div title="{{test}}"></div>
12912 <div title="This is a test template"></div>
12917 Bug 2304: HTML attribute safety (dangerous template; 2309)
12919 <div title="{{dangerous attribute}}"></div>
12921 <div title=""></div>
12926 Bug 2304: HTML attribute safety (dangerous style template; 2309)
12928 <div style="{{dangerous style attribute}}"></div>
12930 <div style="/* insecure input */"></div>
12935 Bug 2304: HTML attribute safety (safe parameter; 2309)
12937 {{div style|width: 200px}}
12939 <div style="float: right; width: 200px">Magic div</div>
12944 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
12946 {{div style|width: expression(alert(document.cookie))}}
12948 <div style="/* insecure input */">Magic div</div>
12953 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
12955 {{div style|"><script>alert(document.cookie)</script>}}
12957 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12962 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
12964 {{div style|" ><script>alert(document.cookie)</script>}}
12966 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12971 Bug 2304: HTML attribute safety (link)
12973 <div title="[[Main Page]]"></div>
12975 <div title="[[Main Page]]"></div>
12980 Bug 2304: HTML attribute safety (italics)
12982 <div title="''foobar''"></div>
12984 <div title="''foobar''"></div>
12989 Bug 2304: HTML attribute safety (bold)
12991 <div title="'''foobar'''"></div>
12993 <div title="'''foobar'''"></div>
12999 Bug 2304: HTML attribute safety (ISBN)
13001 <div title="ISBN 1234567890"></div>
13003 <div title="ISBN 1234567890"></div>
13008 Bug 2304: HTML attribute safety (RFC)
13010 <div title="RFC 1234"></div>
13012 <div title="RFC 1234"></div>
13017 Bug 2304: HTML attribute safety (PMID)
13019 <div title="PMID 1234567890"></div>
13021 <div title="PMID 1234567890"></div>
13026 Bug 2304: HTML attribute safety (web link)
13028 <div title="http://example.com/"></div>
13030 <div title="http://example.com/"></div>
13035 Bug 2304: HTML attribute safety (named web link)
13037 <div title="[http://example.com/ link]"></div>
13039 <div title="[http://example.com/ link]"></div>
13044 Bug 3244: HTML attribute safety (extension; safe)
13046 <div style="<nowiki>background:blue</nowiki>"></div>
13048 <div style="background:blue"></div>
13053 Bug 3244: HTML attribute safety (extension; unsafe)
13055 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
13057 <div style="/* insecure input */"></div>
13061 # More MSIE fun discovered by Tom Gilder
13064 MSIE CSS safety test: spurious slash
13066 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
13068 <div style="/* insecure input */">evil</div>
13073 MSIE CSS safety test: hex code
13075 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
13077 <div style="/* insecure input */">evil</div>
13082 MSIE CSS safety test: comment in url
13084 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
13086 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
13091 MSIE CSS safety test: comment in expression
13093 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
13095 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
13100 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
13102 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
13104 <p style="/* invalid control char */">A</p>
13109 MSIE 6 CSS safety test: Fullwidth (bug 55332)
13111 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
13112 <div style="top:EXPRESSION(alert())">B</div>
13114 <p style="/* insecure input */">A</p>
13115 <div style="/* insecure input */">B</div>
13120 MSIE 6 CSS safety test: IPA extensions (bug 55332)
13122 <div style="background-image:uʀʟ(javascript:alert())">A</div>
13123 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
13125 <div style="/* insecure input */">A</div>
13126 <p style="/* insecure input */">B</p>
13131 MSIE 6 CSS safety test: sup/sub script (bug 55332)
13133 <div style="background-image:url⁽javascript:alert())">A</div>
13134 <div style="background-image:url₍javascript:alert())">B</div>
13135 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
13137 <div style="/* insecure input */">A</div>
13138 <div style="/* insecure input */">B</div>
13139 <p style="/* insecure input */">C</p>
13147 title="data:text/html,<img src=1 onerror=alert(1)>"
13148 style="-o-link:attr(title);-o-link-source:current">X</div>
13150 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
13155 MSIE 6 CSS safety test: Repetition markers (bug 55332)
13157 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
13158 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
13159 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
13160 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
13161 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
13162 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
13163 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
13165 <p style="/* insecure input */">A</p>
13166 <p style="/* insecure input */">B</p>
13167 <p style="/* insecure input */">C</p>
13168 <p style="/* insecure input */">D</p>
13169 <p style="/* insecure input */">E</p>
13170 <p style="/* insecure input */">F</p>
13171 <p style="/* insecure input */">G</p>
13176 Table attribute legitimate extension
13179 !+ style="<nowiki>color:blue</nowiki>"| status
13184 <th style="color:blue"> status
13190 Table attribute safety
13193 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
13198 <th style="/* insecure input */"> status
13204 CSS line continuation 1
13206 <div style="background-image: u\ rl(test.jpg);"></div>
13208 <div style="/* insecure input */"></div>
13213 CSS line continuation 2
13215 <div style="background-image: u\ rl(test.jpg); "></div>
13217 <div style="/* insecure input */"></div>
13228 Expansion of multi-line templates in attribute values (bug 6255)
13230 <div style="background: {{identity|#00FF00}}">-</div>
13232 <div style="background: #00FF00">-</div>
13238 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
13240 <div style="background:
13243 <div style="background: #00FF00">-</div>
13248 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
13250 <div style="background: #00FF00">-</div>
13252 <div style="background: #00FF00">-</div>
13257 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
13260 Parser hook: empty input
13273 Parser hook: empty input using terminated empty elements
13286 Parser hook: empty input using terminated empty elements (space before)
13299 Parser hook: basic input
13313 Parser hook: case insensitive
13327 Parser hook: case insensitive, redux
13340 Parser hook: nested tags
13344 <tag><tag></tag></tag>
13355 Parser hook: basic arguments
13357 <tag width=200 height = "100" depth = '50' square></tag>
13365 'square' => 'square',
13372 Parser hook: argument containing a forward slash (bug 5344)
13374 <tag filename='/tmp/bla'></tag>
13379 'filename' => '/tmp/bla',
13386 Parser hook: empty input using terminated empty elements (bug 2374)
13399 # </tag> should be output literally since there is no matching tag that begins it
13401 Parser hook: basic arguments using terminated empty elements (bug 2374)
13403 <tag width=200 height = "100" depth = '50' square/>
13413 'square' => 'square',
13422 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
13426 Parser hook: static parser hook not inside a comment
13428 <statictag>hello, world</statictag>
13429 <statictag action=flush/>
13437 Parser hook: static parser hook inside a comment
13439 <!-- <statictag>hello, world</statictag> -->
13440 <statictag action=flush/>
13446 # Nested template calls; this case was broken by Parser.php rev 1.506,
13450 Template:One-parameter
13452 (My parameter is: {{{1}}})
13456 Template:Map-one-parameter
13458 {{{{{1}}}|{{{2}}}}}
13462 Nested template calls
13464 {{Map-one-parameter|One-parameter|param}}
13466 <p>(My parameter is: param)
13475 Sanitizer: Closing of open tags
13477 <s></s><table></table>
13479 <s></s><table></table>
13484 Sanitizer: Closing of open but not closed tags
13493 Sanitizer: Closing of closed but not open tags
13502 Sanitizer: Closing of closed but not open table tags
13504 Table not started</td></tr></table>
13506 <p>Table not started</td></tr></table>
13511 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
13513 <span id="æ: v">byte</span>[[#æ: v|backlink]]
13515 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
13520 Sanitizer: Validating the contents of the id attribute (bug 4515)
13526 Something, but definitely not <br id="9" />...
13530 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
13534 <br id="foo" /><br id="foo" />
13536 Something need to be done. foo-2 ?
13540 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
13543 <meta itemprop="hello" content="world">
13544 <meta http-equiv="refresh" content="5">
13545 <meta itemprop="hello" http-equiv="refresh" content="5">
13546 <link itemprop="hello" href="{{SERVER}}">
13547 <link rel="stylesheet" href="{{SERVER}}">
13548 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
13551 <div itemscope="itemscope">
13552 <p> <meta itemprop="hello" content="world" />
13553 <meta http-equiv="refresh" content="5">
13554 <meta itemprop="hello" content="5" />
13556 <link itemprop="hello" href="http://example.org" />
13557 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
13558 <link itemprop="hello" href="http://example.org" />
13564 Language converter: output gets cut off unexpectedly (bug 5757)
13568 this bit is safe: }-
13570 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
13572 then we get cut off here: }-
13574 all additional text is vanished
13576 <p>this bit is safe: }-
13577 </p><p>but if we add a conversion instance: xxx
13578 </p><p>then we get cut off here: }-
13579 </p><p>all additional text is vanished
13584 Self closed html pairs (bug 5487)
13587 <center><font id="bug" />Centered text</center>
13588 <div><font id="bug2" />In div text</div>
13590 <center><font id="bug" />Centered text</center>
13591 <div><font id="bug2" />In div text</div>
13600 Punctuation: nbsp before exclamation
13604 <p>C'est grave !
13609 Punctuation: CSS !important (bug 11874)
13611 <div style="width:50% !important">important</div>
13613 <div style="width:50% !important">important</div>
13618 Punctuation: CSS ! important (bug 11874; with space after)
13620 <div style="width:50% ! important">important</div>
13622 <div style="width:50% ! important">important</div>
13628 HTML bullet list, closed tags (bug 5497)
13643 HTML bullet list, unclosed tags (bug 5497)
13662 HTML ordered list, closed tags (bug 5497)
13677 HTML ordered list, unclosed tags (bug 5497)
13696 HTML nested bullet list, closed tags (bug 5497)
13721 HTML nested bullet list, open tags (bug 5497)
13750 HTML nested ordered list, closed tags (bug 5497)
13775 HTML nested ordered list, open tags (bug 5497)
13804 HTML ordered list item with parameters oddity
13806 <ol><li id="fragment">One</li>
13809 <ol><li id="fragment">One</li>
13814 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
13816 bug 5918: autonumbering
13818 [http://first/] [http://second] [ftp://ftp]
13822 [mailto:enclosed@mail.tld With target]
13824 [mailto:enclosed@mail.tld]
13826 mailto:inline@mail.tld
13828 <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>
13829 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
13830 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
13831 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
13832 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
13835 <p><a rel="mw:ExtLink" href="http://first/"></a> <a rel="mw:ExtLink" href="http://second"></a> <a rel="mw:ExtLink" href="ftp://ftp"></a></p>
13836 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
13837 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
13838 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
13839 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
13844 # Security and HTML correctness
13845 # From Nick Jenkins' fuzz testing
13849 Fuzz testing: Parser13
13864 Fuzz testing: Parser14
13869 <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>
13870 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13872 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
13880 Fuzz testing: Parser14-table
13885 <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>
13886 <table style="__TOC__">
13892 # Known to produce bogus xml (extra </td>)
13894 Fuzz testing: Parser16
13914 Fuzz testing: Parser21
13917 ! irc://{{ftp://a" onmouseover="alert('hello world');"
13922 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
13932 Fuzz testing: Parser22
13934 http://===r:::https://b
13938 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
13946 # Known to produce bad XML for now
13948 Fuzz testing: Parser24
13955 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
13956 <br style="onmouseover='alert(document.cookie);' " />
13958 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13963 <u class="|">}}}} >
13964 <br style="onmouseover='alert(document.cookie);'" />
13966 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13975 # Note: the current result listed for this is not what the original one was,
13976 # but the original bug was JavaScript injection, which is fixed in any case.
13977 # It's not clear that the original result listed was any more correct than the
13978 # current one. Original result:
13981 # <li class="||">
13982 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
13984 Fuzz testing: Parser25 (bug 6055)
13990 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
13992 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
13997 Fuzz testing: URL adjacent extension (with space, clean)
14000 http://example.com <nowiki>junk</nowiki>
14002 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
14007 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
14010 http://example.com<nowiki>junk</nowiki>
14012 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
14017 Fuzz testing: URL adjacent extension (no space, dirty; pre)
14020 http://example.com<pre>junk</pre>
14022 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
14027 Fuzz testing: image with bogus manual thumbnail
14029 [[Image:foobar.jpg|thumbnail= ]]
14031 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
14034 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,null,null]}'/>
14038 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
14040 <pre dir=" "></pre>
14042 <pre dir=" "></pre>
14047 Parsing optional HTML elements (Bug 6171)
14052 <td> Some tabular data</td>
14053 <td> More tabular data ...
14054 <td> And yet som tabular data</td>
14060 <td> Some tabular data</td>
14061 <td> More tabular data ...
14062 </td><td> And yet som tabular data</td>
14069 Correct handling of <td>, <tr> (Bug 6171)
14074 <td> Some tabular data</td>
14075 <td> More tabular data ...</td>
14076 <td> And yet som tabular data</td>
14082 <td> Some tabular data</td>
14083 <td> More tabular data ...</td>
14084 <td> And yet som tabular data</td>
14092 Parsing crashing regression (fr:JavaScript)
14096 <p></body></x>
14101 Inline wiki vs wiki block nesting
14107 <p><b>Bold paragraph</b>
14108 </p><p>New wiki paragraph
14113 Inline HTML vs wiki block nesting
14121 <p><b>Bold paragraph</b>
14122 </p><p>New wiki paragraph
14126 # Original result was this:
14127 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
14129 # While that might be marginally more intuitive, maybe, the six-apostrophe
14130 # construct is clearly pathological and the result stated here (which is what
14131 # the parser actually does) is about as reasonable as anything.
14133 Mixing markup for italics and bold
14136 '''bold''''''bold''bolditalics'''''
14138 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
14146 Article for special page transclusion test
14150 Special page transclusion
14153 {{Special:Prefixindex/Xyzzyx}}
14155 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14160 Special page transclusion twice (bug 5021)
14163 {{Special:Prefixindex/Xyzzyx}}
14164 {{Special:Prefixindex/Xyzzyx}}
14166 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14167 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14172 Transclusion of default MediaWiki message
14174 {{MediaWiki:Mainpage}}
14181 Transclusion of nonexistent MediaWiki message
14183 {{MediaWiki:Mainpagexxx}}
14185 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
14190 Transclusion of MediaWiki message with underscore
14192 {{MediaWiki:history_short}}
14199 Transclusion of MediaWiki message with space
14201 {{MediaWiki:history short}}
14208 Invalid header with following text
14218 Section extraction test (section 0)
14238 Section extraction test (section 1)
14260 Section extraction test (section 2)
14281 Section extraction test (section 3)
14301 Section extraction test (section 4)
14325 Section extraction test (section 5)
14345 Section extraction test (section 6)
14366 Section extraction test (section 7)
14386 Section extraction test (section 8)
14406 Section extraction test (section 9)
14427 Section extraction test (section 10)
14447 Section extraction test (nonexistent section 11)
14466 Section extraction test with bogus heading (section 1)
14471 ==bogus== not a legal section
14475 ==bogus== not a legal section
14479 Section extraction test with bogus heading (section 2)
14484 ==bogus== not a legal section
14491 Section extraction test with comment after heading (section 1)
14503 Section extraction test with comment after heading (section 2)
14515 Section extraction test with bogus <nowiki> heading (section 1)
14520 ==bogus== <nowiki>not a legal section</nowiki>
14524 ==bogus== <nowiki>not a legal section</nowiki>
14528 Section extraction test with bogus <nowiki> heading (section 2)
14533 ==bogus== <nowiki>not a legal section</nowiki>
14540 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
14541 # instead of respecting commented sections
14543 Section extraction prefixed by comment (section 1)
14554 Section extraction prefixed by comment (section 2)
14565 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
14566 # instead of respecting HTML-style headings
14568 Section extraction, mixed wiki and html (section 1)
14584 Section extraction, mixed wiki and html (section 2)
14600 # Formerly testing for bug 3342
14602 Section extraction, heading surrounded by <noinclude>
14606 <noinclude>==unmarked==</noinclude>
14612 # Test behavior of bug 19910
14614 Sectiion with all-equals
14619 The line above must have a trailing space
14622 But just in case it doesn't...
14626 But just in case it doesn't...
14630 Section replacement test (section 0)
14661 Section replacement test (section 1)
14690 Section replacement test (section 2)
14720 Section replacement test (section 3)
14751 Section replacement test (section 4)
14778 Section replacement test (section 5)
14809 Section replacement test (section 6)
14839 Section replacement test (section 7)
14870 Section replacement test (section 8)
14901 Section replacement test (section 9)
14930 Section replacement test (section 10)
14960 Section replacement test with initial whitespace (bug 13728)
14964 Preformatted initial line
14968 Preformatted initial line
14975 Section extraction, heading followed by pre with 20 spaces (bug 6398)
14987 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
15000 Section extraction, <pre> around bogus header (bug 10309)
15017 Section replacement, <pre> around bogus header (bug 10309)
15019 noxml replace=2,"xxx"
15040 Handling of 
 in URLs
15044 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15047 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
15049 a</a></li></ul></li></ul>
15053 Handling of %0A in URLs
15057 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15060 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15064 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
15066 5 quotes, code coverage +1 line
15073 <p><b><i></i></b></p>
15076 # same html as previous, but wikitext adjusted to match parsoid html2wt
15077 # note that wt2html and html2html will put the <i> before the <b>
15079 5 quotes, code coverage +1 line w/ nowiki (1)
15081 parsoid=wt2wt,html2wt
15083 '''''<nowiki/>'''''
15088 <p><b><i></i></b></p>
15091 # same as previous, just swapping the <i> and <b>
15093 5 quotes, code coverage +1 line w/ nowiki (2)
15095 '''''<nowiki/>'''''
15100 <p><i><b></b></i></p>
15104 Special:Search page linking.
15108 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
15115 title=[[Parser test]]
15120 * {{FULLPAGENAMEE}}
15122 * {{BASEPAGENAMEE}}
15126 * {{ROOTPAGENAMEE}}
15128 * {{TALKPAGENAMEE}}
15129 * {{SUBJECTPAGENAME}}
15130 * {{SUBJECTPAGENAMEE}}
15133 * {{NAMESPACENUMBER}}
15137 * {{SUBJECTSPACEE}}
15138 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
15140 <ul><li> Parser test</li>
15141 <li> Parser_test</li>
15142 <li> Parser test</li>
15143 <li> Parser_test</li>
15144 <li> Parser test</li>
15145 <li> Parser_test</li>
15146 <li> Parser test</li>
15147 <li> Parser_test</li>
15148 <li> Parser test</li>
15149 <li> Parser_test</li>
15150 <li> Talk:Parser test</li>
15151 <li> Talk:Parser_test</li>
15152 <li> Parser test</li>
15153 <li> Parser_test</li>
15161 <li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a></li></ul>
15164 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
15174 image4 |300px| centre
15175 image5.svg| http://///////
15180 <ul class="gallery mw-gallery-traditional">
15181 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15182 <div class="thumb" style="height: 150px;">Image1.png</div>
15183 <div class="gallerytext">
15186 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15187 <div class="thumb" style="height: 150px;">Image2.gif</div>
15188 <div class="gallerytext">
15193 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15194 <div class="thumb" style="height: 150px;">Image3</div>
15195 <div class="gallerytext">
15198 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15199 <div class="thumb" style="height: 150px;">Image4</div>
15200 <div class="gallerytext">
15205 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15206 <div class="thumb" style="height: 150px;">Image5.svg</div>
15207 <div class="gallerytext">
15208 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
15212 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15213 <div class="thumb" style="height: 150px;">* image6</div>
15214 <div class="gallerytext">
15222 Gallery (with options)
15224 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
15225 File:Nonexistant.jpg|caption
15226 File:Nonexistant.jpg
15227 image:foobar.jpg|some '''caption''' [[Main Page]]
15229 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
15232 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
15233 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
15234 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15235 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15236 <div class="gallerytext">
15241 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15242 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15243 <div class="gallerytext">
15246 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15247 <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>
15248 <div class="gallerytext">
15249 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15253 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15254 <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>
15255 <div class="gallerytext">
15258 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15259 <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>
15260 <div class="gallerytext">
15270 Gallery with link that has fragment
15273 image:foobar.jpg|link=Main_Page
15274 image:foobar.jpg|link=Main_Page#section
15275 image:foobar.jpg|link=Main Page#section|caption
15278 <ul class="gallery mw-gallery-traditional">
15279 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15280 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
15281 <div class="gallerytext">
15284 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15285 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
15286 <div class="gallerytext">
15289 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15290 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
15291 <div class="gallerytext">
15301 Gallery with wikitext inside caption
15304 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
15305 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
15308 <ul class="gallery mw-gallery-traditional">
15309 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15310 <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>
15311 <div class="gallerytext">
15312 <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>
15316 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15317 <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>
15318 <div class="gallerytext">
15319 <p>This is a test template
15328 gallery (with showfilename option)
15330 <gallery showfilename>
15331 File:Nonexistant.jpg|caption
15332 File:Nonexistant.jpg
15333 image:foobar.jpg|some '''caption''' [[Main Page]]
15337 <ul class="gallery mw-gallery-traditional">
15338 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15339 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15340 <div class="gallerytext">
15341 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15346 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15347 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15348 <div class="gallerytext">
15349 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15353 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15354 <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>
15355 <div class="gallerytext">
15356 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15357 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15361 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15362 <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>
15363 <div class="gallerytext">
15364 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15373 Gallery (with namespace-less filenames)
15376 File:Nonexistant.jpg
15382 <ul class="gallery mw-gallery-traditional">
15383 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15384 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15385 <div class="gallerytext">
15388 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15389 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15390 <div class="gallerytext">
15393 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15394 <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>
15395 <div class="gallerytext">
15398 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15399 <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>
15400 <div class="gallerytext">
15408 HTML Hex character encoding (spells the word "JavaScript")
15410 parsoid=wt2html,wt2wt,html2html
15412 JavaScript
15414 <p>JavaScript
15417 <p><span typeof="mw:Entity">J</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">v</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">S</span><span typeof="mw:Entity">c</span><span typeof="mw:Entity">r</span><span typeof="mw:Entity">i</span><span typeof="mw:Entity">p</span><span typeof="mw:Entity">t</span></p>
15421 HTML Hex character encoding bogus encoding (bug 26437 regression check)
15425 <p>&#xsee;&#XSEE;
15428 <p>&#xsee;&#XSEE;</p>
15432 HTML Hex character encoding mixed case
15434 parsoid=wt2html,wt2wt,html2html
15441 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
15445 __FORCETOC__ override
15457 ISBN 978-0-1234-56 789
15459 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
15464 ISBN followed by 5 spaces
15475 ISBN ISBN 1234567890
15477 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15486 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
15491 ISBN with empty prefix (parsoid test)
15495 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
15499 Bug 22905: <abbr> followed by ISBN followed by </a>
15501 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
15503 <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>
15512 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
15517 Double RFC with a wiki link
15521 <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>
15530 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
15535 Centre-aligned image
15537 [[Image:foobar.jpg|centre]]
15539 <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>
15546 [[Image:foobar.jpg|none]]
15548 <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>
15553 Width + Height sized image (using px) (height is ignored)
15555 [[Image:foobar.jpg|640x480px]]
15557 <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>
15562 Width-sized image (using px, no following whitespace)
15564 [[Image:foobar.jpg|640px]]
15566 <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>
15571 Width-sized image (using px, with following whitespace - test regression from r39467)
15573 [[Image:foobar.jpg|640px ]]
15575 <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>
15580 Width-sized image (using px, with preceding whitespace - test regression from r39467)
15582 [[Image:foobar.jpg| 640px]]
15584 <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>
15589 Image with page parameter
15593 [[File:LoremIpsum.djvu|page=2]]
15595 <p><a href="/index.php?title=File:LoremIpsum.djvu&page=2" class="image"><img alt="LoremIpsum.djvu" src="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-2480px-LoremIpsum.djvu.jpg" width="2480" height="3508" srcset="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-3720px-LoremIpsum.djvu.jpg 1.5x, http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-4960px-LoremIpsum.djvu.jpg 2x" /></a>
15600 Another italics / bold test
15608 # Note the results may be incorrect, as parserTest output included this:
15609 # XML error: Mismatched tag at byte 6120:
15610 # ...<dd> </dt></dl> </dd...
15641 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
15643 Images with the "|" character in the comment
15645 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
15647 <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>
15650 <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>An <a rel="mw:ExtLink" href="http://test/?param1=|left|&param2=|x">external</a> URL</figcaption></figure>
15654 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
15656 <html><script>alert(1);</script></html>
15658 <p><html><script>alert(1);</script></html>
15663 HTML with raw HTML ($wgRawHtml==true)
15667 <html><script>alert(1);</script></html>
15669 <p><script>alert(1);</script>
15674 Parents of subpages, one level up
15676 subpage title=[[Subpage test/L1/L2/L3]]
15680 <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>
15686 Parents of subpages, one level up, not named
15688 subpage title=[[Subpage test/L1/L2/L3]]
15692 <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>
15699 Parents of subpages, two levels up
15701 subpage title=[[Subpage test/L1/L2/L3]]
15707 <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
15708 </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>
15713 Parents of subpages, two levels up, without trailing slash or name.
15715 subpage title=[[Subpage test/L1/L2/L3]]
15724 Parents of subpages, two levels up, with lots of extra trailing slashes.
15726 subpage title=[[Subpage test/L1/L2/L3]]
15730 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
15735 Subpage test/L1/L2/L3Sibling
15741 Transclusion of a sibling page (one level up)
15743 subpage title=[[Subpage test/L1/L2/L3]]
15752 Transclusion of a child page
15754 subpage title=[[Subpage test/L1/L2]]
15763 Non-transclusion because of too many up levels
15765 subpage title=[[Subpage test/L1/L2/L3]]
15767 {{../../../../More than parent}}
15769 <p>{{../../../../More than parent}}
15774 Definition list code coverage
15780 <dl><dt> title  </dt>
15782 <dt> title </dt>
15790 Don't fall for the self-closing div
15792 <div>hello world</div/>
15794 <div>hello world</div>
15803 <p>[[:Template:Msg]]
15812 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
15816 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
15818 Always escape literal '>' in output, not just after '<'
15832 <p>This is a test template
15833 This is a test template
15845 Inclusion of !userCanEdit() content
15849 <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>
15855 Out-of-order TOC heading levels
15864 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15866 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
15868 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
15869 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
15872 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
15874 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
15875 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
15881 <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>
15882 <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>
15883 <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>
15884 <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>
15885 <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>
15886 <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>
15892 ISBN with a dummy number
15902 ISBN with space-delimited number
15906 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
15912 ISBN with multiple spaces, no number
15931 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15932 </p><p>ISBN 12345678901
15938 ISBN with trailing year (bug 8110)
15940 ISBN 1-234-56789-0 - 2006
15942 ISBN 1 234 56789 0 - 2006
15944 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
15945 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
15953 {{anchorencode:foo bar©#%n}}
15955 <p>foo_bar.C2.A9.23.25n
15960 anchorencode trims spaces
15962 {{anchorencode: __pretty__please__}}
15969 anchorencode deals with links
15971 {{anchorencode: [[hello|world]] [[hi]]}}
15978 anchorencode deals with templates
15980 {{anchorencode: {{Foo}} }}
15987 anchorencode encodes like the TOC generator: (bug 18431)
15989 === _ +:.3A%3A&&]] ===
15990 {{anchorencode: _ +:.3A%3A&&]] }}
15993 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
15994 <p>.2B:.3A.253A.26.26.5D.5D
15999 Bug 6200: blockquotes and paragraph formatting
16020 Bug 8293: Use of center tag ruins paragraph formatting
16041 Parsing of overlapping (improperly nested) inline html tags
16043 <span><s>x</span></s>
16045 <p><span><s>x</span></s></span>
16048 <p><span><s>x</s></span>
16053 ### Language variants related tests
16056 Self-link in language variants
16058 title=[[Dunav]] language=sr
16060 Both [[Dunav]] and [[Дунав]] are names for this river.
16062 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
16073 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
16075 title=[[Duna]] language=sr
16077 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
16079 <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.
16084 Link to a section of a variant of this title shouldn't be parsed as self-link
16086 title=[[Duna]] language=sr
16088 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
16090 <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.
16095 Link to pages in language variants
16099 Main Page can be written as [[Маин Паге]]
16101 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
16107 Multiple links to pages in language variants
16111 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
16113 <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>.
16119 Simple template in language variants
16125 <p>This is a test template
16131 Template with explicit namespace in language variants
16137 <p>This is a test template
16143 Basic test for template parameter in language variants
16147 {{парамтест|param=foo}}
16149 <p>This is a test template with parameter foo
16155 Simple category in language variants
16159 [[Category:МедиаWики Усер'с Гуиде]]
16161 <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>
16178 Don't convert blue categorylinks to another variant (bug 33210)
16182 [[A]][[Category:分类]]
16184 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
16189 Stripping -{}- tags (language variants)
16193 Latin proverb: -{Ne nuntium necare}-
16195 <p>Latin proverb: Ne nuntium necare
16201 Prevent conversion with -{}- tags (language variants)
16203 language=sr variant=sr-ec
16205 Latinski: -{Ne nuntium necare}-
16207 <p>Латински: Ne nuntium necare
16213 Prevent conversion of text with -{}- tags (language variants)
16215 language=sr variant=sr-ec
16217 Latinski: -{Ne nuntium necare}-
16219 <p>Латински: Ne nuntium necare
16225 Prevent conversion of links with -{}- tags (language variants)
16227 language=sr variant=sr-ec
16231 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16237 -{}- tags within headlines (within html for parserConvert())
16239 language=sr variant=sr-ec
16243 <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>
16249 Explicit definition of language variant alternatives
16251 language=zh variant=zh-tw
16253 -{zh:China;zh-tw:Taiwan}-, not China
16255 <p>Taiwan, not China
16261 Conversion around HTML tags
16263 language=sr variant=sr-ec
16265 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
16266 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
16269 <span title="ЛаCтин">ски</span>
16275 Explicit session-wise language variant mapping (A flag and - flag)
16277 language=zh variant=zh-tw
16279 Taiwan is not China.
16280 But -{A|zh:China;zh-tw:Taiwan}- is China,
16281 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
16282 and -{China}- is China.
16284 <p>Taiwan is not China.
16285 But Taiwan is Taiwan,
16286 (This should be stripped!)
16287 and China is China.
16292 Explicit session-wise language variant mapping (H flag for hide)
16294 language=zh variant=zh-tw
16296 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
16299 <p>(This should be stripped!)
16305 Adding explicit conversion rule for title (T flag)
16307 language=zh variant=zh-tw showtitle
16309 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16312 <p>Should be stripped!
16317 Testing that changing the language variant here in the tests actually works
16319 language=zh variant=zh showtitle
16321 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16324 <p>Should be stripped!
16329 Recursive conversion of alt and title attrs shouldn't clear converter state
16331 language=zh variant=zh-cn showtitle
16333 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
16334 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
16338 Should be stripped<span title="Exclamation">!</span>
16343 Bug 24072: more test on conversion rule for title
16345 language=zh variant=zh-tw showtitle
16347 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16348 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
16351 <p>This should be stripped!
16352 This won't take interferes with the title rule.
16357 Partly disable title conversion if variant == main language code
16359 language=zh variant=zh title=[[ZH]] showtitle
16361 -{T|zh-cn:CN;zh-tw:TW}-
16369 Partly disable title conversion if variant == main language code, more
16371 language=zh variant=zh title=[[ZH]] showtitle
16381 Raw output of variant escape tags (R flag)
16383 language=zh variant=zh-tw
16385 Raw: -{R|zh:China;zh-tw:Taiwan}-
16387 <p>Raw: zh:China;zh-tw:Taiwan
16392 Nested using of manual convert syntax
16394 language=zh variant=zh-hk
16396 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
16398 <p>Nested: Hello Hong Kong!
16403 Proper conversion of text in external links
16405 language=sr variant=sr-ec
16407 http://www.google.com
16408 gopher://www.google.com
16409 [http://www.google.com http://www.google.com]
16410 [gopher://www.google.com gopher://www.google.com]
16411 [https://www.google.com irc://www.google.com]
16412 [ftp://www.google.com www.google.com/ftp://dir]
16413 [//www.google.com www.google.com]
16415 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16416 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16417 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16418 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16419 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
16420 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
16421 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
16426 Do not convert roman numbers to language variants
16428 language=sr variant=sr-ec
16432 <p>Фридрих IV је цар.
16437 Unclosed language converter markup "-{"
16448 Don't convert raw rule "-{R|=>}-" to "=>"
16459 Don't break link parsing if language converter markup is in the caption.
16461 language=sr variant=sr-ec
16463 [[Main Page|-{R|main page}-]]
16465 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
16469 # This test is currently broken in the PHP parser (bug 52661)
16471 Don't break image parsing if language converter markup is in the caption.
16476 [[File:Foobar.jpg|-{R|caption}-]]
16478 <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>
16482 # This test is currently broken in the PHP parser (bug 52661)
16484 Don't break list handling if language converter markup is in the item.
16486 language=zh variant=zh-cn
16489 ;-{zh-cn:AAA;zh-tw:BBB}-
16496 # This test is currently broken in the PHP parser (bug 52661)
16498 Don't break table handling if language converter markup is in the cell.
16500 language=sr variant=sr-ec
16517 Bug 529: Uncovered bullet
16526 # Plain MediaWiki does not remove empty lists, but tidy actually does.
16527 # Templates in Wikipedia rely on this behavior, as tidy has always been
16528 # enabled there. These tests are normally run *without* tidy, so specify the
16529 # full output here.
16530 # To test realistic parsing behavior, apply a tidy-like transformation to both
16531 # the expected output and your parser's output.
16533 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
16535 ******* Foo {{bullet}}
16537 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo </li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li>
16543 Bug 529: Uncovered table already at line-start
16566 Bug 529: Uncovered bullet in parser function result
16568 * Foo {{lc:{{bullet}} }}
16576 Bug 5678: Double-parsed template argument
16578 {{lc:{{{1}}}|hello}}
16585 Bug 5678: Double-parsed template invocation
16587 {{lc:{{paramtest {{!}} param = hello }} }}
16589 <p>{{paramtest | param = hello }}
16594 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
16597 title=[[Main Page]]
16599 {{PRVNÍVELKÉ:ěščř}}
16600 {{prvnívelké:ěščř}}
16620 Morwen/13: Unclosed link followed by heading
16627 <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>
16632 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
16639 <h1><span class="mw-headline" id="heading">heading</span></h1>
16644 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
16651 <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>
16666 Paragraphs inside divs (no extra line breaks)
16678 Paragraphs inside divs (extra line break on open)
16693 Paragraphs inside divs (extra line break on close)
16708 Paragraphs inside divs (extra line break on open and close)
16725 Nesting tags, paragraphs on lines which begin with <div>
16729 <div></div><strong>A
16738 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
16740 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
16742 <blockquote>Line one
16744 Line two</blockquote>
16746 <blockquote>Line one
16747 Line two</blockquote>
16752 Bug 6200: paragraphs inside blockquotes (extra line break on open)
16757 Line two</blockquote>
16762 Line two</blockquote>
16767 Bug 6200: paragraphs inside blockquotes (extra line break on close)
16769 <blockquote>Line one
16774 <blockquote>Line one
16782 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
16799 Paragraphs inside blockquotes/divs (no extra line breaks)
16801 <blockquote><div>Line one
16803 Line two</div></blockquote>
16805 <blockquote><div>Line one
16806 Line two</div></blockquote>
16811 Paragraphs inside blockquotes/divs (extra line break on open)
16816 Line two</div></blockquote>
16821 Line two</div></blockquote>
16826 Paragraphs inside blockquotes/divs (extra line break on close)
16828 <blockquote><div>Line one
16831 </div></blockquote>
16833 <blockquote><div>Line one
16836 </div></blockquote>
16841 Paragraphs inside blockquotes/divs (extra line break on open and close)
16847 </div></blockquote>
16853 </div></blockquote>
16858 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
16860 wgLinkHolderBatchSize=0
16866 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
16867 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
16868 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
16873 Free external link invading image caption
16875 [[Image:Foobar.jpg|thumb|http://x|hello]]
16877 <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>
16882 Bug 15196: localised external link numbers
16886 [http://en.wikipedia.org/]
16888 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
16891 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
16895 Multibyte character in padleft
16897 {{padleft:-Hello|7|Æ}}
16904 Multibyte character in padright
16906 {{padright:Hello-|7|Æ}}
16913 formatdate parser function
16915 {{#formatdate:2009-03-24}}
16917 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
16922 formatdate parser function, with default format
16924 {{#formatdate:2009-03-24|mdy}}
16926 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
16931 Spacing of numbers in formatted dates
16933 {{#formatdate:January 15}}
16935 <p><span class="mw-formatted-date" title="01-15">January 15</span>
16940 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
16942 language=nl title=[[MediaWiki:Common.css]]
16944 {{#formatdate:2009-03-24|dmy}}
16946 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
16959 Edit comment with link
16963 I like the [[Main Page]] a lot
16965 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
16969 Edit comment with link and link text
16973 I like the [[Main Page|best pages]] a lot
16975 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16979 Edit comment with link and link text with suffix
16983 I like the [[Main Page|best page]]s a lot
16985 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16989 Edit comment with section link (non-local, eg in history list)
16991 comment title=[[Main Page]]
16993 /* External links */ removed bogus entries
16995 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
16999 Edit comment with section link and text before it (non-local, eg in history list)
17001 comment title=[[Main Page]]
17003 pre-comment text /* External links */ removed bogus entries
17005 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>
17009 Edit comment with section link (local, eg in diff view)
17011 comment local title=[[Main Page]]
17013 /* External links */ removed bogus entries
17015 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17019 Edit comment with subpage link (bug 14080)
17023 title=[[Subpage test]]
17025 Poked at a [[/subpage]] here...
17027 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
17031 Edit comment with subpage link and link text (bug 14080)
17035 title=[[Subpage test]]
17037 Poked at a [[/subpage|neat little page]] here...
17039 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
17043 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
17046 title=[[Subpage test]]
17048 Poked at a [[/subpage]] here...
17050 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
17054 Edit comment with bare anchor link (local, as on diff)
17058 title=[[Main Page]]
17062 <a href="#section">#section</a>
17066 Edit comment with bare anchor link (non-local, as on history)
17069 title=[[Main Page]]
17073 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
17077 Anchor starting with underscore
17081 <p><a href="#_ref">One</a>
17086 Id starting with underscore
17088 <div id="_ref"></div>
17090 <div id="_ref"></div>
17095 Space normalisation on autocomment (bug 22784)
17098 title=[[Main Page]]
17100 /* __hello__world__ */
17102 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
17106 percent-encoding and + signs in comments (Bug 26410)
17110 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
17112 <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>
17116 Bad images - basic functionality
17125 Bad images - bug 16039: text after bad image disappears
17139 Verify that displaytitle works (bug #22501) no displaytitle
17143 wgAllowDisplayTitle=true
17144 wgRestrictDisplayTitle=false
17146 this is not the the title
17149 <p>this is not the the title
17154 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
17159 wgAllowDisplayTitle=true
17160 wgRestrictDisplayTitle=false
17162 this is not the the title
17163 {{DISPLAYTITLE:whatever}}
17166 <p>this is not the the title
17171 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
17176 wgAllowDisplayTitle=true
17177 wgRestrictDisplayTitle=true
17179 this is not the the title
17180 {{DISPLAYTITLE:whatever}}
17183 <p>this is not the the title
17188 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
17193 wgAllowDisplayTitle=true
17194 wgRestrictDisplayTitle=true
17196 this is not the the title
17197 {{DISPLAYTITLE:screen}}
17200 <p>this is not the the title
17205 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
17210 wgAllowDisplayTitle=false
17212 this is not the the title
17213 {{DISPLAYTITLE:screen}}
17216 <p>this is not the the title
17217 <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>
17222 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
17227 wgAllowDisplayTitle=false
17229 this is not the the title
17232 <p>this is not the the title
17237 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
17242 wgAllowDisplayTitle=true
17243 wgRestrictDisplayTitle=true
17245 this is not the the title
17246 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
17248 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
17249 <p>this is not the the title
17254 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
17259 wgAllowDisplayTitle=true
17260 wgRestrictDisplayTitle=true
17262 this is not the the title
17263 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
17265 <span style="color: red;">s</span>creen
17266 <p>this is not the the title
17271 preload: check <noinclude> and <includeonly>
17275 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
17281 preload: check <onlyinclude>
17285 Goodbye <onlyinclude>Hello world</onlyinclude>
17291 preload: can pass tags through if we want to
17295 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
17297 <includeonly>Hello world</includeonly>
17301 preload: check that it doesn't try to do tricks
17305 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17307 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17311 Play a bit with r67090 and bug 3158
17315 <div style="width:50% !important"> </div>
17316 <div style="width:50% !important"> </div>
17317 <div style="width:50% !important"> </div>
17318 <div style="border : solid;"> </div>
17320 <div style="width:50% !important"> </div>
17321 <div style="width:50% !important"> </div>
17322 <div style="width:50% !important"> </div>
17323 <div style="border : solid;"> </div>
17328 HTML5 data attributes
17330 <span data-foo="bar">Baz</span>
17331 <p data-abc-def_hij="">Quuz</p>
17333 <p><span data-foo="bar">Baz</span>
17335 <p data-abc-def_hij="">Quuz</p>
17340 percent-encoding and + signs in internal links (Bug 26410)
17342 [[User:+%]] [[Page+title%]]
17343 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
17344 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
17345 [[%33%45]] [[%33%45+]]
17347 <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>
17348 <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>
17349 <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>
17350 <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>
17355 Special characters in embedded file links (bug 27679)
17357 [[File:Contains & ampersand.jpg]]
17358 [[File:Does not exist.jpg|Title with & ampersand]]
17360 <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>
17361 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
17367 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
17369 Text's been normalized?
17371 <p>Text's been normalized?
17376 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
17378 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
17380 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
17385 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
17387 [http://www.example.org/ ideograms]
17389 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
17394 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
17396 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
17398 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
17422 Bug 31098 Template which includes system messages which includes the template
17426 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17427 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17432 Bug31490 Turkish: ucfirst 'blah'
17443 Bug31490 Turkish: ucfirst 'ix'
17454 Bug31490 Turkish: lcfirst 'BLAH'
17465 Bug31490 Turkish: ucfırst (with a dotless i)
17471 <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>
17476 Bug31490 ucfırst (with a dotless i) with English language
17482 <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>
17487 Bug 26375: TOC with italics
17489 title=[[Main Page]]
17492 == ''Lost'' episodes ==
17494 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17496 <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>
17500 <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>
17505 Bug 26375: TOC with bold
17507 title=[[Main Page]]
17510 == '''should be bold''' then normal text ==
17512 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17514 <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>
17518 <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>
17523 Bug 33845: Headings become cursive in TOC when they contain an image
17525 title=[[Main Page]]
17528 == Image [[Image:foobar.jpg]] ==
17530 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17532 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
17536 <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>
17541 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
17543 title=[[Main Page]]
17546 == <blockquote>Quote</blockquote> ==
17548 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17550 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
17554 <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>
17559 Unclosed tags in TOC
17561 title=[[Main Page]]
17565 <small>Hanc marginis exiguitas non caperet.</small>
17568 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17570 <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>
17574 <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>
17575 <p><small>Hanc marginis exiguitas non caperet.</small>
17581 Multiple tags in TOC
17584 == <i>Foo</i> <b>Bar</b> ==
17586 == <i>Foo</i> <blockquote>Bar</blockquote> ==
17588 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17590 <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>
17591 <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>
17595 <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>
17596 <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>
17601 Tags with parameters in TOC
17604 == <sup class="in-h2">Hello</sup> ==
17606 == <sup class="a > b">Evilbye</sup> ==
17608 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17610 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
17611 <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>
17615 <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>
17616 <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>
17621 span tags with directionality in TOC
17624 == <span dir="ltr">C++</span> ==
17626 == <span dir="rtl">זבנג!</span> ==
17628 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
17630 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
17632 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
17634 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17636 <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>
17637 <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>
17638 <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>
17639 <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>
17640 <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>
17644 <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>
17645 <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>
17646 <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>
17647 <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>
17648 <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>
17655 == {{int:headline_sample}} ==
17659 Bug 32057: Title needed when expanding <h> nodes.
17661 title=[[Main Page]]
17665 <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>
17670 Strip marker in urlencode
17672 {{urlencode:x<nowiki/>y}}
17673 {{urlencode:x<nowiki/>y|wiki}}
17674 {{urlencode:x<nowiki/>y|path}}
17701 Strip marker in formatNum
17703 {{formatnum:1<nowiki/>2}}
17704 {{formatnum:1<nowiki/>2|R}}
17712 Check noCommafy in formatNum
17716 {{formatnum:123456.78}}
17717 {{formatnum:123456.78|NOSEP}}
17725 Wrong option for formatNum (bug 56199)
17727 {{formatnum:1,234.56|Random}}
17728 {{formatnum:1,234.56|EVERYTHING}}
17729 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
17738 Strip marker in grammar
17742 {{grammar:elative|foo<nowiki/>bar}}
17749 Strip marker in padleft
17751 {{padleft:|2|x<nowiki/>y}}
17758 Strip marker in padright
17760 {{padright:|2|x<nowiki/>y}}
17767 Strip marker in anchorencode
17769 {{anchorencode:x<nowiki/>y}}
17776 nowiki inside link inside heading (bug 18295)
17778 ==[[foo|x<nowiki>y</nowiki>z]]==
17780 <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>
17785 new support for bdi element (bug 31817)
17787 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17789 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17794 Ignore pipe between table row attributes
17798 |- id=foo | style='color: red'
17806 <tr id="foo" style="color: red">
17813 Gallery override link with WikiLink (bug 34852)
17816 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
17819 <ul class="gallery mw-gallery-traditional">
17820 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17821 <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>
17822 <div class="gallerytext">
17832 Gallery override link with absolute external link (bug 34852)
17835 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
17838 <ul class="gallery mw-gallery-traditional">
17839 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17840 <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>
17841 <div class="gallerytext">
17851 Gallery override link with malicious javascript (bug 34852)
17854 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
17857 <ul class="gallery mw-gallery-traditional">
17858 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17859 <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>
17860 <div class="gallerytext">
17870 Gallery with invalid title as link (bug 43964)
17873 File:foobar.jpg|link=<
17876 <ul class="gallery mw-gallery-traditional">
17877 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17878 <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>
17879 <div class="gallerytext">
17887 Language parser function
17896 Padleft and padright as substr
17898 {{padleft:|3|abcde}}
17899 {{padright:|3|abcde}}
17907 Special parser function
17909 {{#special:RandomPage}}
17910 {{#special:BaDtItLe}}
17911 {{#special:Foobar}}
17920 Bug 34939 - Case insensitive link parsing ([HttP://])
17922 [HttP://MediaWiki.Org/]
17924 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
17927 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
17931 Bug 34939 - Case insensitive link parsing ([HttP:// title])
17933 [HttP://MediaWiki.Org/ MediaWiki]
17935 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
17940 Bug 34939 - Case insensitive link parsing (HttP://)
17942 HttP://MediaWiki.Org/
17944 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
17947 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
17965 <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>
17966 <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>
17967 <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>
17968 <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>
17969 <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>
17975 ### Parsoid-specific tests
17976 ### Parsoid-PHP parser incompatibilities
17979 1. SOL-sensitive wikitext tokens as template-args
17981 parsoid=wt2html,wt2wt
17987 <span about="#mwt1" typeof="mw:Transclusion">
17988 </span><ul about="#mwt1"><li>a</li>
17990 <span about="#mwt2" typeof="mw:Transclusion">
17991 </span><ol about="#mwt2"><li>a</li>
17993 <span about="#mwt3" typeof="mw:Transclusion">
17994 </span><dl about="#mwt3"><dd>a</dd>
17998 #### -----------------------------------------------------------------
17999 #### Parsoid-specific functionality tests
18000 #### -----------------------------------------------------------------
18002 # Bug 63642: Formatting elt fixup is cleaned up.
18003 # We know wt2wt will fail, but we expect selser to pass.
18004 # Due to the nature of our testing, wt2wt and selser tests will enter the
18005 # blacklist and we'll catch selser regressions based on changes to the
18006 # blacklist entries for selser tests.
18008 Bad treebuilder fixup of formatting elt is cleaned up
18010 parsoid=wt2html,wt2wt
18015 [[Image:Foobar.jpg|right|Test]]
18021 <p><small></small></p>
18022 <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><small>Test</small></figcaption></figure>
18027 #### ----------------------------------------------------------------
18028 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
18029 #### tags. Parsoid's output for these tags differs from that of the
18031 #### ----------------------------------------------------------------
18034 Ref: 1. ref-location should be replaced with an index span
18039 B <ref name="x">foo</ref>
18042 <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>
18043 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>
18044 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>
18048 Ref: 2. ref-tags with identical names should all get the same index
18052 A <ref name="x">foo</ref>
18055 <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>
18056 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>
18060 Ref: 3. spaces in ref-names should be ignored
18064 A <ref name="x">foo</ref>
18065 B <ref name=" x " />
18068 <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>
18069 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>
18070 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>
18074 Ref: 4. 'constructor' should be accepted as a valid ref-name
18075 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
18079 A <ref name="constructor">foo</ref>
18081 <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>
18085 Ref: 5. body should accept generic wikitext
18090 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
18095 <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='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[55,76,null,null]}'>transclusion</span>\n"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
18097 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
18098 <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>
18104 Ref: 6. indent-pres should not be output in ref-body
18116 <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>
18118 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
18119 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18127 Ref: 7. No p-wrapping in ref-body
18146 <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>
18148 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18149 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18164 Ref: 8. transclusion wikitext has lower precedence
18168 A <ref> foo {{echo|</ref> B C}}
18172 <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>
18173 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
18174 <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>
18179 Ref: 9. unclosed comments should not leak out of ref-body
18183 A <ref> foo <!--</ref> B C
18186 <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>
18187 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18188 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
18193 Ref: 10. Unclosed HTML tags should not leak out of ref-body
18197 A <ref> <b> foo </ref> B C
18201 <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>
18204 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18205 <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>
18210 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
18217 <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
18218 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>
18222 Ref: 12. ref-tags act as trailing newline migration barrier
18226 <!--the newline at the end of this line moves out of the p-tag-->a
18228 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
18233 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
18236 <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>
18237 <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>
18244 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
18252 <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
18253 <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>
18257 Ref: 14. A nested ref-tag should be emitted as plain text
18261 <ref>foo <ref>bar</ref> baz</ref>
18265 <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>
18267 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18268 <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>
18273 Ref: 15. ref-tags with identical names should get identical indexes
18277 A1 <ref name="a">foo</ref> A2 <ref name="a" />
18278 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
18282 <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>
18283 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>
18285 <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>
18289 ## We don't bother wt2wt-ing non-standard whitespace
18291 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
18299 <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>
18301 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18302 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
18306 References: 1. references tag without any refs should be handled properly
18312 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
18316 References: 2. references tag with group only outputs references from that group
18320 A <ref group="a">foo</ref>
18321 B <ref group="b">bar</ref>
18323 <references group="a" />
18325 <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>
18326 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>
18328 <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>
18333 References: 3. ref list should be cleared after processing references
18345 <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>
18347 <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>
18350 <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>
18352 <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>
18357 References: 4. only referenced group should be cleared after processing references
18361 A <ref group="a">afoo</ref>
18364 <references group="a" />
18370 <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>
18371 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>
18373 <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>
18376 <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>
18378 <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>
18383 References: 5. ref tags in references should be processed while ignoring all other content
18388 B <ref name="b">bar</ref>
18391 <ref name="a">foo</ref>
18392 This should just get lost.
18395 <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>
18396 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>
18399 <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":{}}'>
18400 <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>
18401 <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>
18406 References: 6. <references /> from a transclusion
18410 <ref>Foo</ref> {{echo|<references />}}
18412 <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>
18416 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
18420 A <ref>foo bar for a</ref>
18421 B <ref group="X" name="b" />
18425 <references group="X">
18426 <ref name="b">foo</ref>
18429 <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>
18430 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>
18432 <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>
18434 <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>
18438 Entities in ref name
18442 <ref name="test & me">hi</ref>
18444 <p data-parsoid='{}'><span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"hi"},"attrs":{"name":"test & me"}}' id="cite_ref-test & me-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref name=\"test &amp; me\">hi</ref>"}'><a href="#cite_note-test & me-1" data-parsoid="{}">[1]</a></span></p>
18447 # This test is wt2html only because we're permitting the serializer to produce
18448 # dirty diffs, normalizing the unclosed references to the self-closed version.
18450 Generate references for unclosed references tag
18458 <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>
18461 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
18462 <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>
18466 New reference serializes on its own line
18468 parsoid=wt2wt,html2wt
18473 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
18476 #### ----------------------------------------------------------------
18477 #### The following section of tests are primarily to test
18478 #### wikitext escaping capabilities of Parsoid. Given that
18479 #### escaping can be done any number of ways, the wikitext (input)
18480 #### is always adjusted to reflect how Parsoid adds nowiki
18483 #### We are marking several tests as parsoid-only since the
18484 #### HTML in the result section is different from what the
18485 #### PHP parser generates for it.
18486 #### ----------------------------------------------------------------
18489 #### --------------- Headings ---------------
18491 #### 1. Nested inside html <h1>=foo=</h1>
18492 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
18493 #### 3. Nested inside html with wikitext split by html tags
18494 #### 4. No escape needed
18495 #### 5. Empty headings <h1></h1>
18496 #### 6. Heading chars in SOL context
18497 #### ----------------------------------------
18499 Headings: 0. Unnested
18503 <nowiki>=foo=</nowiki>
18505 <nowiki> =foo= </nowiki>
18507 <nowiki>=foo=</nowiki>
18509 =foo''a''<nowiki>=</nowiki>
18511 <p><span typeof="mw:Nowiki">=foo=</span></p>
18513 <p><span typeof="mw:Nowiki"> =foo= </span>
18515 <span typeof="mw:Nowiki">=foo=</span></p>
18517 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
18521 Headings: 1. Nested inside html
18522 (New headings and existing headings are handled differently)
18532 =<nowiki>=foo=</nowiki>=
18533 ==<nowiki>=foo=</nowiki>==
18534 ===<nowiki>=foo=</nowiki>===
18535 ====<nowiki>=foo=</nowiki>====
18536 =====<nowiki>=foo=</nowiki>=====
18537 ======<nowiki>=foo=</nowiki>======
18544 <h1 data-parsoid='{}'>=foo=</h1>
18545 <h2 data-parsoid='{}'>=foo=</h2>
18546 <h3 data-parsoid='{}'>=foo=</h3>
18547 <h4 data-parsoid='{}'>=foo=</h4>
18548 <h5 data-parsoid='{}'>=foo=</h5>
18549 <h6 data-parsoid='{}'>=foo=</h6>
18553 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
18558 <nowiki>*</nowiki>bar
18564 <nowiki>=bar=</nowiki>
18572 Headings: 3. Nested inside html with wikitext split by html tags
18576 = ='''bold'''<nowiki>foo=</nowiki> =
18578 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
18582 Headings: 4a. No escaping needed (testing just h1 and h2)
18600 = <nowiki>=</nowiki> =
18608 <h1><i>=</i>foo=</h1>
18609 <h1><span typeof="mw:Nowiki">=</span></h1>
18613 Headings: 4b. No escaping needed (inside p-tags)
18628 Headings: 5. Empty headings
18640 =====<nowiki/>=====
18642 ======<nowiki/>======
18653 Headings: 6a. Heading chars in SOL context (with trailing spaces)
18657 <nowiki>=a=</nowiki>
18659 <nowiki>=a=</nowiki>
18661 <nowiki>=a=</nowiki>
18663 <nowiki>=a=</nowiki>
18672 Headings: 6b. Heading chars in SOL context (with trailing newlines)
18700 Headings: 6c. Heading chars in SOL context (leading newline break)
18705 <nowiki>=b=</nowiki>
18712 Headings: 6d. Heading chars in SOL context (with interspersed comments)
18716 <!--c0--><nowiki>=a=</nowiki>
18718 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
18720 <p><!--c0-->=a=</p>
18721 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
18725 Headings: 6d. Heading chars in SOL context (No escaping needed)
18734 #### --------------- Lists ---------------
18735 #### 0. Outside nests (*foo, etc.)
18736 #### 1. Nested inside html <ul><li>*foo</li></ul>
18737 #### 2. Inside definition lists
18738 #### 3. Only bullets at start should be escaped
18739 #### 4. No escapes needed
18740 #### 5. No unnecessary escapes
18741 #### 6. Escape bullets in SOL position
18742 #### 7. Escape bullets in a multi-line context
18743 #### ----------------------------------------
18746 Lists: 0. Outside nests
18748 <nowiki>*</nowiki>foo
18750 <nowiki>#</nowiki>foo
18752 <nowiki>;Foo:</nowiki>bar
18761 Lists: 1. Nested inside html
18763 *<nowiki>*foo</nowiki>
18765 *<nowiki>#foo</nowiki>
18767 *<nowiki>:foo</nowiki>
18769 *<nowiki>;foo</nowiki>
18771 #<nowiki>*foo</nowiki>
18773 #<nowiki>#foo</nowiki>
18775 #<nowiki>:foo</nowiki>
18777 #<nowiki>;foo</nowiki>
18779 <ul><li>*foo</li></ul>
18780 <ul><li>#foo</li></ul>
18781 <ul><li>:foo</li></ul>
18782 <ul><li>;foo</li></ul>
18783 <ol><li>*foo</li></ol>
18784 <ol><li>#foo</li></ol>
18785 <ol><li>:foo</li></ol>
18786 <ol><li>;foo</li></ol>
18791 Lists: 2. Inside definition lists
18793 ;<nowiki>;foo</nowiki>
18795 ;<nowiki>:foo</nowiki>
18797 ;<nowiki>:foo</nowiki>
18800 :<nowiki>:foo</nowiki>
18802 <dl><dt>;foo</dt></dl>
18803 <dl><dt>:foo</dt></dl>
18806 <dl><dd>:foo</dd></dl>
18811 Lists: 3. Only bullets at start of text should be escaped
18813 *<nowiki>*foo*bar</nowiki>
18815 *<nowiki>*foo</nowiki>''it''*bar
18817 <ul><li>*foo*bar</li></ul>
18818 <ul><li>*foo<i>it</i>*bar</li></ul>
18823 Lists: 4. No escapes needed
18844 <li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
18848 <li><a rel="mw:WikiLink" href="Foo">Foo</a>*bar
18854 Lists: 5. No unnecessary escapes
18856 * bar <span><nowiki>[[foo]]</nowiki></span>
18858 *=bar <span><nowiki>[[foo]]</nowiki></span>
18860 *[[bar <span><nowiki>[[foo]]</nowiki></span>
18862 *]]bar <span><nowiki>[[foo]]</nowiki></span>
18864 *=bar <span>foo]]</span>=
18868 <ul><li> bar <span>[[foo]]</span></li></ul>
18869 <ul><li>=bar <span>[[foo]]</span></li></ul>
18870 <ul><li>[[bar <span>[[foo]]</span></li></ul>
18871 <ul><li>]]bar <span>[[foo]]</span></li></ul>
18872 <ul><li>=bar <span>foo]]</span>=</li></ul>
18873 <ul><li> <s></s>: a</li></ul>
18878 Lists: 6. Escape bullets in SOL position
18882 <!--cmt--><nowiki>*foo</nowiki>
18884 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
18888 Lists: 7. Escape bullets in a multi-line context
18891 <nowiki>*</nowiki>b
18898 #### --------------- HRs ---------------
18899 #### 1. Single line
18900 #### -----------------------------------
18903 HRs: 1. Single line
18907 ----<nowiki>----</nowiki>
18911 <hr><span typeof="mw:Nowiki">----</span>
18916 #### --------------- Tables ---------------
18917 #### 1a. Simple example
18918 #### 1b. No escaping needed (!foo)
18919 #### 1c. No escaping needed (|foo)
18920 #### 1d. No escaping needed (|}foo)
18922 #### 2a. Nested in td (<td>foo|bar</td>)
18923 #### 2b. Nested in td (<td>foo||bar</td>)
18924 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
18926 #### 3a. Nested in th (<th>foo!bar</th>)
18927 #### 3b. Nested in th (<th>foo!!bar</th>)
18928 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
18932 #### 4c. No escaping needed
18933 #### --------------------------------------
18936 Tables: 1a. Simple example
18947 Tables: 1b. No escaping needed
18956 Tables: 1c. No escaping needed
18965 Tables: 1d. No escaping needed
18974 Tables: 2a. Nested in td
18979 |<nowiki>foo|bar</nowiki>
18981 |x<div><nowiki>a|b</nowiki></div>
18985 <td>foo|bar</td></tr>
18986 <tr><td>x<div>a|b</div></td>
18991 Tables: 2b. Nested in td
18996 |<nowiki>foo||bar</nowiki>
18997 |''it''<nowiki>foo||bar</nowiki>
19001 <td><span typeof="mw:Nowiki">foo||bar</span></td>
19002 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
19006 Tables: 2c. Nested in td -- no escaping needed
19014 <table><tbody><tr><td>foo!!bar
19015 </td></tr></tbody></table>
19020 Tables: 3a. Nested in th
19028 <table><tbody><tr><th>foo!bar
19029 </th></tr></tbody></table>
19034 Tables: 3b. Nested in th
19039 !<nowiki>foo!!bar</nowiki>
19043 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
19048 Tables: 3c. Nested in th -- no escaping needed
19053 !<nowiki>foo||bar</nowiki>
19057 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
19061 Tables: 4a. Escape -
19068 |<nowiki>-bar</nowiki>
19072 <tr><th>-bar</th></tr>
19074 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
19078 Tables: 4b. Escape +
19085 |<nowiki>+bar</nowiki>
19089 <tr><th>+bar</th></tr>
19091 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
19095 Tables: 4c. No escaping needed
19116 <tr><td>foo-bar</td><td>foo+bar</td></tr>
19117 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
19123 <div>a|b</div></td>
19128 Tables: 4d. No escaping needed
19139 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo">Foo</a>-bar</td>
19140 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
19141 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
19146 Tables: Digest broken attributes on table and tr tag
19162 #### --------------- Links ----------------
19163 #### 1. Quote marks in link text
19164 #### 2. Wikilinks: Escapes needed
19165 #### 3. Wikilinks: No escapes needed
19166 #### 4. Extlinks: Escapes needed
19167 #### 5. Extlinks: No escapes needed
19168 #### --------------------------------------
19170 Links 1. Quote marks in link text
19174 [[Foo|Foo<nowiki>''boo''</nowiki>]]
19176 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
19180 Links 2. WikiLinks: Escapes needed
19185 [[Foo|<nowiki>Foobar]</nowiki>]]
19186 [[Foo|x [Foobar] x]]
19187 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
19188 [[Foo|<nowiki>[[Bar]]</nowiki>]]
19189 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
19190 [[Foo|<nowiki>|Bar</nowiki>]]
19191 [[Foo|<nowiki>]]bar</nowiki>]]
19192 [[Foo|<nowiki>[[bar</nowiki>]]
19193 [[Foo|<nowiki>x [[ y</nowiki>]]
19194 [[Foo|<nowiki>x ]] y</nowiki>]]
19195 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
19197 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
19198 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
19199 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
19200 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
19201 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
19202 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
19203 <a href="Foo" rel="mw:WikiLink">|Bar</a>
19204 <a href="Foo" rel="mw:WikiLink">]]bar</a>
19205 <a href="Foo" rel="mw:WikiLink">[[bar</a>
19206 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
19207 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
19208 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
19212 Links 3. WikiLinks: No escapes needed
19219 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
19220 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
19224 Links 4. ExtLinks: Escapes needed
19228 [http://google.com <nowiki>[google]</nowiki>]
19229 [http://google.com <nowiki>google]</nowiki>]
19231 <nowiki>[http://google.com]</nowiki>
19233 <nowiki>[http://google.com google]</nowiki>
19236 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
19237 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
19238 <p>[http://google.com]</p>
19239 <p>[http://google.com google]</p>
19243 Links 5. ExtLinks: No escapes needed
19247 [http://google.com [google]
19249 <a href="http://google.com" rel="mw:ExtLink">[google</a>
19253 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
19255 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
19256 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
19257 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
19258 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
19259 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
19260 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
19261 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
19262 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
19263 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
19264 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
19265 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
19266 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
19267 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
19270 x<nowiki/>http://example.com<nowiki/>y
19271 http://example.com<nowiki/>?x
19272 http://example.com<nowiki/>&x
19273 http://example.com<nowiki/>'x
19274 http://example.com<nowiki/>,x
19275 http://example.com<nowiki/>.x
19276 http://example.com<nowiki/>;x
19277 http://example.com<nowiki/>:x
19278 http://example.com<nowiki/>;x
19279 http://example.com<nowiki/>!x
19280 http://example.com<nowiki/>=x
19281 http://example.com<nowiki/>(x)
19282 http://example.com(x<nowiki/>)
19286 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19289 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
19291 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
19292 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
19293 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
19294 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
19295 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
19301 "http://example.com"
19302 (http://example.com)
19303 (http://example.com) foo
19304 http://example.com,
19305 http://example.com, foo
19308 ## Parsoid currently fails wt2html on this one!
19310 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19312 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
19314 http://example.com.,;:!?
19318 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
19320 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
19326 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
19328 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19329 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19330 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
19331 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
19341 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
19343 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
19349 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
19351 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19352 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19353 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
19354 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
19364 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
19366 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
19367 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
19368 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
19371 ISBN 1234567890<nowiki/>1
19372 ISBN 1234567890<nowiki/>x
19373 ISBN 1234567890<nowiki/>b
19377 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
19379 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
19384 #### --------------- Quotes ---------------
19385 #### 1. Quotes inside <b> and <i>
19386 #### 2. Link fragments separated by <i> and <b> tags
19387 #### 3. Link fragments inside <i> and <b>
19388 #### 4. No escaping needed
19389 #### --------------------------------------
19391 1. Quotes inside <b> and <i>
19393 parsoid=html2wt,wt2wt
19395 ''<nowiki>'foo'</nowiki>''
19396 ''<nowiki>''foo''</nowiki>''
19397 ''<nowiki>'''foo'''</nowiki>''
19399 '''<nowiki>'foo'</nowiki>'''
19400 '''<nowiki>''foo''</nowiki>'''
19401 '''<nowiki>'''foo'''</nowiki>'''
19402 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
19403 '''foo'''<nowiki/>'s
19406 '<nowiki/>''foo''<nowiki/>'
19408 '''foo'''<nowiki/>'
19409 '<nowiki/>'''foo'''<nowiki/>'
19410 ''fools'<span> errand</span>''
19411 ''<span>fool</span>'s errand''
19420 <b>foo'<i>bar'</i>baz</b>
19428 <i>fools'<span> errand</span></i>
19429 <i><span>fool</span>'s errand</i>
19433 2. Link fragments separated by <i> and <b> tags
19435 [[''foo''<nowiki>hello]]</nowiki>
19437 [['''foo'''<nowiki>hello]]</nowiki>
19439 <p>[[<i>foo</i>hello]]
19440 </p><p>[[<b>foo</b>hello]]
19445 3. Link fragments inside <i> and <b>
19446 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
19447 this is one of the shortcomings of this format)
19449 ''[[foo''<nowiki>]]</nowiki>
19451 '''[[foo'''<nowiki>]]</nowiki>
19454 </p><p><b>[[foo</b>]]
19459 4. No escaping needed
19461 '<span>''bar''</span>'
19462 '<span>'''bar'''</span>'
19464 <p>'<span><i>bar</i></span>'
19465 '<span><b>bar</b></span>'
19469 #### ----------- Paragraphs ---------------
19470 #### 1. No unnecessary escapes
19471 #### --------------------------------------
19474 1. No unnecessary escapes
19476 bar <span><nowiki>[[foo]]</nowiki></span>
19478 =bar <span><nowiki>[[foo]]</nowiki></span>
19480 [[bar <span><nowiki>[[foo]]</nowiki></span>
19482 ]]bar <span><nowiki>[[foo]]</nowiki></span>
19484 =bar <span>foo]]</span><nowiki>=</nowiki>
19486 <p>bar <span>[[foo]]</span>
19487 </p><p>=bar <span>[[foo]]</span>
19488 </p><p>[[bar <span>[[foo]]</span>
19489 </p><p>]]bar <span>[[foo]]</span>
19490 </p><p>=bar <span>foo]]</span>=
19494 #### ----------------------- PRE --------------------------
19495 #### 1. Leading whitespace in SOL context should be escaped
19496 #### ------------------------------------------------------
19498 1. Leading whitespace in SOL context should be escaped
19502 <nowiki> </nowiki>a
19504 <nowiki> </nowiki> a
19506 <nowiki> </nowiki>a(tab)
19508 <nowiki> </nowiki> a
19510 <nowiki> </nowiki> a
19513 <nowiki> </nowiki>b
19516 <nowiki> </nowiki>b
19519 <nowiki> </nowiki> b
19525 <p><!--cmt--> a</p>
19535 2. Leading whitespace in non-indent-pre contexts should not be escaped
19542 <p>foo <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"<i data-parsoid='{\"dsr\":[9,14,2,2]}'>a</i>\n b"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
19546 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
19565 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
19569 [[File:Foobar.jpg|thumb|caption]]
19572 <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>
19575 #### --------------- Behavior Switches --------------------
19577 1. Valid behavior switches should be escaped
19581 <nowiki>__TOC__</nowiki>
19582 ''<nowiki>__TOC__</nowiki>''
19589 2. Invalid behavior switches should not be escaped
19600 #### --------------- HTML tags ---------------
19603 #### 3. multi-line html tag
19604 #### 4. extension tags
19605 #### -----------------------------------------
19611 <a href="http://google.com">google</a>
19613 <a href="http://google.com">google</a>
19619 <nowiki><div>foo</div>
19620 <div style="color:red">foo</div></nowiki>
19622 <p><div>foo</div>
19623 <div style="color:red">foo</div>
19628 3. multi-line html tag
19643 <nowiki><ref>foo</ref></nowiki>
19645 <nowiki><ref>bar</nowiki>
19647 baz<nowiki></ref></nowiki>
19649 <p><ref>foo</ref>
19650 </p><p><ref>bar
19651 </p><p>baz</ref>
19655 #### --------------- Others ---------------
19659 <nowiki>foo</nowiki>
19661 <p><nowiki>foo</nowiki>
19665 ## The quote-char in the input is necessary for triggering the bug
19667 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
19669 parsoid=wt2wt,html2wt
19678 Tag-like HTML structures are passed through as text
19700 </p><p>1<d e>f
19705 # This was a bug in the PHP parser (see bug 17663 and its dups,
19706 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
19708 Tag names followed by punctuation should not be recognized as tags
19712 <p><s.ome> text
19717 HTML tag with necessary entities in attributes
19719 <span title="&amp;">foo</span>
19721 <p><span title="&amp;">foo</span>
19726 HTML tag with 'unnecessary' entity encoding in attributes
19728 <span title="&">foo</span>
19730 <p><span title="&">foo</span>
19735 HTML tag with broken attribute value quoting
19737 <span title="Hello world>Foo</span>
19739 <p><span>Foo</span>
19744 Parsoid-only: HTML tag with broken attribute value quoting
19748 <span title="Hello world>Foo</span>
19750 <p><span title="Hello world">Foo</span>
19755 Table with broken attribute value quoting
19758 | title="Hello world|Foo
19769 Table with broken attribute value quoting on consecutive lines
19772 | title="Hello world|Foo
19773 | style="color:red|Bar
19786 Parsoid-only: Table with broken attribute value quoting on consecutive lines
19791 | title="Hello world|Foo
19792 | style="color:red|Bar
19797 <td title="Hello world">Foo
19798 </td><td style="color: red">Bar
19799 </td></tr></tbody></table>
19804 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19814 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19824 Accept empty td cell attribute
19827 | align="center" | foo || |
19832 <td align="center"> foo </td>
19839 Non-empty attributes in th-cells
19842 ! Foo !! style="color: red" | Bar
19848 <th style="color: red"> Bar
19854 Accept empty attributes in th-cells
19869 Empty table rows go away
19890 ### Parsoid-centric tests for testing RTing of inter-element separators
19891 ### Edge cases not tested by existing parser tests and specific to
19892 ### Parsoid-specific serialization strategies.
19896 RT-ed inter-element separators should be valid separators
19909 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
19910 (Parsoid-only since PHP parser relies on Tidy for correct output)
19926 Empty TD followed by TD with tpl-generated attribute
19931 |{{echo|style='color:red'}}|foo
19945 Indented table with an empty td
19964 Indented block & table
19971 <div data-parsoid='{"stx":"html"}'>foo</div>
19973 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
19978 Indent and comment before table row
19985 <table data-parsoid='{}'>
19986 <!--hi--><tbody data-parsoid='{}'><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
19987 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
19992 Empty TR followed by a template-generated TR
19993 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
19999 {{echo|<tr><td>foo</td></tr>}}
20005 <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}}]}'>
20010 ## PHP and parsoid output differ for this, and since this is primarily
20011 ## for testing Parsoid's serializer, marking this Parsoid only
20013 Empty TR followed by mixed-ws-comment line should RT correctly
20029 <!--c--> </tr><!--d-->
20035 Multi-line image caption generated by templates with/without trailing newlines
20039 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
20040 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
20042 <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>
20043 <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>
20048 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
20052 <includeonly>foo</includeonly>
20059 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
20061 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
20064 ## PHP emits broken html for this, and since this is primarily
20065 ## a Parsoid serializer test, marking this Parsoid only
20067 Improperly nested inline or quotes tags with whitespace in between
20071 <span> <s>x</span> </s>
20074 <p><span> <s>x</s></span><s> </s>
20075 <b> <i>x</i></b><i> </i>
20080 Encapsulate protected attributes from wt
20084 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
20086 <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>
20090 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
20091 ## Having nested or stray pre tags results in the attempt to add duplicates,
20092 ## causing an assertion fail. This test tries to prevent that situation.
20094 Ensure ParagraphWrapper can deal with stray closing pre tags
20104 1. Ensure fostered text content is wrapped in spans
20108 <table>hi</table><table>ho</table>
20117 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
20119 parsoid=wt2html,wt2wt
20126 <span> || ||</span>
20135 Encapsulation properly handles null DSR information from foster box
20137 parsoid=wt2html,wt2wt
20139 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
20141 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20144 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
20148 <td>bar</td></tr></tbody></table>
20152 1. Encapsulate foster-parented transclusion content
20154 parsoid=wt2wt,wt2html
20156 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
20158 <span typeof="mw:Transclusion" data-mw="{"parts":["
20159 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
20161 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
20165 <td>bar</td></tr></tbody></table>
20169 2. Encapsulate foster-parented transclusion content
20171 parsoid=wt2wt,wt2html
20173 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
20175 <div typeof="mw:Transclusion" data-mw="{"parts":["
20177 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
20179 <td>bar</td></tr></table>"]}">foo</div>
20183 <td>bar</td></tr></tbody></table>
20187 3. Encapsulate foster-parented transclusion content
20189 parsoid=wt2wt,wt2html
20191 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20193 <div typeof="mw:Transclusion" data-mw="{"parts":["
20196 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20198 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20203 <td>bar</td></tr></tbody></table>
20207 4. Encapsulate foster-parented transclusion content
20209 parsoid=wt2wt,wt2html
20211 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20213 <div typeof="mw:Transclusion" data-mw="{"parts":["
20216 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20218 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20223 <td>bar</td></tr></tbody></table>
20227 5. Encapsulate foster-parented transclusion content
20229 parsoid=wt2wt,wt2html
20231 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
20233 <span typeof="mw:Transclusion" data-mw="{"parts":["
20238 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
20244 <p>foo</p></div></td></tr></tbody></table>
20248 6. Encapsulate foster-parented transclusion content
20250 parsoid=wt2wt,wt2html
20252 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
20254 <span typeof="mw:Transclusion" data-mw="{"parts":["
20259 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
20265 <p>foo</p></div></td></tr></tbody></table>
20270 7. Encapsulate foster-parented transclusion content
20272 parsoid=wt2wt,wt2html
20274 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
20276 <p typeof="mw:Transclusion" data-mw="{"parts":["
20277 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20278 <p>foo</p>"}},"i":0}},"
20279 <td>bar</td></table>"]}">foo</p>
20283 <td>bar</td></tr></tbody></table>
20287 8. Encapsulate foster-parented transclusion content
20289 parsoid=wt2wt,wt2html
20292 }}{|{{echo|style='color:red'}}
20297 <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>
20301 <td>b</td></tr></tbody></table>
20305 9. Encapsulate foster-parented transclusion content
20307 parsoid=wt2wt,wt2html
20309 <table>{{echo|hi</table>hello}}
20311 <span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}' data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"pi":[[{"k":"1","spc":["","","",""]}]]}'>hi</span>
20312 <table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2" data-parsoid="{}">hello</span>
20316 Table in fosterable position
20318 parsoid=wt2html,wt2wt
20327 <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="{}">
20329 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
20335 # Parsoid only for bug 64747
20337 Properly encapsulate empty-content transclusions in fosterable positions
20345 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n",{"template":{"target":{"wt":"#if:","function":"#if"},"params":{"1":{"wt":"\n<td>foo</td>\n"}},"i":0}},"\n</table>"]}' data-parsoid='{"stx":"html","pi":[[{"k":"1","spc":["","","",""]}]],"src":"<table>\n{{#if:|\n<td>foo</td>\n}}\n</table>"}'>
20351 Support <object> element with .data attribute
20355 <object data="test.swf"></object>
20357 <object data="test.swf"></object>
20360 # -----------------------------------------------------------------
20361 # The following section of tests are primarily to spec requirements
20362 # around serialization of new/edited content.
20364 # All these tests are marked Parsoid html2wt and html2html only
20365 # ----------------------------------------------------------------
20368 Image: Modifying size of an image (1)
20371 "modes": ["wt2wt"],
20373 ["img[height]", "attr", "height", "22"],
20374 ["img[width]", "attr", "width", "200"]
20378 [[Image:Foobar.jpg|230x230px]]
20380 [[Image:Foobar.jpg|200x200px]]
20384 Image: Modifying size of an image (2)
20387 "modes": ["wt2wt"],
20389 ["img[height]", "attr", "height", "100"],
20390 ["img[width]", "attr", "width", "500"]
20394 [[Image:Foobar.jpg|230x230px]]
20396 [[Image:Foobar.jpg|500x500px]]
20399 # Change in size is ignored so long as class='mw-default-size'
20401 Image: Modifying size of an image (3)
20404 "modes": ["wt2wt"],
20406 ["figure[class]", "removeClass", "mw-default-size"],
20407 ["figure img", "attr", "height", "19"],
20408 ["figure img", "attr", "width", "170"]
20412 [[Image:Foobar.jpg|thumb]]
20414 [[Image:Foobar.jpg|thumb|170x170px]]
20418 Image: Modifying alignment of an image (bug 48665)
20421 "modes": ["wt2wt"],
20423 ["figure[class]", "removeClass", "mw-halign-right"],
20424 ["figure[class]", "addClass", "mw-halign-left"]
20428 [[Image:Foobar.jpg|thumb|caption|right]]
20430 [[Image:Foobar.jpg|thumb|caption|left]]
20434 Image: Modifying mw-default-size of an frameless image (bug 62805)
20437 "modes": ["wt2wt"],
20439 ["figure.mw-default-size", "removeClass", "mw-default-size"]
20443 [[Image:Foobar.jpg|frameless|right]]
20445 [[Image:Foobar.jpg|frameless|right|220x220px]]
20449 Image: Modifying valign of an image (bug 49221)
20452 "modes": ["wt2wt"],
20454 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
20455 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
20459 [[File:Foobar.jpg|20px|middle]]
20461 [[File:Foobar.jpg|20px|text-top]]
20465 Image: Modifying alt attribute of an image (bug 56400)
20468 "modes": ["wt2wt"],
20470 ["img[alt]", "attr", "alt", "some alternate edited text"]
20474 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
20476 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
20480 Image: Modifying caption of an image
20483 "modes": ["wt2wt"],
20485 ["figcaption", "text", "new caption"]
20489 [[Image:Foobar.jpg|thumb|original caption]]
20491 [[Image:Foobar.jpg|thumb|new caption]]
20495 Image: empty alt attribute (bug 48924)
20499 [[File:Foobar.jpg|thumb|alt=|bar]]
20501 <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>
20505 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
20510 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
20512 #<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>
20516 Image: Block level image should have \n before and after
20521 [[File:Foobar.jpg|right|thumb|150x150px]]
20524 <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>
20528 Image: New block level image should have \n before and after (existing
20534 [[File:Foobar.jpg|right|thumb|150x150px]]
20537 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
20538 <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>
20539 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
20543 Image: upright option (parsoid)
20547 [[File:Foobar.jpg|thumb|upright|caption]]
20548 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
20549 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
20551 <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="12" width="110"/></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>
20555 Image: upright option is ignored on inline and frame images (parsoid)
20559 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
20561 <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>
20565 Image: from basic HTML (1)
20569 <span typeof="mw:Image">
20570 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20573 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20577 Image: from basic HTML (2)
20581 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20583 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20587 Image: from basic HTML (3)
20591 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
20593 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
20597 Image: from basic HTML (4)
20601 <img src="File:Foobar.jpg">
20603 [[File:Foobar.jpg|link=]]
20607 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
20614 <li><p>foo</p></li>
20619 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
20625 <ul> <li>foo</li></ul>
20629 Don't strip leading whitespace when handling indent-pre suppressing tags
20637 '''This is very bold of you!'''
20641 indented cell (no pre-wrapping!)
20648 <tr><td> indented row</td></tr>
20651 <b>This is very bold of you!</b>
20654 indented cell (no pre-wrapping!)
20662 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
20667 <nowiki> </nowiki><span>bar</span>
20670 <nowiki> </nowiki></span>bar2
20673 <nowiki> </nowiki><span>bar</span>
20676 <nowiki> </nowiki><span>foo</span>
20694 Lists: Add space after bullets
20700 * <span> baz</span>
20705 <li><span> baz</span></li>
20710 Lists: Dont insert newlines in a serialized list item.
20717 <ul><li>a<br>b</li><li>c</li></ul>
20721 Headings: Add space before/after == (Bug 51744)
20731 == <span> baz</span> ==
20736 <h2><span> baz</span></h2>
20740 Parsoid: Serialize positional parameters with = in them as named parameter
20746 {{echo|1 = f=oo|2 = bar}}
20748 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20749 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20750 {{echo|<nowiki>f=oo</nowiki>|bar}}
20752 <p about="#mwt1" typeof="mw:Transclusion"
20753 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
20755 <p about="#mwt1" typeof="mw:Transclusion"
20756 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
20758 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20759 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20760 <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>
20764 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
20780 <div>a<p>b</p></div>
20789 Substrings resembling wikitext in hrefs should not get nowiki escapes
20795 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
20798 #-----------------------------
20799 # I/B quote minimization tests
20800 #-----------------------------
20803 1. I/B quote minimization: wikitext-only tags should be combined
20823 <p><i>A</i><i>B</i></p>
20824 <p><b>A</b><b>B</b></p>
20825 <p><i>A</i><b><i>B</i></b></p>
20826 <p><b>A</b><i><b>B</b></i></p>
20827 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
20828 <p><i><b>A</b></i><i><b>B</b></i></p>
20829 <p><i><b>A</b></i><b><i>B</i></b></p>
20830 <p><b><i>A</i></b><i><b>B</b></i></p>
20834 2. I/B quote minimization: wikitext and html tags should not be combined
20840 ''A'''''<i>B</i>'''
20842 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
20843 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
20847 3. I/B quote minimization: templated content stops minimization
20851 ''A''{{echo|''B''}}
20853 ''A''{{echo|'''''B'''''}}
20855 <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>
20856 <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>
20860 4. I/B quote minimization: new content should be mimimized with adjacent old content
20870 <p><i>A</i><i data-parsoid='{}'>B</i></p>
20871 <p><b data-parsoid='{}'>A</b><b>B</b></p>
20872 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
20875 #------------------------------------
20876 # End of I/B quote minimization tests
20877 #------------------------------------
20880 Bug 54262: New entities
20886 <span typeof="mw:Entity"> </span>
20889 ## Note that there is no wikitext output for 'unknownproperty' ##
20890 ## Unknown magic words are silently dropped ##
20905 __NOCONTENTCONVERT__
20907 <meta property='mw:PageProp/toc' />
20908 <meta property='mw:PageProp/notoc' />
20909 <meta property='mw:PageProp/forcetoc' />
20910 <meta property='mw:PageProp/index' />
20911 <meta property='mw:PageProp/noindex' />
20912 <meta property='mw:PageProp/nogallery' />
20913 <meta property='mw:PageProp/noeditsection' />
20914 <meta property='mw:PageProp/notitleconvert' />
20915 <meta property='mw:PageProp/nocontentconvert' />
20916 <meta property='mw:PageProp/unknownproperty' />
20920 Consecutive <pre>s should not get merged
20922 parsoid=html2wt,html2html
20938 <pre>a</pre><pre>b</pre>
20952 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
20956 [[Special:BookSources/1234567890|ISBN 1234567895]]
20958 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
20962 Edited RFC links not serializable as RFC links should serialize as extlinks
20966 [//tools.ietf.org/html/rfc123 New RFC]
20968 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
20972 Edited PMID links not serializable as PMID links should serialize as extlinks
20976 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
20978 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
20982 Edited Redirect link should emit a non-piped wikitext link
20988 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
20991 # -----------------------------------------------------------------
20992 # End of section for Parsoid-only html2wt tests for serialization
20994 # -----------------------------------------------------------------
21001 Try for 100% code coverage