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 "Extra" interlanguage links (bug 32189 / gerrit 111390)
6414 [[mul:Multilingual]]
6421 Parsoid-specific test: Wikilinks with should RT properly
6427 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
6432 Parsoid bug 53221: Wikilinks should be properly entity-escaped
6436 He&nbsp;llo [[Foo|He&nbsp;llo]]
6438 He&nbsp;llo [[He&nbsp;llo]]
6440 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6441 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6445 Parsoid: handle constructor well
6453 <p><a rel="mw:WikiLink" href="./Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
6455 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
6459 Parsoid: recognize interlanguage links without a target page
6465 <p><link rel="mw:PageProp/Language" href="http://ko.wikipedia.org/wiki/"></p>
6469 Parsoid: recognize interwiki links without a target page
6475 <p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/">ko:</a></p>
6479 Parsoid: Bug #45209, handle interwiki links pointing to the current wiki as plain wiki links
6485 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"en:Foo"}}'>Foo</a></p>
6489 ### Redirects, Parsoid-only
6492 1. Simple redirect to page
6496 #REDIRECT [[Main Page]]
6498 <link rel="mw:PageProp/redirect" href="./Main_Page">
6501 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
6503 2. Other redirect variants
6505 parsoid=wt2html,wt2wt
6507 #REDIRECT [[Main_Page]]
6508 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
6510 <link rel="mw:PageProp/redirect" href="./Main_Page">
6511 <link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
6517 parsoid=wt2html,wt2wt
6522 <li>REDIRECT [[]]</li></ol>
6526 Optional colon in #REDIRECT
6528 # the colon is archaic syntax. we support it for wt2html, but we
6529 # don't care that it roundtrips back to the modern syntax.
6530 parsoid=wt2html,html2html
6532 #REDIRECT:[[Main Page]]
6534 <link rel="mw:PageProp/redirect" href="./Main_Page">
6538 Whitespace in #REDIRECT with optional colon
6540 # the colon and gratuitous whitespace is archaic syntax. we support
6541 # it for wt2html, but we don't care that it roundtrips back to the
6542 # modern syntax (without extra whitespace)
6543 parsoid=wt2html,html2html
6550 <link rel="mw:PageProp/redirect" href="./Main_Page">
6554 Piped link in #REDIRECT
6556 # content after piped link is ignored. we support this syntax,
6557 # but don't care that the piped link is lost when we roundtrip this.
6560 #REDIRECT [[Main Page|bar]]
6562 <link rel="mw:PageProp/redirect" href="./Main_Page">
6566 Redirect to category
6570 #REDIRECT [[Category:Foo]]
6572 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6576 Redirect to category with URL encoding
6580 #REDIRECT [[Category%3AFoo]]
6582 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6586 Redirect to category page
6588 parsoid=wt2html,html2html
6590 #REDIRECT [[:Category:Foo]]
6592 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
6596 Redirect to image page (1)
6600 #REDIRECT [[File:Wiki.png]]
6602 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6606 Redirect to image page (2)
6610 #REDIRECT [[Image:Wiki.png]]
6612 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6616 Redirect to language
6620 #REDIRECT [[en:File:Wiki.png]]
6622 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6626 Redirect to interwiki
6630 #REDIRECT [[meatball:File:Wiki.png]]
6632 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6636 Non-English #REDIRECT
6641 #TILVÍSUN [[Main Page]]
6643 <link rel="mw:PageProp/redirect" href="./Main_Page">
6654 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
6671 Broken br tag sanitization
6679 # TODO: Fix html2html mode (bug 51055)!
6681 Parsoid: Broken br tag recognition
6694 Incorrecly removing closing slashes from correctly formed XHTML
6696 <br style="clear:both;" />
6698 <p><br style="clear:both;" />
6703 Failing to transform badly formed HTML into correct XHTML
6705 <br style="clear: left;">
6706 <br style="clear: right;">
6707 <br style="clear: both;">
6709 <p><br style="clear: left;" />
6710 <br style="clear: right;" />
6711 <br style="clear: both;" />
6716 Handling html with a div self-closing tag
6725 <p><div title />
6729 <p><div title=bar />
6730 <div title=bar/>
6732 <div title="bar/"></div>
6738 Handling html with a br self-closing tag
6747 <p><br title="title" />
6748 <br title="title" />
6757 Horizontal ruler (should it add that extra space?)
6771 Horizontal ruler -- 4+ dashes render hr
6780 Horizontal ruler -- eats additional dashes on the same line
6789 Horizontal ruler -- does not collapse dashes on consecutive lines
6800 Horizontal ruler -- <4 dashes render as plain text
6809 Horizontal ruler -- Supports content following dashes on same line
6818 ### Block-level elements
6827 <ul><li>Common list</li>
6829 <li>item 3</li></ul>
6840 <ol><li>Numbered list</li>
6842 <li> item 3</li></ol>
6856 ***#Number on level 4
6858 **#Number on level 3
6859 **#Number on level 3
6863 #** Level 3, but ordered
6866 <ol><li> with numbers</li></ol>
6867 <ul><li> and bullets</li></ul>
6868 <ol><li> and numbers</li></ol></li>
6870 <ul><li>bullet level 2
6871 <ul><li>bullet level 3
6872 <ol><li>Number on level 4</li></ol></li></ul></li>
6874 <ol><li>Number on level 3</li>
6875 <li>Number on level 3</li></ol></li></ul>
6876 <ol><li>number level 2</li></ol></li>
6878 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
6879 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
6890 <ul><li>bar</li></ul></li></ul>
6900 <ul><li><ul><li>foo</li></ul></li>
6906 Nested lists 3 (first element empty)
6912 <ul><li>bar</li></ul></li></ul>
6917 Nested lists 4 (first element empty)
6922 <ul><li><ul><li></li></ul></li>
6928 Nested lists 5 (both elements empty)
6933 <ul><li><ul><li></li></ul></li>
6939 Nested lists 6 (both elements empty)
6945 <ul><li></li></ul></li></ul>
6950 Nested lists 7 (skip initial nesting levels)
6954 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
6959 Nested lists 8 (multiple nesting transitions)
6967 <ul><li><ul><li> bar</li></ul></li>
6968 <li> baz</li></ul></li>
6974 1. Lists with start-of-line-transparent tokens before bullets: Comments
6987 2. Lists with start-of-line-transparent tokens before bullets: Template close
6992 <ul><li>foo bar</li>
6998 List items are not parsed correctly following a <pre> block (bug 785)
7004 <ul><li> <pre>foo</pre></li>
7005 <li> <pre>bar</pre></li>
7011 List items from template
7022 * notSOL{{inner list}}
7025 <ul><li> item 1</li>
7026 <li> item 2</li></ul>
7027 <ul><li> item 0</li>
7029 <li> item 2</li></ul>
7030 <ul><li> item 0</li>
7033 <li> item 2</li></ul>
7038 List interrupted by empty line or heading
7046 <ul><li> foo</li></ul>
7047 <ul><li><ul><li> bar</li></ul></li></ul>
7048 <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>
7049 <ul><li> Another list item</li></ul>
7054 Multiple list tags generated by templates
7069 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7072 <!--This line will NOT split the list-->
7074 <!--This line will NOT split the list either-->
7076 <!--foo--> <!----> <!--This line NOT split the list either-->
7087 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7090 <!--This line will NOT split the list-->
7092 <!--This line will NOT split the list either-->
7094 <!--foo--> <!----> <!--This line NOT split the list
7107 (Cannot test this with PHP parser since it relies on Tidy for the hack)
7109 parsoid=wt2html,wt2wt
7113 * {{echo|<li>templated li-hack}}
7114 * <!--foo--> <li> unsupported li-hack with preceding comments
7117 <li><li>not a li-hack
7124 <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>
7125 <li> <!--foo--> </li>
7126 <li> li-hack with preceding comments</li>
7137 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7164 Parsoid: Test of whitespace serialization with Templated bullets
7171 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7175 # ------------------------------------------------------------------------
7176 # The next set of tests are about Parsoid's ability to handle badly nested
7177 # tags (parse, minimize scope of fixup, and roundtrip back)
7178 # ------------------------------------------------------------------------
7181 Unbalanced closing block tags break a list
7182 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7200 Unbalanced closing non-block tags don't break a list
7201 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7218 Unclosed formatting tags that straddle lists are closed and reopened
7219 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7233 List embedded in a non-block tag
7234 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
7240 <p><small></small></p>
7246 <p><small></small></p>
7250 Table with missing opening <tr> tag
7252 parsoid=wt2html,wt2wt
7270 # Note that the current date is hard-coded as
7271 # 1970-01-01T00:02:03Z (a Thursday)
7272 # when running parser tests. The timezone is also fixed to GMT, so
7273 # local date will be identical to current date.
7276 Magic Word: {{CURRENTDAY}}
7285 Magic Word: {{CURRENTDAY2}}
7294 Magic Word: {{CURRENTDAYNAME}}
7303 Magic Word: {{CURRENTDOW}}
7312 Magic Word: {{CURRENTMONTH}}
7321 Magic Word: {{CURRENTMONTH1}}
7330 Magic Word: {{CURRENTMONTHABBREV}}
7332 {{CURRENTMONTHABBREV}}
7339 Magic Word: {{CURRENTMONTHNAME}}
7341 {{CURRENTMONTHNAME}}
7348 Magic Word: {{CURRENTMONTHNAMEGEN}}
7350 {{CURRENTMONTHNAMEGEN}}
7357 Magic Word: {{CURRENTTIME}}
7366 Magic Word: {{CURRENTHOUR}}
7375 Magic Word: {{CURRENTWEEK}} (@bug 4594)
7384 Magic Word: {{CURRENTYEAR}}
7393 Magic Word: {{CURRENTTIMESTAMP}}
7395 {{CURRENTTIMESTAMP}}
7402 Magic Words LOCAL (UTC)
7406 * {{LOCALMONTHNAME}}
7407 * {{LOCALMONTHNAMEGEN}}
7408 * {{LOCALMONTHABBREV}}
7417 * {{LOCALTIMESTAMP}}
7432 <li> 19700101000203</li></ul>
7437 Magic Word: {{FULLPAGENAME}}
7439 title=[[User:Ævar Arnfjörð Bjarmason]]
7443 <p>User:Ævar Arnfjörð Bjarmason
7448 Magic Word: {{FULLPAGENAMEE}}
7450 title=[[User:Ævar Arnfjörð Bjarmason]]
7454 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7459 Magic Word: {{TALKSPACE}}
7461 title=[[User:Ævar Arnfjörð Bjarmason]]
7470 Magic Word: {{TALKSPACE}}, same namespace
7472 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7481 Magic Word: {{TALKSPACE}}, main namespace
7483 title=[[Parser Test]]
7492 Magic Word: {{TALKSPACEE}}
7494 title=[[User:Ævar Arnfjörð Bjarmason]]
7503 Magic Word: {{SUBJECTSPACE}}
7505 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7514 Magic Word: {{SUBJECTSPACE}}, same namespace
7516 title=[[User:Ævar Arnfjörð Bjarmason]]
7525 Magic Word: {{SUBJECTSPACE}}, main namespace
7527 title=[[Parser Test]]
7535 Magic Word: {{SUBJECTSPACEE}}
7537 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7546 Magic Word: {{NAMESPACE}}
7548 title=[[User:Ævar Arnfjörð Bjarmason]]
7557 Magic Word: {{NAMESPACEE}}
7559 title=[[User:Ævar Arnfjörð Bjarmason]]
7568 Magic Word: {{NAMESPACENUMBER}}
7570 title=[[User:Ævar Arnfjörð Bjarmason]]
7579 Magic Word: {{SUBPAGENAME}}
7581 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7590 Magic Word: {{SUBPAGENAMEE}}
7592 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7601 Magic Word: {{ROOTPAGENAME}}
7603 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7607 <p>Ævar Arnfjörð Bjarmason
7612 Magic Word: {{ROOTPAGENAMEE}}
7614 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7618 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7623 Magic Word: {{BASEPAGENAME}}
7625 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7629 <p>Ævar Arnfjörð Bjarmason
7634 Magic Word: {{BASEPAGENAMEE}}
7636 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7640 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7645 Magic Word: {{TALKPAGENAME}}
7647 title=[[User:Ævar Arnfjörð Bjarmason]]
7651 <p>User talk:Ævar Arnfjörð Bjarmason
7656 Magic Word: {{TALKPAGENAMEE}}
7658 title=[[User:Ævar Arnfjörð Bjarmason]]
7662 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7667 Magic Word: {{SUBJECTPAGENAME}}
7669 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7673 <p>User:Ævar Arnfjörð Bjarmason
7678 Magic Word: {{SUBJECTPAGENAMEE}}
7680 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7682 {{SUBJECTPAGENAMEE}}
7684 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7689 Magic Word: {{NUMBEROFFILES}}
7698 Magic Word: {{PAGENAME}}
7700 title=[[User:Ævar Arnfjörð Bjarmason]]
7704 <p>Ævar Arnfjörð Bjarmason
7709 Magic Word: {{PAGENAME}} with metacharacters
7711 title=[['foo & bar = baz']]
7715 <p><i>'foo & bar = baz'</i>
7720 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
7722 title=[[*RFC 1234 http://example.com/]]
7726 <p>*RFC 1234 http://example.com/
7731 Magic Word: {{PAGENAMEE}}
7733 title=[[User:Ævar Arnfjörð Bjarmason]]
7737 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7742 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
7744 title=[[*RFC 1234 http://example.com/]]
7748 <p>*RFC_1234_http://example.com/
7753 Magic Word: {{REVISIONID}}
7762 Magic Word: {{SCRIPTPATH}}
7771 Magic Word: {{STYLEPATH}}
7780 Magic Word: {{SERVER}}
7784 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7789 Magic Word: {{SERVERNAME}}
7798 Magic Word: {{SITENAME}}
7807 Case-sensitive magic words, when cased differently, should just be template transclusions
7814 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
7815 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
7816 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
7817 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
7822 Case-insensitive magic words should still work with weird casing.
7832 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7837 Namespace 1 {{ns:1}}
7846 Namespace 1 {{ns:01}}
7855 Namespace 0 {{ns:0}} (bug 4783)
7863 Namespace 0 {{ns:00}} (bug 4783)
7871 Namespace -1 {{ns:-1}}
7880 Namespace User {{ns:User}}
7889 Namespace User talk {{ns:User_talk}}
7898 Namespace User talk {{ns:uSeR tAlK}}
7907 Namespace File {{ns:File}}
7916 Namespace File {{ns:Image}}
7925 Namespace (lang=de) Benutzer {{ns:User}}
7936 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
7942 <p>Benutzer Diskussion
7950 {{urlencode:hi world?!}}
7951 {{urlencode:hi world?!|WIKI}}
7952 {{urlencode:hi world?!|PATH}}
7953 {{urlencode:hi world?!|QUERY}}
7963 Magic Word: prioritize type info over data-parsoid
7969 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
7973 Magic Word: serialize on separate line (parsoid)
7975 parsoid=wt2wt,html2wt
7981 foo<meta property="mw:PageProp/notoc"/>bar
7985 Magic Word: rt non-english wikis
7992 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
7999 Magic links: internal link to RFC (bug 479)
8003 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8008 Magic links: RFC (bug 479)
8012 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8017 Magic links: ISBN (bug 1937)
8021 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8026 Magic links: PMID incorrectly converts space to underscore
8030 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8039 Nonexistent template
8041 {{thistemplatedoesnotexist}}
8043 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8048 Template with invalid target containing tags
8050 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8052 <p>{{a<b>b</b>|foo|a=b|a = b}}
8057 Template with invalid target containing unclosed tag
8059 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8061 <p>{{a<b>|foo|a=b|a = b}}</b>
8066 Template with invalid target containing wikilink
8070 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8073 <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>
8079 This is a test template
8087 <p>This is a test template
8092 Template with explicit namespace
8096 <p>This is a test template
8104 This is a test template with parameter {{{param}}}
8110 {{paramtest|param=foo}}
8112 <p>This is a test template with parameter foo
8117 Template:paramtestnum
8123 Template unnamed parameter
8125 {{paramtestnum|Main Page|the main page}}
8127 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8132 Template:templatesimple
8138 Template:templateredirect
8140 #redirect [[Template:templatesimple]]
8144 Template:templateasargtestnum
8150 Template:templateasargtest
8152 {{template{{{templ}}}}}
8156 Template:templateasargtest2
8162 Template with template name as unnamed argument
8164 {{templateasargtestnum|templatesimple}}
8171 Template with template name as argument
8173 {{templateasargtest|templ=simple}}
8180 Template with template name as argument (2)
8182 {{templateasargtest2|templ=templatesimple}}
8189 Template:templateasargtestdefault
8191 {{{{{templ|templatesimple}}}}}
8201 Template with default value
8203 {{templateasargtestdefault}}
8210 Template with default value (value set)
8212 {{templateasargtestdefault|templ=templa}}
8221 {{templateredirect}}
8228 Template with argument in separate line
8230 {{ templateasargtest |
8238 Template with complex template as argument
8241 param ={{ templateasargtest |
8244 <p>This is a test template with parameter (test)
8249 Template with thumb image (with link in description)
8252 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
8254 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>
8259 Template:complextemplate
8261 {{{1}}} {{paramtest|
8262 param ={{{param}}}}}
8266 Template with complex arguments
8269 param ={{ templateasargtest |
8270 templ = simple }}|[[Template:complextemplate|link]]}}
8272 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
8277 BUG 553: link with two variables in a piped link
8280 |[[{{{1}}}|{{{2}}}]]
8285 <td>[[{{{1}}}|{{{2}}}]]
8291 Magic variable as template parameter
8293 {{paramtest|param={{SITENAME}}}}
8295 <p>This is a test template with parameter MediaWiki
8302 [[{{{param}}}|link]]
8306 Template parameter as link source
8308 {{linktest|param=Main Page}}
8310 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
8315 Template-generated attribute string (k='v')
8317 <span {{attr_str|id|v1}}>bar</span>
8319 <p><span id="v1">bar</span>
8326 including another template, {{paramtest|param={{{arg}}}}}
8330 Template passing argument to another template
8332 {{paramtest2|arg='hmm'}}
8334 <p>including another template, This is a test template with parameter 'hmm'
8345 Template as link source
8349 [[{{linktest2}}|Main Page]]
8351 [[{{linktest2}}]]Page
8353 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8354 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8355 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
8373 Template infinite loop
8377 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
8382 Template from main namespace
8401 BUG 529: Template with table, not included at beginning of line
8420 BUG 523: Template shouldn't eat newline (or add an extra one before table)
8440 BUG 41: Template parameters shown as broken links
8449 Template with targets containing wikilinks
8453 {{[[{{echo|foo}}]]}}
8455 {{{{echo|[[foo}}]]}}
8457 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8458 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8466 ''None'' of '''this''' should be
8468 but rather passed unmodified
8475 # hmm, fix this or just deprecate msgnw and document its behavior?
8479 {{msgnw:MSGNW test}}
8481 <p>''None'' of '''this''' should be
8483  but rather passed unmodified
8484 {{test}}
8494 {{int:youhavenewmessages|lots of money|not!}}
8496 <p>You have lots of money (not!).
8503 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8507 <includeonly> and <noinclude> being included
8518 <onlyinclude>Foo</onlyinclude>bar
8522 <onlyinclude> being included
8534 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
8538 <onlyinclude> and <includeonly> being included
8547 <includeonly> and <noinclude> on a page
8549 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8556 Un-closed <noinclude>
8563 <onlyinclude> on a page
8565 <onlyinclude>Foo</onlyinclude>bar
8572 Un-closed <onlyinclude>
8579 Self-closed noinclude, includeonly, onlyinclude tags
8590 Unbalanced includeonly and noinclude tags
8594 |b</noinclude></noinclude>
8595 |c</noinclude></includeonly>
8596 |d</includeonly></includeonly>
8605 <td>c</includeonly>
8607 <td>d</includeonly></includeonly>
8613 Template:Includeonly section
8616 ==Includeonly section==
8622 Bug 6563: Edit link generation for section shown by <includeonly>
8624 {{includeonly section}}
8626 <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>
8627 <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>
8631 # Uses same input as the contents of [[Template:Includeonly section]]
8633 Bug 6563: Section extraction for section shown by <includeonly>
8638 ==Includeonly section==
8646 Bug 6563: Edit link generation for section suppressed by <includeonly>
8649 ==Includeonly section==
8653 <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>
8658 Bug 6563: Section extraction for section suppressed by <includeonly>
8663 ==Includeonly section==
8671 Un-closed <includeonly>
8677 # TODO: test with DOM fragment reuse!
8679 Parsoid: DOM fragment reuse
8681 parsoid=wt2wt,wt2html
8683 a{{echo|b<table></table>c}}d
8695 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
8696 <table></table>c"}},"i":0}}]}'>b</span>
8697 <table about="#mwt1"></table><span about="#mwt1">c</span>d
8700 <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">
8702 <table about="#mwt2"></table><span about="#mwt2">
8704 <p about="#mwt2">cd</p>
8707 <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">
8710 <table about="#mwt3"></table><span about="#mwt3">
8713 <p about="#mwt3">b</p>
8717 Parsoid: Merge double tds (bug 50603)
8726 <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>
8731 Parsoid: Merge double tds in nested transclusion content (bug 50603)
8741 <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}}]}'>
8743 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
8749 ### <includeonly> and <noinclude> in attributes
8752 0. includeonly around the entire attribute
8754 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
8756 <p><span id="v2">bar</span>
8761 1. includeonly in html attr key
8763 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
8765 <p><span id="foo">bar</span>
8770 2. includeonly in html attr value
8772 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
8773 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
8775 <p><span id="v1">bar</span>
8776 <span id="v1">bar</span>
8781 3. includeonly in part of an attr value
8783 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
8785 <p><span style="color:red;">bar</span>
8790 4. includeonly in table attributes
8814 ### Token Stream Patcher tests
8816 ### These tests won't always pass wt2wt and other modes because
8817 ### on serialization, the table will be output on a new line.
8818 ### For now, we are blacklisting them, and using this to test selser.
8822 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
8824 parsoid=wt2html,wt2wt
8826 {{echo|}}{| width = '100%'
8830 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
8831 <table width="100%">
8834 <td>foo</td></tr></tbody></table>
8838 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
8840 parsoid=wt2html,wt2wt
8842 <includeonly>a</includeonly>{| {{{b}}}
8846 <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|}"}'>
8847 <tbody><tr><td>c</td></tr>
8852 ### Testing parsing of templates where a template arg
8853 ### has the same name as the template itself.
8863 Templates: Template Name/Arg clash: 1. Use of positional param
8872 Templates: Template Name/Arg clash: 2. Use of named param
8881 Templates: Template Name/Arg clash: 3. Use of named param with empty input
8890 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
8894 Templates: 1. Simple use
8903 Templates: 2. Inside a block tag
8905 <div>{{echo|Foo}}</div>
8906 <blockquote>{{echo|Foo}}</blockquote>
8909 <blockquote>Foo</blockquote>
8914 Templates: P-wrapping: 1a. Templates on consecutive lines
8925 Templates: P-wrapping: 1b. Templates on consecutive lines
8939 Templates: P-wrapping: 1c. Templates on consecutive lines
8942 {{echo|bar}} <div>baz</div>
8951 Templates: P-wrapping: 1d. Template preceded by comment-only line
8960 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
8964 Templates: Inline Text: 1. Multiple template uses
8966 {{echo|Foo}}bar{{echo|baz}}
8973 Templates: Inline Text: 2. Back-to-back template uses
8975 {{echo|Foo}}{{echo|bar}}
8982 Templates: Block Tags: 1. Multiple template uses
8984 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
8986 <div>Foo</div><div>bar</div><div>baz</div>
8991 Templates: Block Tags: 2. Back-to-back template uses
8993 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
8995 <div>Foo</div><div>bar</div>
9000 Templates: Links: 1. Simple example
9002 {{echo|[[Foo|bar]]}}
9004 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9009 Templates: Links: 2. Generation of link href
9011 [[{{echo|Foo}}|bar]]
9013 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9018 Templates: Links: 3. Generation of part of a link href
9020 [[Fo{{echo|o}}|bar]]
9024 [[Foo{{echo|bar}}baz]]
9026 [[Foo{{echo|bar}}|bar]]
9028 [[:Foo{{echo|bar}}]]
9030 [[:Foo{{echo|bar}}|bar]]
9032 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9033 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9034 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9035 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9036 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9037 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9042 Templates: Links: 4. Multiple templates generating link href
9044 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9046 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9051 Templates: Links: 5. Generation of link text
9053 [[Foo|{{echo|bar}}]]
9055 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9060 Templates: Links: 5. Nested templates (only outermost template should be marked)
9062 {{echo|[[{{echo|Foo}}|bar]]}}
9064 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9069 Templates: HTML Tag: 1. Generation of HTML attr. key
9071 <div {{echo|style}}="color:red;">foo</div>
9073 <div style="color:red;">foo</div>
9078 Templates: HTML Tag: 2. Generation of HTML attr. value
9080 <div style={{echo|'color:red;'}}>foo</div>
9082 <div style="color:red;">foo</div>
9087 Templates: HTML Tag: 3. Generation of HTML attr key and value
9089 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9091 <div style="color:red;">foo</div>
9096 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9098 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9100 <div title="This is a long title with just one piece templated">foo</div>
9105 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9107 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9109 <div title="This is a long title with just one piece templated">foo</div>
9114 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9116 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9118 <div title="This is a long title with just one piece templated">foo</div>
9123 Templates: HTML Tag: 7. Generation of partial attribute key string
9125 <div st{{echo|yle}}="color:red;">foo</div>
9127 <div style="color:red;">foo</div>
9132 Templates: HTML Tables: 1. Generating start of a HTML table
9134 {{echo|<table><tr><td>foo</td>}}</tr></table>
9136 <table><tr><td>foo</td></tr></table>
9141 Templates: HTML Tables: 2a. Generating middle of a HTML table
9143 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9145 <table><tr><td>foo</td></tr></table>
9150 Templates: HTML Tables: 2b. Generating middle of a HTML table
9152 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9154 <table><tr><td>foo</td></tr></table>
9159 Templates: HTML Tables: 3. Generating end of a HTML table
9161 <table><tr>{{echo|<td>foo</td></tr></table>}}
9163 <table><tr><td>foo</td></tr></table>
9168 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9170 {{echo|<table>}}<tr><td>foo</td></tr></table>
9172 <table><tr><td>foo</td></tr></table>
9177 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9179 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9181 <table><tr><td>foo</td></tr></table>
9186 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9188 <table><tr>{{echo|<td>}}foo</td></tr></table>
9190 <table><tr><td>foo</td></tr></table>
9195 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9197 <table><tr><td>foo{{echo|</td>}}</tr></table>
9199 <table><tr><td>foo</td></tr></table>
9204 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9206 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9208 <table><tr><td>foo</td></tr></table>
9213 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
9215 <table><tr><td>foo</td></tr>{{echo|</table>}}
9217 <table><tr><td>foo</td></tr></table>
9222 Templates: HTML Tables: 5. Proper fostering of categories from inside
9224 parsoid=wt2html,wt2wt
9226 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
9227 <!--Two categories (Bug 50330)-->
9228 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
9230 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
9231 <!--Two categories (Bug 50330)-->
9232 <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>
9236 Templates: Wiki Tables: 1a. Fostering of entire template content
9244 <tr><td></td></tr></table>
9249 Templates: Wiki Tables: 1b. Fostering of entire template content
9262 <tr><td></td></tr></table>
9267 Templates: Wiki Tables: 2. Fostering of partial template content
9277 <tr><td></td></tr></table>
9282 Templates: Wiki Tables: 3. td-content via multiple templates
9285 {{echo|{{pipe}}a}}{{echo|b}}
9296 Templates: Wiki Tables: 4. Templated tags, no content
9302 <tr><td></td></tr></table>
9307 Templates: Wiki Tables: 5. Templated tags, regular td-tags
9321 Templates: Wiki Tables: 6. Templated tags, templated td-tags
9335 Templates: Lists: Multi-line list-items via templates
9337 *{{echo|a {{nonexistent|
9339 *{{echo|b {{nonexistent|
9342 <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>
9343 <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>
9348 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
9350 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
9352 <p><i>ab</i>c<i>d</i>e
9357 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
9358 (PHP parser generates misnested html)
9360 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
9362 <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>
9366 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
9367 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
9369 parsoid=wt2html,wt2wt
9371 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
9373 <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>
9374 <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>
9375 <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>
9379 Templates: Ugly nesting: 4. Divs opened/closed across templates
9381 a<div>b{{echo|c</div>d}}e
9388 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
9394 |{{echo|foo</table>}}
9398 <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|}"]}'>
9402 <td>foo</td></tr></tbody></table><span about="#mwt1">
9403 </span><span about="#mwt1">|bar</span><span about="#mwt1">
9408 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
9418 <td>1. {{echo|foo </table>}}</td>
9420 <td>2. {{echo|baz </table>}}</td>
9433 <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>"]}'>
9438 <td>1. foo </td></tr></tbody></table></td>
9440 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
9441 </span><span about="#mwt2">
9442 </span><span about="#mwt2">
9443 </span><span about="#mwt2">abc</span><span about="#mwt2">
9444 </span><span about="#mwt2">
9445 </span><span about="#mwt2">
9446 </span><span about="#mwt2">
9447 </span><span about="#mwt2">
9448 </span><span about="#mwt2">
9449 </span><span about="#mwt2">xyz</span><span about="#mwt2">
9450 </span><span about="#mwt2">
9455 Templates: Ugly templates: 3. newline-only template parameter
9464 # This looks like a bug: a single newline triggers p/br for some reason.
9466 Templates: Ugly templates: 4. newline-only template parameter inconsistency
9475 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
9476 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
9478 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
9484 <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
9485 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9489 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
9490 # that are "identical" and generate nesting cycles in the algorithm
9492 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
9494 {{echo|<table><tr><td><table>}}
9498 <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"}'>
9499 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9500 </table></td></tr></tbody></table>
9504 Parser Functions: 1. Simple example
9513 Parser Functions: 2. Nested use (only outermost should be marked up)
9522 ### Pre-save transform tests
9525 pre-save transform: subst:
9531 This is a test template
9535 pre-save transform: normal template
9545 pre-save transform: nonexistent template
9549 {{thistemplatedoesnotexist}}
9551 {{thistemplatedoesnotexist}}
9556 pre-save transform: subst magic variables
9565 # This is bug 89, which I fixed. -- wtm
9567 pre-save transform: subst: templates with parameters
9571 {{subst:paramtest|param="something else"}}
9573 This is a test template with parameter "something else"
9579 <nowiki>'''not wiki'''</nowiki>
9583 pre-save transform: nowiki in subst (bug 1188)
9587 {{subst:nowikitest}}
9589 <nowiki>'''not wiki'''</nowiki>
9594 Template:commenttest
9596 This template has <!-- a comment --> in it.
9600 pre-save transform: comment in subst (bug 1936)
9604 {{subst:commenttest}}
9606 This template has <!-- a comment --> in it.
9610 pre-save transform: unclosed tag
9614 <nowiki>'''not wiki'''
9616 <nowiki>'''not wiki'''
9620 pre-save transform: mixed tag case
9624 <NOwiki>'''not wiki'''</noWIKI>
9626 <NOwiki>'''not wiki'''</noWIKI>
9630 pre-save transform: unclosed comment in <nowiki>
9634 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9636 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9639 # Leading @ in this template definition works around a limitation
9640 # in parsoid's parserTests which otherwise strips the <span> from the
9641 # result (confusing it for a template wrapper)
9645 @<span onmouseover="alert('crap')">Oh no</span>
9649 (confirming safety of fix for subst bug 1936)
9651 {{Template:dangerous}}
9653 <p>@<span>Oh no</span>
9658 pre-save transform: comment containing gallery (bug 5024)
9662 <!-- <gallery>data</gallery> -->
9664 <!-- <gallery>data</gallery> -->
9668 pre-save transform: comment containing extension
9672 <!-- <tag>data</tag> -->
9674 <!-- <tag>data</tag> -->
9678 pre-save transform: comment containing nowiki
9682 <!-- <nowiki>data</nowiki> -->
9684 <!-- <nowiki>data</nowiki> -->
9688 pre-save transform: <noinclude> in subst (bug 3298)
9698 pre-save transform: <onlyinclude> in subst (bug 3298)
9710 {{<includeonly>subst:</includeonly>Includes}}
9714 Template:SafeSubstTest
9716 {{<includeonly>safesubst:</includeonly>Includes}}
9720 bug 22297: safesubst: works during PST
9724 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
9730 bug 22297: safesubst: works during normal parse
9739 subst: does not work during normal parse
9743 <p>{{subst:Includes}}
9748 pre-save transform: context links ("pipe trick")
9752 [[Article (context)|]]
9755 [[Bar:Article (context)|]]
9756 [[:Bar:Article (context)|]]
9758 [[|Article (context)]]
9762 [[Article (context)|Article]]
9763 [[Bar:Article|Article]]
9764 [[:Bar:Article|Article]]
9765 [[Bar:Article (context)|Article]]
9766 [[:Bar:Article (context)|Article]]
9768 [[Article (context)]]
9769 [[Bar:X (Y) Z|X (Y) Z]]
9770 [[:Bar:X (Y) Z|X (Y) Z]]
9774 pre-save transform: context links ("pipe trick") with interwiki prefix
9778 [[interwiki:Article|]]
9779 [[:interwiki:Article|]]
9780 [[interwiki:Bar:Article|]]
9781 [[:interwiki:Bar:Article|]]
9783 [[interwiki:Article|Article]]
9784 [[:interwiki:Article|Article]]
9785 [[interwiki:Bar:Article|Bar:Article]]
9786 [[:interwiki:Bar:Article|Bar:Article]]
9790 pre-save transform: context links ("pipe trick") with parens in title
9792 pst title=[[Somearticle (context)]]
9796 [[Article (context)|Article]]
9800 pre-save transform: context links ("pipe trick") with comma in title
9802 pst title=[[Someplace, Somewhere]]
9805 [[Otherplace, Elsewhere|]]
9806 [[Otherplace, Elsewhere, Anywhere|]]
9808 [[Otherplace, Somewhere|Otherplace]]
9809 [[Otherplace, Elsewhere|Otherplace]]
9810 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
9814 pre-save transform: context links ("pipe trick") with parens and comma
9816 pst title=[[Someplace (IGNORED), Somewhere]]
9819 [[Otherplace (place), Elsewhere|]]
9821 [[Otherplace, Somewhere|Otherplace]]
9822 [[Otherplace (place), Elsewhere|Otherplace]]
9826 pre-save transform: context links ("pipe trick") with comma and parens
9828 pst title=[[Who, me? (context)]]
9831 [[Me, Myself, and I (1937 song)|]]
9833 [[Yes, you. (context)|Yes, you.]]
9834 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
9838 pre-save transform: context links ("pipe trick") with namespace
9840 pst title=[[Ns:Somearticle]]
9844 [[Ns:Article|Article]]
9848 pre-save transform: context links ("pipe trick") with namespace and parens
9850 pst title=[[Ns:Somearticle (context)]]
9854 [[Ns:Article (context)|Article]]
9858 pre-save transform: context links ("pipe trick") with namespace and comma
9860 pst title=[[Ns:Somearticle, Context, Whatever]]
9864 [[Ns:Article, Context, Whatever|Article]]
9868 pre-save transform: context links ("pipe trick") with namespace, comma and parens
9870 pst title=[[Ns:Somearticle, Context (context)]]
9874 [[Ns:Article (context)|Article]]
9878 pre-save transform: context links ("pipe trick") with namespace, parens and comma
9880 pst title=[[Ns:Somearticle (IGNORED), Context]]
9884 [[Ns:Article, Context|Article]]
9888 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
9892 [[Article(context)|]]
9893 [[Bar:Article(context)|]]
9894 [[:Bar:Article(context)|]]
9895 [[|Article(context)]]
9899 [[Article(context)|Article]]
9900 [[Bar:Article(context)|Article]]
9901 [[:Bar:Article(context)|Article]]
9902 [[Article(context)]]
9904 [[:Bar:X(Y)Z|X(Y)Z]]
9908 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
9912 [[Article (context)|]]
9913 [[Bar:Article (context)|]]
9914 [[:Bar:Article (context)|]]
9915 [[|Article (context)]]
9919 [[Article (context)|Article]]
9920 [[Bar:Article (context)|Article]]
9921 [[:Bar:Article (context)|Article]]
9922 [[Article (context)]]
9923 [[Bar:X (Y) Z|X (Y) Z]]
9924 [[:Bar:X (Y) Z|X (Y) Z]]
9928 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
9932 [[Article(context)|]]
9933 [[Bar:Article(context)|]]
9934 [[:Bar:Article(context)|]]
9935 [[|Article(context)]]
9939 [[Article(context)|Article]]
9940 [[Bar:Article(context)|Article]]
9941 [[:Bar:Article(context)|Article]]
9942 [[Article(context)]]
9944 [[:Bar:X(Y)Z|X(Y)Z]]
9948 pre-save transform: context links ("pipe trick") with commas (bug 21660)
9952 [[Article (context), context|]]
9953 [[Article (context),context|]]
9954 [[Bar:Article (context), context|]]
9955 [[Bar:Article (context),context|]]
9956 [[:Bar:Article (context), context|]]
9957 [[:Bar:Article (context),context|]]
9959 [[Article (context), context|Article]]
9960 [[Article (context),context|Article]]
9961 [[Bar:Article (context), context|Article]]
9962 [[Bar:Article (context),context|Article]]
9963 [[:Bar:Article (context), context|Article]]
9964 [[:Bar:Article (context),context|Article]]
9968 pre-save transform: trim trailing empty lines
9972 Empty lines are trimmed
9978 Empty lines are trimmed
9982 pre-save transform: Signature expansion
9987 * <noinclude>~~~</noinclude>
9988 * <includeonly>~~~</includeonly>
9989 * <onlyinclude>~~~</onlyinclude>
9991 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
9992 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
9993 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
9994 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
9999 pre-save transform: Signature expansion in nowiki tags (bug 93)
10005 <nowiki>~~~~</nowiki>
10007 <includeonly><nowiki>~~~~</nowiki></includeonly>
10009 <noinclude><nowiki>~~~~</nowiki></noinclude>
10011 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10013 {{subst:Foo}} shall be converted to FOO
10015 As well as inside noinclude/onlyinclude
10016 <noinclude>{{subst:Foo}}</noinclude>
10017 <onlyinclude>{{subst:Foo}}</onlyinclude>
10019 But not inside includeonly
10020 <includeonly>{{subst:Foo}}</includeonly>
10024 <nowiki>~~~~</nowiki>
10026 <includeonly><nowiki>~~~~</nowiki></includeonly>
10028 <noinclude><nowiki>~~~~</nowiki></noinclude>
10030 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10032 FOO shall be converted to FOO
10034 As well as inside noinclude/onlyinclude
10035 <noinclude>FOO</noinclude>
10036 <onlyinclude>FOO</onlyinclude>
10038 But not inside includeonly
10039 <includeonly>{{subst:Foo}}</includeonly>
10043 Parsoid: Recognize nowiki with trailing space in tags
10047 <nowiki ><div>[[foo]]</nowiki >
10055 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10062 Parsoid: Recognize nowiki with odd capitalization
10066 <noWikI ><div>[[foo]]</Nowiki >
10068 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10073 Parsoid: Escape nowiki with trailing space in tags
10077 <nowiki > foo </nowiki >
10083 <p><nowiki > foo </nowiki ></p>
10084 <p>a<nowiki />b</p>
10085 <p>c<nowiki/ >d</p>
10089 Parsoid: Escape weird noWikI capitalizations
10093 <noWikI > foo </NoWikI >
10095 <p><noWikI > foo </NoWikI ></p>
10099 ### Message transform tests
10102 message transform: magic variables
10112 message transform: should not transform wiki markup
10122 message transform: <noinclude> in transcluded template (bug 4926)
10132 message transform: <onlyinclude> in transcluded template (bug 4926)
10142 {{#special:}} page name, known
10146 {{#special:Recentchanges}}
10148 Special:RecentChanges
10152 {{#special:}} page name with subpage, known
10156 {{#special:Recentchanges/param}}
10158 Special:RecentChanges/param
10162 {{#special:}} page name, unknown
10166 {{#special:foobar nonexistent}}
10168 Special:Foobar nonexistent
10172 {{#speciale:}} page name, known
10176 {{#speciale:Recentchanges}}
10178 Special:RecentChanges
10182 {{#speciale:}} page name with subpage, known
10186 {{#speciale:Recentchanges/param}}
10188 Special:RecentChanges/param
10192 {{#speciale:}} page name, unknown
10196 {{#speciale:foobar nonexistent}}
10198 Special:Foobar_nonexistent
10204 ### For Parsoid-specific tests, see
10205 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
10210 parsoid=wt2html,wt2wt,html2html
10212 [[Image:foobar.jpg]]
10214 <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>
10217 <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>
10222 Simple image (using File: namespace, now canonical)
10224 [[File:Foobar.jpg]]
10226 <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>
10229 <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>
10234 Right-aligned image
10236 [[File:Foobar.jpg|right]]
10238 <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>
10241 <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>
10247 [[File:Foobar.jpg|right|Caption text]]
10249 <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>
10252 <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>
10256 Image with caption, bug 53312 #1
10258 [[File:Foobar.jpg|right|Caption page stuff]]
10260 <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>
10263 <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>
10267 Image with caption, bug 53312 #2
10269 [[File:Foobar.jpg|right|Caption page=]]
10271 <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>
10274 <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>
10278 Image with caption, bug 53312 #3
10280 [[File:Foobar.jpg|right|Caption page=stuff]]
10282 <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>
10285 <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>
10289 Allow empty links in image captions (Bug 60753)
10293 [[File:Foobar.jpg|thumb|Caption [[Link1]]
10298 <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>
10301 <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>
10303 <a rel="mw:WikiLink" href="./Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"},"dsr":[47,56,2,2]}'>Link2</a>
10304 </figcaption></figure>
10308 Link with empty target
10317 Image with empty attribute
10319 parsoid=wt2html,wt2wt,html2html
10321 [[File:Foobar.jpg|right||Caption text]]
10323 <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>
10326 <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>
10330 1. Block image with individual attributes from templates
10332 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
10334 <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>
10337 <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>
10341 2. Block Image with individual attributes from templates
10343 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
10345 <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>
10348 <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>
10352 3. Inline image with individual attributes from templates
10354 [[File:Foobar.jpg|{{echo|50px}}]]
10356 <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>
10359 <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>
10362 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
10363 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
10365 Image with multiple attributes from the same template
10367 [[File:Foobar.jpg|{{image_attribs}}]]
10369 <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>
10372 <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>
10376 Image with link tails
10380 123[[File:Foobar.jpg]]456
10381 123[[File:Foobar.jpg|right]]456
10382 123[[File:Foobar.jpg|thumb]]456
10384 <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
10386 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
10387 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
10390 <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>
10391 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
10392 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
10396 Image with multiple captions -- only last one is accepted
10398 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
10400 <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>
10403 <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>
10407 Image with multiple widths -- use last
10409 [[File:Foobar.jpg|200px|300px|caption]]
10411 <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>
10414 <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>
10418 Image with multiple alignments -- use first (bug 48664)
10422 [[File:Foobar.jpg|thumb|left|right|center|caption]]
10424 [[File:Foobar.jpg|middle|text-top|caption]]
10426 <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>
10427 <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>
10430 <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>
10431 <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>
10435 Image with width attribute at different positions
10437 [[File:Foobar.jpg|200px|right|Caption]]
10438 [[File:Foobar.jpg|right|200px|Caption]]
10439 [[File:Foobar.jpg|right|Caption|200px]]
10441 <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>
10442 <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>
10443 <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>
10446 <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>
10447 <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>
10448 <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>
10451 # a sad bit of backward-compatibility
10453 Image with size specified with pxpx (bug 13500, 51628)
10455 parsoid=wt2html,wt2wt,html2html
10457 [[File:Foobar.jpg|20pxpx]]
10458 [[File:Foobar.jpg|200x20pxpx]]
10460 <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>
10461 <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>
10464 <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>
10468 Image with link parameter, wiki target
10470 [[File:Foobar.jpg|link=Main Page]]
10472 <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>
10475 <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>
10478 # parsoid bug 49293 (part 1)
10480 Image with link parameter, URL target
10482 [[File:Foobar.jpg|link=http://example.com/]]
10484 <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>
10487 <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>
10490 # parsoid bug 49293 (part 2)
10492 Image with link parameter, protocol-less URL target
10494 [[File:Foobar.jpg|link=//example.com/]]
10496 <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>
10499 <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>
10503 Image with link parameter, wgExternalLinkTarget
10505 [[Image:foobar.jpg|link=http://example.com/]]
10507 wgExternalLinkTarget='foobar'
10509 <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>
10514 Image with link parameter, wgNoFollowLinks set to false
10516 [[Image:foobar.jpg|link=http://example.com/]]
10518 wgNoFollowLinks=false
10520 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10525 Image with link parameter, wgNoFollowDomainExceptions
10527 [[Image:foobar.jpg|link=http://example.com/]]
10529 wgNoFollowDomainExceptions='example.com'
10531 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10536 Image with link parameter, wgExternalLinkTarget, unnamed parameter
10538 [[Image:foobar.jpg|link=http://example.com/|Title]]
10540 wgExternalLinkTarget='foobar'
10542 <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>
10547 Image with empty link parameter
10549 [[File:Foobar.jpg|link=]]
10551 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
10554 <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>
10558 Image with link parameter (wiki target) and unnamed parameter
10560 [[File:Foobar.jpg|link=Main_Page|Title]]
10562 <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>
10565 <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>
10569 Image with link parameter (URL target) and unnamed parameter
10571 [[File:Foobar.jpg|link=http://example.com/|Title]]
10573 <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>
10576 <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>
10580 Thumbnail image with link parameter
10583 parsoid=wt2html,wt2wt,html2html
10585 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
10587 <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>
10590 <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>
10594 Manually-specified thumbnail image
10598 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
10600 <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>
10603 <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>
10607 Manually-specified thumbnail image with explicit link to wiki page
10610 parsoid=wt2html,wt2wt,html2html
10612 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
10614 <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>
10617 <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>
10621 Manually-specified thumbnail image with explicit link to url
10624 parsoid=wt2html,wt2wt,html2html
10626 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
10628 <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>
10631 <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>
10635 Manually-specified thumbnail image with explicit no link
10638 parsoid=wt2html,wt2wt,html2html
10640 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
10642 <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>
10645 <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>
10649 Manually-specified thumbnail image with explicit link and alt text
10652 parsoid=wt2html,wt2wt,html2html
10654 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
10656 <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>
10659 <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>
10663 Image with frame and link
10665 parsoid=wt2html,wt2wt,html2html
10667 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
10669 <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>
10672 <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>
10676 Image with frame and link and explicit alt
10678 parsoid=wt2html,wt2wt,html2html
10680 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
10682 <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>
10685 <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>
10689 Image with wiki markup in implicit alt
10691 parsoid=wt2html,wt2wt,html2html
10693 [[Image:Foobar.jpg|testing '''bold''' in alt]]
10695 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
10697 <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>
10698 </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>
10701 <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>
10702 <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>
10705 ###################
10706 # Conflicting image format options.
10707 # First option specified should 'win'.
10708 # All three cases in each test should be identical.
10711 Image with 'frameless' first.
10713 parsoid=wt2html,wt2wt,html2html
10715 [[File:Foobar.jpg|frameless|caption]]
10717 [[File:Foobar.jpg|frameless|frame|caption]]
10719 [[File:Foobar.jpg|frameless|thumb|caption]]
10721 <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>
10722 </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>
10723 </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>
10726 <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>
10727 <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>
10728 <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>
10732 Image with 'frame' first.
10734 parsoid=wt2html,wt2wt,html2html
10736 [[File:Foobar.jpg|frame|caption]]
10737 [[File:Foobar.jpg|frame|frameless|caption]]
10738 [[File:Foobar.jpg|frame|thumb|caption]]
10740 <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>
10741 <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>
10742 <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>
10745 <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>
10749 Image with 'thumb' first.
10751 parsoid=wt2html,wt2wt,html2html
10753 [[File:Foobar.jpg|thumb|caption]]
10754 [[File:Foobar.jpg|thumb|frameless|caption]]
10755 [[File:Foobar.jpg|thumb|frame|caption]]
10757 <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>
10758 <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>
10759 <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>
10762 <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>
10765 ###################
10767 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
10768 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
10769 # Foobar has actual size of 1941x220
10770 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
10771 # a scalable format.
10772 # 2. Framed images always ignore size options; always render at default size.
10773 # 3. "Unspecified format" and border are the only types which can be
10777 Image: "unspecified format" and border enlarge
10779 parsoid=wt2html,wt2wt,html2html
10781 [[File:Foobar.jpg|2000px]]
10783 [[File:Foobar.jpg|border|2000px]]
10785 <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>
10786 </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>
10789 <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>
10790 <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>
10794 Image: "unspecified format" and border reduce
10796 parsoid=wt2html,wt2wt,html2html
10798 [[File:Foobar.jpg|1000px]]
10800 [[File:Foobar.jpg|border|1000px]]
10802 <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>
10803 </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>
10806 <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>
10807 <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>
10811 Image: thumbs reduce
10813 parsoid=wt2html,wt2wt,html2html
10815 [[File:Foobar.jpg|thumb|50px]]
10817 <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>
10820 <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>
10824 Image: bitmap thumbs can't be enlarged past original size, but vector can.
10826 parsoid=wt2html,wt2wt,html2html
10828 [[File:Foobar.jpg|thumb|2000px]]
10830 [[File:Foobar.svg|thumb|2000px]]
10832 <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>
10833 <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>
10836 <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>
10837 <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>
10841 Image: frameless can reduce in size
10843 parsoid=wt2html,wt2wt,html2html
10845 [[File:Foobar.jpg|frameless|50px]]
10847 <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>
10850 <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>
10854 Image: bitmap frameless can't be enlarged past original size, but vector can
10856 parsoid=wt2html,wt2wt,html2html
10858 [[File:Foobar.jpg|frameless|2000px]]
10860 [[File:Foobar.svg|frameless|2000px]]
10862 <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>
10863 </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>
10866 <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>
10867 <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>
10871 Image: framed images are always unscaled.
10873 parsoid=wt2html,wt2wt,html2html
10875 [[File:Foobar.jpg|frame]]
10877 [[File:Foobar.jpg|frame|50px]]
10879 [[File:Foobar.jpg|frame|50x50px]]
10881 [[File:Foobar.jpg|frame|2000px]]
10883 <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>
10884 <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>
10885 <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>
10886 <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>
10889 <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>
10892 ###################
10895 Link to image page- image page normally doesn't exists, hence edit link
10896 Add test with existing image page
10897 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
10901 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
10906 bug 18784 Link to non-existent image page with caption should use caption as link text
10908 [[:Image:test|caption]]
10910 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
10915 Frameless image caption with a free URL
10917 [[File:Foobar.jpg|http://example.com]]
10919 <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>
10922 <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>
10926 Thumbnail image caption with a free URL
10930 [[File:Foobar.jpg|thumb|http://example.com]]
10932 <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>
10935 <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>
10939 Thumbnail image caption with a free URL and explicit alt
10942 parsoid=wt2html,wt2wt,html2html
10944 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
10946 <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>
10949 <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>
10953 SVG thumbnails with no language set
10956 [[File:Foobar.svg|thumb|caption]]
10958 <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>
10961 <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>
10965 SVG thumbnails with language de
10967 parsoid=wt2html,wt2wt,html2html
10969 [[File:Foobar.svg|thumb|caption|lang=de]]
10971 <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>
10974 <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>
10978 SVG thumbnails with invalid language code
10980 parsoid=wt2html,wt2wt,html2html
10982 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
10984 <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>
10987 <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>
10991 BUG 1887: A ISBN with a thumbnail
10993 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
10995 <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>
10998 <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>
11002 BUG 1887: A RFC with a thumbnail
11004 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11006 <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>
11009 <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>
11013 BUG 1887: A mailto link with a thumbnail
11015 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11017 <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>
11020 <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>
11023 # Pending resolution to bug 368
11025 BUG 648: Frameless image caption with a link
11027 [[File:Foobar.jpg|text with a [[link]] in it]]
11029 <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>
11032 <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>
11036 BUG 648: Frameless image caption with a link (suffix)
11038 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11040 <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>
11043 <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>
11047 BUG 648: Frameless image caption with an interwiki link
11049 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11051 <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>
11054 <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>
11058 BUG 648: Frameless image caption with a piped interwiki link
11060 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11062 <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>
11065 <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>
11069 Escape HTML special chars in image alt text
11071 [[File:Foobar.jpg|& < > "]]
11073 <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>
11076 <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>
11080 BUG 499: Alt text should have Ӓ, not &1234;
11082 [[File:Foobar.jpg|♀]]
11084 <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>
11087 <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>
11091 Broken image caption with link
11093 parsoid=wt2html,wt2wt,html2html
11095 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11097 <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.
11100 <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>
11104 Image caption containing another image
11106 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
11108 <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>
11111 <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>
11115 Image: caption containing a newline
11117 [[File:Foobar.jpg|This
11120 <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>
11123 <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>
11127 Image: caption containing leading space
11128 (The leading space should not trigger nowiki escaping in wt2wt mode)
11130 [[File:Foobar.jpg|thumb| bar]]
11132 <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>
11135 <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>
11139 Image: caption containing a table
11141 parsoid=wt2html,wt2wt,html2html
11143 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11149 and some more text.]]
11151 <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>
11154 <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
11157 <tr><th>Foo </th><th>Bar</th></tr>
11160 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11164 Bug 3090: External links other than http: in image captions
11166 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11168 <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>
11171 <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>
11177 parsoid=wt2html,wt2wt,html2html
11179 [[Image:foobar.jpg|a|class=b]]
11181 <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>
11184 <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>
11188 Localized image handling (1).
11190 parsoid=wt2html,wt2wt,html2html
11193 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
11195 <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>
11198 <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>
11202 Localized image handling (2).
11205 parsoid=wt2html,wt2wt,html2html
11208 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
11210 <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>
11213 <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>
11217 "border", "frameless" and "class" attributes on an image.
11220 parsoid=wt2html,wt2wt,html2html
11222 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
11224 <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>
11227 <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>
11230 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
11232 Invalid image attributes (bug 62500)
11235 parsoid=wt2html,wt2wt,html2html
11237 [[File:Foobar.jpg|thumb|float|left|caption]]
11239 [[File:Foobar.jpg|thumb|righ|caption]]
11241 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
11243 <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>
11244 <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>
11245 <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>
11248 <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>
11254 #REDIRECT [[File:Barfoo.jpg]]
11260 [[Image:Barfoo.jpg]]
11262 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
11267 Missing image with uploads disabled
11271 [[Image:Foobaz.jpg]]
11273 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
11277 # Parsoid-specific testing for images
11278 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11279 # Currently imperfect due to a flaw in the Parsoid testrunner
11281 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
11285 Parsoid-specific image handling - simple image with size and middle alignment
11287 [[File:Foobar.jpg|middle|50px]]
11289 <p><span class="mw-valign-middle" typeof="mw:Image">
11290 <a href="File:Foobar.jpg">
11291 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11298 Parsoid-specific image handling - simple image with size, middle alignment,
11299 non-standard namespace alias
11301 parsoid=wt2wt,wt2html,html2html
11303 [[Image:Foobar.jpg|middle|50px]]
11305 <p><span class="mw-valign-middle" typeof="mw:Image">
11306 <a href="File:Foobar.jpg">
11307 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11314 Parsoid-specific image handling - simple image with size and middle alignment
11317 [[File:Foobar.jpg|50px|middle]]
11319 <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>
11323 Parsoid-specific image handling - simple image with size and middle alignment
11324 and non-standard namespace name
11326 parsoid=wt2html,wt2wt,html2html
11328 [[Image:Foobar.jpg|50px|middle]]
11330 <p><span class="mw-valign-middle" typeof="mw:Image">
11331 <a href="File:Foobar.jpg">
11332 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11339 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
11341 [[File:Foobar.jpg|500x10px|baseline|caption]]
11343 <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>
11347 Parsoid-specific image handling - simple image with border and size spec
11349 [[File:Foobar.jpg|50px|border|caption]]
11351 <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>
11355 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11357 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
11359 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
11360 <a href="File:Foobar.jpg">
11361 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
11363 <figcaption>caption content</figcaption>
11368 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11371 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
11373 <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>
11377 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
11379 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
11381 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
11382 <a href="File:Foobar.jpg">
11383 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
11385 <figcaption>caption</figcaption>
11390 Parsoid-specific image handling - thumbnail with specific size, halign,
11391 valign, and caption (existing content)
11393 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
11395 <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>
11399 Parsoid-specific image handling - framed image with specific size and caption
11402 parsoid=wt2html,wt2wt,html2html
11404 [[File:Foobar.jpg|frame|500x50px|caption]]
11406 <figure typeof="mw:Image/Frame">
11407 <a href="File:Foobar.jpg">
11408 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11410 <figcaption>caption</figcaption>
11415 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
11418 parsoid=wt2html,wt2wt,html2html
11420 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
11422 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
11423 <a href="File:Foobar.jpg">
11424 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11426 <figcaption>caption</figcaption>
11431 Parsoid-specific image handling - frameless image with specific size, border, and caption
11433 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
11435 <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>
11439 Parsoid-specific image handling - simple image with a formatted caption
11441 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
11443 <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>"}'>
11444 <a href="File:Foobar.jpg">
11445 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
11450 Parsoid-specific image handling - caption with a template in it
11452 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
11454 <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>
11458 Parsoid-specific image handling - caption with unbalanced tags in it
11460 parsoid=wt2html,wt2wt,html2html
11463 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
11467 <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>
11472 Parsoid-specific image handling - empty caption (1)
11474 parsoid=wt2html,wt2wt
11476 [[File:Foobar.jpg|thumb|]]
11478 <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>
11481 # empty captions don't get serialized unless we're in the "round trip" case
11483 Parsoid-specific image handling - empty caption (2)
11487 <figure class="mw-default-size" typeof="mw:Image/Thumb">
11488 <a href="File:Foobar.jpg">
11489 <img resource="./File:Foobar.jpg"
11490 src="//example.com/images/3/3a/Foobar.jpg"
11491 height="25" width="220"/>
11493 <figcaption></figcaption>
11496 [[File:Foobar.jpg|thumb]]
11500 Parsoid-specific image handling - whitespace caption
11502 [[File:Foobar.jpg|thumb| ]]
11504 <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>
11508 Parsoid-specific image handling - lang option
11511 [[File:Foobar.svg|lang=de|caption]]
11515 <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>
11524 Subpage test/subpage
11532 subpage title=[[Subpage test]]
11536 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
11541 Subpage noslash link
11543 subpage title=[[Subpage test]]
11547 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
11551 # TODO: make this PHP-parser compatible!
11553 Relative subpage noslash link
11555 parsoid=wt2wt,wt2html,html2html
11556 subpage title=[[Subpage test/1/2/3/4]]
11562 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
11563 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
11567 Parsoid: dot-slash prefixed wikilinks
11577 </p><p>[[././baz/]]
11582 </p><p>[[././baz/]]
11587 Render invalid page names as plain text (bug 51090)
11600 [[{{echo|./../foo}}|bar]]
11601 [[{{echo|foo/.}}|bar]]
11602 [[{{echo|foo/..}}|bar]]
11603 [[{{echo|foo~~~~bar}}]]
11604 [[{{echo|foo>bar}}]]
11605 [[{{echo|foo././bar}}]]
11606 [[{{echo|foo{bar}}]]
11607 [[{{echo|foo}bar}}]]
11608 [[{{echo|foo[bar}}]]
11609 [[{{echo|foo]bar}}]]
11610 [[{{echo|foo<bar}}]]
11612 <p>[[./../foo|bar]]
11622 </p><p>[[./../foo|bar]]
11635 <p>[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]</p>
11636 <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>
11644 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
11649 BUG 561: {{/Subpage}}
11651 subpage title=[[Page]]
11655 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
11663 Category:MediaWiki User's Guide
11671 [[:Category:MediaWiki User's Guide]]
11673 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
11682 [[Category:MediaWiki User's Guide]]
11684 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11688 PAGESINCATEGORY invalid title fatal (r33546 fix)
11690 {{PAGESINCATEGORY:<bogus>}}
11697 Category with different sort key
11701 [[Category:MediaWiki User's Guide|Foo]]
11703 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11707 Category with identical sort key
11711 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11713 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11717 Category with empty sort key
11722 [[Category:MediaWiki User's Guide|]]
11724 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11728 Category with empty sort key and parentheses
11733 [[Category:Foo (bar)|]]
11735 [[Category:Foo (bar)|Foo]]
11739 Category with link tail
11744 123[[Category:Foo]]456
11746 123[[Category:Foo]]456
11750 Category with template
11755 [[Category:{{echo|Foo}}]]
11757 [[Category:{{echo|Foo}}]]
11761 Category with template in sort key
11766 [[Category:Foo|{{echo|Bar}}]]
11768 [[Category:Foo|{{echo|Bar}}]]
11772 Category with template in sort key and title
11777 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11779 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11783 Category / paragraph interactions
11785 Foo [[Category:Baz]] Bar
11787 Foo [[Category:Baz]]
11795 [[Category:Baz]] Bar
11808 {{echo|[[Category:Baz]]}}
11823 Parsoid: Serialize link to category page with colon escape
11829 [[:Category:Foo|Bar]]
11832 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
11833 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
11838 Parsoid: Link prefix/suffixes aren't applied to category links
11840 parsoid=wt2html,wt2wt,html2html
11845 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
11849 Parsoid: Serialize link to file page with colon escape
11855 [[:File:Foo.png|Bar]]
11858 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
11859 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
11864 Parsoid: Serialize a genuine category link without colon escape
11869 [[Category:Foo|Bar]]
11871 <link rel="mw:PageProp/Category" href="Category:Foo">
11872 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
11876 Parsoid: Defaultsort
11880 {{DEFAULTSORT:Foo}}
11882 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
11886 ### Inter-language links
11889 Inter-language links
11895 [[zh:食品]]
11897 es:Alimento fr:Nourriture zh:食品
11901 Duplicate interlanguage links (bug 24502)
11917 Basic section headings
11924 ===Smaller headline===
11927 <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>
11930 <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>
11933 <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>
11939 Section headings with TOC
11942 === Subheadline 1 ===
11943 ===== Skipping a level =====
11944 ====== Skipping a level ======
11948 ===Another headline===
11950 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11952 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
11954 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
11956 <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>
11958 <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>
11965 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
11967 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
11973 <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>
11974 <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>
11975 <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>
11976 <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>
11977 <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>
11980 <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>
11984 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
11986 Handling of sections up to level 6 and beyond
11989 == Level 2 Heading==
11990 === Level 3 Heading===
11991 ==== Level 4 Heading====
11992 ===== Level 5 Heading=====
11993 ====== Level 6 Heading======
11994 ======= Level 7 Heading=======
11995 ======== Level 8 Heading========
11996 ========= Level 9 Heading=========
11997 ========== Level 10 Heading==========
11999 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12001 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12003 <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>
12005 <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>
12007 <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>
12009 <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>
12011 <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>
12012 <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>
12013 <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>
12014 <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>
12015 <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>
12029 <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>
12030 <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>
12031 <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>
12032 <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>
12033 <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>
12034 <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>
12035 <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>
12036 <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>
12037 <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>
12038 <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>
12043 TOC regression (bug 9764)
12047 ==== title 1.1.1 ====
12052 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12054 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12056 <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>
12058 <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>
12061 <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>
12064 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12066 <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>
12072 <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>
12073 <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>
12074 <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>
12075 <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>
12076 <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>
12077 <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>
12082 TOC with wgMaxTocLevel=3 (bug 6204)
12088 ==== title 1.1.1 ====
12093 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12095 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12097 <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>
12098 <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>
12101 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12103 <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>
12109 <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>
12110 <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>
12111 <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>
12112 <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>
12113 <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>
12114 <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>
12119 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
12125 ====Section 1.1.1====
12126 ====Section 1.1.1.1====
12129 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12131 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
12133 <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>
12136 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
12140 <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>
12141 <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>
12142 <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>
12143 <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>
12144 <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>
12150 Resolving duplicate section names
12155 <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>
12156 <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>
12161 Resolving duplicate section names with differing case (bug 10721)
12166 <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>
12167 <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>
12179 Template with sections, __NOTOC__
12186 <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>
12187 <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>
12188 <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>
12189 <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>
12194 __NOEDITSECTION__ keyword
12200 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
12201 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
12206 Link inside a section heading
12208 ==Section with a [[Main Page|link]] in it==
12210 <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>
12215 TOC regression (bug 12077)
12222 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12224 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12226 <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>
12229 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
12233 <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>
12234 <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>
12235 <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>
12240 BUG 1219 URL next to image (good)
12242 http://example.com [[Image:foobar.jpg]]
12244 <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>
12249 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
12252 The line above must have a trailing space!
12255 But just in case it doesn't...
12257 <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>
12258 <p>The line above must have a trailing space!
12260 <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>
12261 <p>But just in case it doesn't...
12266 Header with special characters (bug 25462)
12268 The tooltips shall not show entities to the user (ie. be double escaped)
12285 <p>The tooltips shall not show entities to the user (ie. be double escaped)
12287 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12289 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
12290 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
12291 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
12292 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
12293 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
12297 <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>
12300 <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>
12303 <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>
12306 <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>
12309 <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>
12315 Headers with excess '=' characters
12316 (Are similar tests necessary beyond the 1st level?)
12320 =''italic'' heading==
12321 ==''italic'' heading=
12323 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12325 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
12326 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
12327 <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>
12328 <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>
12332 <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>
12333 <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>
12334 <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>
12335 <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>
12340 HTML headers vs TOC (bug 23393)
12341 (__NOEDITSECTION__ for clearer output, doesn't matter here)
12353 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12355 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
12357 <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>
12358 <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>
12361 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
12363 <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>
12364 <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>
12370 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
12371 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
12372 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
12373 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
12374 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
12375 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
12380 Single-line or multiline-comments can follow headings
12382 parsoid=wt2html,wt2wt
12390 <h2><span class="mw-headline" id="foo">foo</span></h2>
12391 <h2><span class="mw-headline" id="bar">bar</span></h2>
12392 <h2><span class="mw-headline" id="baz">baz</span></h2>
12397 BUG 1219 URL next to image (broken)
12399 http://example.com[[Image:foobar.jpg]]
12401 <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>
12406 Bug 1186 news: in the middle of text
12408 http://en.wikinews.org/wiki/Wikinews:Workplace
12410 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
12416 Namespaced link must have a title
12425 Namespaced link must have a title (bad fragment version)
12427 [[Project:#fragment]]
12429 <p>[[Project:#fragment]]
12435 ### HTML tags and HTML attributes
12439 div with no attributes
12441 <div>HTML rocks</div>
12443 <div>HTML rocks</div>
12448 div with double-quoted attribute
12450 <div id="rock">HTML rocks</div>
12452 <div id="rock">HTML rocks</div>
12457 div with single-quoted attribute
12459 <div id='rock'>HTML rocks</div>
12461 <div id="rock">HTML rocks</div>
12466 div with unquoted attribute
12468 <div id=rock>HTML rocks</div>
12470 <div id="rock">HTML rocks</div>
12475 div with illegal double attributes
12477 <div id="a" id="b">HTML rocks</div>
12479 <div id="b">HTML rocks</div>
12483 # FIXME: produce empty string instead of "class" in the PHP parser, following
12486 div with empty attribute value, space before equals
12490 <div class =>HTML rocks</div>
12492 <div class="">HTML rocks</div>
12496 # The PHP parser escapes the opening brace to { for some reason, so
12497 # disabled this test for it.
12499 div with braces in attribute value
12503 <div title="{}">Foo</div>
12505 <div title="{}">Foo</div>
12508 # This it very inconsistent in the PHP parser: it returns
12509 # class="class" if there is a space between the name and the equal sign (see
12510 # 'div with empty attribute value, space before equals'), but strips the
12511 # attribute completely if the space is missing. We hope that not much content
12512 # depends on this, so are implementing the behavior below in Parsoid for
12513 # consistencies' sake. Disabled for the PHP parser.
12514 # FIXME: fix this behavior in the PHP parser?
12516 div with empty attribute value, no space before equals
12520 <div class=>HTML rocks</div>
12522 <div class="">HTML rocks</div>
12527 HTML multiple attributes correction
12529 <p class="error" class="awesome">Awesome!</p>
12531 <p class="awesome">Awesome!</p>
12536 Table multiple attributes correction
12539 !+ class="error" class="awesome"| status
12544 <th class="awesome"> status
12552 <DIV ID="x">HTML ROCKS</DIV>
12554 <div id="x">HTML ROCKS</div>
12559 Non-ASCII pseudo-tags are rendered as text
12568 Pseudo-tag with URL 'name' renders as url link
12570 <http://example.com/>
12572 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
12577 text with amp in the middle of nowhere
12581 <p>Remember AT&T?
12586 text with character entity: eacute
12588 I always thought é was a cute letter.
12590 <p>I always thought é was a cute letter.
12595 text with entity-escaped character entity-like string: eacute
12597 I always thought &eacute; was a cute letter.
12599 <p>I always thought &eacute; was a cute letter.
12604 text with undefined character entity: xacute
12606 I always thought &xacute; was a cute letter.
12608 <p>I always thought &xacute; was a cute letter.
12612 # TODO: generalize to PHP parser?
12618 <data value="5">five</data>
12619 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12620 <mark>This highlighted text</mark>
12622 <p><data value="5">five</data>
12623 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12624 <mark>This highlighted text</mark></p>
12628 HTML tag with leading space is parsed as text
12632 <p>< div>foo< /div>
12637 ### Nesting tests (see bug 41545, 50604, 51081)
12640 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
12641 # Note that html2wt is considerably more difficult if we use <b> in
12642 # the test case, instead of <big>
12644 Ensure that HTML adoption agency algorithm is properly implemented.
12646 <big>X<big>Y</big>Z</big>
12648 <p><big>X<big>Y</big>Z</big>
12652 # This was bug 41545 in the PHP parser.
12656 <kbd>X<kbd>Y</kbd>Z</kbd>
12658 <p><kbd>X<kbd>Y</kbd>Z</kbd>
12662 # The following cases were bug 51081 in the PHP parser.
12663 # Note that there are some other nestable tags (b, i, etc) which are
12664 # not covered; see bug 51081 for discussion.
12668 <em>X<em>Y</em>Z</em>
12670 <p><em>X<em>Y</em>Z</em>
12675 Nesting of <strong>
12677 <strong>X<strong>Y</strong>Z</strong>
12679 <p><strong>X<strong>Y</strong>Z</strong>
12688 <p><q>X<q>Y</q>Z</q>
12695 <ruby>X<ruby>Y</ruby>Z</ruby>
12697 <p><ruby>X<ruby>Y</ruby>Z</ruby>
12704 <bdo>X<bdo>Y</bdo>Z</bdo>
12706 <p><bdo>X<bdo>Y</bdo>Z</bdo>
12718 [[Media:Foobar.jpg]]
12720 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
12725 Media link with text
12727 [[Media:Foobar.jpg|A neat file to look at]]
12729 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
12733 # FIXME: this is still bad HTML tag nesting
12735 Media link with nasty text
12736 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
12738 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
12740 <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>
12745 Media link to nonexistent file (bug 1702)
12747 [[Media:No such.jpg]]
12749 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
12754 Image link to nonexistent file (bug 1850 - good)
12756 [[Image:No such.jpg]]
12758 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
12763 :Image link to nonexistent file (bug 1850 - bad)
12765 [[:Image:No such.jpg]]
12767 <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>
12774 Character reference normalization in link text (bug 1938)
12776 [[Main Page|this&that]]
12778 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
12785 Test for unicode normalization
12787 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
12791 (bug 19451) Links should refer to the normalized form.
12799 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12800 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12801 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12802 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12803 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12808 Empty attribute crash test (bug 2067)
12810 <font color="">foo</font>
12812 <p><font color="">foo</font>
12817 Empty attribute crash test single-quotes (bug 2067)
12819 <font color=''>foo</font>
12821 <p><font color="">foo</font>
12826 Attribute test: equals, then nothing
12828 <font color=>foo</font>
12830 <p><font>foo</font>
12835 Attribute test: unquoted value
12837 <font color=x>foo</font>
12839 <p><font color="x">foo</font>
12844 Attribute test: unquoted but illegal value (hash)
12846 <font color=#x>foo</font>
12848 <p><font color="#x">foo</font>
12853 Attribute test: no value
12855 <font color>foo</font>
12857 <p><font color="color">foo</font>
12862 Bug 2095: link with three closing brackets
12866 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
12869 <p><a rel="mw:WikiLink" href="./Main_Page">Main Page</a>]</p>
12873 Bug 2095: link with pipe and three closing brackets
12875 [[Main Page|link]]]
12877 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
12880 <p><a rel="mw:WikiLink" href="./Main_Page">link</a>]</p>
12884 Bug 2095: link with pipe and three closing brackets, version 2
12886 [[Main Page|[http://example.com/]]]
12888 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
12891 <p><a rel="mw:WikiLink" href="./Main_Page">[http://example.com/]</a></p>
12900 Template:Dangerous attribute
12902 " onmouseover="alert(document.cookie)
12906 Template:Dangerous style attribute
12908 border-size: expression(alert(document.cookie))
12914 <div style="float: right; {{{1}}}">Magic div</div>
12918 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
12920 <div title="{{test}}"></div>
12922 <div title="This is a test template"></div>
12927 Bug 2304: HTML attribute safety (dangerous template; 2309)
12929 <div title="{{dangerous attribute}}"></div>
12931 <div title=""></div>
12936 Bug 2304: HTML attribute safety (dangerous style template; 2309)
12938 <div style="{{dangerous style attribute}}"></div>
12940 <div style="/* insecure input */"></div>
12945 Bug 2304: HTML attribute safety (safe parameter; 2309)
12947 {{div style|width: 200px}}
12949 <div style="float: right; width: 200px">Magic div</div>
12954 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
12956 {{div style|width: expression(alert(document.cookie))}}
12958 <div style="/* insecure input */">Magic div</div>
12963 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
12965 {{div style|"><script>alert(document.cookie)</script>}}
12967 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12972 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
12974 {{div style|" ><script>alert(document.cookie)</script>}}
12976 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12981 Bug 2304: HTML attribute safety (link)
12983 <div title="[[Main Page]]"></div>
12985 <div title="[[Main Page]]"></div>
12990 Bug 2304: HTML attribute safety (italics)
12992 <div title="''foobar''"></div>
12994 <div title="''foobar''"></div>
12999 Bug 2304: HTML attribute safety (bold)
13001 <div title="'''foobar'''"></div>
13003 <div title="'''foobar'''"></div>
13009 Bug 2304: HTML attribute safety (ISBN)
13011 <div title="ISBN 1234567890"></div>
13013 <div title="ISBN 1234567890"></div>
13018 Bug 2304: HTML attribute safety (RFC)
13020 <div title="RFC 1234"></div>
13022 <div title="RFC 1234"></div>
13027 Bug 2304: HTML attribute safety (PMID)
13029 <div title="PMID 1234567890"></div>
13031 <div title="PMID 1234567890"></div>
13036 Bug 2304: HTML attribute safety (web link)
13038 <div title="http://example.com/"></div>
13040 <div title="http://example.com/"></div>
13045 Bug 2304: HTML attribute safety (named web link)
13047 <div title="[http://example.com/ link]"></div>
13049 <div title="[http://example.com/ link]"></div>
13054 Bug 3244: HTML attribute safety (extension; safe)
13056 <div style="<nowiki>background:blue</nowiki>"></div>
13058 <div style="background:blue"></div>
13063 Bug 3244: HTML attribute safety (extension; unsafe)
13065 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
13067 <div style="/* insecure input */"></div>
13071 # More MSIE fun discovered by Tom Gilder
13074 MSIE CSS safety test: spurious slash
13076 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
13078 <div style="/* insecure input */">evil</div>
13083 MSIE CSS safety test: hex code
13085 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
13087 <div style="/* insecure input */">evil</div>
13092 MSIE CSS safety test: comment in url
13094 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
13096 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
13101 MSIE CSS safety test: comment in expression
13103 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
13105 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
13110 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
13112 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
13114 <p style="/* invalid control char */">A</p>
13119 MSIE 6 CSS safety test: Fullwidth (bug 55332)
13121 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
13122 <div style="top:EXPRESSION(alert())">B</div>
13124 <p style="/* insecure input */">A</p>
13125 <div style="/* insecure input */">B</div>
13130 MSIE 6 CSS safety test: IPA extensions (bug 55332)
13132 <div style="background-image:uʀʟ(javascript:alert())">A</div>
13133 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
13135 <div style="/* insecure input */">A</div>
13136 <p style="/* insecure input */">B</p>
13141 MSIE 6 CSS safety test: sup/sub script (bug 55332)
13143 <div style="background-image:url⁽javascript:alert())">A</div>
13144 <div style="background-image:url₍javascript:alert())">B</div>
13145 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
13147 <div style="/* insecure input */">A</div>
13148 <div style="/* insecure input */">B</div>
13149 <p style="/* insecure input */">C</p>
13157 title="data:text/html,<img src=1 onerror=alert(1)>"
13158 style="-o-link:attr(title);-o-link-source:current">X</div>
13160 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
13165 MSIE 6 CSS safety test: Repetition markers (bug 55332)
13167 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
13168 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
13169 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
13170 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
13171 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
13172 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
13173 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
13175 <p style="/* insecure input */">A</p>
13176 <p style="/* insecure input */">B</p>
13177 <p style="/* insecure input */">C</p>
13178 <p style="/* insecure input */">D</p>
13179 <p style="/* insecure input */">E</p>
13180 <p style="/* insecure input */">F</p>
13181 <p style="/* insecure input */">G</p>
13186 Table attribute legitimate extension
13189 !+ style="<nowiki>color:blue</nowiki>"| status
13194 <th style="color:blue"> status
13200 Table attribute safety
13203 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
13208 <th style="/* insecure input */"> status
13214 CSS line continuation 1
13216 <div style="background-image: u\ rl(test.jpg);"></div>
13218 <div style="/* insecure input */"></div>
13223 CSS line continuation 2
13225 <div style="background-image: u\ rl(test.jpg); "></div>
13227 <div style="/* insecure input */"></div>
13238 Expansion of multi-line templates in attribute values (bug 6255)
13240 <div style="background: {{identity|#00FF00}}">-</div>
13242 <div style="background: #00FF00">-</div>
13248 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
13250 <div style="background:
13253 <div style="background: #00FF00">-</div>
13258 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
13260 <div style="background: #00FF00">-</div>
13262 <div style="background: #00FF00">-</div>
13267 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
13270 Parser hook: empty input
13283 Parser hook: empty input using terminated empty elements
13296 Parser hook: empty input using terminated empty elements (space before)
13309 Parser hook: basic input
13323 Parser hook: case insensitive
13337 Parser hook: case insensitive, redux
13350 Parser hook: nested tags
13354 <tag><tag></tag></tag>
13365 Parser hook: basic arguments
13367 <tag width=200 height = "100" depth = '50' square></tag>
13375 'square' => 'square',
13382 Parser hook: argument containing a forward slash (bug 5344)
13384 <tag filename='/tmp/bla'></tag>
13389 'filename' => '/tmp/bla',
13396 Parser hook: empty input using terminated empty elements (bug 2374)
13409 # </tag> should be output literally since there is no matching tag that begins it
13411 Parser hook: basic arguments using terminated empty elements (bug 2374)
13413 <tag width=200 height = "100" depth = '50' square/>
13423 'square' => 'square',
13432 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
13436 Parser hook: static parser hook not inside a comment
13438 <statictag>hello, world</statictag>
13439 <statictag action=flush/>
13447 Parser hook: static parser hook inside a comment
13449 <!-- <statictag>hello, world</statictag> -->
13450 <statictag action=flush/>
13456 # Nested template calls; this case was broken by Parser.php rev 1.506,
13460 Template:One-parameter
13462 (My parameter is: {{{1}}})
13466 Template:Map-one-parameter
13468 {{{{{1}}}|{{{2}}}}}
13472 Nested template calls
13474 {{Map-one-parameter|One-parameter|param}}
13476 <p>(My parameter is: param)
13485 Sanitizer: Closing of open tags
13487 <s></s><table></table>
13489 <s></s><table></table>
13494 Sanitizer: Closing of open but not closed tags
13503 Sanitizer: Closing of closed but not open tags
13512 Sanitizer: Closing of closed but not open table tags
13514 Table not started</td></tr></table>
13516 <p>Table not started</td></tr></table>
13521 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
13523 <span id="æ: v">byte</span>[[#æ: v|backlink]]
13525 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
13530 Sanitizer: Validating the contents of the id attribute (bug 4515)
13536 Something, but definitely not <br id="9" />...
13540 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
13544 <br id="foo" /><br id="foo" />
13546 Something need to be done. foo-2 ?
13550 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
13553 <meta itemprop="hello" content="world">
13554 <meta http-equiv="refresh" content="5">
13555 <meta itemprop="hello" http-equiv="refresh" content="5">
13556 <link itemprop="hello" href="{{SERVER}}">
13557 <link rel="stylesheet" href="{{SERVER}}">
13558 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
13561 <div itemscope="itemscope">
13562 <p> <meta itemprop="hello" content="world" />
13563 <meta http-equiv="refresh" content="5">
13564 <meta itemprop="hello" content="5" />
13566 <link itemprop="hello" href="http://example.org" />
13567 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
13568 <link itemprop="hello" href="http://example.org" />
13574 Language converter: output gets cut off unexpectedly (bug 5757)
13578 this bit is safe: }-
13580 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
13582 then we get cut off here: }-
13584 all additional text is vanished
13586 <p>this bit is safe: }-
13587 </p><p>but if we add a conversion instance: xxx
13588 </p><p>then we get cut off here: }-
13589 </p><p>all additional text is vanished
13594 Self closed html pairs (bug 5487)
13597 <center><font id="bug" />Centered text</center>
13598 <div><font id="bug2" />In div text</div>
13600 <center><font id="bug" />Centered text</center>
13601 <div><font id="bug2" />In div text</div>
13610 Punctuation: nbsp before exclamation
13614 <p>C'est grave !
13619 Punctuation: CSS !important (bug 11874)
13621 <div style="width:50% !important">important</div>
13623 <div style="width:50% !important">important</div>
13628 Punctuation: CSS ! important (bug 11874; with space after)
13630 <div style="width:50% ! important">important</div>
13632 <div style="width:50% ! important">important</div>
13638 HTML bullet list, closed tags (bug 5497)
13653 HTML bullet list, unclosed tags (bug 5497)
13672 HTML ordered list, closed tags (bug 5497)
13687 HTML ordered list, unclosed tags (bug 5497)
13706 HTML nested bullet list, closed tags (bug 5497)
13731 HTML nested bullet list, open tags (bug 5497)
13760 HTML nested ordered list, closed tags (bug 5497)
13785 HTML nested ordered list, open tags (bug 5497)
13814 HTML ordered list item with parameters oddity
13816 <ol><li id="fragment">One</li>
13819 <ol><li id="fragment">One</li>
13824 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
13826 bug 5918: autonumbering
13828 [http://first/] [http://second] [ftp://ftp]
13832 [mailto:enclosed@mail.tld With target]
13834 [mailto:enclosed@mail.tld]
13836 mailto:inline@mail.tld
13838 <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>
13839 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
13840 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
13841 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
13842 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
13845 <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>
13846 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
13847 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
13848 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
13849 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
13854 # Security and HTML correctness
13855 # From Nick Jenkins' fuzz testing
13859 Fuzz testing: Parser13
13874 Fuzz testing: Parser14
13879 <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>
13880 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13882 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
13890 Fuzz testing: Parser14-table
13895 <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>
13896 <table style="__TOC__">
13902 # Known to produce bogus xml (extra </td>)
13904 Fuzz testing: Parser16
13924 Fuzz testing: Parser21
13927 ! irc://{{ftp://a" onmouseover="alert('hello world');"
13932 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
13942 Fuzz testing: Parser22
13944 http://===r:::https://b
13948 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
13956 # Known to produce bad XML for now
13958 Fuzz testing: Parser24
13965 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
13966 <br style="onmouseover='alert(document.cookie);' " />
13968 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13973 <u class="|">}}}} >
13974 <br style="onmouseover='alert(document.cookie);'" />
13976 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13985 # Note: the current result listed for this is not what the original one was,
13986 # but the original bug was JavaScript injection, which is fixed in any case.
13987 # It's not clear that the original result listed was any more correct than the
13988 # current one. Original result:
13991 # <li class="||">
13992 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
13994 Fuzz testing: Parser25 (bug 6055)
14000 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
14002 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14007 Fuzz testing: URL adjacent extension (with space, clean)
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; nowiki)
14020 http://example.com<nowiki>junk</nowiki>
14022 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
14027 Fuzz testing: URL adjacent extension (no space, dirty; pre)
14030 http://example.com<pre>junk</pre>
14032 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
14037 Fuzz testing: image with bogus manual thumbnail
14039 [[Image:foobar.jpg|thumbnail= ]]
14041 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
14044 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,null,null]}'/>
14048 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
14050 <pre dir=" "></pre>
14052 <pre dir=" "></pre>
14057 Parsing optional HTML elements (Bug 6171)
14062 <td> Some tabular data</td>
14063 <td> More tabular data ...
14064 <td> And yet som tabular data</td>
14070 <td> Some tabular data</td>
14071 <td> More tabular data ...
14072 </td><td> And yet som tabular data</td>
14079 Correct handling of <td>, <tr> (Bug 6171)
14084 <td> Some tabular data</td>
14085 <td> More tabular data ...</td>
14086 <td> And yet som tabular data</td>
14092 <td> Some tabular data</td>
14093 <td> More tabular data ...</td>
14094 <td> And yet som tabular data</td>
14102 Parsing crashing regression (fr:JavaScript)
14106 <p></body></x>
14111 Inline wiki vs wiki block nesting
14117 <p><b>Bold paragraph</b>
14118 </p><p>New wiki paragraph
14123 Inline HTML vs wiki block nesting
14131 <p><b>Bold paragraph</b>
14132 </p><p>New wiki paragraph
14136 # Original result was this:
14137 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
14139 # While that might be marginally more intuitive, maybe, the six-apostrophe
14140 # construct is clearly pathological and the result stated here (which is what
14141 # the parser actually does) is about as reasonable as anything.
14143 Mixing markup for italics and bold
14146 '''bold''''''bold''bolditalics'''''
14148 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
14156 Article for special page transclusion test
14160 Special page transclusion
14163 {{Special:Prefixindex/Xyzzyx}}
14165 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14170 Special page transclusion twice (bug 5021)
14173 {{Special:Prefixindex/Xyzzyx}}
14174 {{Special:Prefixindex/Xyzzyx}}
14176 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14177 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14182 Transclusion of default MediaWiki message
14184 {{MediaWiki:Mainpage}}
14191 Transclusion of nonexistent MediaWiki message
14193 {{MediaWiki:Mainpagexxx}}
14195 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
14200 Transclusion of MediaWiki message with underscore
14202 {{MediaWiki:history_short}}
14209 Transclusion of MediaWiki message with space
14211 {{MediaWiki:history short}}
14218 Invalid header with following text
14228 Section extraction test (section 0)
14248 Section extraction test (section 1)
14270 Section extraction test (section 2)
14291 Section extraction test (section 3)
14311 Section extraction test (section 4)
14335 Section extraction test (section 5)
14355 Section extraction test (section 6)
14376 Section extraction test (section 7)
14396 Section extraction test (section 8)
14416 Section extraction test (section 9)
14437 Section extraction test (section 10)
14457 Section extraction test (nonexistent section 11)
14476 Section extraction test with bogus heading (section 1)
14481 ==bogus== not a legal section
14485 ==bogus== not a legal section
14489 Section extraction test with bogus heading (section 2)
14494 ==bogus== not a legal section
14501 Section extraction test with comment after heading (section 1)
14513 Section extraction test with comment after heading (section 2)
14525 Section extraction test with bogus <nowiki> heading (section 1)
14530 ==bogus== <nowiki>not a legal section</nowiki>
14534 ==bogus== <nowiki>not a legal section</nowiki>
14538 Section extraction test with bogus <nowiki> heading (section 2)
14543 ==bogus== <nowiki>not a legal section</nowiki>
14550 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
14551 # instead of respecting commented sections
14553 Section extraction prefixed by comment (section 1)
14564 Section extraction prefixed by comment (section 2)
14575 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
14576 # instead of respecting HTML-style headings
14578 Section extraction, mixed wiki and html (section 1)
14594 Section extraction, mixed wiki and html (section 2)
14610 # Formerly testing for bug 3342
14612 Section extraction, heading surrounded by <noinclude>
14616 <noinclude>==unmarked==</noinclude>
14622 # Test behavior of bug 19910
14624 Sectiion with all-equals
14629 The line above must have a trailing space
14632 But just in case it doesn't...
14636 But just in case it doesn't...
14640 Section replacement test (section 0)
14671 Section replacement test (section 1)
14700 Section replacement test (section 2)
14730 Section replacement test (section 3)
14761 Section replacement test (section 4)
14788 Section replacement test (section 5)
14819 Section replacement test (section 6)
14849 Section replacement test (section 7)
14880 Section replacement test (section 8)
14911 Section replacement test (section 9)
14940 Section replacement test (section 10)
14970 Section replacement test with initial whitespace (bug 13728)
14974 Preformatted initial line
14978 Preformatted initial line
14985 Section extraction, heading followed by pre with 20 spaces (bug 6398)
14997 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
15010 Section extraction, <pre> around bogus header (bug 10309)
15027 Section replacement, <pre> around bogus header (bug 10309)
15029 noxml replace=2,"xxx"
15050 Handling of 
 in URLs
15054 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15057 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
15059 a</a></li></ul></li></ul>
15063 Handling of %0A in URLs
15067 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15070 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15074 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
15076 5 quotes, code coverage +1 line
15083 <p><b><i></i></b></p>
15086 # same html as previous, but wikitext adjusted to match parsoid html2wt
15087 # note that wt2html and html2html will put the <i> before the <b>
15089 5 quotes, code coverage +1 line w/ nowiki (1)
15091 parsoid=wt2wt,html2wt
15093 '''''<nowiki/>'''''
15098 <p><b><i></i></b></p>
15101 # same as previous, just swapping the <i> and <b>
15103 5 quotes, code coverage +1 line w/ nowiki (2)
15105 '''''<nowiki/>'''''
15110 <p><i><b></b></i></p>
15114 Special:Search page linking.
15118 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
15125 title=[[Parser test]]
15130 * {{FULLPAGENAMEE}}
15132 * {{BASEPAGENAMEE}}
15136 * {{ROOTPAGENAMEE}}
15138 * {{TALKPAGENAMEE}}
15139 * {{SUBJECTPAGENAME}}
15140 * {{SUBJECTPAGENAMEE}}
15143 * {{NAMESPACENUMBER}}
15147 * {{SUBJECTSPACEE}}
15148 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
15150 <ul><li> Parser test</li>
15151 <li> Parser_test</li>
15152 <li> Parser test</li>
15153 <li> Parser_test</li>
15154 <li> Parser test</li>
15155 <li> Parser_test</li>
15156 <li> Parser test</li>
15157 <li> Parser_test</li>
15158 <li> Parser test</li>
15159 <li> Parser_test</li>
15160 <li> Talk:Parser test</li>
15161 <li> Talk:Parser_test</li>
15162 <li> Parser test</li>
15163 <li> Parser_test</li>
15171 <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>
15174 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
15184 image4 |300px| centre
15185 image5.svg| http://///////
15190 <ul class="gallery mw-gallery-traditional">
15191 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15192 <div class="thumb" style="height: 150px;">Image1.png</div>
15193 <div class="gallerytext">
15196 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15197 <div class="thumb" style="height: 150px;">Image2.gif</div>
15198 <div class="gallerytext">
15203 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15204 <div class="thumb" style="height: 150px;">Image3</div>
15205 <div class="gallerytext">
15208 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15209 <div class="thumb" style="height: 150px;">Image4</div>
15210 <div class="gallerytext">
15215 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15216 <div class="thumb" style="height: 150px;">Image5.svg</div>
15217 <div class="gallerytext">
15218 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
15222 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15223 <div class="thumb" style="height: 150px;">* image6</div>
15224 <div class="gallerytext">
15232 Gallery (with options)
15234 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
15235 File:Nonexistant.jpg|caption
15236 File:Nonexistant.jpg
15237 image:foobar.jpg|some '''caption''' [[Main Page]]
15239 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
15242 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
15243 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
15244 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15245 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15246 <div class="gallerytext">
15251 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15252 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15253 <div class="gallerytext">
15256 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15257 <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>
15258 <div class="gallerytext">
15259 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15263 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15264 <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>
15265 <div class="gallerytext">
15268 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15269 <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>
15270 <div class="gallerytext">
15280 Gallery with link that has fragment
15283 image:foobar.jpg|link=Main_Page
15284 image:foobar.jpg|link=Main_Page#section
15285 image:foobar.jpg|link=Main Page#section|caption
15288 <ul class="gallery mw-gallery-traditional">
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"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
15291 <div class="gallerytext">
15294 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15295 <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>
15296 <div class="gallerytext">
15299 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15300 <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>
15301 <div class="gallerytext">
15311 Gallery with wikitext inside caption
15314 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
15315 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
15318 <ul class="gallery mw-gallery-traditional">
15319 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15320 <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>
15321 <div class="gallerytext">
15322 <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>
15326 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15327 <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>
15328 <div class="gallerytext">
15329 <p>This is a test template
15338 gallery (with showfilename option)
15340 <gallery showfilename>
15341 File:Nonexistant.jpg|caption
15342 File:Nonexistant.jpg
15343 image:foobar.jpg|some '''caption''' [[Main Page]]
15347 <ul class="gallery mw-gallery-traditional">
15348 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15349 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15350 <div class="gallerytext">
15351 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15356 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15357 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15358 <div class="gallerytext">
15359 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15363 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15364 <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>
15365 <div class="gallerytext">
15366 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15367 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15371 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15372 <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>
15373 <div class="gallerytext">
15374 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15383 Gallery (with namespace-less filenames)
15386 File:Nonexistant.jpg
15392 <ul class="gallery mw-gallery-traditional">
15393 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15394 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15395 <div class="gallerytext">
15398 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15399 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15400 <div class="gallerytext">
15403 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15404 <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>
15405 <div class="gallerytext">
15408 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15409 <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>
15410 <div class="gallerytext">
15418 HTML Hex character encoding (spells the word "JavaScript")
15420 parsoid=wt2html,wt2wt,html2html
15422 JavaScript
15424 <p>JavaScript
15427 <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>
15431 HTML Hex character encoding bogus encoding (bug 26437 regression check)
15435 <p>&#xsee;&#XSEE;
15438 <p>&#xsee;&#XSEE;</p>
15442 HTML Hex character encoding mixed case
15444 parsoid=wt2html,wt2wt,html2html
15451 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
15455 __FORCETOC__ override
15467 ISBN 978-0-1234-56 789
15469 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
15474 ISBN followed by 5 spaces
15485 ISBN ISBN 1234567890
15487 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15496 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
15501 ISBN with empty prefix (parsoid test)
15505 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
15509 Bug 22905: <abbr> followed by ISBN followed by </a>
15511 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
15513 <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>
15522 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
15527 Double RFC with a wiki link
15531 <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>
15540 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
15545 Centre-aligned image
15547 [[Image:foobar.jpg|centre]]
15549 <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>
15556 [[Image:foobar.jpg|none]]
15558 <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>
15563 Width + Height sized image (using px) (height is ignored)
15565 [[Image:foobar.jpg|640x480px]]
15567 <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>
15572 Width-sized image (using px, no following whitespace)
15574 [[Image:foobar.jpg|640px]]
15576 <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>
15581 Width-sized image (using px, with following whitespace - test regression from r39467)
15583 [[Image:foobar.jpg|640px ]]
15585 <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>
15590 Width-sized image (using px, with preceding whitespace - test regression from r39467)
15592 [[Image:foobar.jpg| 640px]]
15594 <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>
15599 Image with page parameter
15603 [[File:LoremIpsum.djvu|page=2]]
15605 <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>
15610 Another italics / bold test
15618 # Note the results may be incorrect, as parserTest output included this:
15619 # XML error: Mismatched tag at byte 6120:
15620 # ...<dd> </dt></dl> </dd...
15651 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
15653 Images with the "|" character in the comment
15655 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
15657 <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>
15660 <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>
15664 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
15666 <html><script>alert(1);</script></html>
15668 <p><html><script>alert(1);</script></html>
15673 HTML with raw HTML ($wgRawHtml==true)
15677 <html><script>alert(1);</script></html>
15679 <p><script>alert(1);</script>
15684 Parents of subpages, one level up
15686 subpage title=[[Subpage test/L1/L2/L3]]
15690 <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>
15696 Parents of subpages, one level up, not named
15698 subpage title=[[Subpage test/L1/L2/L3]]
15702 <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>
15709 Parents of subpages, two levels up
15711 subpage title=[[Subpage test/L1/L2/L3]]
15717 <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
15718 </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>
15723 Parents of subpages, two levels up, without trailing slash or name.
15725 subpage title=[[Subpage test/L1/L2/L3]]
15734 Parents of subpages, two levels up, with lots of extra trailing slashes.
15736 subpage title=[[Subpage test/L1/L2/L3]]
15740 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
15745 Subpage test/L1/L2/L3Sibling
15751 Transclusion of a sibling page (one level up)
15753 subpage title=[[Subpage test/L1/L2/L3]]
15762 Transclusion of a child page
15764 subpage title=[[Subpage test/L1/L2]]
15773 Non-transclusion because of too many up levels
15775 subpage title=[[Subpage test/L1/L2/L3]]
15777 {{../../../../More than parent}}
15779 <p>{{../../../../More than parent}}
15784 Definition list code coverage
15790 <dl><dt> title  </dt>
15792 <dt> title </dt>
15800 Don't fall for the self-closing div
15802 <div>hello world</div/>
15804 <div>hello world</div>
15813 <p>[[:Template:Msg]]
15822 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
15826 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
15828 Always escape literal '>' in output, not just after '<'
15842 <p>This is a test template
15843 This is a test template
15855 Inclusion of !userCanEdit() content
15859 <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>
15865 Out-of-order TOC heading levels
15874 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15876 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
15878 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
15879 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
15882 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
15884 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
15885 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
15891 <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>
15892 <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>
15893 <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>
15894 <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>
15895 <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>
15896 <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>
15902 ISBN with a dummy number
15912 ISBN with space-delimited number
15916 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
15922 ISBN with multiple spaces, no number
15941 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15942 </p><p>ISBN 12345678901
15948 ISBN with trailing year (bug 8110)
15950 ISBN 1-234-56789-0 - 2006
15952 ISBN 1 234 56789 0 - 2006
15954 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
15955 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
15963 {{anchorencode:foo bar©#%n}}
15965 <p>foo_bar.C2.A9.23.25n
15970 anchorencode trims spaces
15972 {{anchorencode: __pretty__please__}}
15979 anchorencode deals with links
15981 {{anchorencode: [[hello|world]] [[hi]]}}
15988 anchorencode deals with templates
15990 {{anchorencode: {{Foo}} }}
15997 anchorencode encodes like the TOC generator: (bug 18431)
15999 === _ +:.3A%3A&&]] ===
16000 {{anchorencode: _ +:.3A%3A&&]] }}
16003 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
16004 <p>.2B:.3A.253A.26.26.5D.5D
16009 Bug 6200: blockquotes and paragraph formatting
16030 Bug 8293: Use of center tag ruins paragraph formatting
16051 Parsing of overlapping (improperly nested) inline html tags
16053 <span><s>x</span></s>
16055 <p><span><s>x</span></s></span>
16058 <p><span><s>x</s></span>
16063 ### Language variants related tests
16066 Self-link in language variants
16068 title=[[Dunav]] language=sr
16070 Both [[Dunav]] and [[Дунав]] are names for this river.
16072 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
16083 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
16085 title=[[Duna]] language=sr
16087 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
16089 <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.
16094 Link to a section of a variant of this title shouldn't be parsed as self-link
16096 title=[[Duna]] language=sr
16098 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
16100 <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.
16105 Link to pages in language variants
16109 Main Page can be written as [[Маин Паге]]
16111 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
16117 Multiple links to pages in language variants
16121 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
16123 <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>.
16129 Simple template in language variants
16135 <p>This is a test template
16141 Template with explicit namespace in language variants
16147 <p>This is a test template
16153 Basic test for template parameter in language variants
16157 {{парамтест|param=foo}}
16159 <p>This is a test template with parameter foo
16165 Simple category in language variants
16169 [[Category:МедиаWики Усер'с Гуиде]]
16171 <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>
16188 Don't convert blue categorylinks to another variant (bug 33210)
16192 [[A]][[Category:分类]]
16194 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
16199 Stripping -{}- tags (language variants)
16203 Latin proverb: -{Ne nuntium necare}-
16205 <p>Latin proverb: Ne nuntium necare
16211 Prevent conversion with -{}- tags (language variants)
16213 language=sr variant=sr-ec
16215 Latinski: -{Ne nuntium necare}-
16217 <p>Латински: Ne nuntium necare
16223 Prevent conversion of text with -{}- tags (language variants)
16225 language=sr variant=sr-ec
16227 Latinski: -{Ne nuntium necare}-
16229 <p>Латински: Ne nuntium necare
16235 Prevent conversion of links with -{}- tags (language variants)
16237 language=sr variant=sr-ec
16241 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16247 -{}- tags within headlines (within html for parserConvert())
16249 language=sr variant=sr-ec
16253 <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>
16259 Explicit definition of language variant alternatives
16261 language=zh variant=zh-tw
16263 -{zh:China;zh-tw:Taiwan}-, not China
16265 <p>Taiwan, not China
16271 Conversion around HTML tags
16273 language=sr variant=sr-ec
16275 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
16276 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
16279 <span title="ЛаCтин">ски</span>
16285 Explicit session-wise language variant mapping (A flag and - flag)
16287 language=zh variant=zh-tw
16289 Taiwan is not China.
16290 But -{A|zh:China;zh-tw:Taiwan}- is China,
16291 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
16292 and -{China}- is China.
16294 <p>Taiwan is not China.
16295 But Taiwan is Taiwan,
16296 (This should be stripped!)
16297 and China is China.
16302 Explicit session-wise language variant mapping (H flag for hide)
16304 language=zh variant=zh-tw
16306 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
16309 <p>(This should be stripped!)
16315 Adding explicit conversion rule for title (T flag)
16317 language=zh variant=zh-tw showtitle
16319 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16322 <p>Should be stripped!
16327 Testing that changing the language variant here in the tests actually works
16329 language=zh variant=zh showtitle
16331 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16334 <p>Should be stripped!
16339 Recursive conversion of alt and title attrs shouldn't clear converter state
16341 language=zh variant=zh-cn showtitle
16343 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
16344 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
16348 Should be stripped<span title="Exclamation">!</span>
16353 Bug 24072: more test on conversion rule for title
16355 language=zh variant=zh-tw showtitle
16357 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16358 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
16361 <p>This should be stripped!
16362 This won't take interferes with the title rule.
16367 Partly disable title conversion if variant == main language code
16369 language=zh variant=zh title=[[ZH]] showtitle
16371 -{T|zh-cn:CN;zh-tw:TW}-
16379 Partly disable title conversion if variant == main language code, more
16381 language=zh variant=zh title=[[ZH]] showtitle
16391 Raw output of variant escape tags (R flag)
16393 language=zh variant=zh-tw
16395 Raw: -{R|zh:China;zh-tw:Taiwan}-
16397 <p>Raw: zh:China;zh-tw:Taiwan
16402 Nested using of manual convert syntax
16404 language=zh variant=zh-hk
16406 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
16408 <p>Nested: Hello Hong Kong!
16413 Proper conversion of text in external links
16415 language=sr variant=sr-ec
16417 http://www.google.com
16418 gopher://www.google.com
16419 [http://www.google.com http://www.google.com]
16420 [gopher://www.google.com gopher://www.google.com]
16421 [https://www.google.com irc://www.google.com]
16422 [ftp://www.google.com www.google.com/ftp://dir]
16423 [//www.google.com www.google.com]
16425 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16426 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16427 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16428 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16429 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
16430 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
16431 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
16436 Do not convert roman numbers to language variants
16438 language=sr variant=sr-ec
16442 <p>Фридрих IV је цар.
16447 Unclosed language converter markup "-{"
16458 Don't convert raw rule "-{R|=>}-" to "=>"
16469 Don't break link parsing if language converter markup is in the caption.
16471 language=sr variant=sr-ec
16473 [[Main Page|-{R|main page}-]]
16475 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
16479 # This test is currently broken in the PHP parser (bug 52661)
16481 Don't break image parsing if language converter markup is in the caption.
16486 [[File:Foobar.jpg|-{R|caption}-]]
16488 <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>
16492 # This test is currently broken in the PHP parser (bug 52661)
16494 Don't break list handling if language converter markup is in the item.
16496 language=zh variant=zh-cn
16499 ;-{zh-cn:AAA;zh-tw:BBB}-
16506 # This test is currently broken in the PHP parser (bug 52661)
16508 Don't break table handling if language converter markup is in the cell.
16510 language=sr variant=sr-ec
16527 Bug 529: Uncovered bullet
16536 # Plain MediaWiki does not remove empty lists, but tidy actually does.
16537 # Templates in Wikipedia rely on this behavior, as tidy has always been
16538 # enabled there. These tests are normally run *without* tidy, so specify the
16539 # full output here.
16540 # To test realistic parsing behavior, apply a tidy-like transformation to both
16541 # the expected output and your parser's output.
16543 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
16545 ******* Foo {{bullet}}
16547 <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>
16553 Bug 529: Uncovered table already at line-start
16576 Bug 529: Uncovered bullet in parser function result
16578 * Foo {{lc:{{bullet}} }}
16586 Bug 5678: Double-parsed template argument
16588 {{lc:{{{1}}}|hello}}
16595 Bug 5678: Double-parsed template invocation
16597 {{lc:{{paramtest {{!}} param = hello }} }}
16599 <p>{{paramtest | param = hello }}
16604 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
16607 title=[[Main Page]]
16609 {{PRVNÍVELKÉ:ěščř}}
16610 {{prvnívelké:ěščř}}
16630 Morwen/13: Unclosed link followed by heading
16637 <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>
16642 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
16649 <h1><span class="mw-headline" id="heading">heading</span></h1>
16654 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
16661 <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>
16676 Paragraphs inside divs (no extra line breaks)
16688 Paragraphs inside divs (extra line break on open)
16703 Paragraphs inside divs (extra line break on close)
16718 Paragraphs inside divs (extra line break on open and close)
16735 Nesting tags, paragraphs on lines which begin with <div>
16739 <div></div><strong>A
16748 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
16750 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
16752 <blockquote>Line one
16754 Line two</blockquote>
16756 <blockquote>Line one
16757 Line two</blockquote>
16762 Bug 6200: paragraphs inside blockquotes (extra line break on open)
16767 Line two</blockquote>
16772 Line two</blockquote>
16777 Bug 6200: paragraphs inside blockquotes (extra line break on close)
16779 <blockquote>Line one
16784 <blockquote>Line one
16792 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
16809 Paragraphs inside blockquotes/divs (no extra line breaks)
16811 <blockquote><div>Line one
16813 Line two</div></blockquote>
16815 <blockquote><div>Line one
16816 Line two</div></blockquote>
16821 Paragraphs inside blockquotes/divs (extra line break on open)
16826 Line two</div></blockquote>
16831 Line two</div></blockquote>
16836 Paragraphs inside blockquotes/divs (extra line break on close)
16838 <blockquote><div>Line one
16841 </div></blockquote>
16843 <blockquote><div>Line one
16846 </div></blockquote>
16851 Paragraphs inside blockquotes/divs (extra line break on open and close)
16857 </div></blockquote>
16863 </div></blockquote>
16868 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
16870 wgLinkHolderBatchSize=0
16876 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
16877 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
16878 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
16883 Free external link invading image caption
16885 [[Image:Foobar.jpg|thumb|http://x|hello]]
16887 <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>
16892 Bug 15196: localised external link numbers
16896 [http://en.wikipedia.org/]
16898 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
16901 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
16905 Multibyte character in padleft
16907 {{padleft:-Hello|7|Æ}}
16914 Multibyte character in padright
16916 {{padright:Hello-|7|Æ}}
16923 formatdate parser function
16925 {{#formatdate:2009-03-24}}
16927 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
16932 formatdate parser function, with default format
16934 {{#formatdate:2009-03-24|mdy}}
16936 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
16941 Spacing of numbers in formatted dates
16943 {{#formatdate:January 15}}
16945 <p><span class="mw-formatted-date" title="01-15">January 15</span>
16950 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
16952 language=nl title=[[MediaWiki:Common.css]]
16954 {{#formatdate:2009-03-24|dmy}}
16956 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
16969 Edit comment with link
16973 I like the [[Main Page]] a lot
16975 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
16979 Edit comment with link and link text
16983 I like the [[Main Page|best pages]] a lot
16985 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16989 Edit comment with link and link text with suffix
16993 I like the [[Main Page|best page]]s a lot
16995 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16999 Edit comment with section link (non-local, eg in history list)
17001 comment title=[[Main Page]]
17003 /* External links */ removed bogus entries
17005 <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 and text before it (non-local, eg in history list)
17011 comment title=[[Main Page]]
17013 pre-comment text /* External links */ removed bogus entries
17015 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>
17019 Edit comment with section link (local, eg in diff view)
17021 comment local title=[[Main Page]]
17023 /* External links */ removed bogus entries
17025 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17029 Edit comment with subpage link (bug 14080)
17033 title=[[Subpage test]]
17035 Poked at a [[/subpage]] here...
17037 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
17041 Edit comment with subpage link and link text (bug 14080)
17045 title=[[Subpage test]]
17047 Poked at a [[/subpage|neat little page]] here...
17049 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
17053 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
17056 title=[[Subpage test]]
17058 Poked at a [[/subpage]] here...
17060 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
17064 Edit comment with bare anchor link (local, as on diff)
17068 title=[[Main Page]]
17072 <a href="#section">#section</a>
17076 Edit comment with bare anchor link (non-local, as on history)
17079 title=[[Main Page]]
17083 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
17087 Anchor starting with underscore
17091 <p><a href="#_ref">One</a>
17096 Id starting with underscore
17098 <div id="_ref"></div>
17100 <div id="_ref"></div>
17105 Space normalisation on autocomment (bug 22784)
17108 title=[[Main Page]]
17110 /* __hello__world__ */
17112 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
17116 percent-encoding and + signs in comments (Bug 26410)
17120 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
17122 <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>
17126 Bad images - basic functionality
17135 Bad images - bug 16039: text after bad image disappears
17149 Verify that displaytitle works (bug #22501) no displaytitle
17153 wgAllowDisplayTitle=true
17154 wgRestrictDisplayTitle=false
17156 this is not the the title
17159 <p>this is not the the title
17164 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
17169 wgAllowDisplayTitle=true
17170 wgRestrictDisplayTitle=false
17172 this is not the the title
17173 {{DISPLAYTITLE:whatever}}
17176 <p>this is not the the title
17181 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
17186 wgAllowDisplayTitle=true
17187 wgRestrictDisplayTitle=true
17189 this is not the the title
17190 {{DISPLAYTITLE:whatever}}
17193 <p>this is not the the title
17198 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
17203 wgAllowDisplayTitle=true
17204 wgRestrictDisplayTitle=true
17206 this is not the the title
17207 {{DISPLAYTITLE:screen}}
17210 <p>this is not the the title
17215 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
17220 wgAllowDisplayTitle=false
17222 this is not the the title
17223 {{DISPLAYTITLE:screen}}
17226 <p>this is not the the title
17227 <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>
17232 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
17237 wgAllowDisplayTitle=false
17239 this is not the the title
17242 <p>this is not the the title
17247 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
17252 wgAllowDisplayTitle=true
17253 wgRestrictDisplayTitle=true
17255 this is not the the title
17256 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
17258 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
17259 <p>this is not the the title
17264 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
17269 wgAllowDisplayTitle=true
17270 wgRestrictDisplayTitle=true
17272 this is not the the title
17273 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
17275 <span style="color: red;">s</span>creen
17276 <p>this is not the the title
17281 preload: check <noinclude> and <includeonly>
17285 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
17291 preload: check <onlyinclude>
17295 Goodbye <onlyinclude>Hello world</onlyinclude>
17301 preload: can pass tags through if we want to
17305 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
17307 <includeonly>Hello world</includeonly>
17311 preload: check that it doesn't try to do tricks
17315 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17317 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17321 Play a bit with r67090 and bug 3158
17325 <div style="width:50% !important"> </div>
17326 <div style="width:50% !important"> </div>
17327 <div style="width:50% !important"> </div>
17328 <div style="border : solid;"> </div>
17330 <div style="width:50% !important"> </div>
17331 <div style="width:50% !important"> </div>
17332 <div style="width:50% !important"> </div>
17333 <div style="border : solid;"> </div>
17338 HTML5 data attributes
17340 <span data-foo="bar">Baz</span>
17341 <p data-abc-def_hij="">Quuz</p>
17343 <p><span data-foo="bar">Baz</span>
17345 <p data-abc-def_hij="">Quuz</p>
17350 percent-encoding and + signs in internal links (Bug 26410)
17352 [[User:+%]] [[Page+title%]]
17353 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
17354 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
17355 [[%33%45]] [[%33%45+]]
17357 <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>
17358 <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>
17359 <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>
17360 <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>
17365 Special characters in embedded file links (bug 27679)
17367 [[File:Contains & ampersand.jpg]]
17368 [[File:Does not exist.jpg|Title with & ampersand]]
17370 <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>
17371 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
17377 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
17379 Text's been normalized?
17381 <p>Text's been normalized?
17386 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
17388 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
17390 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
17395 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
17397 [http://www.example.org/ ideograms]
17399 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
17404 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
17406 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
17408 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
17432 Bug 31098 Template which includes system messages which includes the template
17436 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17437 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17442 Bug31490 Turkish: ucfirst 'blah'
17453 Bug31490 Turkish: ucfirst 'ix'
17464 Bug31490 Turkish: lcfirst 'BLAH'
17475 Bug31490 Turkish: ucfırst (with a dotless i)
17481 <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>
17486 Bug31490 ucfırst (with a dotless i) with English language
17492 <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>
17497 Bug 26375: TOC with italics
17499 title=[[Main Page]]
17502 == ''Lost'' episodes ==
17504 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17506 <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>
17510 <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>
17515 Bug 26375: TOC with bold
17517 title=[[Main Page]]
17520 == '''should be bold''' then normal text ==
17522 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17524 <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>
17528 <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>
17533 Bug 33845: Headings become cursive in TOC when they contain an image
17535 title=[[Main Page]]
17538 == Image [[Image:foobar.jpg]] ==
17540 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17542 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
17546 <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>
17551 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
17553 title=[[Main Page]]
17556 == <blockquote>Quote</blockquote> ==
17558 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17560 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
17564 <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>
17569 Unclosed tags in TOC
17571 title=[[Main Page]]
17575 <small>Hanc marginis exiguitas non caperet.</small>
17578 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17580 <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>
17584 <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>
17585 <p><small>Hanc marginis exiguitas non caperet.</small>
17591 Multiple tags in TOC
17594 == <i>Foo</i> <b>Bar</b> ==
17596 == <i>Foo</i> <blockquote>Bar</blockquote> ==
17598 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17600 <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>
17601 <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>
17605 <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>
17606 <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>
17611 Tags with parameters in TOC
17614 == <sup class="in-h2">Hello</sup> ==
17616 == <sup class="a > b">Evilbye</sup> ==
17618 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17620 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
17621 <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>
17625 <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>
17626 <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>
17631 span tags with directionality in TOC
17634 == <span dir="ltr">C++</span> ==
17636 == <span dir="rtl">זבנג!</span> ==
17638 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
17640 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
17642 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
17644 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17646 <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>
17647 <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>
17648 <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>
17649 <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>
17650 <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>
17654 <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>
17655 <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>
17656 <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>
17657 <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>
17658 <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>
17665 == {{int:headline_sample}} ==
17669 Bug 32057: Title needed when expanding <h> nodes.
17671 title=[[Main Page]]
17675 <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>
17680 Strip marker in urlencode
17682 {{urlencode:x<nowiki/>y}}
17683 {{urlencode:x<nowiki/>y|wiki}}
17684 {{urlencode:x<nowiki/>y|path}}
17711 Strip marker in formatNum
17713 {{formatnum:1<nowiki/>2}}
17714 {{formatnum:1<nowiki/>2|R}}
17722 Check noCommafy in formatNum
17726 {{formatnum:123456.78}}
17727 {{formatnum:123456.78|NOSEP}}
17735 Wrong option for formatNum (bug 56199)
17737 {{formatnum:1,234.56|Random}}
17738 {{formatnum:1,234.56|EVERYTHING}}
17739 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
17748 Strip marker in grammar
17752 {{grammar:elative|foo<nowiki/>bar}}
17759 Strip marker in padleft
17761 {{padleft:|2|x<nowiki/>y}}
17768 Strip marker in padright
17770 {{padright:|2|x<nowiki/>y}}
17777 Strip marker in anchorencode
17779 {{anchorencode:x<nowiki/>y}}
17786 nowiki inside link inside heading (bug 18295)
17788 ==[[foo|x<nowiki>y</nowiki>z]]==
17790 <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>
17795 new support for bdi element (bug 31817)
17797 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17799 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17804 Ignore pipe between table row attributes
17808 |- id=foo | style='color: red'
17816 <tr id="foo" style="color: red">
17823 Gallery override link with WikiLink (bug 34852)
17826 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
17829 <ul class="gallery mw-gallery-traditional">
17830 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17831 <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>
17832 <div class="gallerytext">
17842 Gallery override link with absolute external link (bug 34852)
17845 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
17848 <ul class="gallery mw-gallery-traditional">
17849 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17850 <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>
17851 <div class="gallerytext">
17861 Gallery override link with malicious javascript (bug 34852)
17864 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
17867 <ul class="gallery mw-gallery-traditional">
17868 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17869 <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>
17870 <div class="gallerytext">
17880 Gallery with invalid title as link (bug 43964)
17883 File:foobar.jpg|link=<
17886 <ul class="gallery mw-gallery-traditional">
17887 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17888 <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>
17889 <div class="gallerytext">
17897 Language parser function
17906 Padleft and padright as substr
17908 {{padleft:|3|abcde}}
17909 {{padright:|3|abcde}}
17917 Special parser function
17919 {{#special:RandomPage}}
17920 {{#special:BaDtItLe}}
17921 {{#special:Foobar}}
17930 Bug 34939 - Case insensitive link parsing ([HttP://])
17932 [HttP://MediaWiki.Org/]
17934 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
17937 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
17941 Bug 34939 - Case insensitive link parsing ([HttP:// title])
17943 [HttP://MediaWiki.Org/ MediaWiki]
17945 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
17950 Bug 34939 - Case insensitive link parsing (HttP://)
17952 HttP://MediaWiki.Org/
17954 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
17957 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
17975 <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>
17976 <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>
17977 <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>
17978 <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>
17979 <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>
17985 ### Parsoid-specific tests
17986 ### Parsoid-PHP parser incompatibilities
17989 1. SOL-sensitive wikitext tokens as template-args
17991 parsoid=wt2html,wt2wt
17997 <span about="#mwt1" typeof="mw:Transclusion">
17998 </span><ul about="#mwt1"><li>a</li>
18000 <span about="#mwt2" typeof="mw:Transclusion">
18001 </span><ol about="#mwt2"><li>a</li>
18003 <span about="#mwt3" typeof="mw:Transclusion">
18004 </span><dl about="#mwt3"><dd>a</dd>
18008 #### -----------------------------------------------------------------
18009 #### Parsoid-specific functionality tests
18010 #### -----------------------------------------------------------------
18012 # Bug 63642: Formatting elt fixup is cleaned up.
18013 # We know wt2wt will fail, but we expect selser to pass.
18014 # Due to the nature of our testing, wt2wt and selser tests will enter the
18015 # blacklist and we'll catch selser regressions based on changes to the
18016 # blacklist entries for selser tests.
18018 Bad treebuilder fixup of formatting elt is cleaned up
18020 parsoid=wt2html,wt2wt
18025 [[Image:Foobar.jpg|right|Test]]
18031 <p><small></small></p>
18032 <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>
18037 #### ----------------------------------------------------------------
18038 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
18039 #### tags. Parsoid's output for these tags differs from that of the
18041 #### ----------------------------------------------------------------
18044 Ref: 1. ref-location should be replaced with an index span
18049 B <ref name="x">foo</ref>
18052 <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>
18053 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>
18054 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>
18058 Ref: 2. ref-tags with identical names should all get the same index
18062 A <ref name="x">foo</ref>
18065 <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>
18066 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>
18070 Ref: 3. spaces in ref-names should be ignored
18074 A <ref name="x">foo</ref>
18075 B <ref name=" x " />
18078 <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>
18079 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>
18080 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>
18084 Ref: 4. 'constructor' should be accepted as a valid ref-name
18085 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
18089 A <ref name="constructor">foo</ref>
18091 <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>
18095 Ref: 5. body should accept generic wikitext
18100 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
18105 <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>
18107 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
18108 <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>
18114 Ref: 6. indent-pres should not be output in ref-body
18126 <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>
18128 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
18129 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18137 Ref: 7. No p-wrapping in ref-body
18156 <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>
18158 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18159 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18174 Ref: 8. transclusion wikitext has lower precedence
18178 A <ref> foo {{echo|</ref> B C}}
18182 <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>
18183 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
18184 <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>
18189 Ref: 9. unclosed comments should not leak out of ref-body
18193 A <ref> foo <!--</ref> B C
18196 <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>
18197 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18198 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
18203 Ref: 10. Unclosed HTML tags should not leak out of ref-body
18207 A <ref> <b> foo </ref> B C
18211 <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>
18214 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18215 <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>
18220 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
18227 <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
18228 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>
18232 Ref: 12. ref-tags act as trailing newline migration barrier
18236 <!--the newline at the end of this line moves out of the p-tag-->a
18238 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
18243 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
18246 <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>
18247 <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>
18254 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
18262 <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
18263 <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>
18267 Ref: 14. A nested ref-tag should be emitted as plain text
18271 <ref>foo <ref>bar</ref> baz</ref>
18275 <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>
18277 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18278 <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>
18283 Ref: 15. ref-tags with identical names should get identical indexes
18287 A1 <ref name="a">foo</ref> A2 <ref name="a" />
18288 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
18292 <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>
18293 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>
18295 <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>
18299 ## We don't bother wt2wt-ing non-standard whitespace
18301 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
18309 <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>
18311 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18312 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
18316 References: 1. references tag without any refs should be handled properly
18322 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
18326 References: 2. references tag with group only outputs references from that group
18330 A <ref group="a">foo</ref>
18331 B <ref group="b">bar</ref>
18333 <references group="a" />
18335 <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>
18336 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>
18338 <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>
18343 References: 3. ref list should be cleared after processing references
18355 <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>
18357 <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>
18360 <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>
18362 <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>
18367 References: 4. only referenced group should be cleared after processing references
18371 A <ref group="a">afoo</ref>
18374 <references group="a" />
18380 <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>
18381 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>
18383 <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>
18386 <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>
18388 <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>
18393 References: 5. ref tags in references should be processed while ignoring all other content
18398 B <ref name="b">bar</ref>
18401 <ref name="a">foo</ref>
18402 This should just get lost.
18405 <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>
18406 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>
18409 <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":{}}'>
18410 <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>
18411 <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>
18416 References: 6. <references /> from a transclusion
18420 <ref>Foo</ref> {{echo|<references />}}
18422 <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>
18426 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
18430 A <ref>foo bar for a</ref>
18431 B <ref group="X" name="b" />
18435 <references group="X">
18436 <ref name="b">foo</ref>
18439 <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>
18440 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>
18442 <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>
18444 <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>
18448 Entities in ref name
18452 <ref name="test & me">hi</ref>
18454 <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>
18457 # This test is wt2html only because we're permitting the serializer to produce
18458 # dirty diffs, normalizing the unclosed references to the self-closed version.
18460 Generate references for unclosed references tag
18468 <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>
18471 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
18472 <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>
18476 New reference serializes on its own line
18478 parsoid=wt2wt,html2wt
18483 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
18486 #### ----------------------------------------------------------------
18487 #### The following section of tests are primarily to test
18488 #### wikitext escaping capabilities of Parsoid. Given that
18489 #### escaping can be done any number of ways, the wikitext (input)
18490 #### is always adjusted to reflect how Parsoid adds nowiki
18493 #### We are marking several tests as parsoid-only since the
18494 #### HTML in the result section is different from what the
18495 #### PHP parser generates for it.
18496 #### ----------------------------------------------------------------
18499 #### --------------- Headings ---------------
18501 #### 1. Nested inside html <h1>=foo=</h1>
18502 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
18503 #### 3. Nested inside html with wikitext split by html tags
18504 #### 4. No escape needed
18505 #### 5. Empty headings <h1></h1>
18506 #### 6. Heading chars in SOL context
18507 #### ----------------------------------------
18509 Headings: 0. Unnested
18513 <nowiki>=foo=</nowiki>
18515 <nowiki> =foo= </nowiki>
18517 <nowiki>=foo=</nowiki>
18519 =foo''a''<nowiki>=</nowiki>
18521 <p><span typeof="mw:Nowiki">=foo=</span></p>
18523 <p><span typeof="mw:Nowiki"> =foo= </span>
18525 <span typeof="mw:Nowiki">=foo=</span></p>
18527 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
18531 Headings: 1. Nested inside html
18532 (New headings and existing headings are handled differently)
18542 =<nowiki>=foo=</nowiki>=
18543 ==<nowiki>=foo=</nowiki>==
18544 ===<nowiki>=foo=</nowiki>===
18545 ====<nowiki>=foo=</nowiki>====
18546 =====<nowiki>=foo=</nowiki>=====
18547 ======<nowiki>=foo=</nowiki>======
18554 <h1 data-parsoid='{}'>=foo=</h1>
18555 <h2 data-parsoid='{}'>=foo=</h2>
18556 <h3 data-parsoid='{}'>=foo=</h3>
18557 <h4 data-parsoid='{}'>=foo=</h4>
18558 <h5 data-parsoid='{}'>=foo=</h5>
18559 <h6 data-parsoid='{}'>=foo=</h6>
18563 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
18568 <nowiki>*</nowiki>bar
18574 <nowiki>=bar=</nowiki>
18582 Headings: 3. Nested inside html with wikitext split by html tags
18586 = ='''bold'''<nowiki>foo=</nowiki> =
18588 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
18592 Headings: 4a. No escaping needed (testing just h1 and h2)
18610 = <nowiki>=</nowiki> =
18618 <h1><i>=</i>foo=</h1>
18619 <h1><span typeof="mw:Nowiki">=</span></h1>
18623 Headings: 4b. No escaping needed (inside p-tags)
18638 Headings: 5. Empty headings
18650 =====<nowiki/>=====
18652 ======<nowiki/>======
18663 Headings: 6a. Heading chars in SOL context (with trailing spaces)
18667 <nowiki>=a=</nowiki>
18669 <nowiki>=a=</nowiki>
18671 <nowiki>=a=</nowiki>
18673 <nowiki>=a=</nowiki>
18682 Headings: 6b. Heading chars in SOL context (with trailing newlines)
18710 Headings: 6c. Heading chars in SOL context (leading newline break)
18715 <nowiki>=b=</nowiki>
18722 Headings: 6d. Heading chars in SOL context (with interspersed comments)
18726 <!--c0--><nowiki>=a=</nowiki>
18728 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
18730 <p><!--c0-->=a=</p>
18731 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
18735 Headings: 6d. Heading chars in SOL context (No escaping needed)
18744 #### --------------- Lists ---------------
18745 #### 0. Outside nests (*foo, etc.)
18746 #### 1. Nested inside html <ul><li>*foo</li></ul>
18747 #### 2. Inside definition lists
18748 #### 3. Only bullets at start should be escaped
18749 #### 4. No escapes needed
18750 #### 5. No unnecessary escapes
18751 #### 6. Escape bullets in SOL position
18752 #### 7. Escape bullets in a multi-line context
18753 #### ----------------------------------------
18756 Lists: 0. Outside nests
18758 <nowiki>*</nowiki>foo
18760 <nowiki>#</nowiki>foo
18762 <nowiki>;Foo:</nowiki>bar
18771 Lists: 1. Nested inside html
18773 *<nowiki>*foo</nowiki>
18775 *<nowiki>#foo</nowiki>
18777 *<nowiki>:foo</nowiki>
18779 *<nowiki>;foo</nowiki>
18781 #<nowiki>*foo</nowiki>
18783 #<nowiki>#foo</nowiki>
18785 #<nowiki>:foo</nowiki>
18787 #<nowiki>;foo</nowiki>
18789 <ul><li>*foo</li></ul>
18790 <ul><li>#foo</li></ul>
18791 <ul><li>:foo</li></ul>
18792 <ul><li>;foo</li></ul>
18793 <ol><li>*foo</li></ol>
18794 <ol><li>#foo</li></ol>
18795 <ol><li>:foo</li></ol>
18796 <ol><li>;foo</li></ol>
18801 Lists: 2. Inside definition lists
18803 ;<nowiki>;foo</nowiki>
18805 ;<nowiki>:foo</nowiki>
18807 ;<nowiki>:foo</nowiki>
18810 :<nowiki>:foo</nowiki>
18812 <dl><dt>;foo</dt></dl>
18813 <dl><dt>:foo</dt></dl>
18816 <dl><dd>:foo</dd></dl>
18821 Lists: 3. Only bullets at start of text should be escaped
18823 *<nowiki>*foo*bar</nowiki>
18825 *<nowiki>*foo</nowiki>''it''*bar
18827 <ul><li>*foo*bar</li></ul>
18828 <ul><li>*foo<i>it</i>*bar</li></ul>
18833 Lists: 4. No escapes needed
18854 <li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
18858 <li><a rel="mw:WikiLink" href="Foo">Foo</a>*bar
18864 Lists: 5. No unnecessary escapes
18866 * bar <span><nowiki>[[foo]]</nowiki></span>
18868 *=bar <span><nowiki>[[foo]]</nowiki></span>
18870 *[[bar <span><nowiki>[[foo]]</nowiki></span>
18872 *]]bar <span><nowiki>[[foo]]</nowiki></span>
18874 *=bar <span>foo]]</span>=
18878 <ul><li> bar <span>[[foo]]</span></li></ul>
18879 <ul><li>=bar <span>[[foo]]</span></li></ul>
18880 <ul><li>[[bar <span>[[foo]]</span></li></ul>
18881 <ul><li>]]bar <span>[[foo]]</span></li></ul>
18882 <ul><li>=bar <span>foo]]</span>=</li></ul>
18883 <ul><li> <s></s>: a</li></ul>
18888 Lists: 6. Escape bullets in SOL position
18892 <!--cmt--><nowiki>*foo</nowiki>
18894 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
18898 Lists: 7. Escape bullets in a multi-line context
18901 <nowiki>*</nowiki>b
18908 #### --------------- HRs ---------------
18909 #### 1. Single line
18910 #### -----------------------------------
18913 HRs: 1. Single line
18917 ----<nowiki>----</nowiki>
18921 <hr><span typeof="mw:Nowiki">----</span>
18926 #### --------------- Tables ---------------
18927 #### 1a. Simple example
18928 #### 1b. No escaping needed (!foo)
18929 #### 1c. No escaping needed (|foo)
18930 #### 1d. No escaping needed (|}foo)
18932 #### 2a. Nested in td (<td>foo|bar</td>)
18933 #### 2b. Nested in td (<td>foo||bar</td>)
18934 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
18936 #### 3a. Nested in th (<th>foo!bar</th>)
18937 #### 3b. Nested in th (<th>foo!!bar</th>)
18938 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
18942 #### 4c. No escaping needed
18943 #### --------------------------------------
18946 Tables: 1a. Simple example
18957 Tables: 1b. No escaping needed
18966 Tables: 1c. No escaping needed
18975 Tables: 1d. No escaping needed
18984 Tables: 2a. Nested in td
18989 |<nowiki>foo|bar</nowiki>
18991 |x<div><nowiki>a|b</nowiki></div>
18995 <td>foo|bar</td></tr>
18996 <tr><td>x<div>a|b</div></td>
19001 Tables: 2b. Nested in td
19006 |<nowiki>foo||bar</nowiki>
19007 |''it''<nowiki>foo||bar</nowiki>
19011 <td><span typeof="mw:Nowiki">foo||bar</span></td>
19012 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
19016 Tables: 2c. Nested in td -- no escaping needed
19024 <table><tbody><tr><td>foo!!bar
19025 </td></tr></tbody></table>
19030 Tables: 3a. Nested in th
19038 <table><tbody><tr><th>foo!bar
19039 </th></tr></tbody></table>
19044 Tables: 3b. Nested in th
19049 !<nowiki>foo!!bar</nowiki>
19053 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
19058 Tables: 3c. Nested in th -- no escaping needed
19063 !<nowiki>foo||bar</nowiki>
19067 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
19071 Tables: 4a. Escape -
19078 |<nowiki>-bar</nowiki>
19082 <tr><th>-bar</th></tr>
19084 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
19088 Tables: 4b. Escape +
19095 |<nowiki>+bar</nowiki>
19099 <tr><th>+bar</th></tr>
19101 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
19105 Tables: 4c. No escaping needed
19126 <tr><td>foo-bar</td><td>foo+bar</td></tr>
19127 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
19133 <div>a|b</div></td>
19138 Tables: 4d. No escaping needed
19149 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo">Foo</a>-bar</td>
19150 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
19151 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
19156 Tables: Digest broken attributes on table and tr tag
19172 #### --------------- Links ----------------
19173 #### 1. Quote marks in link text
19174 #### 2. Wikilinks: Escapes needed
19175 #### 3. Wikilinks: No escapes needed
19176 #### 4. Extlinks: Escapes needed
19177 #### 5. Extlinks: No escapes needed
19178 #### --------------------------------------
19180 Links 1. Quote marks in link text
19184 [[Foo|Foo<nowiki>''boo''</nowiki>]]
19186 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
19190 Links 2. WikiLinks: Escapes needed
19195 [[Foo|<nowiki>Foobar]</nowiki>]]
19196 [[Foo|x [Foobar] x]]
19197 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
19198 [[Foo|<nowiki>[[Bar]]</nowiki>]]
19199 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
19200 [[Foo|<nowiki>|Bar</nowiki>]]
19201 [[Foo|<nowiki>]]bar</nowiki>]]
19202 [[Foo|<nowiki>[[bar</nowiki>]]
19203 [[Foo|<nowiki>x [[ y</nowiki>]]
19204 [[Foo|<nowiki>x ]] y</nowiki>]]
19205 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
19207 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
19208 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
19209 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
19210 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
19211 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
19212 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
19213 <a href="Foo" rel="mw:WikiLink">|Bar</a>
19214 <a href="Foo" rel="mw:WikiLink">]]bar</a>
19215 <a href="Foo" rel="mw:WikiLink">[[bar</a>
19216 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
19217 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
19218 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
19222 Links 3. WikiLinks: No escapes needed
19229 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
19230 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
19234 Links 4. ExtLinks: Escapes needed
19238 [http://google.com <nowiki>[google]</nowiki>]
19239 [http://google.com <nowiki>google]</nowiki>]
19241 <nowiki>[http://google.com]</nowiki>
19243 <nowiki>[http://google.com google]</nowiki>
19246 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
19247 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
19248 <p>[http://google.com]</p>
19249 <p>[http://google.com google]</p>
19253 Links 5. ExtLinks: No escapes needed
19257 [http://google.com [google]
19259 <a href="http://google.com" rel="mw:ExtLink">[google</a>
19263 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
19265 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
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" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
19268 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
19269 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
19270 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
19271 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
19272 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
19273 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
19274 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
19275 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
19276 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
19277 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
19280 x<nowiki/>http://example.com<nowiki/>y
19281 http://example.com<nowiki/>?x
19282 http://example.com<nowiki/>&x
19283 http://example.com<nowiki/>'x
19284 http://example.com<nowiki/>,x
19285 http://example.com<nowiki/>.x
19286 http://example.com<nowiki/>;x
19287 http://example.com<nowiki/>:x
19288 http://example.com<nowiki/>;x
19289 http://example.com<nowiki/>!x
19290 http://example.com<nowiki/>=x
19291 http://example.com<nowiki/>(x)
19292 http://example.com(x<nowiki/>)
19296 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19299 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
19301 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
19302 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
19303 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
19304 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
19305 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
19311 "http://example.com"
19312 (http://example.com)
19313 (http://example.com) foo
19314 http://example.com,
19315 http://example.com, foo
19318 ## Parsoid currently fails wt2html on this one!
19320 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19322 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
19324 http://example.com.,;:!?
19328 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
19330 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
19336 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
19338 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19339 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19340 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
19341 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
19351 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
19353 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
19359 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
19361 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19362 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19363 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
19364 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
19374 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
19376 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
19377 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
19378 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
19381 ISBN 1234567890<nowiki/>1
19382 ISBN 1234567890<nowiki/>x
19383 ISBN 1234567890<nowiki/>b
19387 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
19389 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
19394 #### --------------- Quotes ---------------
19395 #### 1. Quotes inside <b> and <i>
19396 #### 2. Link fragments separated by <i> and <b> tags
19397 #### 3. Link fragments inside <i> and <b>
19398 #### 4. No escaping needed
19399 #### --------------------------------------
19401 1. Quotes inside <b> and <i>
19403 parsoid=html2wt,wt2wt
19405 ''<nowiki>'foo'</nowiki>''
19406 ''<nowiki>''foo''</nowiki>''
19407 ''<nowiki>'''foo'''</nowiki>''
19409 '''<nowiki>'foo'</nowiki>'''
19410 '''<nowiki>''foo''</nowiki>'''
19411 '''<nowiki>'''foo'''</nowiki>'''
19412 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
19413 '''foo'''<nowiki/>'s
19416 '<nowiki/>''foo''<nowiki/>'
19418 '''foo'''<nowiki/>'
19419 '<nowiki/>'''foo'''<nowiki/>'
19420 ''fools'<span> errand</span>''
19421 ''<span>fool</span>'s errand''
19430 <b>foo'<i>bar'</i>baz</b>
19438 <i>fools'<span> errand</span></i>
19439 <i><span>fool</span>'s errand</i>
19443 2. Link fragments separated by <i> and <b> tags
19445 [[''foo''<nowiki>hello]]</nowiki>
19447 [['''foo'''<nowiki>hello]]</nowiki>
19449 <p>[[<i>foo</i>hello]]
19450 </p><p>[[<b>foo</b>hello]]
19455 3. Link fragments inside <i> and <b>
19456 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
19457 this is one of the shortcomings of this format)
19459 ''[[foo''<nowiki>]]</nowiki>
19461 '''[[foo'''<nowiki>]]</nowiki>
19464 </p><p><b>[[foo</b>]]
19469 4. No escaping needed
19471 '<span>''bar''</span>'
19472 '<span>'''bar'''</span>'
19474 <p>'<span><i>bar</i></span>'
19475 '<span><b>bar</b></span>'
19479 #### ----------- Paragraphs ---------------
19480 #### 1. No unnecessary escapes
19481 #### --------------------------------------
19484 1. No unnecessary escapes
19486 bar <span><nowiki>[[foo]]</nowiki></span>
19488 =bar <span><nowiki>[[foo]]</nowiki></span>
19490 [[bar <span><nowiki>[[foo]]</nowiki></span>
19492 ]]bar <span><nowiki>[[foo]]</nowiki></span>
19494 =bar <span>foo]]</span><nowiki>=</nowiki>
19496 <p>bar <span>[[foo]]</span>
19497 </p><p>=bar <span>[[foo]]</span>
19498 </p><p>[[bar <span>[[foo]]</span>
19499 </p><p>]]bar <span>[[foo]]</span>
19500 </p><p>=bar <span>foo]]</span>=
19504 #### ----------------------- PRE --------------------------
19505 #### 1. Leading whitespace in SOL context should be escaped
19506 #### ------------------------------------------------------
19508 1. Leading whitespace in SOL context should be escaped
19512 <nowiki> </nowiki>a
19514 <nowiki> </nowiki> a
19516 <nowiki> </nowiki>a(tab)
19518 <nowiki> </nowiki> a
19520 <nowiki> </nowiki> a
19523 <nowiki> </nowiki>b
19526 <nowiki> </nowiki>b
19529 <nowiki> </nowiki> b
19535 <p><!--cmt--> a</p>
19545 2. Leading whitespace in non-indent-pre contexts should not be escaped
19552 <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>
19556 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
19575 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
19579 [[File:Foobar.jpg|thumb|caption]]
19582 <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>
19585 #### --------------- Behavior Switches --------------------
19587 1. Valid behavior switches should be escaped
19591 <nowiki>__TOC__</nowiki>
19592 ''<nowiki>__TOC__</nowiki>''
19599 2. Invalid behavior switches should not be escaped
19610 #### --------------- HTML tags ---------------
19613 #### 3. multi-line html tag
19614 #### 4. extension tags
19615 #### -----------------------------------------
19621 <a href="http://google.com">google</a>
19623 <a href="http://google.com">google</a>
19629 <nowiki><div>foo</div>
19630 <div style="color:red">foo</div></nowiki>
19632 <p><div>foo</div>
19633 <div style="color:red">foo</div>
19638 3. multi-line html tag
19653 <nowiki><ref>foo</ref></nowiki>
19655 <nowiki><ref>bar</nowiki>
19657 baz<nowiki></ref></nowiki>
19659 <p><ref>foo</ref>
19660 </p><p><ref>bar
19661 </p><p>baz</ref>
19665 #### --------------- Others ---------------
19669 <nowiki>foo</nowiki>
19671 <p><nowiki>foo</nowiki>
19675 ## The quote-char in the input is necessary for triggering the bug
19677 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
19679 parsoid=wt2wt,html2wt
19688 Tag-like HTML structures are passed through as text
19710 </p><p>1<d e>f
19715 # This was a bug in the PHP parser (see bug 17663 and its dups,
19716 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
19718 Tag names followed by punctuation should not be recognized as tags
19722 <p><s.ome> text
19727 HTML tag with necessary entities in attributes
19729 <span title="&amp;">foo</span>
19731 <p><span title="&amp;">foo</span>
19736 HTML tag with 'unnecessary' entity encoding in attributes
19738 <span title="&">foo</span>
19740 <p><span title="&">foo</span>
19745 HTML tag with broken attribute value quoting
19747 <span title="Hello world>Foo</span>
19749 <p><span>Foo</span>
19754 Parsoid-only: HTML tag with broken attribute value quoting
19758 <span title="Hello world>Foo</span>
19760 <p><span title="Hello world">Foo</span>
19765 Table with broken attribute value quoting
19768 | title="Hello world|Foo
19779 Table with broken attribute value quoting on consecutive lines
19782 | title="Hello world|Foo
19783 | style="color:red|Bar
19796 Parsoid-only: Table with broken attribute value quoting on consecutive lines
19801 | title="Hello world|Foo
19802 | style="color:red|Bar
19807 <td title="Hello world">Foo
19808 </td><td style="color: red">Bar
19809 </td></tr></tbody></table>
19814 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19824 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19834 Accept empty td cell attribute
19837 | align="center" | foo || |
19842 <td align="center"> foo </td>
19849 Non-empty attributes in th-cells
19852 ! Foo !! style="color: red" | Bar
19858 <th style="color: red"> Bar
19864 Accept empty attributes in th-cells
19879 Empty table rows go away
19900 ### Parsoid-centric tests for testing RTing of inter-element separators
19901 ### Edge cases not tested by existing parser tests and specific to
19902 ### Parsoid-specific serialization strategies.
19906 RT-ed inter-element separators should be valid separators
19919 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
19920 (Parsoid-only since PHP parser relies on Tidy for correct output)
19936 Empty TD followed by TD with tpl-generated attribute
19941 |{{echo|style='color:red'}}|foo
19955 Indented table with an empty td
19974 Indented block & table
19981 <div data-parsoid='{"stx":"html"}'>foo</div>
19983 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
19988 Indent and comment before table row
19995 <table data-parsoid='{}'>
19996 <!--hi--><tbody data-parsoid='{}'><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
19997 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
20002 Empty TR followed by a template-generated TR
20003 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
20009 {{echo|<tr><td>foo</td></tr>}}
20015 <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}}]}'>
20020 ## PHP and parsoid output differ for this, and since this is primarily
20021 ## for testing Parsoid's serializer, marking this Parsoid only
20023 Empty TR followed by mixed-ws-comment line should RT correctly
20039 <!--c--> </tr><!--d-->
20045 Multi-line image caption generated by templates with/without trailing newlines
20049 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
20050 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
20052 <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>
20053 <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>
20058 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
20062 <includeonly>foo</includeonly>
20069 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
20071 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
20074 ## PHP emits broken html for this, and since this is primarily
20075 ## a Parsoid serializer test, marking this Parsoid only
20077 Improperly nested inline or quotes tags with whitespace in between
20081 <span> <s>x</span> </s>
20084 <p><span> <s>x</s></span><s> </s>
20085 <b> <i>x</i></b><i> </i>
20090 Encapsulate protected attributes from wt
20094 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
20096 <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>
20100 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
20101 ## Having nested or stray pre tags results in the attempt to add duplicates,
20102 ## causing an assertion fail. This test tries to prevent that situation.
20104 Ensure ParagraphWrapper can deal with stray closing pre tags
20114 1. Ensure fostered text content is wrapped in spans
20118 <table>hi</table><table>ho</table>
20127 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
20129 parsoid=wt2html,wt2wt
20136 <span> || ||</span>
20145 Encapsulation properly handles null DSR information from foster box
20147 parsoid=wt2html,wt2wt
20149 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
20151 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20154 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
20158 <td>bar</td></tr></tbody></table>
20162 1. Encapsulate foster-parented transclusion content
20164 parsoid=wt2wt,wt2html
20166 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
20168 <span typeof="mw:Transclusion" data-mw="{"parts":["
20169 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
20171 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
20175 <td>bar</td></tr></tbody></table>
20179 2. Encapsulate foster-parented transclusion content
20181 parsoid=wt2wt,wt2html
20183 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
20185 <div typeof="mw:Transclusion" data-mw="{"parts":["
20187 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
20189 <td>bar</td></tr></table>"]}">foo</div>
20193 <td>bar</td></tr></tbody></table>
20197 3. Encapsulate foster-parented transclusion content
20199 parsoid=wt2wt,wt2html
20201 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20203 <div typeof="mw:Transclusion" data-mw="{"parts":["
20206 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20208 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20213 <td>bar</td></tr></tbody></table>
20217 4. Encapsulate foster-parented transclusion content
20219 parsoid=wt2wt,wt2html
20221 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20223 <div typeof="mw:Transclusion" data-mw="{"parts":["
20226 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20228 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20233 <td>bar</td></tr></tbody></table>
20237 5. Encapsulate foster-parented transclusion content
20239 parsoid=wt2wt,wt2html
20241 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
20243 <span typeof="mw:Transclusion" data-mw="{"parts":["
20248 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
20254 <p>foo</p></div></td></tr></tbody></table>
20258 6. Encapsulate foster-parented transclusion content
20260 parsoid=wt2wt,wt2html
20262 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
20264 <span typeof="mw:Transclusion" data-mw="{"parts":["
20269 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
20275 <p>foo</p></div></td></tr></tbody></table>
20280 7. Encapsulate foster-parented transclusion content
20282 parsoid=wt2wt,wt2html
20284 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
20286 <p typeof="mw:Transclusion" data-mw="{"parts":["
20287 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20288 <p>foo</p>"}},"i":0}},"
20289 <td>bar</td></table>"]}">foo</p>
20293 <td>bar</td></tr></tbody></table>
20297 8. Encapsulate foster-parented transclusion content
20299 parsoid=wt2wt,wt2html
20302 }}{|{{echo|style='color:red'}}
20307 <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>
20311 <td>b</td></tr></tbody></table>
20315 9. Encapsulate foster-parented transclusion content
20317 parsoid=wt2wt,wt2html
20319 <table>{{echo|hi</table>hello}}
20321 <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>
20322 <table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2" data-parsoid="{}">hello</span>
20326 Table in fosterable position
20328 parsoid=wt2html,wt2wt
20337 <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="{}">
20339 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
20345 # Parsoid only for bug 64747
20347 Properly encapsulate empty-content transclusions in fosterable positions
20355 <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>"}'>
20361 Support <object> element with .data attribute
20365 <object data="test.swf"></object>
20367 <object data="test.swf"></object>
20370 # -----------------------------------------------------------------
20371 # The following section of tests are primarily to spec requirements
20372 # around serialization of new/edited content.
20374 # All these tests are marked Parsoid html2wt and html2html only
20375 # ----------------------------------------------------------------
20378 Image: Modifying size of an image (1)
20381 "modes": ["wt2wt"],
20383 ["img[height]", "attr", "height", "22"],
20384 ["img[width]", "attr", "width", "200"]
20388 [[Image:Foobar.jpg|230x230px]]
20390 [[Image:Foobar.jpg|200x200px]]
20394 Image: Modifying size of an image (2)
20397 "modes": ["wt2wt"],
20399 ["img[height]", "attr", "height", "100"],
20400 ["img[width]", "attr", "width", "500"]
20404 [[Image:Foobar.jpg|230x230px]]
20406 [[Image:Foobar.jpg|500x500px]]
20409 # Change in size is ignored so long as class='mw-default-size'
20411 Image: Modifying size of an image (3)
20414 "modes": ["wt2wt"],
20416 ["figure[class]", "removeClass", "mw-default-size"],
20417 ["figure img", "attr", "height", "19"],
20418 ["figure img", "attr", "width", "170"]
20422 [[Image:Foobar.jpg|thumb]]
20424 [[Image:Foobar.jpg|thumb|170x170px]]
20428 Image: Modifying alignment of an image (bug 48665)
20431 "modes": ["wt2wt"],
20433 ["figure[class]", "removeClass", "mw-halign-right"],
20434 ["figure[class]", "addClass", "mw-halign-left"]
20438 [[Image:Foobar.jpg|thumb|caption|right]]
20440 [[Image:Foobar.jpg|thumb|caption|left]]
20444 Image: Modifying mw-default-size of an frameless image (bug 62805)
20447 "modes": ["wt2wt"],
20449 ["figure.mw-default-size", "removeClass", "mw-default-size"]
20453 [[Image:Foobar.jpg|frameless|right]]
20455 [[Image:Foobar.jpg|frameless|right|220x220px]]
20459 Image: Modifying valign of an image (bug 49221)
20462 "modes": ["wt2wt"],
20464 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
20465 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
20469 [[File:Foobar.jpg|20px|middle]]
20471 [[File:Foobar.jpg|20px|text-top]]
20475 Image: Modifying alt attribute of an image (bug 56400)
20478 "modes": ["wt2wt"],
20480 ["img[alt]", "attr", "alt", "some alternate edited text"]
20484 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
20486 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
20490 Image: Modifying caption of an image
20493 "modes": ["wt2wt"],
20495 ["figcaption", "text", "new caption"]
20499 [[Image:Foobar.jpg|thumb|original caption]]
20501 [[Image:Foobar.jpg|thumb|new caption]]
20505 Image: empty alt attribute (bug 48924)
20509 [[File:Foobar.jpg|thumb|alt=|bar]]
20511 <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>
20515 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
20520 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
20522 #<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>
20526 Image: Block level image should have \n before and after
20531 [[File:Foobar.jpg|right|thumb|150x150px]]
20534 <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>
20538 Image: New block level image should have \n before and after (existing
20544 [[File:Foobar.jpg|right|thumb|150x150px]]
20547 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
20548 <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>
20549 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
20553 Image: upright option (parsoid)
20557 [[File:Foobar.jpg|thumb|upright|caption]]
20558 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
20559 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
20561 <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>
20565 Image: upright option is ignored on inline and frame images (parsoid)
20569 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
20571 <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>
20575 Image: from basic HTML (1)
20579 <span typeof="mw:Image">
20580 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20583 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20587 Image: from basic HTML (2)
20591 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20593 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20597 Image: from basic HTML (3)
20601 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
20603 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
20607 Image: from basic HTML (4)
20611 <img src="File:Foobar.jpg">
20613 [[File:Foobar.jpg|link=]]
20617 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
20624 <li><p>foo</p></li>
20629 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
20635 <ul> <li>foo</li></ul>
20639 Don't strip leading whitespace when handling indent-pre suppressing tags
20647 '''This is very bold of you!'''
20651 indented cell (no pre-wrapping!)
20658 <tr><td> indented row</td></tr>
20661 <b>This is very bold of you!</b>
20664 indented cell (no pre-wrapping!)
20672 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
20677 <nowiki> </nowiki><span>bar</span>
20680 <nowiki> </nowiki></span>bar2
20683 <nowiki> </nowiki><span>bar</span>
20686 <nowiki> </nowiki><span>foo</span>
20704 Lists: Add space after bullets
20710 * <span> baz</span>
20715 <li><span> baz</span></li>
20720 Lists: Dont insert newlines in a serialized list item.
20727 <ul><li>a<br>b</li><li>c</li></ul>
20731 Headings: Add space before/after == (Bug 51744)
20741 == <span> baz</span> ==
20746 <h2><span> baz</span></h2>
20750 Parsoid: Serialize positional parameters with = in them as named parameter
20756 {{echo|1 = f=oo|2 = bar}}
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 {{echo|<nowiki>f=oo</nowiki>|bar}}
20762 <p about="#mwt1" typeof="mw:Transclusion"
20763 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
20765 <p about="#mwt1" typeof="mw:Transclusion"
20766 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
20768 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20769 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20770 <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>
20774 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
20790 <div>a<p>b</p></div>
20799 Substrings resembling wikitext in hrefs should not get nowiki escapes
20805 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
20808 #-----------------------------
20809 # I/B quote minimization tests
20810 #-----------------------------
20813 1. I/B quote minimization: wikitext-only tags should be combined
20833 <p><i>A</i><i>B</i></p>
20834 <p><b>A</b><b>B</b></p>
20835 <p><i>A</i><b><i>B</i></b></p>
20836 <p><b>A</b><i><b>B</b></i></p>
20837 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
20838 <p><i><b>A</b></i><i><b>B</b></i></p>
20839 <p><i><b>A</b></i><b><i>B</i></b></p>
20840 <p><b><i>A</i></b><i><b>B</b></i></p>
20844 2. I/B quote minimization: wikitext and html tags should not be combined
20850 ''A'''''<i>B</i>'''
20852 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
20853 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
20857 3. I/B quote minimization: templated content stops minimization
20861 ''A''{{echo|''B''}}
20863 ''A''{{echo|'''''B'''''}}
20865 <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>
20866 <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>
20870 4. I/B quote minimization: new content should be mimimized with adjacent old content
20880 <p><i>A</i><i data-parsoid='{}'>B</i></p>
20881 <p><b data-parsoid='{}'>A</b><b>B</b></p>
20882 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
20885 #------------------------------------
20886 # End of I/B quote minimization tests
20887 #------------------------------------
20890 Bug 54262: New entities
20896 <span typeof="mw:Entity"> </span>
20899 ## Note that there is no wikitext output for 'unknownproperty' ##
20900 ## Unknown magic words are silently dropped ##
20915 __NOCONTENTCONVERT__
20917 <meta property='mw:PageProp/toc' />
20918 <meta property='mw:PageProp/notoc' />
20919 <meta property='mw:PageProp/forcetoc' />
20920 <meta property='mw:PageProp/index' />
20921 <meta property='mw:PageProp/noindex' />
20922 <meta property='mw:PageProp/nogallery' />
20923 <meta property='mw:PageProp/noeditsection' />
20924 <meta property='mw:PageProp/notitleconvert' />
20925 <meta property='mw:PageProp/nocontentconvert' />
20926 <meta property='mw:PageProp/unknownproperty' />
20930 Consecutive <pre>s should not get merged
20932 parsoid=html2wt,html2html
20948 <pre>a</pre><pre>b</pre>
20962 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
20966 [[Special:BookSources/1234567890|ISBN 1234567895]]
20968 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
20972 Edited RFC links not serializable as RFC links should serialize as extlinks
20976 [//tools.ietf.org/html/rfc123 New RFC]
20978 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
20982 Edited PMID links not serializable as PMID links should serialize as extlinks
20986 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
20988 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
20992 Edited Redirect link should emit a non-piped wikitext link
20998 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
21001 # -----------------------------------------------------------------
21002 # End of section for Parsoid-only html2wt tests for serialization
21004 # -----------------------------------------------------------------
21011 Try for 100% code coverage