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]]
103 Template:echo_with_span
109 Template:echo_with_div
121 Template:table_attribs
124 |</noinclude>style="color: red"| Foo
130 {{table_attribs}} || Bar || Baz
134 Template:image_attribs
137 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
171 This is a simple paragraph.
173 <p>This is a simple paragraph.
178 Paragraphs with extra newline spacing
201 Paragraphs with newline spacing with comment lines in between
209 <!--foo--><!--More than 1 comment, still stripped-->
213 <!--foo--> <!----> <!-- bar -->
274 Paragraphs with newline spacing with non-empty white-space lines in between
301 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
309 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
348 Extra newlines: More paragraphs with indented comment
363 Extra newlines followed by heading
378 <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>
379 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
382 <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>
387 Extra newlines between heading and content are swallowed
395 <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>
396 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
403 http://fr.wikipedia.org/wiki/🍺
404 <!-- EasterEgg we love beer, better be able be able to link to it -->
406 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
417 <li> Item 2</li></ul>
425 * plain''italic''plain
426 * plain''italic''plain''italic''plain
427 * plain'''bold'''plain
428 * plain'''bold'''plain'''bold'''plain
429 * plain''italic''plain'''bold'''plain
430 * plain'''bold'''plain''italic''plain
431 * plain''italic'''bold-italic'''italic''plain
432 * plain'''bold''bold-italic''bold'''plain
433 * plain'''''bold-italic'''italic''plain
434 * plain'''''bold-italic''bold'''plain
435 * plain''italic'''bold-italic'''''plain
436 * plain'''bold''bold-italic'''''plain
437 * plain l'''italic''plain
438 * plain l''''bold''' plain
441 <li> plain<i>italic</i>plain</li>
442 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
443 <li> plain<b>bold</b>plain</li>
444 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
445 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
446 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
447 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
448 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
449 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
450 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
451 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
452 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
453 <li> plain l'<i>italic</i>plain</li>
454 <li> plain l'<b>bold</b> plain</li></ul>
458 # this example taken from the [[simple:Moon]] article (bug 47326)
460 Italics and possessives (1)
462 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
464 <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
468 # this example taken from [[en:Flaming Pie]] (bug 49926)
470 Italics and possessives (2)
472 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
474 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
478 # this example taken from [[en:Dictionary]] (bug 49926)
480 Italics and possessives (3)
482 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''.
484 <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>.
490 ### 2-quote opening sequence tests
493 Italics and bold: 2-quote opening sequence: (2,2)
503 Italics and bold: 2-quote opening sequence: (2,3)
514 # same html as previous, but wikitext adjusted to match parsoid html2wt
516 Italics and bold: 2-quote opening sequence: (2,3) w/ nowiki
518 ''<nowiki>foo'</nowiki>''
526 Italics and bold: 2-quote opening sequence: (2,4)
537 # same html as previous, but wikitext adjusted to match parsoid html2wt
539 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
541 ''<nowiki>foo''</nowiki>''
548 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
550 Italics and bold: 2-quote opening sequence: (2,5)
563 # same html as previous, but wikitext adjusted to match parsoid html2wt
565 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
567 ''foo'''''<nowiki/>'''
578 ### 3-quote opening sequence tests
582 Italics and bold: 3-quote opening sequence: (3,2)
592 Italics and bold: 3-quote opening sequence: (3,3)
602 Italics and bold: 3-quote opening sequence: (3,4)
613 # same html as previous, but wikitext adjusted to match parsoid html2wt
615 Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki
617 '''<nowiki>foo'</nowiki>'''
624 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
626 Italics and bold: 3-quote opening sequence: (3,5)
639 # same html as previous, but wikitext adjusted to match parsoid html2wt
641 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
643 '''foo'''''<nowiki/>''
654 ### 4-quote opening sequence tests
658 Italics and bold: 4-quote opening sequence: (4,2)
669 # same html as previous, but wikitext adjusted to match parsoid html2wt
671 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
673 <nowiki>''</nowiki>''foo''
681 Italics and bold: 4-quote opening sequence: (4,3)
691 Italics and bold: 4-quote opening sequence: (4,4)
702 # same html as previous, but wikitext adjusted to match parsoid html2wt
704 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
706 ''''<nowiki>foo'</nowiki>'''
713 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
715 Italics and bold: 4-quote opening sequence: (4,5)
724 <p>'<b>foo</b><i></i>
728 # same html as previous, but wikitext adjusted to match parsoid html2wt
730 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
732 ''''foo'''''<nowiki/>''
737 <p>'<b>foo</b><i></i>
743 ### 5-quote opening sequence tests
747 Italics and bold: 5-quote opening sequence: (5,2)
758 # same html as previous, but wikitext adjusted to match parsoid html2wt
759 # skipping wt2html and html2html because it wants to put <i> before <b>
761 Italics and bold: 5-quote opening sequence: (5,2+3)
763 parsoid=wt2wt,html2wt
772 Italics and bold: 5-quote opening sequence: (5,3)
783 # same html as previous, but wikitext adjusted to match parsoid html2wt
785 Italics and bold: 5-quote opening sequence: (5,3+2)
795 Italics and bold: 5-quote opening sequence: (5,4)
801 <p><i><b>foo'</b></i>
806 # same html as previous, but wikitext adjusted to match parsoid html2wt
808 Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki
810 '''''<nowiki>foo'</nowiki>'''''
812 <p><i><b>foo'</b></i>
818 Italics and bold: 5-quote opening sequence: (5,5)
827 ### multiple quote sequences in a line
830 Italics and bold: multiple quote sequences: (2,4,2)
836 <p><i>foo'<b>bar</b></i>
841 # same html as previous, but wikitext adjusted to match parsoid html2wt
843 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
845 ''<nowiki>foo'</nowiki>'''bar'''''
847 <p><i>foo'<b>bar</b></i>
853 Italics and bold: multiple quote sequences: (2,4,3)
859 <p><i>foo'<b>bar</b></i>
864 # same html as previous, but wikitext adjusted to match parsoid html2wt
866 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
868 ''<nowiki>foo'</nowiki>'''bar'''''
870 <p><i>foo'<b>bar</b></i>
876 Italics and bold: multiple quote sequences: (2,4,4)
882 <p><i>foo'<b>bar'</b></i>
887 # same html as previous, but wikitext adjusted to match parsoid html2wt
889 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
891 ''<nowiki>foo'</nowiki>'''<nowiki>bar'</nowiki>'''''
893 <p><i>foo'<b>bar'</b></i>
898 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
900 Italics and bold: multiple quote sequences: (3,4,2)
909 <p><b>foo'</b>bar<i></i>
913 # same html as previous, but wikitext adjusted to match parsoid html2wt
915 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
919 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
924 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
929 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
931 Italics and bold: multiple quote sequences: (3,4,3)
940 <p><b>foo'</b>bar<b></b>
944 # same html as previous, but wikitext adjusted to match parsoid html2wt
946 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
948 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
953 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
958 ### other quote tests
961 Italics and bold: other quote tests: (2,3,5)
963 ''this is about '''foo's family'''''
965 <p><i>this is about <b>foo's family</b></i>
971 Italics and bold: other quote tests: (2,(3,3),2)
973 ''this is about '''foo's''' family''
975 <p><i>this is about <b>foo's</b> family</i>
981 Italics and bold: other quote tests: (3,2,3,2)
985 '''this is about ''foo'''s family''
987 <p><b>this is about <i>foo</i></b><i>s family</i>
992 # same html as previous, but wikitext adjusted to match parsoid html2wt
993 # add 'parsoid' option to use 'parsoid' normalization of the placeholder
995 Italics and bold: other quote tests: (3,2,3+2+2,2)
999 '''this is about ''foo'''''<nowiki/>''s family''
1001 <p><b>this is about <i>foo</i></b><i>s family</i>
1007 Italics and bold: other quote tests: (3,2,3,3)
1010 '''this is about ''foo'''s family'''
1012 <p>'<i>this is about </i>foo<b>s family</b>
1018 Italics and bold: other quote tests: (3,(2,2),3)
1020 '''this is about ''foo's'' family'''
1022 <p><b>this is about <i>foo's</i> family</b>
1028 Italicized possessive
1030 The ''[[Main Page]]'''s talk page.
1032 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1037 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1038 (Requires tidy for PHP parser output to be fixed up)
1040 parsoid=wt2html,wt2wt
1048 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1049 <td><i>a</i></td><td><i>b</i></td></tr>
1058 Non-html5 tags should be accepted
1060 <center>''foo''</center>
1062 <font>''foo''</font>
1063 <strike>''foo''</strike>
1066 <center><i>foo</i></center>
1067 <p><big><i>foo</i></big>
1068 <font><i>foo</i></font>
1069 <strike><i>foo</i></strike>
1075 <wbr> is valid wikitext (bug 52468)
1083 # <strike> is HTML4, <s> is HTML4/5.
1085 <s> or <strike> for strikethrough
1087 <strike>strike</strike>
1091 <p><strike>strike</strike>
1096 ## a,rtc not permitted
1099 Text-level semantic html elements in wikitext
1102 <strong>text</strong>
1118 <ruby><rb>明日<rp>(</rp><rt>Ashita</rt><rp>)</rp></rb></ruby>
1125 <strong>text</strong>
1141 <ruby><rb>明日<rp>(</rp><rt>Ashita</rt><rp>)</rp></rb></ruby>
1150 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1152 <b→> doesn't work! </b→>
1154 <bä> doesn't work! </bä>
1156 <boo> works fine </boo>
1158 <s.foo>s.foo</s.foo>
1162 <p><b→> doesn't work! </b→>
1163 </p><p><bä> doesn't work! </bä>
1164 </p><p><boo> works fine </boo>
1165 </p><p><s.foo>s.foo</s.foo>
1166 </p><p><sub-ID#1>
1171 Isolated close tags should be treated as literal text (bug 52760)
1178 </p><p><s.foo>s</s>
1183 ### Special characters
1187 Bare pipe character (bug 52363)
1196 Bare pipe character from a template (bug 52363)
1205 ### <nowiki> test cases
1209 <nowiki> unordered list
1211 <nowiki>* This is not an unordered list item.</nowiki>
1213 <p>* This is not an unordered list item.
1220 <nowiki>Lorem ipsum dolor
1228 <p>Lorem ipsum dolor
1241 :There is not nowiki.
1242 :There is <nowiki>nowiki</nowiki>.
1244 #There is not nowiki.
1245 #There is <nowiki>nowiki</nowiki>.
1247 *There is not nowiki.
1248 *There is <nowiki>nowiki</nowiki>.
1250 <dl><dd>There is not nowiki.</dd>
1251 <dd>There is nowiki.</dd></dl>
1252 <ol><li>There is not nowiki.</li>
1253 <li>There is nowiki.</li></ol>
1254 <ul><li>There is not nowiki.</li>
1255 <li>There is nowiki.</li></ul>
1260 Entities inside <nowiki>
1262 <nowiki><</nowiki>
1269 Entities inside template parameters
1275 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span>
1280 Properly escape nowiki when combined with other wiki markup
1284 <nowiki>* </nowiki></nowiki> tag
1286 <p>* </nowiki> tag</p>
1293 Comments and Indent-Pre
1295 <!-- comment 1 --> asdf
1297 <!-- comment 1 --> asdf
1300 <!-- comment 1 --> asdf
1301 <!-- comment 2 -->xyz
1303 <!-- comment 1 --> asdf
1304 <!-- comment 2 --> xyz
1360 asdf<!-- comment 1 -->jkl
1370 <!-- foo --> b <!-- bar -->
1384 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1390 Comment semantics and delimiters
1392 <!-- --><!----><!-----><!------>
1398 Comment semantics and delimiters, redux
1400 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1401 -- foo -- funky huh? ... -->
1407 Comment semantics and delimiters: directors cut
1409 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1410 everything starting with < followed by !-- until the first -- and > we see,
1411 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1419 Comment semantics: nesting
1421 <!--<!-- no, we're not going to do anything fancy here -->-->
1428 Comment semantics: unclosed comment at end
1430 <!--This comment will run out to the end of the document
1436 Comment in template title
1445 Comment on its own line post-expand
1457 Comment on its own line post-expand with non-significant whitespace
1469 Multiple comments should still parse as SOL-transparent
1471 parsoid=wt2html,wt2wt
1474 <!--c2--><!--c3--><!--c4-->*b
1485 ### paragraph wrapping tests
1500 Block tag on one line (<div>)
1512 Block tag on one line (<blockquote>)
1514 a <blockquote>foo</blockquote>
1518 a <blockquote>foo</blockquote>
1524 Block tag on both lines (<div>)
1536 Block tag on both lines (<blockquote>)
1538 a <blockquote>foo</blockquote>
1540 b <blockquote>foo</blockquote>
1542 a <blockquote>foo</blockquote>
1543 b <blockquote>foo</blockquote>
1548 Multiple lines without block tags
1566 Empty lines between lines with block tags
1595 ## PHP parser emits output which is broken
1597 Unclosed HTML p-tags should be handled properly
1604 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1610 ### Preformatted text
1619 And a [[Main Page|link]]
1625 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1630 Tabs don't trigger preformatted text
1634 This is preformatted text.
1640 <pre>This is preformatted text.
1646 Ident preformatting with inline content
1657 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1674 Regression with preformatted in <center>
1688 Bug 52763: Preformatted in <blockquote>
1694 indented cell (no pre-wrapping!)
1704 <p> indented cell (no pre-wrapping!)
1712 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1729 Bug 15491: <ins>/<del> in blockquote
1732 Foo <del>bar</del> <ins>baz</ins> quux
1736 <p>Foo <del>bar</del> <ins>baz</ins> quux
1742 # Note that the p-wrapping is newline sensitive, which could be
1743 # considered a bug: tidy will wrap only the 'Foo' in the example
1744 # below in a <p> tag. (see comment 23-25 of bug #6200)
1746 Bug 15491: <ins>/<del> in blockquote (2)
1748 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1751 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1757 <pre> with attributes (bug 3202)
1759 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1761 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1766 <pre> with width attribute (bug 3202)
1768 <pre width="8">Narrow screen goodies</pre>
1770 <pre width="8">Narrow screen goodies</pre>
1775 <pre> with forbidden attribute (bug 3202)
1777 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1779 <pre width="8">Narrow screen goodies</pre>
1784 Entities inside <pre>
1793 <pre> with forbidden attribute values (bug 3202)
1795 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1797 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1802 <nowiki> inside <pre> (bug 13238)
1810 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1818 <pre><nowiki>Foo</nowiki></pre>
1823 <nowiki> and <pre> preference (first one wins)
1854 </pre> inside nowiki
1856 <nowiki></pre></nowiki>
1863 Empty pre; pre inside other HTML tags (bug 54946)
1882 HTML pre followed by indent-pre
1897 <p><pre>foo</pre></p>
1899 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
1903 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1911 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1921 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1933 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1954 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1958 {{echo| foo}}{{echo| bar}}
1963 {{echo|<!--cmt--> foo}}
1965 <!--cmt-->{{echo| foo}}
1967 {{echo|{{echo| }}bar}}
1985 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2022 Things that look like <pre> tags aren't treated as such
2024 Barack Obama <President> of the United States
2025 <President></President>
2027 <p>Barack Obama <President> of the United States
2028 <President></President>
2032 ## PHP parser discards the "<pre " string
2034 Handle broken pre-like tags (bug 64025)
2038 {{echo|<pre <pre>x</pre>}}
2040 <table><pre </table>
2043 <table><pre></pre></table>
2046 <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>
2049 <span><pre </span>
2054 Parsoid: handle pre with space after attribute
2058 <pre style="width:50%;" >{{echo|foo}}</pre>
2060 <pre style="width:50%;">{{echo|foo}}</pre>
2063 # TODO / maybe: fix wt2wt for this
2065 Parsoid: Don't paragraph-wrap fosterable content
2091 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2119 #--------------------------------------------------------------------
2120 # Transclusion parameter whitespace stripping tests
2121 # Behavior is different for positional and named parameters
2122 #--------------------------------------------------------------------
2124 Templates: Strip leading and trailing whitespace from named-param values
2128 {{echo|1= {{echo|b}} }}
2141 <ul><li> d</li></ul>
2146 Templates: Don't strip whitespace from positional-param values
2150 {{echo|{{echo|b}} }}
2182 <ul><li> f</li></ul>
2190 Templates: Handle empty comment-and-ws-only lines correctly
2193 <!--should be ignored-->
2194 <!--should be ignored as well-->
2203 Templates: Handle comments in the target
2206 <!-- should be ignored -->
2209 {{echo<!-- should be ignored -->
2212 {{echo<!-- should be ignored -->|foo}}
2214 {{<!-- should be ignored -->echo|foo}}
2216 <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>
2218 <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>
2220 <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>
2222 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2225 #--------------------------------------------------------------------
2226 # Transclusion parameter escaping tests
2227 #--------------------------------------------------------------------
2229 Templates: Parsoid parameter escaping test 1
2233 {{echo|[foo]|{{echo|[bar]}}}}
2235 <p about="#mwt1" typeof="mw:Transclusion"
2236 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2240 Parsoid: Pipes in external links in template parameter
2244 {{echo|[{{echo|http://example.com}} link]}}
2246 <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>
2250 Parsoid: pipe in transclusion parameter
2254 {{echo|http://foo.com/a|b}}
2256 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2257 typeof="mw:Transclusion"
2258 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>
2262 Parsoid: Pipe in external link target and content in template parameter
2264 parsoid=html2wt,wt2wt
2266 {{echo|[http://foo.com/a|b a|b]}}
2268 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2269 typeof="mw:Transclusion"
2270 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2271 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2275 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2279 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2281 <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>
2285 Templates: Don't escape already nowiki-escaped text in template parameters
2287 parsoid=html2wt,wt2wt
2289 {{echo|foo<nowiki>|</nowiki>bar}}
2290 {{echo|<nowiki><div></nowiki>}}
2291 {{echo|<nowiki></nowiki>}}
2293 <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>
2294 <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>
2295 <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>
2301 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2303 parsoid=html2wt,wt2wt
2305 {{echo|{{echo|1=bar}}}}
2307 <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>
2312 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2318 <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>
2322 ### Parsoid-centric tests for testing RT edge cases for pre
2326 1a. Indent-Pre and Comments
2339 1b. Indent-Pre and Comments
2352 1c. Indent-Pre and Comments
2365 1d. Indent-Pre and Comments
2366 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2379 2a. Indent-Pre and tables
2400 2b. Indent-Pre and tables
2416 2c. Indent-Pre and tables (bug 42252)
2433 2d. Indent-Pre and tables
2459 2e. Indent-Pre and table-line syntax
2471 2f. Indent-pre started by table-line syntax
2484 3a. Indent-Pre and block tags (single-line html)
2488 c <blockquote> foo </blockquote>
2493 c <blockquote> foo </blockquote>
2494 <pre><span> foo </span>
2499 3b. Indent-Pre and block tags (multi-line html)
2504 <pre>a <span>foo</span>
2511 3c. Indent-Pre and block tags (pre-content on separate line)
2575 4. Indent-Pre and extension tags
2581 a <ul class="gallery mw-gallery-traditional">
2582 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2583 <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>
2584 <div class="gallerytext">
2592 Leading pipes outside of tables
2602 Leading pipes outside of tables 2
2616 Leading pipes outside of tables 3
2621 | class="foo bar" | baz
2625 | class="foo bar" | baz
2630 Render paragraphs when indent-pre is suppressed in blocklevels
2647 4. Multiple spaces at start-of-line
2665 ## NOTE: the leading white-space chars on empty line are significant
2667 5a. White-space in indent-pre
2679 ## NOTE: the leading white-space chars on empty line are significant
2681 5b. White-space in indent-pre
2700 5c. White-space in indent-pre
2713 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2736 7a. Indent-pre and category links
2738 parsoid=wt2html,wt2wt
2740 [[Category:foo]] <!-- No pre-wrapping -->
2741 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2743 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2744 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span>
2745 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2749 7b. Indent-pre and category links
2751 parsoid=wt2html,wt2wt
2754 [[Category:foo]] {{echo|b}}
2757 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
2759 <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>
2763 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2767 HTML-pre: 1. embedded newlines
2801 <pre data-parsoid='{"stx":"html"}'>foo</pre>
2803 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
2807 <pre data-parsoid='{"stx":"html"}'>
2812 <pre data-parsoid='{"stx":"html"}'>
2820 HTML-pre: big spaces
2857 <pre data-parsoid='{"stx":"html"}'>
2876 HTML-pre: 2: indented text
2889 HTML-pre: 3: other wikitext
2910 ### Definition lists
2917 <dl><dt> name </dt>
2918 <dd> Definition</dd></dl>
2923 Definition list for indentation only
2927 <dl><dd> Indented text</dd></dl>
2932 Definition list with no space
2937 <dd>Definition</dd></dl>
2942 Definition list with URL link
2944 ; http://example.com/ : definition
2946 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
2947 <dd> definition</dd></dl>
2952 Definition list with bracketed URL link
2954 ;[http://www.example.com/ Example]:Something about it
2956 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
2957 <dd>Something about it</dd></dl>
2962 Definition list with wikilink containing colon
2964 ; [[Help:FAQ]]: The least-read page on Wikipedia
2966 <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>
2967 <dd> The least-read page on Wikipedia</dd></dl>
2971 # At Brion's and JeLuF's insistence... :)
2973 Definition list with news link containing colon
2975 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2977 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
2978 <dd> This isn't even a real newsgroup!</dd></dl>
2983 Malformed definition list with colon
2985 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2987 <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>
2992 Definition lists: colon in external link text
2994 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2996 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
2997 <dd> OK, I made that up</dd></dl>
3002 Definition lists: colon in HTML attribute
3004 ;<b style="display: inline">bold</b>
3006 <dl><dt><b style="display: inline">bold</b></dt></dl>
3011 Definition lists: self-closed tag
3013 ;one<br/>two : two-line fun
3015 <dl><dt>one<br />two </dt>
3016 <dd> two-line fun</dd></dl>
3021 Bug 11748: Literal closing tags
3025 <dd>test test test test test</dd>
3027 <dd>test test test test test</dd>
3032 <dd>test test test test test</dd>
3034 <dd>test test test test test</dd>
3040 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3043 ; term : description
3048 <dl><dt> term </dt>
3049 <dd> description</dd></dl>
3050 <ul><li> unordered</li></ul>
3057 Definition list with empty definition and following paragraph
3069 Nested definition lists using html syntax
3078 Definition Lists: No nesting: Multiple dd's
3091 Definition Lists: Indentation: Regular
3099 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3104 Definition Lists: Indentation: Missing 1st level
3110 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3115 Definition Lists: Indentation: Multi-level indent
3119 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3124 Definition Lists: Hacky use to indent tables
3131 should be left alone
3133 <dl><dd><dl><dd><table>
3138 </td></tr></table></dd></dl></dd></dl>
3140 should be left alone
3145 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3153 should be left alone
3156 <dl><dd><dl><dd><table><tr>
3159 </tr></table><!-- bar --></dd></dl></dd></dl>
3161 should be left alone</p>
3165 Definition Lists: Hacky use to indent tables, with comment before table
3171 <dl><dd><dl><dd><!-- foo --><table><tr>
3173 </tr></table></dd></dl></dd></dl>
3178 Definition Lists: Hacky use to indent tables (WS-insensitive)
3187 <dd> <table><tr><td>a</td></tr></table> </dd>
3190 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3191 ## as an empty dt item. It also ignores all but the last ";" when followed
3192 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3193 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3196 ## Ex: ";;t2 ::d2" is transformed into:
3208 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3209 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3220 ## All Parsoid only definition list tests have this difference.
3222 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3223 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3226 Table / list interaction: indented table with lists in table contents
3241 <ul><li> b</li></ul>
3245 <ul><li> d</li></ul>
3246 </td></tr></table></dd></dl>
3251 Table / list interaction: lists nested in tables nested in indented lists
3274 </td></tr></table></dd></dl>
3281 Definition Lists: Nesting: Multi-level (Parsoid only)
3311 Definition Lists: Nesting: Test 2 (Parsoid only)
3331 Definition Lists: Nesting: Test 3 (Parsoid only)
3359 Definition Lists: Nesting: Test 4
3364 <dl><dd><dl><dd><dl><dt>t3</dt>
3365 <dd>d3</dd></dl></dd></dl></dd></dl>
3370 ## The Parsoid team believes the following three test exposes a
3371 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3372 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3374 Definition Lists: Mixed Lists: Test 1
3380 <dl><dd><dl><dt><ul><li> foo</li>
3381 <li> bar</li></ul></dt></dl>
3382 <dl><dt> baz</dt></dl></dd></dl>
3401 Definition Lists: Mixed Lists: Test 2
3406 <ul><li><dl><dd> d1</dd>
3407 <dd> d2</dd></dl></li></ul>
3413 Definition Lists: Mixed Lists: Test 3
3418 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3419 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3425 Definition Lists: Mixed Lists: Test 4
3430 <ul><li><dl><dt>d1 </dt>
3433 <dd>d4</dd></dl></li></ul>
3439 Definition Lists: Mixed Lists: Test 5
3445 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3451 Definition Lists: Mixed Lists: Test 6
3456 <ol><li><ul><li><dl><dd>d1
3457 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3463 Definition Lists: Mixed Lists: Test 7
3468 <dl><dd><ul><li> d1</li>
3469 <li> d2</li></ul></dd></dl>
3475 Definition Lists: Mixed Lists: Test 8
3480 <dl><dd><ul><li> d1</li></ul>
3481 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3487 Definition Lists: Mixed Lists: Test 9
3491 <ul><li><dl><dt>foo </dt>
3492 <dd>bar</dd></dl></li></ul>
3498 Definition Lists: Mixed Lists: Test 10
3502 <ul><li><ol><li><dl><dt>foo </dt>
3503 <dd>bar</dd></dl></li></ol></li></ul>
3507 # The Parsoid team disagrees with the PHP parser's seemingly-random
3508 # rules regarding dd/dt on the next two tests. Parsoid is more
3509 # consistent, and recognizes the shared nesting and keeps the
3510 # still-open tags around until the nesting is complete.
3513 Definition Lists: Mixed Lists: Test 11
3518 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3519 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3520 <dl><dt>boo </dt>
3521 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3539 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3540 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3544 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3545 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3555 Definition Lists: Weird Ones: Test 1
3557 *#;*::;; foo : bar (who uses this?)
3559 <ul><li><ol><li><dl><dt> foo </dt>
3560 <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>
3578 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3579 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3594 External links: non-bracketed
3596 Non-bracketed: http://example.com
3598 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3602 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3604 External links: numbered
3606 Numbered: [http://example.com]
3607 Numbered: [http://example.net]
3608 Numbered: [http://example.com]
3610 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
3611 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
3612 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
3615 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
3616 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
3617 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
3621 External links: specified text
3623 Specified text: [http://example.com link]
3625 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
3630 External links: trail
3632 Linktrails should not work for external links: [http://example.com link]s
3634 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3639 External links: dollar sign in URL
3641 http://example.com/1$2345
3643 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3647 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3649 External links: dollar sign in URL (autonumber)
3651 [http://example.com/1$2345]
3653 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3656 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
3660 External links: open square bracket forbidden in URL (bug 4377)
3662 parsoid=wt2html,wt2wt,html2html
3664 http://example.com/1[2345
3666 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3669 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
3673 External links: open square bracket forbidden in URL (named) (bug 4377)
3675 parsoid=wt2html,html2html
3677 [http://example.com/1[2345]
3679 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3682 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
3685 # parsoid adds a space before the link name
3687 External links: open square bracket forbidden in URL (named) (bug 4377)
3690 [http://example.com/1 [2345]
3692 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3697 External links: nowiki in URL link text (bug 6230)
3699 [http://example.com/ <nowiki>''example site''</nowiki>]
3701 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
3706 External links: newline forbidden in text (bug 6230 regression check)
3708 [http://example.com/ first
3711 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
3717 External links: Pipe char between url and text
3719 [http://example.com | link]
3721 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
3726 External links: protocol-relative URL in brackets
3728 [//example.com/ Test]
3730 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
3734 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3736 External links: protocol-relative URL in brackets without text
3740 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
3743 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
3747 External links: protocol-relative URL in free text is left alone
3751 <p>//example.com/Foo
3756 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
3758 foo//example.com/Foo
3760 <p>foo//example.com/Foo
3765 External links: with no contents
3767 [http://en.wikipedia.org/wiki/Foo]
3769 [[wikipedia:Foo|Bar]]
3771 [[wikipedia:Foo|<span>Bar</span>]]
3773 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
3774 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo">Bar</a></p>
3775 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"><span>Bar</span></a></p>
3781 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3783 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3788 External image from https
3790 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3792 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3797 External image (when not allowed)
3799 wgAllowExternalImages=0
3801 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3803 <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>
3808 Link to non-http image, no img tag
3810 Link to non-http image, no img tag: ftp://example.com/test.jpg
3812 <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>
3817 External links: terminating separator
3819 Terminating separator: http://example.com/thing,
3821 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
3826 External links: intervening separator
3828 Intervening separator: http://example.com/1,2,3
3830 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
3835 External links: old bug with URL in query
3837 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
3839 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
3844 External links: old URL-in-URL bug, mixed protocols
3846 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
3848 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
3853 External links: URL in text
3855 URL in text: [http://example.com http://example.com]
3857 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3862 External links: Clickable images
3864 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
3866 <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>
3871 External links: raw ampersand
3873 Old & use: http://x&y
3875 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3880 External links: encoded ampersand
3882 Old & use: http://x&y
3884 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3887 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
3891 External links: encoded equals (bug 6102)
3893 http://example.com/?foo=bar
3895 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
3898 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
3902 ## Note that parsoid doesn't explicit mark autonumbered links, nor
3903 ## does it number them. As discussed in bug 53505, we can identify
3904 ## autonumbered links via CSS.
3908 External links: [raw ampersand]
3910 Old & use: [http://x&y]
3912 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3915 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
3918 # note that parsoid html is identical to [raw ampersand] case; so html2wt
3919 # mode will return the [raw ampersand] wikitext
3921 External links: [encoded ampersand]
3923 parsoid=wt2html,wt2wt,html2html
3925 Old & use: [http://x&y]
3927 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3930 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
3934 External links: [raw equals]
3936 [http://example.com/?foo=bar]
3938 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3941 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
3944 # note that parsoid html is identical to [raw equals] case; so html2wt
3945 # mode will return the [raw equals] wikitext
3947 External links: [encoded equals] (bug 6102)
3949 parsoid=wt2html,wt2wt,html2html
3951 [http://example.com/?foo=bar]
3953 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3956 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
3959 # xxx parsoid strips the IDN character, so the round-trip tests will
3960 # obviously fail and are disabled. --cscott
3962 External links: [IDN ignored character reference in hostname; strip it right off]
3964 parsoid=wt2html,wt2wt,html2html
3966 [http://e‌xample.com/]
3968 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
3971 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
3974 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
3975 # Where an external link could easily circumvent the sanitization of the text of
3976 # a link like this (where an IDN-ignore character is in the URL somewhere), this
3977 # test demands a higher standard. That's a bit strange.
3981 # http://example.com -> [http://example.com|http://example.com]
3982 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
3984 # The first example is sanitized, but the second is not. Any security benefits
3985 # from this production are trivial to circumvent. Either remove this test and
3986 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
3987 # the test accordingly.
3991 # xxx parsoid strips the IDN character, so the round-trip tests will
3992 # obviously fail and are disabled. --cscott
3994 External links: IDN ignored character reference in hostname; strip it right off
3996 parsoid=wt2html,html2html
3998 http://e‌xample.com/
4000 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4003 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4007 External links: www.jpeg.org (bug 554)
4011 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4015 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4017 External links: URL within URL (original bug 2)
4019 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4021 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4024 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4028 BUG 361: URL inside bracketed URL
4030 [http://www.example.com/foo http://www.example.com/bar]
4032 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4037 BUG 361: URL within URL, not bracketed
4039 http://www.example.com/foo?=http://www.example.com/bar
4041 <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>
4046 BUG 289: ">"-token in URL-tail
4048 http://www.example.com/<hello>
4050 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4055 BUG 289: literal ">"-token in URL-tail
4057 http://www.example.com/<b>html</b>
4059 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4064 BUG 289: ">"-token in bracketed URL
4066 [http://www.example.com/<hello> stuff]
4068 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4073 BUG 289: literal ">"-token in bracketed URL
4075 [http://www.example.com/<b>html</b> stuff]
4077 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4082 BUG 289: literal double quote at end of URL
4084 http://www.example.com/"hello"
4086 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4091 BUG 289: literal double quote in bracketed URL
4093 [http://www.example.com/"hello" stuff]
4095 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4100 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4102 [http://www.example.com test]
4104 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4109 External links: link text with spaces
4111 [http://www.example.com a b c]
4112 [http://www.example.com ''a'' ''b'']
4114 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4115 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4120 External links: wiki links within external link (Bug 3695)
4122 [http://example.com [[wikilink]] embedded in ext link]
4124 <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>
4127 <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>
4131 BUG 787: Links with one slash after the url protocol are invalid
4135 [http:/example.com title]
4137 <p>http:/example.com
4138 </p><p>[http:/example.com title]
4143 Bracketed external links with template-generated invalid target
4145 [{{echo|http:/example.com}} title]
4147 <p>[http:/example.com title]
4152 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4154 ''[http://example.com text'']
4155 [http://example.com '''text]'''
4156 ''Something [http://example.com in italic'']
4157 ''Something [http://example.com mixed''''', even bold]'''
4158 '''''Now [http://example.com both''''']
4160 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4161 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4162 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4163 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4164 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4170 Bug 4781: %26 in URL
4172 http://www.example.com/?title=AT%26T
4174 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4177 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4180 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4181 # % is actually legal in HTML5. Any change in output would need testing though.
4183 Bug 4781, 5267: %25 in URL
4185 http://www.example.com/?title=100%25_Bran
4187 <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>
4190 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4194 Bug 4781, 5267: %28, %29 in URL
4196 http://www.example.com/?title=Ben-Hur_%281959_film%29
4198 <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>
4201 <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>
4206 Bug 4781: %26 in autonumber URL
4208 [http://www.example.com/?title=AT%26T]
4210 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4213 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4217 Bug 4781, 5267: %26 in autonumber URL
4219 [http://www.example.com/?title=100%25_Bran]
4221 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4224 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4228 Bug 4781, 5267: %28, %29 in autonumber URL
4230 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4232 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4235 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4240 Bug 4781: %26 in bracketed URL
4242 [http://www.example.com/?title=AT%26T link]
4244 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4247 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4251 Bug 4781, 5267: %25 in bracketed URL
4253 [http://www.example.com/?title=100%25_Bran link]
4255 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4260 Bug 4781, 5267: %28, %29 in bracketed URL
4262 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4264 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4267 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4271 External link containing a period in the anchor. (bug 63947)
4273 [//foo.org/bar#baz. bang]
4275 [//foo.org/bar. bang]
4277 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4278 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4281 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4282 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4286 External link containing a single quote. (bug 63947)
4290 [//foo.org/bar'baz bang]
4292 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4293 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4296 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4297 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4302 External link containing a period in the anchor. (bug 63947)
4304 [//foo.org/bar#baz. bang]
4306 [//foo.org/bar. bang]
4308 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4309 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4312 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4313 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4317 External link containing a single quote. (bug 63947)
4321 [//foo.org/bar'baz bang]
4323 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4324 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4327 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4328 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4333 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4335 Some [http://example.com/ pretty ''italics'' and stuff]!
4337 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4342 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4344 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4346 <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>
4351 External link containing double-single-quotes with no space separating the url from text in italics
4353 [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]].]
4355 <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>
4358 <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>
4362 External link with comments in link text
4364 [http://www.google.com Google <!-- comment -->]
4366 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4371 URL-encoding in URL functions (single parameter)
4373 {{localurl:Some page|amp=&}}
4375 <p>/index.php?title=Some_page&amp=&
4380 URL-encoding in URL functions (multiple parameters)
4382 {{localurl:Some page|q=?&=&}}
4384 <p>/index.php?title=Some_page&q=?&amp=&
4391 http://example.com/index.php?foozoid%5B%5D=bar
4393 http://example.com/index.php?foozoid[]=bar
4395 <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>
4396 </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>
4399 <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>
4401 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4405 IPv6 urls (bug 21261)
4409 http://[2404:130:0:1000::187:2]/index.php
4411 <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>
4416 Non-extlinks in brackets
4425 [{{echo|foo}} ''bar'']
4426 [{{echo|foo}}l's] errand
4427 [{{echo|foo}}l's errand]
4429 [url=http://example.com]
4442 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4447 Percent encoding in external links
4449 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4451 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4454 <p><a rel="mw:ExtLink"
4455 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4459 Use url link syntax for links where the content is equal the link target
4463 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4466 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4470 Parenthesis in external links, especially URL links
4474 http://example.com/test)
4476 http://example.com/(test)
4478 http://example.com/((test)
4480 (http://example.com/(test))
4482 (http://example.com/(test)))))
4484 http://example.com/a)b
4486 [http://example.com) foo]
4488 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4489 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4490 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4491 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4492 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4493 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4494 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4495 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4498 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4499 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4500 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4501 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4502 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4503 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4504 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4505 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4509 Parenthesis in external links, w/ transclusion or comment
4511 (http://example.com/{{echo|hi}})
4513 (http://example.com<!-- hi -->)
4515 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4516 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4519 <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>
4521 <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>
4525 Replace invalid link targets when serializing
4529 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
4531 [[MediaWiki:Badtitletext|Manual]]
4541 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4543 Normal text. '''''Bold italic text.''''' Normal text.
4545 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4546 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4551 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4552 # parser strips. The wikitext contains just the first half of the bold
4555 Unclosed and unmatched quotes
4557 '''''Bold italic text '''with bold deactivated''' in between.'''''
4559 '''''Bold italic text ''with italic deactivated'' in between.'''''
4563 ..spanning two paragraphs (should not work).'''
4565 '''Bold tag left open
4567 ''Italic tag left open
4571 <!-- Unmatching number of opening, closing tags: -->
4572 '''This year''''s election ''should'' beat '''last year''''s.
4574 ''Tom'''s car is bigger than ''Susan'''s.
4576 Plain ''italic'''s plain
4578 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4579 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4580 </p><p><b>Bold text..</b>
4581 </p><p>..spanning two paragraphs (should not work).
4582 </p><p><b>Bold tag left open</b>
4583 </p><p><i>Italic tag left open</i>
4585 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4586 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4587 </p><p>Plain <i>italic'</i>s plain
4590 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4591 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4592 </p><p><b>Bold text..</b>
4593 </p><p>..spanning two paragraphs (should not work).<b></b>
4594 </p><p><b>Bold tag left open</b>
4595 </p><p><i>Italic tag left open</i>
4597 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4598 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4599 </p><p>Plain <i>italic'</i>s plain
4606 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
4609 # This should not produce <table></table> as <table><tr><td></td></tr></table>
4610 # is the bare minimum required by the spec, see:
4611 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
4612 # Parsoid team replies: empty table tags are legal in HTML5
4614 A table with no data.
4627 A table with stray table end tags on start tag line (wt2html)
4631 {|style="color: red;"|}
4633 {|style="color: red;" |}
4637 {|style="color: red;"|} id="foo"
4641 {|style="color: red;" |} id="foo"
4645 <table style="color: red;"></table>
4647 <table style="color: red;">
4653 <table style="color: red;" id="foo">
4659 <table style="color: red;" id="foo">
4668 A table with no data (take 2)
4676 # A table with nothing but a caption is invalid XHTML, we might want to render
4677 # this as <p>caption</p>
4678 # Parsoid team replies: table with only a caption is legal in HTML5
4680 A table with nothing but a caption
4688 </caption><tr><td></td></tr></table>
4691 <table><caption> caption</caption></table>
4695 A table with caption with default-spaced attributes and a table row
4698 |+ style="color: red;" | caption1
4704 <caption style="color: red;"> caption1
4713 A table with captions with non-default spaced attributes and a table row
4716 |+style="color: red;"|caption2
4717 |+ style="color: red;"| caption3
4723 <caption style="color: red;">caption2
4725 <caption style="color: red;"> caption3
4734 Table td-cell syntax variations
4738 | foo bar foo || baz
4739 | style='color:red;' | baz
4740 | style='color:red;' || baz
4747 <td> foo bar foo </td>
4750 <td style="color:red;"> baz
4752 <td> style='color:red;' </td>
4780 Simple table but with multiple dashes for row wikitext
4798 Multiplication table
4800 {| border="1" cellpadding="2"
4801 |+Multiplication table
4803 ! × !! 1 !! 2 !! 3
4821 <table border="1" cellpadding="2">
4822 <caption>Multiplication table
4869 Accept "||" in table headings
4884 Accept "!!" in table data
4890 <table data-parsoid='{}'>
4891 <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>
4896 Accept "||" in indented table headings
4906 </th></tr></table></dd></dl>
4911 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
4928 Accept "| !" at start of line in tables (ignore !-attribute)
4932 | !style="color:red" | bar
4944 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 +/-
4948 |style='color:red;'|+1
4949 |style='color:blue;'|-1
4961 <td style="color:red;">+1
4963 <td style="color:blue;">-1
4987 |rowspan=2| Cell 2, row 1 (and 2)
4998 <td rowspan="2"> Cell 2, row 1 (and 2)
5016 {| bgcolor=#ABCDEF border=2
5021 |the original table again
5029 <table bgcolor="#ABCDEF" border="2">
5037 <td>the original table again
5043 Invalid attributes in table cell (bug 1830)
5057 # The "|}" to close the table is missing from the input, so parsoid's
5058 # *2wt modes will fail.
5060 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5062 parsoid=wt2html,html2html
5065 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5069 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5070 <td>]" onmouseover="alert(document.cookie)">test
5078 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5083 Indented table markup mixed with indented pre content (proposed in bug 6200)
5088 Text that should be rendered preformatted
5096 <pre>Text that should be rendered preformatted
5105 Template-generated table cell attributes and cell content
5114 <td style="color: red"> Foo
5116 <td style="color: red"> Foo
5122 Template-generated table cell attributes and cell content (2)
5125 |align=center {{table_attribs}}
5130 <td align="center" style="color: red"> Foo
5136 Template-generated table cell attributes and cell content (3)
5139 |align=center {{table_cells}}
5144 <td align="center" style="color: red"> Foo </td>
5152 Table with row followed by newlines and table heading
5170 Table with empty line following the start tag
5187 # FIXME: Preserve the attribute properly (with an empty string as value) in
5188 # the PHP parser. Parsoid implements the behavior below.
5190 Table attributes with empty value
5200 </td></tr></tbody></table>
5205 Wikitext table with a lot of comments
5228 Wikitext table with double-line table cell
5245 Table cell with a single comment
5262 Table-cell after a comment-only-empty-line
5271 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5273 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5278 # The expected HTML structure in this test is debatable. The PHP parser does
5279 # not parse this kind of table at all. The main focus for Parsoid is on
5280 # round-tripping, so this output is ok for now. TODO: revisit!
5282 Wikitext table with html-syntax row
5292 <td>foo</td></tr></tbody></table>
5296 Implicit <td> after a |-
5297 (PHP parser relies on Tidy to add the missing <td> tags)
5299 parsoid=wt2html,wt2wt
5312 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
5313 (PHP parser relies on Tidy to add the missing <td> tags)
5315 parsoid=wt2html,wt2wt
5327 <tr><td><pre>a</pre></td></tr>
5328 <tr><td> b</td></tr>
5334 Lists should be recognized in an implicit <td> context
5335 (PHP parser relies on Tidy to add the missing <td> tags)
5337 parsoid=wt2html,wt2wt
5354 Parsoid: Round-trip tables directly followed by content (bug 51219)
5356 parsoid=wt2html,wt2wt
5368 <td>foo</td></tr></tbody></table> bar
5372 <td>baz</td></tr></tbody></table><b>quux</b>
5376 Parsoid: Default to a newline after tables in new content (bug 51219)
5383 <nowiki> </nowiki>bar
5390 <tr><td>foo</td></tr></tbody></table> bar
5392 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5396 Parsoid: newline inducing block nodes don't suppress <nowiki>
5408 Parsoid: Row-syntax table headings followed by comment & table cells
5410 parsoid=wt2html,wt2wt
5414 <!-- foo --> || baz || quux
5419 <tr><th>foo </th><th>bar </th>
5421 <td>quux</td></tr></tbody></table>
5426 Parsoid: Recover better from broken table attributes
5438 <p>foo</p></td></tr>
5443 Strip unsupported table tags
5494 Plain link, capitalized
5498 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5503 Plain link, uncapitalized
5507 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
5514 [[Main Page|The Main Page]]
5516 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5521 Piped link with comment in link text
5523 [[Main Page|The Main<!--front--> Page]]
5525 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5530 Piped link with multiple pipe characters in link text
5532 [[Main Page||The|Main|Page|]]
5534 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
5537 <p><a rel="mw:WikiLink" href="Main_Page">|The|Main|Page|</a></p>
5545 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
5550 Broken link with fragment
5552 [[Zigzagzogzagzig#zug]]
5554 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
5559 Special page link with fragment
5561 [[Special:Version#anchor]]
5563 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
5568 Nonexistent special page link with fragment
5570 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
5572 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
5579 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
5581 <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>
5588 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
5590 <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>!!!
5601 Bug 43661: Piped links with identical prefixes
5603 [[prefixed article|prefixed articles with spaces]]
5605 [[prefixed article|prefixed articlesaoeu]]
5607 [[Main Page|Main Page test]]
5609 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
5610 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
5611 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
5617 Link with HTML entity in suffix / tail
5619 [[Main Page]]", [[Main Page]]a
5621 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
5626 Link with 3 brackets
5635 Link with 4 brackets
5639 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
5644 Piped link with 3 brackets
5646 [[[main page|the main page]]]
5648 <p>[[[main page|the main page]]]
5653 Piped link with extlink-like text
5656 [[Main Page|This is a [bar]]]
5658 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
5659 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
5664 Link with multiple pipes
5666 [[Main Page|The|Main|Page]]
5668 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
5672 # Note that parsoid does not munge anchor text; all non-space
5673 # characters are valid in HTML5 ids.
5675 Anchor containing a #. (bug 63430)
5677 [[Main Page#And#Link]]
5679 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
5682 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link">Main Page#And#Link</a></p>
5688 [[Talk:Parser testing]], [[Meta:Disclaimers]]
5690 <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>
5695 Link with space in namespace
5697 [[User talk:Foo bar]]
5699 <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>
5704 MemoryAlpha:AlphaTest
5706 This is an article in the MemoryAlpha namespace
5707 (which shadows the memoryalpha interwiki link).
5711 Namespace takes precedence over interwiki link (bug 51680)
5713 [[MemoryAlpha:AlphaTest]]
5715 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5719 # The previous test doesn't work correctly in html2*, due to not recognizing the
5720 # link as an internal one. This one checks for the correct behavior.
5722 Link to namespace preferred over interwiki with correct rel attribute
5724 parsoid=html2wt,html2html
5726 [[MemoryAlpha:AlphaTest]]
5728 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5733 Piped link to namespace
5735 [[Meta:Disclaimers|The disclaimers]]
5737 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
5744 [[Usually caused by a typo (oops}]]
5746 <p>[[Usually caused by a typo (oops}]]
5753 Just a test of an article title containing a percent.
5757 Link containing % (not as a hex sequence)
5761 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
5764 <p><a rel="mw:WikiLink" href="./7%25_Solution">7% Solution</a></p>
5767 # note that the parsoid HTML is identical to the previous test output,
5768 # so the previous test ensures that the html2wt mode will generate the
5769 # "not as a hex sequence" wikitext.
5771 Link containing % as a single hex sequence interpreted to char
5773 parsoid=wt2wt,wt2html,html2html
5777 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
5780 <p><a rel="mw:WikiLink" href="./7%25_Solution">7% Solution</a></p>
5784 Link containing % as a double hex sequence interpreted to hex sequence
5788 <p>[[7%2525 Solution]]
5792 # note that parsoid does not munge anchor text; all non-space
5793 # characters are valid in HTML5 anchors.
5795 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
5796 Example for such a section: == < ==
5798 [[%23%3c]][[%23%3e]]
5800 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
5803 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E">#></a></p>
5807 Link containing "<#" and ">#" as a hex sequences
5809 [[%3c%23]][[%3e%23]]
5811 <p>[[%3c%23]][[%3e%23]]
5816 Link containing an equals sign
5818 [[Special:BookSources/isbn=4-00-026157-6]]
5820 <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>
5823 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
5829 Just a test of an article title containing a tilde.
5832 # note that links containing signatures, like [[Foo~~~~]], are
5833 # massaged by the pre-save transform (PST) and so the tildes are never
5834 # seen by the parser.
5836 Link containing a tilde
5840 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
5843 <p><a rel="mw:WikiLink" href="./Foo~bar">Foo~bar</a></p>
5847 Link containing double-single-quotes '' (bug 4598)
5849 [[Lista d''e paise d''o munno]]
5851 <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>
5854 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno">Lista d''e paise d''o munno</a></p>
5858 Link containing double-single-quotes '' in text (bug 4598 sanity check)
5860 Some [[Link|pretty ''italics'' and stuff]]!
5862 <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>!
5865 <p>Some <a rel="mw:WikiLink" href="Link">pretty <i>italics</i> and stuff</a>!</p>
5869 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
5871 ''Some [[Link|pretty ''italics'' and stuff]]!''
5873 <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>
5878 Link with double quotes in title part (literal) and alternate part (interpreted)
5880 [[File:Denys Savchenko ''Pentecoste''.jpg]]
5884 [[''Pentecoste''|Pentecoste]]
5886 [[''Pentecoste''|''Pentecoste'']]
5888 <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>
5889 </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>
5890 </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>
5891 </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>
5894 <meta typeof="mw:Placeholder"/>
5895 <p><a rel="mw:WikiLink" href="''Pentecoste''">''Pentecoste''</a></p>
5896 <p><a rel="mw:WikiLink" href="''Pentecoste''">Pentecoste</a></p>
5897 <p><a rel="mw:WikiLink" href="''Pentecoste''"><i>Pentecoste</i></a></p>
5901 Broken image links with HTML captions (bug 39700)
5903 [[File:Nonexistent|<script></script>]]
5904 [[File:Nonexistent|100px|<script></script>]]
5905 [[File:Nonexistent|<]]
5906 [[File:Nonexistent|a<i>b</i>c]]
5908 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5909 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5910 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
5911 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
5918 [[http://www.example.com]]
5920 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
5923 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
5927 Plain link to URL with link text
5929 [[http://www.example.com Link text]]
5931 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
5936 Plain link to protocol-relative URL
5938 [[//www.example.com]]
5940 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
5943 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
5947 Plain link to protocol-relative URL with link text
5949 [[//www.example.com Link text]]
5951 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
5956 Plain link to page with question mark in title
5962 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
5963 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
5968 # I'm fairly sure the expected result here is wrong.
5969 # We want these to be URL links, not pseudo-pages with URLs for titles....
5970 # However the current output is also pretty screwy.
5973 # I'm changing it to match the current output--it arguably makes more
5974 # sense in the light of the test above. Old expected result was:
5975 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
5977 # But I think this test is bordering on "garbage in, garbage out" anyway.
5982 Piped link to URL: [[http://www.example.com|an example URL]]
5984 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
5987 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
5991 BUG 2: [[page|http://url/]] should link to page, not http://url/
5993 [[Main Page|http://url/]]
5995 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
5998 <p><a rel="mw:WikiLink" href="./Main_Page">http://url/</a></p>
6001 # Parsoid does not mark self-links, by design.
6003 BUG 337: Escaped self-links should be bold
6007 [[Bug462]] [[Bug462]]
6009 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6012 <p><a rel="mw:WikiLink" href="./Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462">Bug462</a></p>
6016 Self-link to section should not be bold
6020 [[Main Page#section]]
6022 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6033 Self-link to numeric title
6039 <p><strong class="selflink">0</strong>
6044 Link to numeric-equivalent title
6050 <p><a href="/wiki/00" title="00">00</a>
6055 <nowiki> inside a link
6057 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6059 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6064 Non-breaking spaces in title
6066 [[ Main Page ]]
6068 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6073 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6079 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6084 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6090 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6095 Internal link with en linktrail: no apostrophes (bug 27473)
6101 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6106 Internal link with ca linktrail with apostrophes (bug 27473)
6112 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6117 Internal link with kaa linktrail with apostrophes (bug 27473)
6123 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6128 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6130 [[User:Foo/Test/63636:Bar|Test]]
6132 <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>
6135 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar">Test</a></p>
6139 1. Interaction of linktrail and template encapsulation
6145 <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>
6149 2. Interaction of linktrail and template encapsulation
6153 {{echo|Some [[Fool]]}}s
6155 <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>
6159 3. Interaction of linktrail and template encapsulation
6163 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6165 <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>
6175 Internal link with is link prefix
6179 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6181 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6192 Internal link with is link trail and link prefix
6196 [[mótmælendatrú|xxx]]ar
6198 mótmælenda[[söfnuður]]
6199 mótmælenda[[söfnuður|söfnuðir]]
6200 mótmælenda[[söfnuður|söfnuðir]]xxx
6202 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6203 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6204 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6205 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6206 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6211 Parsoid link trail escaping
6213 parsoid=html2wt,html2html
6217 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
6221 Parsoid link prefix escaping
6224 parsoid=html2wt,html2html
6226 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6228 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
6232 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6240 [http://wp.org ''foo'']
6242 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
6243 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
6244 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6245 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6250 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6254 [[Foo|{{echo|a}} b {{echo|c}}]]
6256 <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>
6260 Link with angle bracket after anchor
6264 <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>
6268 ### Interwiki links (see maintenance/interwiki.sql)
6272 Inline interwiki link
6274 [[MeatBall:SoftSecurity]]
6276 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6281 Inline interwiki link with empty title (bug 2372)
6285 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6290 Interwiki link encoding conversion (bug 1636)
6292 *[[Wikipedia:ro:Olteniţa]]
6293 *[[Wikipedia:ro:Olteniţa]]
6295 <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>
6296 <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>
6301 Interwiki link with fragment (bug 2130)
6303 [[MeatBall:SoftSecurity#foo]]
6305 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6309 # Ideally the wikipedia: prefix here should be proto-relative too
6311 Different interwiki prefixes mapping to the same URL
6319 [[:wikipedia:Foo|Foo]]
6321 [[wikipedia:en:Foo]]
6323 [[:wikipedia:en:Foo]]
6325 <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>
6327 <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>
6329 <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>
6331 <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>
6333 <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>
6335 <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>
6339 Interwiki links that cannot be represented in wiki syntax
6342 [[meatball:ok#foo|ok with fragment]]
6343 [[meatball:ok_as_well?|ok ending with ? mark]]
6344 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6345 [http://de.wikipedia.org/wiki/#foo is just fragment]
6348 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok">meatball:ok</a>
6349 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo">ok with fragment</a>
6350 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?">ok ending with ? mark</a>
6351 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6352 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6356 Interwiki links: trail
6360 [[wikipedia:Foo|Ba]]r
6362 <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>
6366 ### Interlanguage links
6367 ### Language links (so that searching for '### language' matches..)
6381 Double interlanguage link
6392 Interlanguage link, with prefix links
6404 Double interlanguage link, with prefix links (bug 8897)
6417 "Extra" interlanguage links (bug 32189 / gerrit 111390)
6420 [[mul:Multilingual]]
6427 Parsoid-specific test: Wikilinks with should RT properly
6433 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
6438 Parsoid bug 53221: Wikilinks should be properly entity-escaped
6442 He&nbsp;llo [[Foo|He&nbsp;llo]]
6444 He&nbsp;llo [[He&nbsp;llo]]
6446 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6447 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6451 Parsoid: handle constructor well
6459 <p><a rel="mw:WikiLink" href="./Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
6461 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
6465 Parsoid: recognize interlanguage links without a target page
6471 <p><link rel="mw:PageProp/Language" href="http://ko.wikipedia.org/wiki/"></p>
6475 Parsoid: recognize interwiki links without a target page
6481 <p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/">ko:</a></p>
6485 Parsoid: Bug #45209, handle interwiki links pointing to the current wiki as plain wiki links
6491 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"en:Foo"}}'>Foo</a></p>
6495 ### Redirects, Parsoid-only
6498 1. Simple redirect to page
6502 #REDIRECT [[Main Page]]
6504 <link rel="mw:PageProp/redirect" href="./Main_Page">
6507 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
6509 2. Other redirect variants
6511 parsoid=wt2html,wt2wt
6513 #REDIRECT [[Main_Page]]
6514 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
6516 <link rel="mw:PageProp/redirect" href="./Main_Page">
6517 <link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
6523 parsoid=wt2html,wt2wt
6528 <li>REDIRECT [[]]</li></ol>
6532 Optional colon in #REDIRECT
6534 # the colon is archaic syntax. we support it for wt2html, but we
6535 # don't care that it roundtrips back to the modern syntax.
6536 parsoid=wt2html,html2html
6538 #REDIRECT:[[Main Page]]
6540 <link rel="mw:PageProp/redirect" href="./Main_Page">
6544 Whitespace in #REDIRECT with optional colon
6546 # the colon and gratuitous whitespace is archaic syntax. we support
6547 # it for wt2html, but we don't care that it roundtrips back to the
6548 # modern syntax (without extra whitespace)
6549 parsoid=wt2html,html2html
6556 <link rel="mw:PageProp/redirect" href="./Main_Page">
6560 Piped link in #REDIRECT
6562 # content after piped link is ignored. we support this syntax,
6563 # but don't care that the piped link is lost when we roundtrip this.
6566 #REDIRECT [[Main Page|bar]]
6568 <link rel="mw:PageProp/redirect" href="./Main_Page">
6572 Redirect to category
6576 #REDIRECT [[Category:Foo]]
6578 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6582 Redirect to category with URL encoding
6586 #REDIRECT [[Category%3AFoo]]
6588 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6592 Redirect to category page
6594 parsoid=wt2html,html2html
6596 #REDIRECT [[:Category:Foo]]
6598 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
6602 Redirect to image page (1)
6606 #REDIRECT [[File:Wiki.png]]
6608 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6612 Redirect to image page (2)
6616 #REDIRECT [[Image:Wiki.png]]
6618 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6622 Redirect to language
6626 #REDIRECT [[en:File:Wiki.png]]
6628 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6632 Redirect to interwiki
6636 #REDIRECT [[meatball:File:Wiki.png]]
6638 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6642 Non-English #REDIRECT
6647 #TILVÍSUN [[Main Page]]
6649 <link rel="mw:PageProp/redirect" href="./Main_Page">
6660 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
6677 Broken br tag sanitization
6685 # TODO: Fix html2html mode (bug 51055)!
6687 Parsoid: Broken br tag recognition
6700 Incorrecly removing closing slashes from correctly formed XHTML
6702 <br style="clear:both;" />
6704 <p><br style="clear:both;" />
6709 Failing to transform badly formed HTML into correct XHTML
6711 <br style="clear: left;">
6712 <br style="clear: right;">
6713 <br style="clear: both;">
6715 <p><br style="clear: left;" />
6716 <br style="clear: right;" />
6717 <br style="clear: both;" />
6722 Handling html with a div self-closing tag
6731 <p><div title />
6735 <p><div title=bar />
6736 <div title=bar/>
6738 <div title="bar/"></div>
6744 Handling html with a br self-closing tag
6753 <p><br title="title" />
6754 <br title="title" />
6763 Horizontal ruler (should it add that extra space?)
6777 Horizontal ruler -- 4+ dashes render hr
6786 Horizontal ruler -- eats additional dashes on the same line
6795 Horizontal ruler -- does not collapse dashes on consecutive lines
6806 Horizontal ruler -- <4 dashes render as plain text
6815 Horizontal ruler -- Supports content following dashes on same line
6824 ### Block-level elements
6833 <ul><li>Common list</li>
6835 <li>item 3</li></ul>
6846 <ol><li>Numbered list</li>
6848 <li> item 3</li></ol>
6862 ***#Number on level 4
6864 **#Number on level 3
6865 **#Number on level 3
6869 #** Level 3, but ordered
6872 <ol><li> with numbers</li></ol>
6873 <ul><li> and bullets</li></ul>
6874 <ol><li> and numbers</li></ol></li>
6876 <ul><li>bullet level 2
6877 <ul><li>bullet level 3
6878 <ol><li>Number on level 4</li></ol></li></ul></li>
6880 <ol><li>Number on level 3</li>
6881 <li>Number on level 3</li></ol></li></ul>
6882 <ol><li>number level 2</li></ol></li>
6884 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
6885 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
6896 <ul><li>bar</li></ul></li></ul>
6906 <ul><li><ul><li>foo</li></ul></li>
6912 Nested lists 3 (first element empty)
6918 <ul><li>bar</li></ul></li></ul>
6923 Nested lists 4 (first element empty)
6928 <ul><li><ul><li></li></ul></li>
6934 Nested lists 5 (both elements empty)
6939 <ul><li><ul><li></li></ul></li>
6945 Nested lists 6 (both elements empty)
6951 <ul><li></li></ul></li></ul>
6956 Nested lists 7 (skip initial nesting levels)
6960 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
6965 Nested lists 8 (multiple nesting transitions)
6973 <ul><li><ul><li> bar</li></ul></li>
6974 <li> baz</li></ul></li>
6980 1. Lists with start-of-line-transparent tokens before bullets: Comments
6993 2. Lists with start-of-line-transparent tokens before bullets: Template close
6998 <ul><li>foo bar</li>
7004 List items are not parsed correctly following a <pre> block (bug 785)
7010 <ul><li> <pre>foo</pre></li>
7011 <li> <pre>bar</pre></li>
7017 List items from template
7028 * notSOL{{inner list}}
7031 <ul><li> item 1</li>
7032 <li> item 2</li></ul>
7033 <ul><li> item 0</li>
7035 <li> item 2</li></ul>
7036 <ul><li> item 0</li>
7039 <li> item 2</li></ul>
7044 List interrupted by empty line or heading
7052 <ul><li> foo</li></ul>
7053 <ul><li><ul><li> bar</li></ul></li></ul>
7054 <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>
7055 <ul><li> Another list item</li></ul>
7060 Multiple list tags generated by templates
7075 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7078 <!--This line will NOT split the list-->
7080 <!--This line will NOT split the list either-->
7082 <!--foo--> <!----> <!--This line NOT split the list either-->
7093 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7096 <!--This line will NOT split the list-->
7098 <!--This line will NOT split the list either-->
7100 <!--foo--> <!----> <!--This line NOT split the list
7113 (Cannot test this with PHP parser since it relies on Tidy for the hack)
7115 parsoid=wt2html,wt2wt
7119 * {{echo|<li>templated li-hack}}
7120 * <!--foo--> <li> unsupported li-hack with preceding comments
7123 <li><li>not a li-hack
7130 <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>
7131 <li> <!--foo--> </li>
7132 <li> li-hack with preceding comments</li>
7143 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7170 Parsoid: Test of whitespace serialization with Templated bullets
7177 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7181 # ------------------------------------------------------------------------
7182 # The next set of tests are about Parsoid's ability to handle badly nested
7183 # tags (parse, minimize scope of fixup, and roundtrip back)
7184 # ------------------------------------------------------------------------
7187 Unbalanced closing block tags break a list
7188 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7206 Unbalanced closing non-block tags don't break a list
7207 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7224 Unclosed formatting tags that straddle lists are closed and reopened
7225 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7239 List embedded in a non-block tag
7240 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
7246 <p><small></small></p>
7252 <p><small></small></p>
7256 Table with missing opening <tr> tag
7258 parsoid=wt2html,wt2wt
7276 # Note that the current date is hard-coded as
7277 # 1970-01-01T00:02:03Z (a Thursday)
7278 # when running parser tests. The timezone is also fixed to GMT, so
7279 # local date will be identical to current date.
7282 Magic Word: {{CURRENTDAY}}
7291 Magic Word: {{CURRENTDAY2}}
7300 Magic Word: {{CURRENTDAYNAME}}
7309 Magic Word: {{CURRENTDOW}}
7318 Magic Word: {{CURRENTMONTH}}
7327 Magic Word: {{CURRENTMONTH1}}
7336 Magic Word: {{CURRENTMONTHABBREV}}
7338 {{CURRENTMONTHABBREV}}
7345 Magic Word: {{CURRENTMONTHNAME}}
7347 {{CURRENTMONTHNAME}}
7354 Magic Word: {{CURRENTMONTHNAMEGEN}}
7356 {{CURRENTMONTHNAMEGEN}}
7363 Magic Word: {{CURRENTTIME}}
7372 Magic Word: {{CURRENTHOUR}}
7381 Magic Word: {{CURRENTWEEK}} (@bug 4594)
7390 Magic Word: {{CURRENTYEAR}}
7399 Magic Word: {{CURRENTTIMESTAMP}}
7401 {{CURRENTTIMESTAMP}}
7408 Magic Words LOCAL (UTC)
7412 * {{LOCALMONTHNAME}}
7413 * {{LOCALMONTHNAMEGEN}}
7414 * {{LOCALMONTHABBREV}}
7423 * {{LOCALTIMESTAMP}}
7438 <li> 19700101000203</li></ul>
7443 Magic Word: {{FULLPAGENAME}}
7445 title=[[User:Ævar Arnfjörð Bjarmason]]
7449 <p>User:Ævar Arnfjörð Bjarmason
7454 Magic Word: {{FULLPAGENAMEE}}
7456 title=[[User:Ævar Arnfjörð Bjarmason]]
7460 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7465 Magic Word: {{TALKSPACE}}
7467 title=[[User:Ævar Arnfjörð Bjarmason]]
7476 Magic Word: {{TALKSPACE}}, same namespace
7478 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7487 Magic Word: {{TALKSPACE}}, main namespace
7489 title=[[Parser Test]]
7498 Magic Word: {{TALKSPACEE}}
7500 title=[[User:Ævar Arnfjörð Bjarmason]]
7509 Magic Word: {{SUBJECTSPACE}}
7511 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7520 Magic Word: {{SUBJECTSPACE}}, same namespace
7522 title=[[User:Ævar Arnfjörð Bjarmason]]
7531 Magic Word: {{SUBJECTSPACE}}, main namespace
7533 title=[[Parser Test]]
7541 Magic Word: {{SUBJECTSPACEE}}
7543 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7552 Magic Word: {{NAMESPACE}}
7554 title=[[User:Ævar Arnfjörð Bjarmason]]
7563 Magic Word: {{NAMESPACEE}}
7565 title=[[User:Ævar Arnfjörð Bjarmason]]
7574 Magic Word: {{NAMESPACENUMBER}}
7576 title=[[User:Ævar Arnfjörð Bjarmason]]
7585 Magic Word: {{SUBPAGENAME}}
7587 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7596 Magic Word: {{SUBPAGENAMEE}}
7598 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7607 Magic Word: {{ROOTPAGENAME}}
7609 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7613 <p>Ævar Arnfjörð Bjarmason
7618 Magic Word: {{ROOTPAGENAMEE}}
7620 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7624 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7629 Magic Word: {{BASEPAGENAME}}
7631 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7635 <p>Ævar Arnfjörð Bjarmason
7640 Magic Word: {{BASEPAGENAMEE}}
7642 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7646 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7651 Magic Word: {{TALKPAGENAME}}
7653 title=[[User:Ævar Arnfjörð Bjarmason]]
7657 <p>User talk:Ævar Arnfjörð Bjarmason
7662 Magic Word: {{TALKPAGENAMEE}}
7664 title=[[User:Ævar Arnfjörð Bjarmason]]
7668 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7673 Magic Word: {{SUBJECTPAGENAME}}
7675 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7679 <p>User:Ævar Arnfjörð Bjarmason
7684 Magic Word: {{SUBJECTPAGENAMEE}}
7686 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7688 {{SUBJECTPAGENAMEE}}
7690 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7695 Magic Word: {{NUMBEROFFILES}}
7704 Magic Word: {{PAGENAME}}
7706 title=[[User:Ævar Arnfjörð Bjarmason]]
7710 <p>Ævar Arnfjörð Bjarmason
7715 Magic Word: {{PAGENAME}} with metacharacters
7717 title=[['foo & bar = baz']]
7721 <p><i>'foo & bar = baz'</i>
7726 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
7728 title=[[*RFC 1234 http://example.com/]]
7732 <p>*RFC 1234 http://example.com/
7737 Magic Word: {{PAGENAMEE}}
7739 title=[[User:Ævar Arnfjörð Bjarmason]]
7743 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7748 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
7750 title=[[*RFC 1234 http://example.com/]]
7754 <p>*RFC_1234_http://example.com/
7759 Magic Word: {{REVISIONID}}
7768 Magic Word: {{SCRIPTPATH}}
7777 Magic Word: {{STYLEPATH}}
7786 Magic Word: {{SERVER}}
7790 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7795 Magic Word: {{SERVERNAME}}
7804 Magic Word: {{SITENAME}}
7813 Case-sensitive magic words, when cased differently, should just be template transclusions
7820 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
7821 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
7822 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
7823 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
7828 Case-insensitive magic words should still work with weird casing.
7838 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7843 Namespace 1 {{ns:1}}
7852 Namespace 1 {{ns:01}}
7861 Namespace 0 {{ns:0}} (bug 4783)
7869 Namespace 0 {{ns:00}} (bug 4783)
7877 Namespace -1 {{ns:-1}}
7886 Namespace User {{ns:User}}
7895 Namespace User talk {{ns:User_talk}}
7904 Namespace User talk {{ns:uSeR tAlK}}
7913 Namespace File {{ns:File}}
7922 Namespace File {{ns:Image}}
7931 Namespace (lang=de) Benutzer {{ns:User}}
7942 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
7948 <p>Benutzer Diskussion
7956 {{urlencode:hi world?!}}
7957 {{urlencode:hi world?!|WIKI}}
7958 {{urlencode:hi world?!|PATH}}
7959 {{urlencode:hi world?!|QUERY}}
7969 Magic Word: prioritize type info over data-parsoid
7975 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
7979 Magic Word: serialize on separate line (parsoid)
7981 parsoid=wt2wt,html2wt
7987 foo<meta property="mw:PageProp/notoc"/>bar
7991 Magic Word: rt non-english wikis
7998 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8005 Magic links: internal link to RFC (bug 479)
8009 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8014 Magic links: RFC (bug 479)
8018 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8023 Magic links: ISBN (bug 1937)
8027 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8032 Magic links: PMID incorrectly converts space to underscore
8036 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8045 Nonexistent template
8047 {{thistemplatedoesnotexist}}
8049 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8054 Template with invalid target containing tags
8056 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8058 <p>{{a<b>b</b>|foo|a=b|a = b}}
8063 Template with invalid target containing unclosed tag
8065 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8067 <p>{{a<b>|foo|a=b|a = b}}</b>
8072 Template with invalid target containing wikilink
8076 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8079 <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>
8085 This is a test template
8093 <p>This is a test template
8098 Template with explicit namespace
8102 <p>This is a test template
8110 This is a test template with parameter {{{param}}}
8116 {{paramtest|param=foo}}
8118 <p>This is a test template with parameter foo
8123 Template:paramtestnum
8129 Template unnamed parameter
8131 {{paramtestnum|Main Page|the main page}}
8133 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8138 Template:templatesimple
8144 Template:templateredirect
8146 #redirect [[Template:templatesimple]]
8150 Template:templateasargtestnum
8156 Template:templateasargtest
8158 {{template{{{templ}}}}}
8162 Template:templateasargtest2
8168 Template with template name as unnamed argument
8170 {{templateasargtestnum|templatesimple}}
8177 Template with template name as argument
8179 {{templateasargtest|templ=simple}}
8186 Template with template name as argument (2)
8188 {{templateasargtest2|templ=templatesimple}}
8195 Template:templateasargtestdefault
8197 {{{{{templ|templatesimple}}}}}
8207 Template with default value
8209 {{templateasargtestdefault}}
8216 Template with default value (value set)
8218 {{templateasargtestdefault|templ=templa}}
8227 {{templateredirect}}
8234 Template with argument in separate line
8236 {{ templateasargtest |
8244 Template with complex template as argument
8247 param ={{ templateasargtest |
8250 <p>This is a test template with parameter (test)
8255 Template with thumb image (with link in description)
8258 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
8260 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>
8265 Template:complextemplate
8267 {{{1}}} {{paramtest|
8268 param ={{{param}}}}}
8272 Template with complex arguments
8275 param ={{ templateasargtest |
8276 templ = simple }}|[[Template:complextemplate|link]]}}
8278 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
8283 BUG 553: link with two variables in a piped link
8286 |[[{{{1}}}|{{{2}}}]]
8291 <td>[[{{{1}}}|{{{2}}}]]
8297 Magic variable as template parameter
8299 {{paramtest|param={{SITENAME}}}}
8301 <p>This is a test template with parameter MediaWiki
8308 [[{{{param}}}|link]]
8312 Template parameter as link source
8314 {{linktest|param=Main Page}}
8316 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
8321 Template-generated attribute string (k='v')
8323 <span {{attr_str|id|v1}}>bar</span>
8325 <p><span id="v1">bar</span>
8332 including another template, {{paramtest|param={{{arg}}}}}
8336 Template passing argument to another template
8338 {{paramtest2|arg='hmm'}}
8340 <p>including another template, This is a test template with parameter 'hmm'
8351 Template as link source
8355 [[{{linktest2}}|Main Page]]
8357 [[{{linktest2}}]]Page
8359 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8360 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8361 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
8379 Template infinite loop
8383 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
8388 Template from main namespace
8407 BUG 529: Template with table, not included at beginning of line
8426 BUG 523: Template shouldn't eat newline (or add an extra one before table)
8446 BUG 41: Template parameters shown as broken links
8455 Template with targets containing wikilinks
8459 {{[[{{echo|foo}}]]}}
8461 {{{{echo|[[foo}}]]}}
8463 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8464 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8472 ''None'' of '''this''' should be
8474 but rather passed unmodified
8481 # hmm, fix this or just deprecate msgnw and document its behavior?
8485 {{msgnw:MSGNW test}}
8487 <p>''None'' of '''this''' should be
8489  but rather passed unmodified
8490 {{test}}
8500 {{int:youhavenewmessages|lots of money|not!}}
8502 <p>You have lots of money (not!).
8509 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8513 <includeonly> and <noinclude> being included
8524 <onlyinclude>Foo</onlyinclude>bar
8528 <onlyinclude> being included
8540 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
8544 <onlyinclude> and <includeonly> being included
8553 <includeonly> and <noinclude> on a page
8555 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8562 Un-closed <noinclude>
8569 <onlyinclude> on a page
8571 <onlyinclude>Foo</onlyinclude>bar
8578 Un-closed <onlyinclude>
8585 Self-closed noinclude, includeonly, onlyinclude tags
8596 Unbalanced includeonly and noinclude tags
8600 |b</noinclude></noinclude>
8601 |c</noinclude></includeonly>
8602 |d</includeonly></includeonly>
8611 <td>c</includeonly>
8613 <td>d</includeonly></includeonly>
8619 Template:Includeonly section
8622 ==Includeonly section==
8628 Bug 6563: Edit link generation for section shown by <includeonly>
8630 {{includeonly section}}
8632 <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>
8633 <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>
8637 # Uses same input as the contents of [[Template:Includeonly section]]
8639 Bug 6563: Section extraction for section shown by <includeonly>
8644 ==Includeonly section==
8652 Bug 6563: Edit link generation for section suppressed by <includeonly>
8655 ==Includeonly section==
8659 <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>
8664 Bug 6563: Section extraction for section suppressed by <includeonly>
8669 ==Includeonly section==
8677 Un-closed <includeonly>
8683 # TODO: test with DOM fragment reuse!
8685 Parsoid: DOM fragment reuse
8687 parsoid=wt2wt,wt2html
8689 a{{echo|b<table></table>c}}d
8701 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
8702 <table></table>c"}},"i":0}}]}'>b</span>
8703 <table about="#mwt1"></table><span about="#mwt1">c</span>d
8706 <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">
8708 <table about="#mwt2"></table><span about="#mwt2">
8710 <p about="#mwt2">cd</p>
8713 <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">
8716 <table about="#mwt3"></table><span about="#mwt3">
8719 <p about="#mwt3">b</p>
8723 Parsoid: Merge double tds (bug 50603)
8732 <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>
8737 Parsoid: Merge double tds in nested transclusion content (bug 50603)
8747 <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}}]}'>
8749 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
8755 ### <includeonly> and <noinclude> in attributes
8758 0. includeonly around the entire attribute
8760 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
8762 <p><span id="v2">bar</span>
8767 1. includeonly in html attr key
8769 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
8771 <p><span id="foo">bar</span>
8776 2. includeonly in html attr value
8778 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
8779 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
8781 <p><span id="v1">bar</span>
8782 <span id="v1">bar</span>
8787 3. includeonly in part of an attr value
8789 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
8791 <p><span style="color:red;">bar</span>
8796 4. includeonly in table attributes
8820 ### Token Stream Patcher tests
8822 ### These tests won't always pass wt2wt and other modes because
8823 ### on serialization, the table will be output on a new line.
8824 ### For now, we are blacklisting them, and using this to test selser.
8828 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
8830 parsoid=wt2html,wt2wt
8832 {{echo|}}{| width = '100%'
8836 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
8837 <table width="100%">
8840 <td>foo</td></tr></tbody></table>
8844 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
8846 parsoid=wt2html,wt2wt
8848 <includeonly>a</includeonly>{| {{{b}}}
8852 <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|}"}'>
8853 <tbody><tr><td>c</td></tr>
8858 ### Testing parsing of templates where a template arg
8859 ### has the same name as the template itself.
8869 Templates: Template Name/Arg clash: 1. Use of positional param
8878 Templates: Template Name/Arg clash: 2. Use of named param
8887 Templates: Template Name/Arg clash: 3. Use of named param with empty input
8896 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
8900 Templates: 1. Simple use
8909 Templates: 2. Inside a block tag
8911 <div>{{echo|Foo}}</div>
8912 <blockquote>{{echo|Foo}}</blockquote>
8915 <blockquote>Foo</blockquote>
8920 Templates: P-wrapping: 1a. Templates on consecutive lines
8931 Templates: P-wrapping: 1b. Templates on consecutive lines
8945 Templates: P-wrapping: 1c. Templates on consecutive lines
8948 {{echo|bar}} <div>baz</div>
8957 Templates: P-wrapping: 1d. Template preceded by comment-only line
8966 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
8970 Templates: Inline Text: 1. Multiple template uses
8972 {{echo|Foo}}bar{{echo|baz}}
8979 Templates: Inline Text: 2. Back-to-back template uses
8981 {{echo|Foo}}{{echo|bar}}
8988 Templates: Block Tags: 1. Multiple template uses
8990 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
8992 <div>Foo</div><div>bar</div><div>baz</div>
8997 Templates: Block Tags: 2. Back-to-back template uses
8999 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
9001 <div>Foo</div><div>bar</div>
9006 Templates: Links: 1. Simple example
9008 {{echo|[[Foo|bar]]}}
9010 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9015 Templates: Links: 2. Generation of link href
9017 [[{{echo|Foo}}|bar]]
9019 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9024 Templates: Links: 3. Generation of part of a link href
9026 [[Fo{{echo|o}}|bar]]
9030 [[Foo{{echo|bar}}baz]]
9032 [[Foo{{echo|bar}}|bar]]
9034 [[:Foo{{echo|bar}}]]
9036 [[:Foo{{echo|bar}}|bar]]
9038 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9039 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9040 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9041 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9042 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9043 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9048 Templates: Links: 4. Multiple templates generating link href
9050 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9052 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9057 Templates: Links: 5. Generation of link text
9059 [[Foo|{{echo|bar}}]]
9061 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9066 Templates: Links: 5. Nested templates (only outermost template should be marked)
9068 {{echo|[[{{echo|Foo}}|bar]]}}
9070 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9075 Templates: HTML Tag: 1. Generation of HTML attr. key
9077 <div {{echo|style}}="color:red;">foo</div>
9079 <div style="color:red;">foo</div>
9084 Templates: HTML Tag: 2. Generation of HTML attr. value
9086 <div style={{echo|'color:red;'}}>foo</div>
9088 <div style="color:red;">foo</div>
9093 Templates: HTML Tag: 3. Generation of HTML attr key and value
9095 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9097 <div style="color:red;">foo</div>
9102 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9104 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9106 <div title="This is a long title with just one piece templated">foo</div>
9111 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9113 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9115 <div title="This is a long title with just one piece templated">foo</div>
9120 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9122 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9124 <div title="This is a long title with just one piece templated">foo</div>
9129 Templates: HTML Tag: 7. Generation of partial attribute key string
9131 <div st{{echo|yle}}="color:red;">foo</div>
9133 <div style="color:red;">foo</div>
9138 Templates: HTML Tables: 1. Generating start of a HTML table
9140 {{echo|<table><tr><td>foo</td>}}</tr></table>
9142 <table><tr><td>foo</td></tr></table>
9147 Templates: HTML Tables: 2a. Generating middle of a HTML table
9149 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9151 <table><tr><td>foo</td></tr></table>
9156 Templates: HTML Tables: 2b. Generating middle of a HTML table
9158 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9160 <table><tr><td>foo</td></tr></table>
9165 Templates: HTML Tables: 3. Generating end of a HTML table
9167 <table><tr>{{echo|<td>foo</td></tr></table>}}
9169 <table><tr><td>foo</td></tr></table>
9174 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9176 {{echo|<table>}}<tr><td>foo</td></tr></table>
9178 <table><tr><td>foo</td></tr></table>
9183 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9185 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9187 <table><tr><td>foo</td></tr></table>
9192 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9194 <table><tr>{{echo|<td>}}foo</td></tr></table>
9196 <table><tr><td>foo</td></tr></table>
9201 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9203 <table><tr><td>foo{{echo|</td>}}</tr></table>
9205 <table><tr><td>foo</td></tr></table>
9210 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9212 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9214 <table><tr><td>foo</td></tr></table>
9219 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
9221 <table><tr><td>foo</td></tr>{{echo|</table>}}
9223 <table><tr><td>foo</td></tr></table>
9228 Templates: HTML Tables: 5. Proper fostering of categories from inside
9230 parsoid=wt2html,wt2wt
9232 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
9233 <!--Two categories (Bug 50330)-->
9234 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
9236 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
9237 <!--Two categories (Bug 50330)-->
9238 <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>
9242 Templates: Wiki Tables: 1a. Fostering of entire template content
9250 <tr><td></td></tr></table>
9255 Templates: Wiki Tables: 1b. Fostering of entire template content
9268 <tr><td></td></tr></table>
9273 Templates: Wiki Tables: 2. Fostering of partial template content
9283 <tr><td></td></tr></table>
9288 Templates: Wiki Tables: 3. td-content via multiple templates
9291 {{echo|{{pipe}}a}}{{echo|b}}
9302 Templates: Wiki Tables: 4. Templated tags, no content
9308 <tr><td></td></tr></table>
9313 Templates: Wiki Tables: 5. Templated tags, regular td-tags
9327 Templates: Wiki Tables: 6. Templated tags, templated td-tags
9341 Templates: Lists: Multi-line list-items via templates
9343 *{{echo|a {{nonexistent|
9345 *{{echo|b {{nonexistent|
9348 <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>
9349 <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>
9354 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
9356 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
9358 <p><i>ab</i>c<i>d</i>e
9363 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
9364 (PHP parser generates misnested html)
9366 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
9368 <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>
9372 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
9373 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
9375 parsoid=wt2html,wt2wt
9377 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
9379 <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>
9380 <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>
9381 <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>
9385 Templates: Ugly nesting: 4. Divs opened/closed across templates
9387 a<div>b{{echo|c</div>d}}e
9394 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
9400 |{{echo|foo</table>}}
9404 <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|}"]}'>
9408 <td>foo</td></tr></tbody></table><span about="#mwt1">
9409 </span><span about="#mwt1">|bar</span><span about="#mwt1">
9414 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
9424 <td>1. {{echo|foo </table>}}</td>
9426 <td>2. {{echo|baz </table>}}</td>
9439 <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>"]}'>
9444 <td>1. foo </td></tr></tbody></table></td>
9446 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
9447 </span><span about="#mwt2">
9448 </span><span about="#mwt2">
9449 </span><span about="#mwt2">abc</span><span about="#mwt2">
9450 </span><span about="#mwt2">
9451 </span><span about="#mwt2">
9452 </span><span about="#mwt2">
9453 </span><span about="#mwt2">
9454 </span><span about="#mwt2">
9455 </span><span about="#mwt2">xyz</span><span about="#mwt2">
9456 </span><span about="#mwt2">
9461 Templates: Ugly templates: 3. newline-only template parameter
9470 # This looks like a bug: a single newline triggers p/br for some reason.
9472 Templates: Ugly templates: 4. newline-only template parameter inconsistency
9481 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
9482 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
9484 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
9490 <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
9491 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9495 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
9496 # that are "identical" and generate nesting cycles in the algorithm
9498 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
9500 {{echo|<table><tr><td><table>}}
9504 <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"}'>
9505 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9506 </table></td></tr></tbody></table>
9510 Parser Functions: 1. Simple example
9519 Parser Functions: 2. Nested use (only outermost should be marked up)
9528 ### Pre-save transform tests
9531 pre-save transform: subst:
9537 This is a test template
9541 pre-save transform: normal template
9551 pre-save transform: nonexistent template
9555 {{thistemplatedoesnotexist}}
9557 {{thistemplatedoesnotexist}}
9562 pre-save transform: subst magic variables
9571 # This is bug 89, which I fixed. -- wtm
9573 pre-save transform: subst: templates with parameters
9577 {{subst:paramtest|param="something else"}}
9579 This is a test template with parameter "something else"
9585 <nowiki>'''not wiki'''</nowiki>
9589 pre-save transform: nowiki in subst (bug 1188)
9593 {{subst:nowikitest}}
9595 <nowiki>'''not wiki'''</nowiki>
9600 Template:commenttest
9602 This template has <!-- a comment --> in it.
9606 pre-save transform: comment in subst (bug 1936)
9610 {{subst:commenttest}}
9612 This template has <!-- a comment --> in it.
9616 pre-save transform: unclosed tag
9620 <nowiki>'''not wiki'''
9622 <nowiki>'''not wiki'''
9626 pre-save transform: mixed tag case
9630 <NOwiki>'''not wiki'''</noWIKI>
9632 <NOwiki>'''not wiki'''</noWIKI>
9636 pre-save transform: unclosed comment in <nowiki>
9640 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9642 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9645 # Leading @ in this template definition works around a limitation
9646 # in parsoid's parserTests which otherwise strips the <span> from the
9647 # result (confusing it for a template wrapper)
9651 @<span onmouseover="alert('crap')">Oh no</span>
9655 (confirming safety of fix for subst bug 1936)
9657 {{Template:dangerous}}
9659 <p>@<span>Oh no</span>
9664 pre-save transform: comment containing gallery (bug 5024)
9668 <!-- <gallery>data</gallery> -->
9670 <!-- <gallery>data</gallery> -->
9674 pre-save transform: comment containing extension
9678 <!-- <tag>data</tag> -->
9680 <!-- <tag>data</tag> -->
9684 pre-save transform: comment containing nowiki
9688 <!-- <nowiki>data</nowiki> -->
9690 <!-- <nowiki>data</nowiki> -->
9694 pre-save transform: <noinclude> in subst (bug 3298)
9704 pre-save transform: <onlyinclude> in subst (bug 3298)
9716 {{<includeonly>subst:</includeonly>Includes}}
9720 Template:SafeSubstTest
9722 {{<includeonly>safesubst:</includeonly>Includes}}
9726 bug 22297: safesubst: works during PST
9730 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
9736 bug 22297: safesubst: works during normal parse
9745 subst: does not work during normal parse
9749 <p>{{subst:Includes}}
9754 pre-save transform: context links ("pipe trick")
9758 [[Article (context)|]]
9761 [[Bar:Article (context)|]]
9762 [[:Bar:Article (context)|]]
9764 [[|Article (context)]]
9768 [[Article (context)|Article]]
9769 [[Bar:Article|Article]]
9770 [[:Bar:Article|Article]]
9771 [[Bar:Article (context)|Article]]
9772 [[:Bar:Article (context)|Article]]
9774 [[Article (context)]]
9775 [[Bar:X (Y) Z|X (Y) Z]]
9776 [[:Bar:X (Y) Z|X (Y) Z]]
9780 pre-save transform: context links ("pipe trick") with interwiki prefix
9784 [[interwiki:Article|]]
9785 [[:interwiki:Article|]]
9786 [[interwiki:Bar:Article|]]
9787 [[:interwiki:Bar:Article|]]
9789 [[interwiki:Article|Article]]
9790 [[:interwiki:Article|Article]]
9791 [[interwiki:Bar:Article|Bar:Article]]
9792 [[:interwiki:Bar:Article|Bar:Article]]
9796 pre-save transform: context links ("pipe trick") with parens in title
9798 pst title=[[Somearticle (context)]]
9802 [[Article (context)|Article]]
9806 pre-save transform: context links ("pipe trick") with comma in title
9808 pst title=[[Someplace, Somewhere]]
9811 [[Otherplace, Elsewhere|]]
9812 [[Otherplace, Elsewhere, Anywhere|]]
9814 [[Otherplace, Somewhere|Otherplace]]
9815 [[Otherplace, Elsewhere|Otherplace]]
9816 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
9820 pre-save transform: context links ("pipe trick") with parens and comma
9822 pst title=[[Someplace (IGNORED), Somewhere]]
9825 [[Otherplace (place), Elsewhere|]]
9827 [[Otherplace, Somewhere|Otherplace]]
9828 [[Otherplace (place), Elsewhere|Otherplace]]
9832 pre-save transform: context links ("pipe trick") with comma and parens
9834 pst title=[[Who, me? (context)]]
9837 [[Me, Myself, and I (1937 song)|]]
9839 [[Yes, you. (context)|Yes, you.]]
9840 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
9844 pre-save transform: context links ("pipe trick") with namespace
9846 pst title=[[Ns:Somearticle]]
9850 [[Ns:Article|Article]]
9854 pre-save transform: context links ("pipe trick") with namespace and parens
9856 pst title=[[Ns:Somearticle (context)]]
9860 [[Ns:Article (context)|Article]]
9864 pre-save transform: context links ("pipe trick") with namespace and comma
9866 pst title=[[Ns:Somearticle, Context, Whatever]]
9870 [[Ns:Article, Context, Whatever|Article]]
9874 pre-save transform: context links ("pipe trick") with namespace, comma and parens
9876 pst title=[[Ns:Somearticle, Context (context)]]
9880 [[Ns:Article (context)|Article]]
9884 pre-save transform: context links ("pipe trick") with namespace, parens and comma
9886 pst title=[[Ns:Somearticle (IGNORED), Context]]
9890 [[Ns:Article, Context|Article]]
9894 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
9898 [[Article(context)|]]
9899 [[Bar:Article(context)|]]
9900 [[:Bar:Article(context)|]]
9901 [[|Article(context)]]
9905 [[Article(context)|Article]]
9906 [[Bar:Article(context)|Article]]
9907 [[:Bar:Article(context)|Article]]
9908 [[Article(context)]]
9910 [[:Bar:X(Y)Z|X(Y)Z]]
9914 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
9918 [[Article (context)|]]
9919 [[Bar:Article (context)|]]
9920 [[:Bar:Article (context)|]]
9921 [[|Article (context)]]
9925 [[Article (context)|Article]]
9926 [[Bar:Article (context)|Article]]
9927 [[:Bar:Article (context)|Article]]
9928 [[Article (context)]]
9929 [[Bar:X (Y) Z|X (Y) Z]]
9930 [[:Bar:X (Y) Z|X (Y) Z]]
9934 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
9938 [[Article(context)|]]
9939 [[Bar:Article(context)|]]
9940 [[:Bar:Article(context)|]]
9941 [[|Article(context)]]
9945 [[Article(context)|Article]]
9946 [[Bar:Article(context)|Article]]
9947 [[:Bar:Article(context)|Article]]
9948 [[Article(context)]]
9950 [[:Bar:X(Y)Z|X(Y)Z]]
9954 pre-save transform: context links ("pipe trick") with commas (bug 21660)
9958 [[Article (context), context|]]
9959 [[Article (context),context|]]
9960 [[Bar:Article (context), context|]]
9961 [[Bar:Article (context),context|]]
9962 [[:Bar:Article (context), context|]]
9963 [[:Bar:Article (context),context|]]
9965 [[Article (context), context|Article]]
9966 [[Article (context),context|Article]]
9967 [[Bar:Article (context), context|Article]]
9968 [[Bar:Article (context),context|Article]]
9969 [[:Bar:Article (context), context|Article]]
9970 [[:Bar:Article (context),context|Article]]
9974 pre-save transform: trim trailing empty lines
9978 Empty lines are trimmed
9984 Empty lines are trimmed
9988 pre-save transform: Signature expansion
9993 * <noinclude>~~~</noinclude>
9994 * <includeonly>~~~</includeonly>
9995 * <onlyinclude>~~~</onlyinclude>
9997 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
9998 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
9999 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
10000 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
10005 pre-save transform: Signature expansion in nowiki tags (bug 93)
10011 <nowiki>~~~~</nowiki>
10013 <includeonly><nowiki>~~~~</nowiki></includeonly>
10015 <noinclude><nowiki>~~~~</nowiki></noinclude>
10017 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10019 {{subst:Foo}} shall be converted to FOO
10021 As well as inside noinclude/onlyinclude
10022 <noinclude>{{subst:Foo}}</noinclude>
10023 <onlyinclude>{{subst:Foo}}</onlyinclude>
10025 But not inside includeonly
10026 <includeonly>{{subst:Foo}}</includeonly>
10030 <nowiki>~~~~</nowiki>
10032 <includeonly><nowiki>~~~~</nowiki></includeonly>
10034 <noinclude><nowiki>~~~~</nowiki></noinclude>
10036 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10038 FOO shall be converted to FOO
10040 As well as inside noinclude/onlyinclude
10041 <noinclude>FOO</noinclude>
10042 <onlyinclude>FOO</onlyinclude>
10044 But not inside includeonly
10045 <includeonly>{{subst:Foo}}</includeonly>
10049 Parsoid: Recognize nowiki with trailing space in tags
10053 <nowiki ><div>[[foo]]</nowiki >
10061 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10068 Parsoid: Recognize nowiki with odd capitalization
10072 <noWikI ><div>[[foo]]</Nowiki >
10074 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10079 Parsoid: Escape nowiki with trailing space in tags
10083 <nowiki > foo </nowiki >
10089 <p><nowiki > foo </nowiki ></p>
10090 <p>a<nowiki />b</p>
10091 <p>c<nowiki/ >d</p>
10095 Parsoid: Escape weird noWikI capitalizations
10099 <noWikI > foo </NoWikI >
10101 <p><noWikI > foo </NoWikI ></p>
10105 ### Message transform tests
10108 message transform: magic variables
10118 message transform: should not transform wiki markup
10128 message transform: <noinclude> in transcluded template (bug 4926)
10138 message transform: <onlyinclude> in transcluded template (bug 4926)
10148 {{#special:}} page name, known
10152 {{#special:Recentchanges}}
10154 Special:RecentChanges
10158 {{#special:}} page name with subpage, known
10162 {{#special:Recentchanges/param}}
10164 Special:RecentChanges/param
10168 {{#special:}} page name, unknown
10172 {{#special:foobar nonexistent}}
10174 Special:Foobar nonexistent
10178 {{#speciale:}} page name, known
10182 {{#speciale:Recentchanges}}
10184 Special:RecentChanges
10188 {{#speciale:}} page name with subpage, known
10192 {{#speciale:Recentchanges/param}}
10194 Special:RecentChanges/param
10198 {{#speciale:}} page name, unknown
10202 {{#speciale:foobar nonexistent}}
10204 Special:Foobar_nonexistent
10210 ### For Parsoid-specific tests, see
10211 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
10216 parsoid=wt2html,wt2wt,html2html
10218 [[Image:foobar.jpg]]
10220 <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>
10223 <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>
10228 Simple image (using File: namespace, now canonical)
10230 [[File:Foobar.jpg]]
10232 <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>
10235 <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>
10240 Right-aligned image
10242 [[File:Foobar.jpg|right]]
10244 <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>
10247 <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>
10253 [[File:Foobar.jpg|right|Caption text]]
10255 <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>
10258 <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>
10262 Image with caption, bug 53312 #1
10264 [[File:Foobar.jpg|right|Caption page stuff]]
10266 <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>
10269 <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>
10273 Image with caption, bug 53312 #2
10275 [[File:Foobar.jpg|right|Caption page=]]
10277 <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>
10280 <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>
10284 Image with caption, bug 53312 #3
10286 [[File:Foobar.jpg|right|Caption page=stuff]]
10288 <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>
10291 <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>
10295 Allow empty links in image captions (Bug 60753)
10299 [[File:Foobar.jpg|thumb|Caption [[Link1]]
10304 <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>
10307 <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>
10309 <a rel="mw:WikiLink" href="./Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"},"dsr":[47,56,2,2]}'>Link2</a>
10310 </figcaption></figure>
10314 Link with empty target
10323 Image with empty attribute
10325 parsoid=wt2html,wt2wt,html2html
10327 [[File:Foobar.jpg|right||Caption text]]
10329 <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>
10332 <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>
10336 1. Block image with individual attributes from templates
10338 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
10340 <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>
10343 <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>
10347 2. Block Image with individual attributes from templates
10349 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
10351 <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>
10354 <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>
10358 3. Inline image with individual attributes from templates
10360 [[File:Foobar.jpg|{{echo|50px}}]]
10362 <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>
10365 <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>
10368 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
10369 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
10371 Image with multiple attributes from the same template
10373 [[File:Foobar.jpg|{{image_attribs}}]]
10375 <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>
10378 <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>
10382 Image with link tails
10386 123[[File:Foobar.jpg]]456
10387 123[[File:Foobar.jpg|right]]456
10388 123[[File:Foobar.jpg|thumb]]456
10390 <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
10392 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
10393 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
10396 <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>
10397 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
10398 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
10402 Image with multiple captions -- only last one is accepted
10404 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
10406 <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>
10409 <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>
10413 Image with multiple widths -- use last
10415 [[File:Foobar.jpg|200px|300px|caption]]
10417 <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>
10420 <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>
10424 Image with multiple alignments -- use first (bug 48664)
10428 [[File:Foobar.jpg|thumb|left|right|center|caption]]
10430 [[File:Foobar.jpg|middle|text-top|caption]]
10432 <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>
10433 <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>
10436 <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>
10437 <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>
10441 Image with width attribute at different positions
10443 [[File:Foobar.jpg|200px|right|Caption]]
10444 [[File:Foobar.jpg|right|200px|Caption]]
10445 [[File:Foobar.jpg|right|Caption|200px]]
10447 <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>
10448 <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>
10449 <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>
10452 <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>
10453 <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>
10454 <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>
10457 # a sad bit of backward-compatibility
10459 Image with size specified with pxpx (bug 13500, 51628)
10461 parsoid=wt2html,wt2wt,html2html
10463 [[File:Foobar.jpg|20pxpx]]
10464 [[File:Foobar.jpg|200x20pxpx]]
10466 <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>
10467 <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>
10470 <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>
10474 Image with link parameter, wiki target
10476 [[File:Foobar.jpg|link=Main Page]]
10478 <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>
10481 <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>
10484 # parsoid bug 49293 (part 1)
10486 Image with link parameter, URL target
10488 [[File:Foobar.jpg|link=http://example.com/]]
10490 <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>
10493 <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>
10496 # parsoid bug 49293 (part 2)
10498 Image with link parameter, protocol-less URL target
10500 [[File:Foobar.jpg|link=//example.com/]]
10502 <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>
10505 <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>
10509 Image with link parameter, wgExternalLinkTarget
10511 [[Image:foobar.jpg|link=http://example.com/]]
10513 wgExternalLinkTarget='foobar'
10515 <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>
10520 Image with link parameter, wgNoFollowLinks set to false
10522 [[Image:foobar.jpg|link=http://example.com/]]
10524 wgNoFollowLinks=false
10526 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10531 Image with link parameter, wgNoFollowDomainExceptions
10533 [[Image:foobar.jpg|link=http://example.com/]]
10535 wgNoFollowDomainExceptions='example.com'
10537 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10542 Image with link parameter, wgExternalLinkTarget, unnamed parameter
10544 [[Image:foobar.jpg|link=http://example.com/|Title]]
10546 wgExternalLinkTarget='foobar'
10548 <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>
10553 Image with empty link parameter
10555 [[File:Foobar.jpg|link=]]
10557 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
10560 <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>
10564 Image with link parameter (wiki target) and unnamed parameter
10566 [[File:Foobar.jpg|link=Main_Page|Title]]
10568 <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>
10571 <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>
10575 Image with link parameter (URL target) and unnamed parameter
10577 [[File:Foobar.jpg|link=http://example.com/|Title]]
10579 <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>
10582 <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>
10586 Thumbnail image with link parameter
10589 parsoid=wt2html,wt2wt,html2html
10591 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
10593 <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>
10596 <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>
10600 Manually-specified thumbnail image
10604 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
10606 <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>
10609 <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>
10613 Manually-specified thumbnail image with explicit link to wiki page
10616 parsoid=wt2html,wt2wt,html2html
10618 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
10620 <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>
10623 <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>
10627 Manually-specified thumbnail image with explicit link to url
10630 parsoid=wt2html,wt2wt,html2html
10632 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
10634 <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>
10637 <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>
10641 Manually-specified thumbnail image with explicit no link
10644 parsoid=wt2html,wt2wt,html2html
10646 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
10648 <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>
10651 <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>
10655 Manually-specified thumbnail image with explicit link and alt text
10658 parsoid=wt2html,wt2wt,html2html
10660 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
10662 <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>
10665 <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>
10669 Image with frame and link
10671 parsoid=wt2html,wt2wt,html2html
10673 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
10675 <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>
10678 <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>
10682 Image with frame and link and explicit alt
10684 parsoid=wt2html,wt2wt,html2html
10686 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
10688 <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>
10691 <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>
10695 Image with wiki markup in implicit alt
10697 parsoid=wt2html,wt2wt,html2html
10699 [[Image:Foobar.jpg|testing '''bold''' in alt]]
10701 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
10703 <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>
10704 </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>
10707 <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>
10708 <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>
10711 ###################
10712 # Conflicting image format options.
10713 # First option specified should 'win'.
10714 # All three cases in each test should be identical.
10717 Image with 'frameless' first.
10719 parsoid=wt2html,wt2wt,html2html
10721 [[File:Foobar.jpg|frameless|caption]]
10723 [[File:Foobar.jpg|frameless|frame|caption]]
10725 [[File:Foobar.jpg|frameless|thumb|caption]]
10727 <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>
10728 </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>
10729 </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>
10732 <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>
10733 <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>
10734 <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>
10738 Image with 'frame' first.
10740 parsoid=wt2html,wt2wt,html2html
10742 [[File:Foobar.jpg|frame|caption]]
10743 [[File:Foobar.jpg|frame|frameless|caption]]
10744 [[File:Foobar.jpg|frame|thumb|caption]]
10746 <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>
10747 <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>
10748 <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>
10751 <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>
10755 Image with 'thumb' first.
10757 parsoid=wt2html,wt2wt,html2html
10759 [[File:Foobar.jpg|thumb|caption]]
10760 [[File:Foobar.jpg|thumb|frameless|caption]]
10761 [[File:Foobar.jpg|thumb|frame|caption]]
10763 <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>
10764 <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>
10765 <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>
10768 <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>
10771 ###################
10773 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
10774 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
10775 # Foobar has actual size of 1941x220
10776 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
10777 # a scalable format.
10778 # 2. Framed images always ignore size options; always render at default size.
10779 # 3. "Unspecified format" and border are the only types which can be
10783 Image: "unspecified format" and border enlarge
10785 parsoid=wt2html,wt2wt,html2html
10787 [[File:Foobar.jpg|2000px]]
10789 [[File:Foobar.jpg|border|2000px]]
10791 <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>
10792 </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>
10795 <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>
10796 <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>
10800 Image: "unspecified format" and border reduce
10802 parsoid=wt2html,wt2wt,html2html
10804 [[File:Foobar.jpg|1000px]]
10806 [[File:Foobar.jpg|border|1000px]]
10808 <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>
10809 </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>
10812 <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>
10813 <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>
10817 Image: thumbs reduce
10819 parsoid=wt2html,wt2wt,html2html
10821 [[File:Foobar.jpg|thumb|50px]]
10823 <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>
10826 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="6" width="50"/></a></figure>
10830 Image: bitmap thumbs can't be enlarged past original size, but vector can.
10832 parsoid=wt2html,wt2wt,html2html
10834 [[File:Foobar.jpg|thumb|2000px]]
10836 [[File:Foobar.svg|thumb|2000px]]
10838 <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>
10839 <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>
10842 <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>
10843 <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>
10847 Image: frameless can reduce in size
10849 parsoid=wt2html,wt2wt,html2html
10851 [[File:Foobar.jpg|frameless|50px]]
10853 <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>
10856 <p><span typeof="mw:Image/Frameless"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="6" width="50"/></a></span></p>
10860 Image: bitmap frameless can't be enlarged past original size, but vector can
10862 parsoid=wt2html,wt2wt,html2html
10864 [[File:Foobar.jpg|frameless|2000px]]
10866 [[File:Foobar.svg|frameless|2000px]]
10868 <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>
10869 </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>
10872 <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>
10873 <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>
10877 Image: framed images are always unscaled.
10879 parsoid=wt2html,wt2wt,html2html
10881 [[File:Foobar.jpg|frame]]
10883 [[File:Foobar.jpg|frame|50px]]
10885 [[File:Foobar.jpg|frame|50x50px]]
10887 [[File:Foobar.jpg|frame|2000px]]
10889 <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>
10890 <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>
10891 <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>
10892 <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>
10895 <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>
10898 ###################
10901 Link to image page- image page normally doesn't exists, hence edit link
10902 Add test with existing image page
10903 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
10907 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
10912 bug 18784 Link to non-existent image page with caption should use caption as link text
10914 [[:Image:test|caption]]
10916 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
10921 Frameless image caption with a free URL
10923 [[File:Foobar.jpg|http://example.com]]
10925 <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>
10928 <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>
10932 Thumbnail image caption with a free URL
10936 [[File:Foobar.jpg|thumb|http://example.com]]
10938 <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>
10941 <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>
10945 Thumbnail image caption with a free URL and explicit alt
10948 parsoid=wt2html,wt2wt,html2html
10950 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
10952 <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>
10955 <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>
10959 SVG thumbnails with no language set
10962 [[File:Foobar.svg|thumb|caption]]
10964 <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>
10967 <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>
10971 SVG thumbnails with language de
10973 parsoid=wt2html,wt2wt,html2html
10975 [[File:Foobar.svg|thumb|caption|lang=de]]
10977 <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>
10980 <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>
10984 SVG thumbnails with invalid language code
10986 parsoid=wt2html,wt2wt,html2html
10988 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
10990 <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>
10993 <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>
10997 BUG 1887: A ISBN with a thumbnail
10999 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11001 <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>
11004 <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>
11008 BUG 1887: A RFC with a thumbnail
11010 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11012 <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>
11015 <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>
11019 BUG 1887: A mailto link with a thumbnail
11021 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11023 <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>
11026 <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>
11029 # Pending resolution to bug 368
11031 BUG 648: Frameless image caption with a link
11033 [[File:Foobar.jpg|text with a [[link]] in it]]
11035 <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>
11038 <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>
11042 BUG 648: Frameless image caption with a link (suffix)
11044 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11046 <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>
11049 <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>
11053 BUG 648: Frameless image caption with an interwiki link
11055 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11057 <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>
11060 <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>
11064 BUG 648: Frameless image caption with a piped interwiki link
11066 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11068 <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>
11071 <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>
11075 Escape HTML special chars in image alt text
11077 [[File:Foobar.jpg|& < > "]]
11079 <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>
11082 <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>
11086 BUG 499: Alt text should have Ӓ, not &1234;
11088 [[File:Foobar.jpg|♀]]
11090 <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>
11093 <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>
11097 Broken image caption with link
11099 parsoid=wt2html,wt2wt,html2html
11101 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11103 <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.
11106 <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>
11110 Image caption containing another image
11112 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
11114 <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>
11117 <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>
11121 Image: caption containing a newline
11123 [[File:Foobar.jpg|This
11126 <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>
11129 <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>
11133 Image: caption containing leading space
11134 (The leading space should not trigger nowiki escaping in wt2wt mode)
11136 [[File:Foobar.jpg|thumb| bar]]
11138 <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>
11141 <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>
11145 Image: caption containing a table
11147 parsoid=wt2html,wt2wt,html2html
11149 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11155 and some more text.]]
11157 <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>
11160 <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
11163 <tr><th>Foo </th><th>Bar</th></tr>
11166 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11170 Bug 3090: External links other than http: in image captions
11172 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11174 <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>
11177 <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>
11183 parsoid=wt2html,wt2wt,html2html
11185 [[Image:foobar.jpg|a|class=b]]
11187 <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>
11190 <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>
11194 Localized image handling (1).
11196 parsoid=wt2html,wt2wt,html2html
11199 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
11201 <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>
11204 <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>
11208 Localized image handling (2).
11211 parsoid=wt2html,wt2wt,html2html
11214 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
11216 <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>
11219 <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>
11223 "border", "frameless" and "class" attributes on an image.
11226 parsoid=wt2html,wt2wt,html2html
11228 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
11230 <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>
11233 <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>
11236 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
11238 Invalid image attributes (bug 62500)
11241 parsoid=wt2html,wt2wt,html2html
11243 [[File:Foobar.jpg|thumb|float|left|caption]]
11245 [[File:Foobar.jpg|thumb|righ|caption]]
11247 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
11249 <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>
11250 <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>
11251 <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>
11254 <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>
11260 #REDIRECT [[File:Barfoo.jpg]]
11266 [[Image:Barfoo.jpg]]
11268 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
11273 Missing image with uploads disabled
11277 [[Image:Foobaz.jpg]]
11279 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
11283 # Parsoid-specific testing for images
11284 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11285 # Currently imperfect due to a flaw in the Parsoid testrunner
11287 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
11291 Parsoid-specific image handling - simple image with size and middle alignment
11293 [[File:Foobar.jpg|middle|50px]]
11295 <p><span class="mw-valign-middle" typeof="mw:Image">
11296 <a href="File:Foobar.jpg">
11297 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11304 Parsoid-specific image handling - simple image with size, middle alignment,
11305 non-standard namespace alias
11307 parsoid=wt2wt,wt2html,html2html
11309 [[Image:Foobar.jpg|middle|50px]]
11311 <p><span class="mw-valign-middle" typeof="mw:Image">
11312 <a href="File:Foobar.jpg">
11313 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11320 Parsoid-specific image handling - simple image with size and middle alignment
11323 [[File:Foobar.jpg|50px|middle]]
11325 <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>
11329 Parsoid-specific image handling - simple image with size and middle alignment
11330 and non-standard namespace name
11332 parsoid=wt2html,wt2wt,html2html
11334 [[Image:Foobar.jpg|50px|middle]]
11336 <p><span class="mw-valign-middle" typeof="mw:Image">
11337 <a href="File:Foobar.jpg">
11338 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11345 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
11347 [[File:Foobar.jpg|500x10px|baseline|caption]]
11349 <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>
11353 Parsoid-specific image handling - simple image with border and size spec
11355 [[File:Foobar.jpg|50px|border|caption]]
11357 <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>
11361 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11363 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
11365 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
11366 <a href="File:Foobar.jpg">
11367 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
11369 <figcaption>caption content</figcaption>
11374 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11377 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
11379 <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>
11383 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
11385 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
11387 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
11388 <a href="File:Foobar.jpg">
11389 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
11391 <figcaption>caption</figcaption>
11396 Parsoid-specific image handling - thumbnail with specific size, halign,
11397 valign, and caption (existing content)
11399 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
11401 <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>
11405 Parsoid-specific image handling - framed image with specific size and caption
11408 parsoid=wt2html,wt2wt,html2html
11410 [[File:Foobar.jpg|frame|500x50px|caption]]
11412 <figure typeof="mw:Image/Frame">
11413 <a href="File:Foobar.jpg">
11414 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11416 <figcaption>caption</figcaption>
11421 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
11424 parsoid=wt2html,wt2wt,html2html
11426 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
11428 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
11429 <a href="File:Foobar.jpg">
11430 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11432 <figcaption>caption</figcaption>
11437 Parsoid-specific image handling - frameless image with specific size, border, and caption
11439 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
11441 <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>
11445 Parsoid-specific image handling - simple image with a formatted caption
11447 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
11449 <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>"}'>
11450 <a href="File:Foobar.jpg">
11451 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
11456 Parsoid-specific image handling - caption with a template in it
11458 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
11460 <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>
11464 Parsoid-specific image handling - caption with unbalanced tags in it
11466 parsoid=wt2html,wt2wt,html2html
11469 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
11473 <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>
11478 Parsoid-specific image handling - empty caption (1)
11480 parsoid=wt2html,wt2wt
11482 [[File:Foobar.jpg|thumb|]]
11484 <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>
11487 # empty captions don't get serialized unless we're in the "round trip" case
11489 Parsoid-specific image handling - empty caption (2)
11493 <figure class="mw-default-size" typeof="mw:Image/Thumb">
11494 <a href="File:Foobar.jpg">
11495 <img resource="./File:Foobar.jpg"
11496 src="//example.com/images/3/3a/Foobar.jpg"
11497 height="25" width="220"/>
11499 <figcaption></figcaption>
11502 [[File:Foobar.jpg|thumb]]
11506 Parsoid-specific image handling - whitespace caption
11508 [[File:Foobar.jpg|thumb| ]]
11510 <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>
11514 Parsoid-specific image handling - lang option
11517 [[File:Foobar.svg|lang=de|caption]]
11521 <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>
11530 Subpage test/subpage
11538 subpage title=[[Subpage test]]
11542 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
11547 Subpage noslash link
11549 subpage title=[[Subpage test]]
11553 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
11557 # TODO: make this PHP-parser compatible!
11559 Relative subpage noslash link
11561 parsoid=wt2wt,wt2html,html2html
11562 subpage title=[[Subpage test/1/2/3/4]]
11568 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
11569 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
11573 Parsoid: dot-slash prefixed wikilinks
11583 </p><p>[[././baz/]]
11588 </p><p>[[././baz/]]
11593 Render invalid page names as plain text (bug 51090)
11606 [[{{echo|./../foo}}|bar]]
11607 [[{{echo|foo/.}}|bar]]
11608 [[{{echo|foo/..}}|bar]]
11609 [[{{echo|foo~~~~bar}}]]
11610 [[{{echo|foo>bar}}]]
11611 [[{{echo|foo././bar}}]]
11612 [[{{echo|foo{bar}}]]
11613 [[{{echo|foo}bar}}]]
11614 [[{{echo|foo[bar}}]]
11615 [[{{echo|foo]bar}}]]
11616 [[{{echo|foo<bar}}]]
11618 <p>[[./../foo|bar]]
11628 </p><p>[[./../foo|bar]]
11641 <p>[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]</p>
11642 <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>
11650 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
11655 BUG 561: {{/Subpage}}
11657 subpage title=[[Page]]
11661 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
11669 Category:MediaWiki User's Guide
11677 [[:Category:MediaWiki User's Guide]]
11679 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
11688 [[Category:MediaWiki User's Guide]]
11690 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11694 PAGESINCATEGORY invalid title fatal (r33546 fix)
11696 {{PAGESINCATEGORY:<bogus>}}
11703 Category with different sort key
11707 [[Category:MediaWiki User's Guide|Foo]]
11709 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11713 Category with identical sort key
11717 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11719 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11723 Category with empty sort key
11728 [[Category:MediaWiki User's Guide|]]
11730 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11734 Category with empty sort key and parentheses
11739 [[Category:Foo (bar)|]]
11741 [[Category:Foo (bar)|Foo]]
11745 Category with link tail
11750 123[[Category:Foo]]456
11752 123[[Category:Foo]]456
11756 Category with template
11761 [[Category:{{echo|Foo}}]]
11763 [[Category:{{echo|Foo}}]]
11767 Category with template in sort key
11772 [[Category:Foo|{{echo|Bar}}]]
11774 [[Category:Foo|{{echo|Bar}}]]
11778 Category with template in sort key and title
11783 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11785 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11789 Category / paragraph interactions
11791 Foo [[Category:Baz]] Bar
11793 Foo [[Category:Baz]]
11801 [[Category:Baz]] Bar
11814 {{echo|[[Category:Baz]]}}
11829 Parsoid: Serialize link to category page with colon escape
11835 [[:Category:Foo|Bar]]
11838 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
11839 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
11844 Parsoid: Link prefix/suffixes aren't applied to category links
11846 parsoid=wt2html,wt2wt,html2html
11851 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
11855 Parsoid: Serialize link to file page with colon escape
11861 [[:File:Foo.png|Bar]]
11864 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
11865 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
11870 Parsoid: Serialize a genuine category link without colon escape
11875 [[Category:Foo|Bar]]
11877 <link rel="mw:PageProp/Category" href="Category:Foo">
11878 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
11882 Parsoid: Defaultsort
11886 {{DEFAULTSORT:Foo}}
11888 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
11892 ### Inter-language links
11895 Inter-language links
11901 [[zh:食品]]
11903 es:Alimento fr:Nourriture zh:食品
11907 Duplicate interlanguage links (bug 24502)
11923 Basic section headings
11930 ===Smaller headline===
11933 <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>
11936 <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>
11939 <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>
11945 Section headings with TOC
11948 === Subheadline 1 ===
11949 ===== Skipping a level =====
11950 ====== Skipping a level ======
11954 ===Another headline===
11956 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11958 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
11960 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
11962 <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>
11964 <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>
11971 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
11973 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
11979 <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>
11980 <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>
11981 <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>
11982 <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>
11983 <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>
11986 <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>
11990 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
11992 Handling of sections up to level 6 and beyond
11995 == Level 2 Heading==
11996 === Level 3 Heading===
11997 ==== Level 4 Heading====
11998 ===== Level 5 Heading=====
11999 ====== Level 6 Heading======
12000 ======= Level 7 Heading=======
12001 ======== Level 8 Heading========
12002 ========= Level 9 Heading=========
12003 ========== Level 10 Heading==========
12005 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12007 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12009 <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>
12011 <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>
12013 <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>
12015 <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>
12017 <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>
12018 <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>
12019 <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>
12020 <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>
12021 <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>
12035 <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>
12036 <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>
12037 <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>
12038 <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>
12039 <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>
12040 <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>
12041 <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>
12042 <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>
12043 <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>
12044 <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>
12049 TOC regression (bug 9764)
12053 ==== title 1.1.1 ====
12058 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12060 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12062 <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>
12064 <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>
12067 <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>
12070 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12072 <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>
12078 <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>
12079 <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>
12080 <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>
12081 <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>
12082 <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>
12083 <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>
12088 TOC with wgMaxTocLevel=3 (bug 6204)
12094 ==== title 1.1.1 ====
12099 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12101 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12103 <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>
12104 <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>
12107 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12109 <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>
12115 <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>
12116 <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>
12117 <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>
12118 <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>
12119 <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>
12120 <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>
12125 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
12131 ====Section 1.1.1====
12132 ====Section 1.1.1.1====
12135 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12137 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
12139 <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>
12142 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
12146 <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>
12147 <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>
12148 <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>
12149 <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>
12150 <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>
12156 Resolving duplicate section names
12161 <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>
12162 <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>
12167 Resolving duplicate section names with differing case (bug 10721)
12172 <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>
12173 <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>
12185 Template with sections, __NOTOC__
12192 <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>
12193 <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>
12194 <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>
12195 <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>
12200 __NOEDITSECTION__ keyword
12206 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
12207 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
12212 Link inside a section heading
12214 ==Section with a [[Main Page|link]] in it==
12216 <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>
12221 TOC regression (bug 12077)
12228 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12230 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12232 <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>
12235 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
12239 <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>
12240 <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>
12241 <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>
12246 BUG 1219 URL next to image (good)
12248 http://example.com [[Image:foobar.jpg]]
12250 <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>
12255 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
12258 The line above must have a trailing space!
12261 But just in case it doesn't...
12263 <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>
12264 <p>The line above must have a trailing space!
12266 <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>
12267 <p>But just in case it doesn't...
12272 Header with special characters (bug 25462)
12274 The tooltips shall not show entities to the user (ie. be double escaped)
12291 <p>The tooltips shall not show entities to the user (ie. be double escaped)
12293 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12295 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
12296 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
12297 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
12298 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
12299 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
12303 <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>
12306 <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>
12309 <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>
12312 <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>
12315 <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>
12321 Headers with excess '=' characters
12322 (Are similar tests necessary beyond the 1st level?)
12326 =''italic'' heading==
12327 ==''italic'' heading=
12329 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12331 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
12332 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
12333 <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>
12334 <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>
12338 <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>
12339 <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>
12340 <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>
12341 <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>
12346 HTML headers vs TOC (bug 23393)
12347 (__NOEDITSECTION__ for clearer output, doesn't matter here)
12359 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12361 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
12363 <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>
12364 <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>
12367 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
12369 <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>
12370 <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>
12376 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
12377 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
12378 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
12379 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
12380 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
12381 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
12386 Single-line or multiline-comments can follow headings
12388 parsoid=wt2html,wt2wt
12396 <h2><span class="mw-headline" id="foo">foo</span></h2>
12397 <h2><span class="mw-headline" id="bar">bar</span></h2>
12398 <h2><span class="mw-headline" id="baz">baz</span></h2>
12403 BUG 1219 URL next to image (broken)
12405 http://example.com[[Image:foobar.jpg]]
12407 <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>
12412 Bug 1186 news: in the middle of text
12414 http://en.wikinews.org/wiki/Wikinews:Workplace
12416 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
12422 Namespaced link must have a title
12431 Namespaced link must have a title (bad fragment version)
12433 [[Project:#fragment]]
12435 <p>[[Project:#fragment]]
12441 ### HTML tags and HTML attributes
12445 div with no attributes
12447 <div>HTML rocks</div>
12449 <div>HTML rocks</div>
12454 div with double-quoted attribute
12456 <div id="rock">HTML rocks</div>
12458 <div id="rock">HTML rocks</div>
12463 div with single-quoted attribute
12465 <div id='rock'>HTML rocks</div>
12467 <div id="rock">HTML rocks</div>
12472 div with unquoted attribute
12474 <div id=rock>HTML rocks</div>
12476 <div id="rock">HTML rocks</div>
12481 div with illegal double attributes
12483 <div id="a" id="b">HTML rocks</div>
12485 <div id="b">HTML rocks</div>
12489 # FIXME: produce empty string instead of "class" in the PHP parser, following
12492 div with empty attribute value, space before equals
12496 <div class =>HTML rocks</div>
12498 <div class="">HTML rocks</div>
12502 # The PHP parser escapes the opening brace to { for some reason, so
12503 # disabled this test for it.
12505 div with braces in attribute value
12509 <div title="{}">Foo</div>
12511 <div title="{}">Foo</div>
12514 # This it very inconsistent in the PHP parser: it returns
12515 # class="class" if there is a space between the name and the equal sign (see
12516 # 'div with empty attribute value, space before equals'), but strips the
12517 # attribute completely if the space is missing. We hope that not much content
12518 # depends on this, so are implementing the behavior below in Parsoid for
12519 # consistencies' sake. Disabled for the PHP parser.
12520 # FIXME: fix this behavior in the PHP parser?
12522 div with empty attribute value, no space before equals
12526 <div class=>HTML rocks</div>
12528 <div class="">HTML rocks</div>
12533 HTML multiple attributes correction
12535 <p class="error" class="awesome">Awesome!</p>
12537 <p class="awesome">Awesome!</p>
12542 Table multiple attributes correction
12545 !+ class="error" class="awesome"| status
12550 <th class="awesome"> status
12558 <DIV ID="x">HTML ROCKS</DIV>
12560 <div id="x">HTML ROCKS</div>
12565 Non-ASCII pseudo-tags are rendered as text
12574 Pseudo-tag with URL 'name' renders as url link
12576 <http://example.com/>
12578 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
12583 text with amp in the middle of nowhere
12587 <p>Remember AT&T?
12592 text with character entity: eacute
12594 I always thought é was a cute letter.
12596 <p>I always thought é was a cute letter.
12601 text with entity-escaped character entity-like string: eacute
12603 I always thought &eacute; was a cute letter.
12605 <p>I always thought &eacute; was a cute letter.
12610 text with undefined character entity: xacute
12612 I always thought &xacute; was a cute letter.
12614 <p>I always thought &xacute; was a cute letter.
12618 # TODO: generalize to PHP parser?
12624 <data value="5">five</data>
12625 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12626 <mark>This highlighted text</mark>
12628 <p><data value="5">five</data>
12629 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12630 <mark>This highlighted text</mark></p>
12634 HTML tag with leading space is parsed as text
12638 <p>< div>foo< /div>
12643 ### Nesting tests (see bug 41545, 50604, 51081)
12646 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
12647 # Note that html2wt is considerably more difficult if we use <b> in
12648 # the test case, instead of <big>
12650 Ensure that HTML adoption agency algorithm is properly implemented.
12652 <big>X<big>Y</big>Z</big>
12654 <p><big>X<big>Y</big>Z</big>
12658 # This was bug 41545 in the PHP parser.
12662 <kbd>X<kbd>Y</kbd>Z</kbd>
12664 <p><kbd>X<kbd>Y</kbd>Z</kbd>
12668 # The following cases were bug 51081 in the PHP parser.
12669 # Note that there are some other nestable tags (b, i, etc) which are
12670 # not covered; see bug 51081 for discussion.
12674 <em>X<em>Y</em>Z</em>
12676 <p><em>X<em>Y</em>Z</em>
12681 Nesting of <strong>
12683 <strong>X<strong>Y</strong>Z</strong>
12685 <p><strong>X<strong>Y</strong>Z</strong>
12694 <p><q>X<q>Y</q>Z</q>
12701 <ruby>X<ruby>Y</ruby>Z</ruby>
12703 <p><ruby>X<ruby>Y</ruby>Z</ruby>
12710 <bdo>X<bdo>Y</bdo>Z</bdo>
12712 <p><bdo>X<bdo>Y</bdo>Z</bdo>
12724 [[Media:Foobar.jpg]]
12726 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
12731 Media link with text
12733 [[Media:Foobar.jpg|A neat file to look at]]
12735 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
12739 # FIXME: this is still bad HTML tag nesting
12741 Media link with nasty text
12742 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
12744 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
12746 <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>
12751 Media link to nonexistent file (bug 1702)
12753 [[Media:No such.jpg]]
12755 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
12760 Image link to nonexistent file (bug 1850 - good)
12762 [[Image:No such.jpg]]
12764 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
12769 :Image link to nonexistent file (bug 1850 - bad)
12771 [[:Image:No such.jpg]]
12773 <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>
12780 Character reference normalization in link text (bug 1938)
12782 [[Main Page|this&that]]
12784 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
12791 Test for unicode normalization
12793 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
12797 (bug 19451) Links should refer to the normalized form.
12805 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12806 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12807 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12808 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12809 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12814 Empty attribute crash test (bug 2067)
12816 <font color="">foo</font>
12818 <p><font color="">foo</font>
12823 Empty attribute crash test single-quotes (bug 2067)
12825 <font color=''>foo</font>
12827 <p><font color="">foo</font>
12832 Attribute test: equals, then nothing
12834 <font color=>foo</font>
12836 <p><font>foo</font>
12841 Attribute test: unquoted value
12843 <font color=x>foo</font>
12845 <p><font color="x">foo</font>
12850 Attribute test: unquoted but illegal value (hash)
12852 <font color=#x>foo</font>
12854 <p><font color="#x">foo</font>
12859 Attribute test: no value
12861 <font color>foo</font>
12863 <p><font color="color">foo</font>
12868 Bug 2095: link with three closing brackets
12872 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
12875 <p><a rel="mw:WikiLink" href="./Main_Page">Main Page</a>]</p>
12879 Bug 2095: link with pipe and three closing brackets
12881 [[Main Page|link]]]
12883 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
12886 <p><a rel="mw:WikiLink" href="./Main_Page">link</a>]</p>
12890 Bug 2095: link with pipe and three closing brackets, version 2
12892 [[Main Page|[http://example.com/]]]
12894 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
12897 <p><a rel="mw:WikiLink" href="./Main_Page">[http://example.com/]</a></p>
12906 Template:Dangerous attribute
12908 " onmouseover="alert(document.cookie)
12912 Template:Dangerous style attribute
12914 border-size: expression(alert(document.cookie))
12920 <div style="float: right; {{{1}}}">Magic div</div>
12924 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
12926 <div title="{{test}}"></div>
12928 <div title="This is a test template"></div>
12933 Bug 2304: HTML attribute safety (dangerous template; 2309)
12935 <div title="{{dangerous attribute}}"></div>
12937 <div title=""></div>
12942 Bug 2304: HTML attribute safety (dangerous style template; 2309)
12944 <div style="{{dangerous style attribute}}"></div>
12946 <div style="/* insecure input */"></div>
12951 Bug 2304: HTML attribute safety (safe parameter; 2309)
12953 {{div style|width: 200px}}
12955 <div style="float: right; width: 200px">Magic div</div>
12960 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
12962 {{div style|width: expression(alert(document.cookie))}}
12964 <div style="/* insecure input */">Magic div</div>
12969 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
12971 {{div style|"><script>alert(document.cookie)</script>}}
12973 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12978 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
12980 {{div style|" ><script>alert(document.cookie)</script>}}
12982 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12987 Bug 2304: HTML attribute safety (link)
12989 <div title="[[Main Page]]"></div>
12991 <div title="[[Main Page]]"></div>
12996 Bug 2304: HTML attribute safety (italics)
12998 <div title="''foobar''"></div>
13000 <div title="''foobar''"></div>
13005 Bug 2304: HTML attribute safety (bold)
13007 <div title="'''foobar'''"></div>
13009 <div title="'''foobar'''"></div>
13015 Bug 2304: HTML attribute safety (ISBN)
13017 <div title="ISBN 1234567890"></div>
13019 <div title="ISBN 1234567890"></div>
13024 Bug 2304: HTML attribute safety (RFC)
13026 <div title="RFC 1234"></div>
13028 <div title="RFC 1234"></div>
13033 Bug 2304: HTML attribute safety (PMID)
13035 <div title="PMID 1234567890"></div>
13037 <div title="PMID 1234567890"></div>
13042 Bug 2304: HTML attribute safety (web link)
13044 <div title="http://example.com/"></div>
13046 <div title="http://example.com/"></div>
13051 Bug 2304: HTML attribute safety (named web link)
13053 <div title="[http://example.com/ link]"></div>
13055 <div title="[http://example.com/ link]"></div>
13060 Bug 3244: HTML attribute safety (extension; safe)
13062 <div style="<nowiki>background:blue</nowiki>"></div>
13064 <div style="background:blue"></div>
13069 Bug 3244: HTML attribute safety (extension; unsafe)
13071 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
13073 <div style="/* insecure input */"></div>
13077 # More MSIE fun discovered by Tom Gilder
13080 MSIE CSS safety test: spurious slash
13082 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
13084 <div style="/* insecure input */">evil</div>
13089 MSIE CSS safety test: hex code
13091 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
13093 <div style="/* insecure input */">evil</div>
13098 MSIE CSS safety test: comment in url
13100 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
13102 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
13107 MSIE CSS safety test: comment in expression
13109 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
13111 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
13116 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
13118 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
13120 <p style="/* invalid control char */">A</p>
13125 MSIE 6 CSS safety test: Fullwidth (bug 55332)
13127 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
13128 <div style="top:EXPRESSION(alert())">B</div>
13130 <p style="/* insecure input */">A</p>
13131 <div style="/* insecure input */">B</div>
13136 MSIE 6 CSS safety test: IPA extensions (bug 55332)
13138 <div style="background-image:uʀʟ(javascript:alert())">A</div>
13139 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
13141 <div style="/* insecure input */">A</div>
13142 <p style="/* insecure input */">B</p>
13147 MSIE 6 CSS safety test: sup/sub script (bug 55332)
13149 <div style="background-image:url⁽javascript:alert())">A</div>
13150 <div style="background-image:url₍javascript:alert())">B</div>
13151 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
13153 <div style="/* insecure input */">A</div>
13154 <div style="/* insecure input */">B</div>
13155 <p style="/* insecure input */">C</p>
13163 title="data:text/html,<img src=1 onerror=alert(1)>"
13164 style="-o-link:attr(title);-o-link-source:current">X</div>
13166 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
13171 MSIE 6 CSS safety test: Repetition markers (bug 55332)
13173 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
13174 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
13175 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
13176 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
13177 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
13178 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
13179 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
13181 <p style="/* insecure input */">A</p>
13182 <p style="/* insecure input */">B</p>
13183 <p style="/* insecure input */">C</p>
13184 <p style="/* insecure input */">D</p>
13185 <p style="/* insecure input */">E</p>
13186 <p style="/* insecure input */">F</p>
13187 <p style="/* insecure input */">G</p>
13192 Table attribute legitimate extension
13195 !+ style="<nowiki>color:blue</nowiki>"| status
13200 <th style="color:blue"> status
13206 Table attribute safety
13209 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
13214 <th style="/* insecure input */"> status
13220 CSS line continuation 1
13222 <div style="background-image: u\ rl(test.jpg);"></div>
13224 <div style="/* insecure input */"></div>
13229 CSS line continuation 2
13231 <div style="background-image: u\ rl(test.jpg); "></div>
13233 <div style="/* insecure input */"></div>
13244 Expansion of multi-line templates in attribute values (bug 6255)
13246 <div style="background: {{identity|#00FF00}}">-</div>
13248 <div style="background: #00FF00">-</div>
13254 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
13256 <div style="background:
13259 <div style="background: #00FF00">-</div>
13264 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
13266 <div style="background: #00FF00">-</div>
13268 <div style="background: #00FF00">-</div>
13273 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
13276 Parser hook: empty input
13289 Parser hook: empty input using terminated empty elements
13302 Parser hook: empty input using terminated empty elements (space before)
13315 Parser hook: basic input
13329 Parser hook: case insensitive
13343 Parser hook: case insensitive, redux
13356 Parser hook: nested tags
13360 <tag><tag></tag></tag>
13371 Parser hook: basic arguments
13373 <tag width=200 height = "100" depth = '50' square></tag>
13381 'square' => 'square',
13388 Parser hook: argument containing a forward slash (bug 5344)
13390 <tag filename='/tmp/bla'></tag>
13395 'filename' => '/tmp/bla',
13402 Parser hook: empty input using terminated empty elements (bug 2374)
13415 # </tag> should be output literally since there is no matching tag that begins it
13417 Parser hook: basic arguments using terminated empty elements (bug 2374)
13419 <tag width=200 height = "100" depth = '50' square/>
13429 'square' => 'square',
13438 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
13442 Parser hook: static parser hook not inside a comment
13444 <statictag>hello, world</statictag>
13445 <statictag action=flush/>
13453 Parser hook: static parser hook inside a comment
13455 <!-- <statictag>hello, world</statictag> -->
13456 <statictag action=flush/>
13462 # Nested template calls; this case was broken by Parser.php rev 1.506,
13466 Template:One-parameter
13468 (My parameter is: {{{1}}})
13472 Template:Map-one-parameter
13474 {{{{{1}}}|{{{2}}}}}
13478 Nested template calls
13480 {{Map-one-parameter|One-parameter|param}}
13482 <p>(My parameter is: param)
13491 Sanitizer: Closing of open tags
13493 <s></s><table></table>
13495 <s></s><table></table>
13500 Sanitizer: Closing of open but not closed tags
13509 Sanitizer: Closing of closed but not open tags
13518 Sanitizer: Closing of closed but not open table tags
13520 Table not started</td></tr></table>
13522 <p>Table not started</td></tr></table>
13527 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
13529 <span id="æ: v">byte</span>[[#æ: v|backlink]]
13531 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
13536 Sanitizer: Validating the contents of the id attribute (bug 4515)
13542 Something, but definitely not <br id="9" />...
13546 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
13550 <br id="foo" /><br id="foo" />
13552 Something need to be done. foo-2 ?
13556 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
13559 <meta itemprop="hello" content="world">
13560 <meta http-equiv="refresh" content="5">
13561 <meta itemprop="hello" http-equiv="refresh" content="5">
13562 <link itemprop="hello" href="{{SERVER}}">
13563 <link rel="stylesheet" href="{{SERVER}}">
13564 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
13567 <div itemscope="itemscope">
13568 <p> <meta itemprop="hello" content="world" />
13569 <meta http-equiv="refresh" content="5">
13570 <meta itemprop="hello" content="5" />
13572 <link itemprop="hello" href="http://example.org" />
13573 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
13574 <link itemprop="hello" href="http://example.org" />
13580 Language converter: output gets cut off unexpectedly (bug 5757)
13584 this bit is safe: }-
13586 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
13588 then we get cut off here: }-
13590 all additional text is vanished
13592 <p>this bit is safe: }-
13593 </p><p>but if we add a conversion instance: xxx
13594 </p><p>then we get cut off here: }-
13595 </p><p>all additional text is vanished
13600 Self closed html pairs (bug 5487)
13603 <center><font id="bug" />Centered text</center>
13604 <div><font id="bug2" />In div text</div>
13606 <center><font id="bug" />Centered text</center>
13607 <div><font id="bug2" />In div text</div>
13616 Punctuation: nbsp before exclamation
13620 <p>C'est grave !
13625 Punctuation: CSS !important (bug 11874)
13627 <div style="width:50% !important">important</div>
13629 <div style="width:50% !important">important</div>
13634 Punctuation: CSS ! important (bug 11874; with space after)
13636 <div style="width:50% ! important">important</div>
13638 <div style="width:50% ! important">important</div>
13644 HTML bullet list, closed tags (bug 5497)
13659 HTML bullet list, unclosed tags (bug 5497)
13678 HTML ordered list, closed tags (bug 5497)
13693 HTML ordered list, unclosed tags (bug 5497)
13712 HTML nested bullet list, closed tags (bug 5497)
13737 HTML nested bullet list, open tags (bug 5497)
13766 HTML nested ordered list, closed tags (bug 5497)
13791 HTML nested ordered list, open tags (bug 5497)
13820 HTML ordered list item with parameters oddity
13822 <ol><li id="fragment">One</li>
13825 <ol><li id="fragment">One</li>
13830 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
13832 bug 5918: autonumbering
13834 [http://first/] [http://second] [ftp://ftp]
13838 [mailto:enclosed@mail.tld With target]
13840 [mailto:enclosed@mail.tld]
13842 mailto:inline@mail.tld
13844 <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>
13845 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
13846 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
13847 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
13848 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
13851 <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>
13852 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
13853 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
13854 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
13855 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
13860 # Security and HTML correctness
13861 # From Nick Jenkins' fuzz testing
13865 Fuzz testing: Parser13
13880 Fuzz testing: Parser14
13885 <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>
13886 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13888 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
13896 Fuzz testing: Parser14-table
13901 <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>
13902 <table style="__TOC__">
13908 # Known to produce bogus xml (extra </td>)
13910 Fuzz testing: Parser16
13930 Fuzz testing: Parser21
13933 ! irc://{{ftp://a" onmouseover="alert('hello world');"
13938 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
13948 Fuzz testing: Parser22
13950 http://===r:::https://b
13954 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
13962 # Known to produce bad XML for now
13964 Fuzz testing: Parser24
13971 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
13972 <br style="onmouseover='alert(document.cookie);' " />
13974 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13979 <u class="|">}}}} >
13980 <br style="onmouseover='alert(document.cookie);'" />
13982 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13991 # Note: the current result listed for this is not what the original one was,
13992 # but the original bug was JavaScript injection, which is fixed in any case.
13993 # It's not clear that the original result listed was any more correct than the
13994 # current one. Original result:
13997 # <li class="||">
13998 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14000 Fuzz testing: Parser25 (bug 6055)
14006 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
14008 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14013 Fuzz testing: URL adjacent extension (with space, clean)
14016 http://example.com <nowiki>junk</nowiki>
14018 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
14023 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
14026 http://example.com<nowiki>junk</nowiki>
14028 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
14033 Fuzz testing: URL adjacent extension (no space, dirty; pre)
14036 http://example.com<pre>junk</pre>
14038 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
14043 Fuzz testing: image with bogus manual thumbnail
14045 [[Image:foobar.jpg|thumbnail= ]]
14047 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
14050 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,null,null]}'/>
14054 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
14056 <pre dir=" "></pre>
14058 <pre dir=" "></pre>
14063 Parsing optional HTML elements (Bug 6171)
14068 <td> Some tabular data</td>
14069 <td> More tabular data ...
14070 <td> And yet som tabular data</td>
14076 <td> Some tabular data</td>
14077 <td> More tabular data ...
14078 </td><td> And yet som tabular data</td>
14085 Correct handling of <td>, <tr> (Bug 6171)
14090 <td> Some tabular data</td>
14091 <td> More tabular data ...</td>
14092 <td> And yet som tabular data</td>
14098 <td> Some tabular data</td>
14099 <td> More tabular data ...</td>
14100 <td> And yet som tabular data</td>
14108 Parsing crashing regression (fr:JavaScript)
14112 <p></body></x>
14117 Inline wiki vs wiki block nesting
14123 <p><b>Bold paragraph</b>
14124 </p><p>New wiki paragraph
14129 Inline HTML vs wiki block nesting
14137 <p><b>Bold paragraph</b>
14138 </p><p>New wiki paragraph
14142 # Original result was this:
14143 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
14145 # While that might be marginally more intuitive, maybe, the six-apostrophe
14146 # construct is clearly pathological and the result stated here (which is what
14147 # the parser actually does) is about as reasonable as anything.
14149 Mixing markup for italics and bold
14152 '''bold''''''bold''bolditalics'''''
14154 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
14162 Article for special page transclusion test
14166 Special page transclusion
14169 {{Special:Prefixindex/Xyzzyx}}
14171 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14176 Special page transclusion twice (bug 5021)
14179 {{Special:Prefixindex/Xyzzyx}}
14180 {{Special:Prefixindex/Xyzzyx}}
14182 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14183 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14188 Transclusion of default MediaWiki message
14190 {{MediaWiki:Mainpage}}
14197 Transclusion of nonexistent MediaWiki message
14199 {{MediaWiki:Mainpagexxx}}
14201 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
14206 Transclusion of MediaWiki message with underscore
14208 {{MediaWiki:history_short}}
14215 Transclusion of MediaWiki message with space
14217 {{MediaWiki:history short}}
14224 Invalid header with following text
14234 Section extraction test (section 0)
14254 Section extraction test (section 1)
14276 Section extraction test (section 2)
14297 Section extraction test (section 3)
14317 Section extraction test (section 4)
14341 Section extraction test (section 5)
14361 Section extraction test (section 6)
14382 Section extraction test (section 7)
14402 Section extraction test (section 8)
14422 Section extraction test (section 9)
14443 Section extraction test (section 10)
14463 Section extraction test (nonexistent section 11)
14482 Section extraction test with bogus heading (section 1)
14487 ==bogus== not a legal section
14491 ==bogus== not a legal section
14495 Section extraction test with bogus heading (section 2)
14500 ==bogus== not a legal section
14507 Section extraction test with comment after heading (section 1)
14519 Section extraction test with comment after heading (section 2)
14531 Section extraction test with bogus <nowiki> heading (section 1)
14536 ==bogus== <nowiki>not a legal section</nowiki>
14540 ==bogus== <nowiki>not a legal section</nowiki>
14544 Section extraction test with bogus <nowiki> heading (section 2)
14549 ==bogus== <nowiki>not a legal section</nowiki>
14556 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
14557 # instead of respecting commented sections
14559 Section extraction prefixed by comment (section 1)
14570 Section extraction prefixed by comment (section 2)
14581 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
14582 # instead of respecting HTML-style headings
14584 Section extraction, mixed wiki and html (section 1)
14600 Section extraction, mixed wiki and html (section 2)
14616 # Formerly testing for bug 3342
14618 Section extraction, heading surrounded by <noinclude>
14622 <noinclude>==unmarked==</noinclude>
14628 # Test behavior of bug 19910
14630 Sectiion with all-equals
14635 The line above must have a trailing space
14638 But just in case it doesn't...
14642 But just in case it doesn't...
14646 Section replacement test (section 0)
14677 Section replacement test (section 1)
14706 Section replacement test (section 2)
14736 Section replacement test (section 3)
14767 Section replacement test (section 4)
14794 Section replacement test (section 5)
14825 Section replacement test (section 6)
14855 Section replacement test (section 7)
14886 Section replacement test (section 8)
14917 Section replacement test (section 9)
14946 Section replacement test (section 10)
14976 Section replacement test with initial whitespace (bug 13728)
14980 Preformatted initial line
14984 Preformatted initial line
14991 Section extraction, heading followed by pre with 20 spaces (bug 6398)
15003 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
15016 Section extraction, <pre> around bogus header (bug 10309)
15033 Section replacement, <pre> around bogus header (bug 10309)
15035 noxml replace=2,"xxx"
15056 Handling of 
 in URLs
15060 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15063 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
15065 a</a></li></ul></li></ul>
15069 Handling of %0A in URLs
15073 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15076 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15080 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
15082 5 quotes, code coverage +1 line
15089 <p><b><i></i></b></p>
15092 # same html as previous, but wikitext adjusted to match parsoid html2wt
15093 # note that wt2html and html2html will put the <i> before the <b>
15095 5 quotes, code coverage +1 line w/ nowiki (1)
15097 parsoid=wt2wt,html2wt
15099 '''''<nowiki/>'''''
15104 <p><b><i></i></b></p>
15107 # same as previous, just swapping the <i> and <b>
15109 5 quotes, code coverage +1 line w/ nowiki (2)
15111 '''''<nowiki/>'''''
15116 <p><i><b></b></i></p>
15120 Special:Search page linking.
15124 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
15131 title=[[Parser test]]
15136 * {{FULLPAGENAMEE}}
15138 * {{BASEPAGENAMEE}}
15142 * {{ROOTPAGENAMEE}}
15144 * {{TALKPAGENAMEE}}
15145 * {{SUBJECTPAGENAME}}
15146 * {{SUBJECTPAGENAMEE}}
15149 * {{NAMESPACENUMBER}}
15153 * {{SUBJECTSPACEE}}
15154 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
15156 <ul><li> Parser test</li>
15157 <li> Parser_test</li>
15158 <li> Parser test</li>
15159 <li> Parser_test</li>
15160 <li> Parser test</li>
15161 <li> Parser_test</li>
15162 <li> Parser test</li>
15163 <li> Parser_test</li>
15164 <li> Parser test</li>
15165 <li> Parser_test</li>
15166 <li> Talk:Parser test</li>
15167 <li> Talk:Parser_test</li>
15168 <li> Parser test</li>
15169 <li> Parser_test</li>
15177 <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>
15180 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
15190 image4 |300px| centre
15191 image5.svg| http://///////
15196 <ul class="gallery mw-gallery-traditional">
15197 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15198 <div class="thumb" style="height: 150px;">Image1.png</div>
15199 <div class="gallerytext">
15202 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15203 <div class="thumb" style="height: 150px;">Image2.gif</div>
15204 <div class="gallerytext">
15209 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15210 <div class="thumb" style="height: 150px;">Image3</div>
15211 <div class="gallerytext">
15214 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15215 <div class="thumb" style="height: 150px;">Image4</div>
15216 <div class="gallerytext">
15221 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15222 <div class="thumb" style="height: 150px;">Image5.svg</div>
15223 <div class="gallerytext">
15224 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
15228 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15229 <div class="thumb" style="height: 150px;">* image6</div>
15230 <div class="gallerytext">
15238 Gallery (with options)
15240 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
15241 File:Nonexistant.jpg|caption
15242 File:Nonexistant.jpg
15243 image:foobar.jpg|some '''caption''' [[Main Page]]
15245 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
15248 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
15249 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
15250 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15251 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15252 <div class="gallerytext">
15257 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15258 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15259 <div class="gallerytext">
15262 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15263 <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>
15264 <div class="gallerytext">
15265 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15269 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15270 <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>
15271 <div class="gallerytext">
15274 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15275 <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>
15276 <div class="gallerytext">
15286 Gallery with link that has fragment
15289 image:foobar.jpg|link=Main_Page
15290 image:foobar.jpg|link=Main_Page#section
15291 image:foobar.jpg|link=Main Page#section|caption
15294 <ul class="gallery mw-gallery-traditional">
15295 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15296 <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>
15297 <div class="gallerytext">
15300 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15301 <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>
15302 <div class="gallerytext">
15305 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15306 <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>
15307 <div class="gallerytext">
15317 Gallery with wikitext inside caption
15320 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
15321 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
15324 <ul class="gallery mw-gallery-traditional">
15325 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15326 <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>
15327 <div class="gallerytext">
15328 <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>
15332 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15333 <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>
15334 <div class="gallerytext">
15335 <p>This is a test template
15344 gallery (with showfilename option)
15346 <gallery showfilename>
15347 File:Nonexistant.jpg|caption
15348 File:Nonexistant.jpg
15349 image:foobar.jpg|some '''caption''' [[Main Page]]
15353 <ul class="gallery mw-gallery-traditional">
15354 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15355 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15356 <div class="gallerytext">
15357 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15362 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15363 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15364 <div class="gallerytext">
15365 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15369 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15370 <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>
15371 <div class="gallerytext">
15372 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15373 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15377 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15378 <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>
15379 <div class="gallerytext">
15380 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15389 Gallery (with namespace-less filenames)
15392 File:Nonexistant.jpg
15398 <ul class="gallery mw-gallery-traditional">
15399 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15400 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15401 <div class="gallerytext">
15404 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15405 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15406 <div class="gallerytext">
15409 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15410 <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>
15411 <div class="gallerytext">
15414 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15415 <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>
15416 <div class="gallerytext">
15424 HTML Hex character encoding (spells the word "JavaScript")
15426 parsoid=wt2html,wt2wt,html2html
15428 JavaScript
15430 <p>JavaScript
15433 <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>
15437 HTML Hex character encoding bogus encoding (bug 26437 regression check)
15441 <p>&#xsee;&#XSEE;
15444 <p>&#xsee;&#XSEE;</p>
15448 HTML Hex character encoding mixed case
15450 parsoid=wt2html,wt2wt,html2html
15457 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
15461 __FORCETOC__ override
15473 ISBN 978-0-1234-56 789
15475 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
15480 ISBN followed by 5 spaces
15491 ISBN ISBN 1234567890
15493 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15502 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
15507 ISBN with empty prefix (parsoid test)
15511 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
15515 Bug 22905: <abbr> followed by ISBN followed by </a>
15517 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
15519 <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>
15528 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
15533 Double RFC with a wiki link
15537 <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>
15546 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
15551 Centre-aligned image
15553 [[Image:foobar.jpg|centre]]
15555 <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>
15562 [[Image:foobar.jpg|none]]
15564 <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>
15569 Width + Height sized image (using px) (height is ignored)
15571 [[Image:foobar.jpg|640x480px]]
15573 <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>
15578 Width-sized image (using px, no following whitespace)
15580 [[Image:foobar.jpg|640px]]
15582 <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>
15587 Width-sized image (using px, with following whitespace - test regression from r39467)
15589 [[Image:foobar.jpg|640px ]]
15591 <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>
15596 Width-sized image (using px, with preceding whitespace - test regression from r39467)
15598 [[Image:foobar.jpg| 640px]]
15600 <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>
15605 Image with page parameter
15609 [[File:LoremIpsum.djvu|page=2]]
15611 <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>
15616 Another italics / bold test
15624 # Note the results may be incorrect, as parserTest output included this:
15625 # XML error: Mismatched tag at byte 6120:
15626 # ...<dd> </dt></dl> </dd...
15657 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
15659 Images with the "|" character in the comment
15661 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
15663 <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>
15666 <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>
15670 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
15672 <html><script>alert(1);</script></html>
15674 <p><html><script>alert(1);</script></html>
15679 HTML with raw HTML ($wgRawHtml==true)
15683 <html><script>alert(1);</script></html>
15685 <p><script>alert(1);</script>
15690 Parents of subpages, one level up
15692 subpage title=[[Subpage test/L1/L2/L3]]
15696 <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>
15702 Parents of subpages, one level up, not named
15704 subpage title=[[Subpage test/L1/L2/L3]]
15708 <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>
15715 Parents of subpages, two levels up
15717 subpage title=[[Subpage test/L1/L2/L3]]
15723 <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
15724 </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>
15729 Parents of subpages, two levels up, without trailing slash or name.
15731 subpage title=[[Subpage test/L1/L2/L3]]
15740 Parents of subpages, two levels up, with lots of extra trailing slashes.
15742 subpage title=[[Subpage test/L1/L2/L3]]
15746 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
15751 Subpage test/L1/L2/L3Sibling
15757 Transclusion of a sibling page (one level up)
15759 subpage title=[[Subpage test/L1/L2/L3]]
15768 Transclusion of a child page
15770 subpage title=[[Subpage test/L1/L2]]
15779 Non-transclusion because of too many up levels
15781 subpage title=[[Subpage test/L1/L2/L3]]
15783 {{../../../../More than parent}}
15785 <p>{{../../../../More than parent}}
15790 Definition list code coverage
15796 <dl><dt> title  </dt>
15798 <dt> title </dt>
15806 Don't fall for the self-closing div
15808 <div>hello world</div/>
15810 <div>hello world</div>
15819 <p>[[:Template:Msg]]
15828 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
15832 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
15834 Always escape literal '>' in output, not just after '<'
15848 <p>This is a test template
15849 This is a test template
15861 Inclusion of !userCanEdit() content
15865 <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>
15871 Out-of-order TOC heading levels
15880 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15882 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
15884 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
15885 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
15888 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
15890 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
15891 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
15897 <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>
15898 <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>
15899 <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>
15900 <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>
15901 <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>
15902 <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>
15908 ISBN with a dummy number
15918 ISBN with space-delimited number
15922 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
15928 ISBN with multiple spaces, no number
15947 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15948 </p><p>ISBN 12345678901
15954 ISBN with trailing year (bug 8110)
15956 ISBN 1-234-56789-0 - 2006
15958 ISBN 1 234 56789 0 - 2006
15960 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
15961 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
15969 {{anchorencode:foo bar©#%n}}
15971 <p>foo_bar.C2.A9.23.25n
15976 anchorencode trims spaces
15978 {{anchorencode: __pretty__please__}}
15985 anchorencode deals with links
15987 {{anchorencode: [[hello|world]] [[hi]]}}
15994 anchorencode deals with templates
15996 {{anchorencode: {{Foo}} }}
16003 anchorencode encodes like the TOC generator: (bug 18431)
16005 === _ +:.3A%3A&&]] ===
16006 {{anchorencode: _ +:.3A%3A&&]] }}
16009 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
16010 <p>.2B:.3A.253A.26.26.5D.5D
16015 Bug 6200: blockquotes and paragraph formatting
16036 Bug 8293: Use of center tag ruins paragraph formatting
16057 Parsing of overlapping (improperly nested) inline html tags
16059 <span><s>x</span></s>
16061 <p><span><s>x</span></s></span>
16064 <p><span><s>x</s></span>
16069 ### Language variants related tests
16072 Self-link in language variants
16074 title=[[Dunav]] language=sr
16076 Both [[Dunav]] and [[Дунав]] are names for this river.
16078 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
16089 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
16091 title=[[Duna]] language=sr
16093 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
16095 <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.
16100 Link to a section of a variant of this title shouldn't be parsed as self-link
16102 title=[[Duna]] language=sr
16104 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
16106 <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.
16111 Link to pages in language variants
16115 Main Page can be written as [[Маин Паге]]
16117 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
16123 Multiple links to pages in language variants
16127 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
16129 <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>.
16135 Simple template in language variants
16141 <p>This is a test template
16147 Template with explicit namespace in language variants
16153 <p>This is a test template
16159 Basic test for template parameter in language variants
16163 {{парамтест|param=foo}}
16165 <p>This is a test template with parameter foo
16171 Simple category in language variants
16175 [[Category:МедиаWики Усер'с Гуиде]]
16177 <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>
16194 Don't convert blue categorylinks to another variant (bug 33210)
16198 [[A]][[Category:分类]]
16200 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
16205 Stripping -{}- tags (language variants)
16209 Latin proverb: -{Ne nuntium necare}-
16211 <p>Latin proverb: Ne nuntium necare
16217 Prevent conversion with -{}- tags (language variants)
16219 language=sr variant=sr-ec
16221 Latinski: -{Ne nuntium necare}-
16223 <p>Латински: Ne nuntium necare
16229 Prevent conversion of text with -{}- tags (language variants)
16231 language=sr variant=sr-ec
16233 Latinski: -{Ne nuntium necare}-
16235 <p>Латински: Ne nuntium necare
16241 Prevent conversion of links with -{}- tags (language variants)
16243 language=sr variant=sr-ec
16247 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16253 -{}- tags within headlines (within html for parserConvert())
16255 language=sr variant=sr-ec
16259 <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>
16265 Explicit definition of language variant alternatives
16267 language=zh variant=zh-tw
16269 -{zh:China;zh-tw:Taiwan}-, not China
16271 <p>Taiwan, not China
16277 Conversion around HTML tags
16279 language=sr variant=sr-ec
16281 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
16282 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
16285 <span title="ЛаCтин">ски</span>
16291 Explicit session-wise language variant mapping (A flag and - flag)
16293 language=zh variant=zh-tw
16295 Taiwan is not China.
16296 But -{A|zh:China;zh-tw:Taiwan}- is China,
16297 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
16298 and -{China}- is China.
16300 <p>Taiwan is not China.
16301 But Taiwan is Taiwan,
16302 (This should be stripped!)
16303 and China is China.
16308 Explicit session-wise language variant mapping (H flag for hide)
16310 language=zh variant=zh-tw
16312 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
16315 <p>(This should be stripped!)
16321 Adding explicit conversion rule for title (T flag)
16323 language=zh variant=zh-tw showtitle
16325 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16328 <p>Should be stripped!
16333 Testing that changing the language variant here in the tests actually works
16335 language=zh variant=zh showtitle
16337 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16340 <p>Should be stripped!
16345 Recursive conversion of alt and title attrs shouldn't clear converter state
16347 language=zh variant=zh-cn showtitle
16349 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
16350 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
16354 Should be stripped<span title="Exclamation">!</span>
16359 Bug 24072: more test on conversion rule for title
16361 language=zh variant=zh-tw showtitle
16363 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16364 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
16367 <p>This should be stripped!
16368 This won't take interferes with the title rule.
16373 Partly disable title conversion if variant == main language code
16375 language=zh variant=zh title=[[ZH]] showtitle
16377 -{T|zh-cn:CN;zh-tw:TW}-
16385 Partly disable title conversion if variant == main language code, more
16387 language=zh variant=zh title=[[ZH]] showtitle
16397 Raw output of variant escape tags (R flag)
16399 language=zh variant=zh-tw
16401 Raw: -{R|zh:China;zh-tw:Taiwan}-
16403 <p>Raw: zh:China;zh-tw:Taiwan
16408 Nested using of manual convert syntax
16410 language=zh variant=zh-hk
16412 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
16414 <p>Nested: Hello Hong Kong!
16419 Proper conversion of text in external links
16421 language=sr variant=sr-ec
16423 http://www.google.com
16424 gopher://www.google.com
16425 [http://www.google.com http://www.google.com]
16426 [gopher://www.google.com gopher://www.google.com]
16427 [https://www.google.com irc://www.google.com]
16428 [ftp://www.google.com www.google.com/ftp://dir]
16429 [//www.google.com www.google.com]
16431 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16432 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16433 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16434 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16435 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
16436 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
16437 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
16442 Do not convert roman numbers to language variants
16444 language=sr variant=sr-ec
16448 <p>Фридрих IV је цар.
16453 Unclosed language converter markup "-{"
16464 Don't convert raw rule "-{R|=>}-" to "=>"
16475 Don't break link parsing if language converter markup is in the caption.
16477 language=sr variant=sr-ec
16479 [[Main Page|-{R|main page}-]]
16481 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
16485 # This test is currently broken in the PHP parser (bug 52661)
16487 Don't break image parsing if language converter markup is in the caption.
16492 [[File:Foobar.jpg|-{R|caption}-]]
16494 <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>
16498 # This test is currently broken in the PHP parser (bug 52661)
16500 Don't break list handling if language converter markup is in the item.
16502 language=zh variant=zh-cn
16505 ;-{zh-cn:AAA;zh-tw:BBB}-
16512 # This test is currently broken in the PHP parser (bug 52661)
16514 Don't break table handling if language converter markup is in the cell.
16516 language=sr variant=sr-ec
16533 Bug 529: Uncovered bullet
16542 # Plain MediaWiki does not remove empty lists, but tidy actually does.
16543 # Templates in Wikipedia rely on this behavior, as tidy has always been
16544 # enabled there. These tests are normally run *without* tidy, so specify the
16545 # full output here.
16546 # To test realistic parsing behavior, apply a tidy-like transformation to both
16547 # the expected output and your parser's output.
16549 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
16551 ******* Foo {{bullet}}
16553 <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>
16559 Bug 529: Uncovered table already at line-start
16582 Bug 529: Uncovered bullet in parser function result
16584 * Foo {{lc:{{bullet}} }}
16592 Bug 5678: Double-parsed template argument
16594 {{lc:{{{1}}}|hello}}
16601 Bug 5678: Double-parsed template invocation
16603 {{lc:{{paramtest {{!}} param = hello }} }}
16605 <p>{{paramtest | param = hello }}
16610 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
16613 title=[[Main Page]]
16615 {{PRVNÍVELKÉ:ěščř}}
16616 {{prvnívelké:ěščř}}
16636 Morwen/13: Unclosed link followed by heading
16643 <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>
16648 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
16655 <h1><span class="mw-headline" id="heading">heading</span></h1>
16660 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
16667 <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>
16682 Paragraphs inside divs (no extra line breaks)
16694 Paragraphs inside divs (extra line break on open)
16709 Paragraphs inside divs (extra line break on close)
16724 Paragraphs inside divs (extra line break on open and close)
16741 Nesting tags, paragraphs on lines which begin with <div>
16745 <div></div><strong>A
16754 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
16756 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
16758 <blockquote>Line one
16760 Line two</blockquote>
16762 <blockquote>Line one
16763 Line two</blockquote>
16768 Bug 6200: paragraphs inside blockquotes (extra line break on open)
16773 Line two</blockquote>
16778 Line two</blockquote>
16783 Bug 6200: paragraphs inside blockquotes (extra line break on close)
16785 <blockquote>Line one
16790 <blockquote>Line one
16798 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
16815 Paragraphs inside blockquotes/divs (no extra line breaks)
16817 <blockquote><div>Line one
16819 Line two</div></blockquote>
16821 <blockquote><div>Line one
16822 Line two</div></blockquote>
16827 Paragraphs inside blockquotes/divs (extra line break on open)
16832 Line two</div></blockquote>
16837 Line two</div></blockquote>
16842 Paragraphs inside blockquotes/divs (extra line break on close)
16844 <blockquote><div>Line one
16847 </div></blockquote>
16849 <blockquote><div>Line one
16852 </div></blockquote>
16857 Paragraphs inside blockquotes/divs (extra line break on open and close)
16863 </div></blockquote>
16869 </div></blockquote>
16874 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
16876 wgLinkHolderBatchSize=0
16882 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
16883 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
16884 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
16889 Free external link invading image caption
16891 [[Image:Foobar.jpg|thumb|http://x|hello]]
16893 <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>
16898 Bug 15196: localised external link numbers
16902 [http://en.wikipedia.org/]
16904 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
16907 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
16911 Multibyte character in padleft
16913 {{padleft:-Hello|7|Æ}}
16920 Multibyte character in padright
16922 {{padright:Hello-|7|Æ}}
16929 formatdate parser function
16931 {{#formatdate:2009-03-24}}
16933 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
16938 formatdate parser function, with default format
16940 {{#formatdate:2009-03-24|mdy}}
16942 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
16947 Spacing of numbers in formatted dates
16949 {{#formatdate:January 15}}
16951 <p><span class="mw-formatted-date" title="01-15">January 15</span>
16956 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
16958 language=nl title=[[MediaWiki:Common.css]]
16960 {{#formatdate:2009-03-24|dmy}}
16962 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
16975 Edit comment with link
16979 I like the [[Main Page]] a lot
16981 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
16985 Edit comment with link and link text
16989 I like the [[Main Page|best pages]] a lot
16991 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16995 Edit comment with link and link text with suffix
16999 I like the [[Main Page|best page]]s a lot
17001 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
17005 Edit comment with section link (non-local, eg in history list)
17007 comment title=[[Main Page]]
17009 /* External links */ removed bogus entries
17011 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17015 Edit comment with section link and text before it (non-local, eg in history list)
17017 comment title=[[Main Page]]
17019 pre-comment text /* External links */ removed bogus entries
17021 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>
17025 Edit comment with section link (local, eg in diff view)
17027 comment local title=[[Main Page]]
17029 /* External links */ removed bogus entries
17031 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17035 Edit comment with subpage link (bug 14080)
17039 title=[[Subpage test]]
17041 Poked at a [[/subpage]] here...
17043 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
17047 Edit comment with subpage link and link text (bug 14080)
17051 title=[[Subpage test]]
17053 Poked at a [[/subpage|neat little page]] here...
17055 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
17059 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
17062 title=[[Subpage test]]
17064 Poked at a [[/subpage]] here...
17066 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
17070 Edit comment with bare anchor link (local, as on diff)
17074 title=[[Main Page]]
17078 <a href="#section">#section</a>
17082 Edit comment with bare anchor link (non-local, as on history)
17085 title=[[Main Page]]
17089 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
17093 Anchor starting with underscore
17097 <p><a href="#_ref">One</a>
17102 Id starting with underscore
17104 <div id="_ref"></div>
17106 <div id="_ref"></div>
17111 Space normalisation on autocomment (bug 22784)
17114 title=[[Main Page]]
17116 /* __hello__world__ */
17118 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
17122 percent-encoding and + signs in comments (Bug 26410)
17126 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
17128 <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>
17132 Bad images - basic functionality
17141 Bad images - bug 16039: text after bad image disappears
17155 Verify that displaytitle works (bug #22501) no displaytitle
17159 wgAllowDisplayTitle=true
17160 wgRestrictDisplayTitle=false
17162 this is not the the title
17165 <p>this is not the the title
17170 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
17175 wgAllowDisplayTitle=true
17176 wgRestrictDisplayTitle=false
17178 this is not the the title
17179 {{DISPLAYTITLE:whatever}}
17182 <p>this is not the the title
17187 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
17192 wgAllowDisplayTitle=true
17193 wgRestrictDisplayTitle=true
17195 this is not the the title
17196 {{DISPLAYTITLE:whatever}}
17199 <p>this is not the the title
17204 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
17209 wgAllowDisplayTitle=true
17210 wgRestrictDisplayTitle=true
17212 this is not the the title
17213 {{DISPLAYTITLE:screen}}
17216 <p>this is not the the title
17221 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
17226 wgAllowDisplayTitle=false
17228 this is not the the title
17229 {{DISPLAYTITLE:screen}}
17232 <p>this is not the the title
17233 <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>
17238 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
17243 wgAllowDisplayTitle=false
17245 this is not the the title
17248 <p>this is not the the title
17253 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
17258 wgAllowDisplayTitle=true
17259 wgRestrictDisplayTitle=true
17261 this is not the the title
17262 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
17264 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
17265 <p>this is not the the title
17270 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
17275 wgAllowDisplayTitle=true
17276 wgRestrictDisplayTitle=true
17278 this is not the the title
17279 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
17281 <span style="color: red;">s</span>creen
17282 <p>this is not the the title
17287 preload: check <noinclude> and <includeonly>
17291 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
17297 preload: check <onlyinclude>
17301 Goodbye <onlyinclude>Hello world</onlyinclude>
17307 preload: can pass tags through if we want to
17311 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
17313 <includeonly>Hello world</includeonly>
17317 preload: check that it doesn't try to do tricks
17321 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17323 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17327 Play a bit with r67090 and bug 3158
17331 <div style="width:50% !important"> </div>
17332 <div style="width:50% !important"> </div>
17333 <div style="width:50% !important"> </div>
17334 <div style="border : solid;"> </div>
17336 <div style="width:50% !important"> </div>
17337 <div style="width:50% !important"> </div>
17338 <div style="width:50% !important"> </div>
17339 <div style="border : solid;"> </div>
17344 HTML5 data attributes
17346 <span data-foo="bar">Baz</span>
17347 <p data-abc-def_hij="">Quuz</p>
17349 <p><span data-foo="bar">Baz</span>
17351 <p data-abc-def_hij="">Quuz</p>
17356 percent-encoding and + signs in internal links (Bug 26410)
17358 [[User:+%]] [[Page+title%]]
17359 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
17360 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
17361 [[%33%45]] [[%33%45+]]
17363 <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>
17364 <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>
17365 <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>
17366 <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>
17371 Special characters in embedded file links (bug 27679)
17373 [[File:Contains & ampersand.jpg]]
17374 [[File:Does not exist.jpg|Title with & ampersand]]
17376 <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>
17377 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
17383 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
17385 Text's been normalized?
17387 <p>Text's been normalized?
17392 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
17394 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
17396 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
17401 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
17403 [http://www.example.org/ ideograms]
17405 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
17410 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
17412 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
17414 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
17438 Bug 31098 Template which includes system messages which includes the template
17442 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17443 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17448 Bug31490 Turkish: ucfirst 'blah'
17459 Bug31490 Turkish: ucfirst 'ix'
17470 Bug31490 Turkish: lcfirst 'BLAH'
17481 Bug31490 Turkish: ucfırst (with a dotless i)
17487 <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>
17492 Bug31490 ucfırst (with a dotless i) with English language
17498 <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>
17503 Bug 26375: TOC with italics
17505 title=[[Main Page]]
17508 == ''Lost'' episodes ==
17510 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17512 <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>
17516 <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>
17521 Bug 26375: TOC with bold
17523 title=[[Main Page]]
17526 == '''should be bold''' then normal text ==
17528 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17530 <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>
17534 <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>
17539 Bug 33845: Headings become cursive in TOC when they contain an image
17541 title=[[Main Page]]
17544 == Image [[Image:foobar.jpg]] ==
17546 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17548 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
17552 <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>
17557 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
17559 title=[[Main Page]]
17562 == <blockquote>Quote</blockquote> ==
17564 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17566 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
17570 <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>
17575 Unclosed tags in TOC
17577 title=[[Main Page]]
17581 <small>Hanc marginis exiguitas non caperet.</small>
17584 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17586 <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>
17590 <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>
17591 <p><small>Hanc marginis exiguitas non caperet.</small>
17597 Multiple tags in TOC
17600 == <i>Foo</i> <b>Bar</b> ==
17602 == <i>Foo</i> <blockquote>Bar</blockquote> ==
17604 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17606 <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>
17607 <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>
17611 <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>
17612 <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>
17617 Tags with parameters in TOC
17620 == <sup class="in-h2">Hello</sup> ==
17622 == <sup class="a > b">Evilbye</sup> ==
17624 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17626 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
17627 <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>
17631 <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>
17632 <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>
17637 span tags with directionality in TOC
17640 == <span dir="ltr">C++</span> ==
17642 == <span dir="rtl">זבנג!</span> ==
17644 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
17646 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
17648 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
17650 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17652 <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>
17653 <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>
17654 <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>
17655 <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>
17656 <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>
17660 <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>
17661 <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>
17662 <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>
17663 <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>
17664 <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>
17671 == {{int:headline_sample}} ==
17675 Bug 32057: Title needed when expanding <h> nodes.
17677 title=[[Main Page]]
17681 <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>
17686 Strip marker in urlencode
17688 {{urlencode:x<nowiki/>y}}
17689 {{urlencode:x<nowiki/>y|wiki}}
17690 {{urlencode:x<nowiki/>y|path}}
17717 Strip marker in formatNum
17719 {{formatnum:1<nowiki/>2}}
17720 {{formatnum:1<nowiki/>2|R}}
17728 Check noCommafy in formatNum
17732 {{formatnum:123456.78}}
17733 {{formatnum:123456.78|NOSEP}}
17741 Wrong option for formatNum (bug 56199)
17743 {{formatnum:1,234.56|Random}}
17744 {{formatnum:1,234.56|EVERYTHING}}
17745 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
17754 Strip marker in grammar
17758 {{grammar:elative|foo<nowiki/>bar}}
17765 Strip marker in padleft
17767 {{padleft:|2|x<nowiki/>y}}
17774 Strip marker in padright
17776 {{padright:|2|x<nowiki/>y}}
17783 Strip marker in anchorencode
17785 {{anchorencode:x<nowiki/>y}}
17792 nowiki inside link inside heading (bug 18295)
17794 ==[[foo|x<nowiki>y</nowiki>z]]==
17796 <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>
17801 new support for bdi element (bug 31817)
17803 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17805 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17810 Ignore pipe between table row attributes
17814 |- id=foo | style='color: red'
17822 <tr id="foo" style="color: red">
17829 Gallery override link with WikiLink (bug 34852)
17832 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
17835 <ul class="gallery mw-gallery-traditional">
17836 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17837 <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>
17838 <div class="gallerytext">
17848 Gallery override link with absolute external link (bug 34852)
17851 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
17854 <ul class="gallery mw-gallery-traditional">
17855 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17856 <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>
17857 <div class="gallerytext">
17867 Gallery override link with malicious javascript (bug 34852)
17870 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
17873 <ul class="gallery mw-gallery-traditional">
17874 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17875 <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>
17876 <div class="gallerytext">
17886 Gallery with invalid title as link (bug 43964)
17889 File:foobar.jpg|link=<
17892 <ul class="gallery mw-gallery-traditional">
17893 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17894 <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>
17895 <div class="gallerytext">
17903 Language parser function
17912 Padleft and padright as substr
17914 {{padleft:|3|abcde}}
17915 {{padright:|3|abcde}}
17923 Special parser function
17925 {{#special:RandomPage}}
17926 {{#special:BaDtItLe}}
17927 {{#special:Foobar}}
17936 Bug 34939 - Case insensitive link parsing ([HttP://])
17938 [HttP://MediaWiki.Org/]
17940 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
17943 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
17947 Bug 34939 - Case insensitive link parsing ([HttP:// title])
17949 [HttP://MediaWiki.Org/ MediaWiki]
17951 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
17956 Bug 34939 - Case insensitive link parsing (HttP://)
17958 HttP://MediaWiki.Org/
17960 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
17963 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
17981 <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>
17982 <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>
17983 <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>
17984 <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>
17985 <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>
17991 ### Parsoid-specific tests
17992 ### Parsoid-PHP parser incompatibilities
17995 1. SOL-sensitive wikitext tokens as template-args
17997 parsoid=wt2html,wt2wt
18003 <span about="#mwt1" typeof="mw:Transclusion">
18004 </span><ul about="#mwt1"><li>a</li>
18006 <span about="#mwt2" typeof="mw:Transclusion">
18007 </span><ol about="#mwt2"><li>a</li>
18009 <span about="#mwt3" typeof="mw:Transclusion">
18010 </span><dl about="#mwt3"><dd>a</dd>
18014 #### -----------------------------------------------------------------
18015 #### Parsoid-specific functionality tests
18016 #### -----------------------------------------------------------------
18018 # Bug 63642: Formatting elt fixup is cleaned up.
18019 # We know wt2wt will fail, but we expect selser to pass.
18020 # Due to the nature of our testing, wt2wt and selser tests will enter the
18021 # blacklist and we'll catch selser regressions based on changes to the
18022 # blacklist entries for selser tests.
18024 Bad treebuilder fixup of formatting elt is cleaned up
18026 parsoid=wt2html,wt2wt
18031 [[Image:Foobar.jpg|right|Test]]
18037 <p><small></small></p>
18038 <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>
18043 #### ----------------------------------------------------------------
18044 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
18045 #### tags. Parsoid's output for these tags differs from that of the
18047 #### ----------------------------------------------------------------
18050 Ref: 1. ref-location should be replaced with an index span
18055 B <ref name="x">foo</ref>
18058 <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>
18059 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>
18060 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>
18064 Ref: 2. ref-tags with identical names should all get the same index
18068 A <ref name="x">foo</ref>
18071 <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>
18072 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>
18076 Ref: 3. spaces in ref-names should be ignored
18080 A <ref name="x">foo</ref>
18081 B <ref name=" x " />
18084 <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>
18085 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>
18086 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>
18090 Ref: 4. 'constructor' should be accepted as a valid ref-name
18091 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
18095 A <ref name="constructor">foo</ref>
18097 <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>
18101 Ref: 5. body should accept generic wikitext
18106 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
18111 <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>
18113 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
18114 <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>
18120 Ref: 6. indent-pres should not be output in ref-body
18132 <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>
18134 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
18135 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18143 Ref: 7. No p-wrapping in ref-body
18162 <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>
18164 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18165 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18180 Ref: 8. transclusion wikitext has lower precedence
18184 A <ref> foo {{echo|</ref> B C}}
18188 <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>
18189 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
18190 <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>
18195 Ref: 9. unclosed comments should not leak out of ref-body
18199 A <ref> foo <!--</ref> B C
18202 <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>
18203 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18204 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
18209 Ref: 10. Unclosed HTML tags should not leak out of ref-body
18213 A <ref> <b> foo </ref> B C
18217 <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>
18220 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18221 <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>
18226 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
18233 <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
18234 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>
18238 Ref: 12. ref-tags act as trailing newline migration barrier
18242 <!--the newline at the end of this line moves out of the p-tag-->a
18244 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
18249 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
18252 <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>
18253 <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>
18260 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
18268 <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
18269 <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>
18273 Ref: 14. A nested ref-tag should be emitted as plain text
18277 <ref>foo <ref>bar</ref> baz</ref>
18281 <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>
18283 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18284 <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>
18289 Ref: 15. ref-tags with identical names should get identical indexes
18293 A1 <ref name="a">foo</ref> A2 <ref name="a" />
18294 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
18298 <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>
18299 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>
18301 <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>
18305 ## We don't bother wt2wt-ing non-standard whitespace
18307 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
18315 <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>
18317 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18318 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
18322 References: 1. references tag without any refs should be handled properly
18328 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
18332 References: 2. references tag with group only outputs references from that group
18336 A <ref group="a">foo</ref>
18337 B <ref group="b">bar</ref>
18339 <references group="a" />
18341 <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>
18342 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>
18344 <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>
18349 References: 3. ref list should be cleared after processing references
18361 <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>
18363 <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>
18366 <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>
18368 <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>
18373 References: 4. only referenced group should be cleared after processing references
18377 A <ref group="a">afoo</ref>
18380 <references group="a" />
18386 <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>
18387 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>
18389 <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>
18392 <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>
18394 <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>
18399 References: 5. ref tags in references should be processed while ignoring all other content
18404 B <ref name="b">bar</ref>
18407 <ref name="a">foo</ref>
18408 This should just get lost.
18411 <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>
18412 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>
18415 <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":{}}'>
18416 <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>
18417 <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>
18422 References: 6. <references /> from a transclusion
18426 <ref>Foo</ref> {{echo|<references />}}
18428 <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>
18432 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
18436 A <ref>foo bar for a</ref>
18437 B <ref group="X" name="b" />
18441 <references group="X">
18442 <ref name="b">foo</ref>
18445 <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>
18446 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>
18448 <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>
18450 <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>
18454 Entities in ref name
18458 <ref name="test & me">hi</ref>
18460 <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>
18463 # This test is wt2html only because we're permitting the serializer to produce
18464 # dirty diffs, normalizing the unclosed references to the self-closed version.
18466 Generate references for unclosed references tag
18474 <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>
18477 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
18478 <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>
18482 New reference serializes on its own line
18484 parsoid=wt2wt,html2wt
18489 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
18492 #### ----------------------------------------------------------------
18493 #### The following section of tests are primarily to test
18494 #### wikitext escaping capabilities of Parsoid. Given that
18495 #### escaping can be done any number of ways, the wikitext (input)
18496 #### is always adjusted to reflect how Parsoid adds nowiki
18499 #### We are marking several tests as parsoid-only since the
18500 #### HTML in the result section is different from what the
18501 #### PHP parser generates for it.
18502 #### ----------------------------------------------------------------
18505 #### --------------- Headings ---------------
18507 #### 1. Nested inside html <h1>=foo=</h1>
18508 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
18509 #### 3. Nested inside html with wikitext split by html tags
18510 #### 4. No escape needed
18511 #### 5. Empty headings <h1></h1>
18512 #### 6. Heading chars in SOL context
18513 #### ----------------------------------------
18515 Headings: 0. Unnested
18519 <nowiki>=foo=</nowiki>
18521 <nowiki> =foo= </nowiki>
18523 <nowiki>=foo=</nowiki>
18525 =foo''a''<nowiki>=</nowiki>
18527 <p><span typeof="mw:Nowiki">=foo=</span></p>
18529 <p><span typeof="mw:Nowiki"> =foo= </span>
18531 <span typeof="mw:Nowiki">=foo=</span></p>
18533 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
18537 Headings: 1. Nested inside html
18538 (New headings and existing headings are handled differently)
18548 =<nowiki>=foo=</nowiki>=
18549 ==<nowiki>=foo=</nowiki>==
18550 ===<nowiki>=foo=</nowiki>===
18551 ====<nowiki>=foo=</nowiki>====
18552 =====<nowiki>=foo=</nowiki>=====
18553 ======<nowiki>=foo=</nowiki>======
18560 <h1 data-parsoid='{}'>=foo=</h1>
18561 <h2 data-parsoid='{}'>=foo=</h2>
18562 <h3 data-parsoid='{}'>=foo=</h3>
18563 <h4 data-parsoid='{}'>=foo=</h4>
18564 <h5 data-parsoid='{}'>=foo=</h5>
18565 <h6 data-parsoid='{}'>=foo=</h6>
18569 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
18574 <nowiki>*</nowiki>bar
18580 <nowiki>=bar=</nowiki>
18588 Headings: 3. Nested inside html with wikitext split by html tags
18592 = ='''bold'''<nowiki>foo=</nowiki> =
18594 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
18598 Headings: 4a. No escaping needed (testing just h1 and h2)
18616 = <nowiki>=</nowiki> =
18624 <h1><i>=</i>foo=</h1>
18625 <h1><span typeof="mw:Nowiki">=</span></h1>
18629 Headings: 4b. No escaping needed (inside p-tags)
18644 Headings: 5. Empty headings
18656 =====<nowiki/>=====
18658 ======<nowiki/>======
18669 Headings: 6a. Heading chars in SOL context (with trailing spaces)
18673 <nowiki>=a=</nowiki>
18675 <nowiki>=a=</nowiki>
18677 <nowiki>=a=</nowiki>
18679 <nowiki>=a=</nowiki>
18688 Headings: 6b. Heading chars in SOL context (with trailing newlines)
18716 Headings: 6c. Heading chars in SOL context (leading newline break)
18721 <nowiki>=b=</nowiki>
18728 Headings: 6d. Heading chars in SOL context (with interspersed comments)
18732 <!--c0--><nowiki>=a=</nowiki>
18734 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
18736 <p><!--c0-->=a=</p>
18737 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
18741 Headings: 6d. Heading chars in SOL context (No escaping needed)
18750 #### --------------- Lists ---------------
18751 #### 0. Outside nests (*foo, etc.)
18752 #### 1. Nested inside html <ul><li>*foo</li></ul>
18753 #### 2. Inside definition lists
18754 #### 3. Only bullets at start should be escaped
18755 #### 4. No escapes needed
18756 #### 5. No unnecessary escapes
18757 #### 6. Escape bullets in SOL position
18758 #### 7. Escape bullets in a multi-line context
18759 #### ----------------------------------------
18762 Lists: 0. Outside nests
18764 <nowiki>*</nowiki>foo
18766 <nowiki>#</nowiki>foo
18768 <nowiki>;Foo:</nowiki>bar
18777 Lists: 1. Nested inside html
18779 *<nowiki>*foo</nowiki>
18781 *<nowiki>#foo</nowiki>
18783 *<nowiki>:foo</nowiki>
18785 *<nowiki>;foo</nowiki>
18787 #<nowiki>*foo</nowiki>
18789 #<nowiki>#foo</nowiki>
18791 #<nowiki>:foo</nowiki>
18793 #<nowiki>;foo</nowiki>
18795 <ul><li>*foo</li></ul>
18796 <ul><li>#foo</li></ul>
18797 <ul><li>:foo</li></ul>
18798 <ul><li>;foo</li></ul>
18799 <ol><li>*foo</li></ol>
18800 <ol><li>#foo</li></ol>
18801 <ol><li>:foo</li></ol>
18802 <ol><li>;foo</li></ol>
18807 Lists: 2. Inside definition lists
18809 ;<nowiki>;foo</nowiki>
18811 ;<nowiki>:foo</nowiki>
18813 ;<nowiki>:foo</nowiki>
18816 :<nowiki>:foo</nowiki>
18818 <dl><dt>;foo</dt></dl>
18819 <dl><dt>:foo</dt></dl>
18822 <dl><dd>:foo</dd></dl>
18827 Lists: 3. Only bullets at start of text should be escaped
18829 *<nowiki>*foo*bar</nowiki>
18831 *<nowiki>*foo</nowiki>''it''*bar
18833 <ul><li>*foo*bar</li></ul>
18834 <ul><li>*foo<i>it</i>*bar</li></ul>
18839 Lists: 4. No escapes needed
18860 <li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
18864 <li><a rel="mw:WikiLink" href="Foo">Foo</a>*bar
18870 Lists: 5. No unnecessary escapes
18872 * bar <span><nowiki>[[foo]]</nowiki></span>
18874 *=bar <span><nowiki>[[foo]]</nowiki></span>
18876 *[[bar <span><nowiki>[[foo]]</nowiki></span>
18878 *]]bar <span><nowiki>[[foo]]</nowiki></span>
18880 *=bar <span>foo]]</span>=
18884 <ul><li> bar <span>[[foo]]</span></li></ul>
18885 <ul><li>=bar <span>[[foo]]</span></li></ul>
18886 <ul><li>[[bar <span>[[foo]]</span></li></ul>
18887 <ul><li>]]bar <span>[[foo]]</span></li></ul>
18888 <ul><li>=bar <span>foo]]</span>=</li></ul>
18889 <ul><li> <s></s>: a</li></ul>
18894 Lists: 6. Escape bullets in SOL position
18898 <!--cmt--><nowiki>*foo</nowiki>
18900 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
18904 Lists: 7. Escape bullets in a multi-line context
18907 <nowiki>*</nowiki>b
18914 #### --------------- HRs ---------------
18915 #### 1. Single line
18916 #### -----------------------------------
18919 HRs: 1. Single line
18923 ----<nowiki>----</nowiki>
18927 <hr><span typeof="mw:Nowiki">----</span>
18932 #### --------------- Tables ---------------
18933 #### 1a. Simple example
18934 #### 1b. No escaping needed (!foo)
18935 #### 1c. No escaping needed (|foo)
18936 #### 1d. No escaping needed (|}foo)
18938 #### 2a. Nested in td (<td>foo|bar</td>)
18939 #### 2b. Nested in td (<td>foo||bar</td>)
18940 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
18942 #### 3a. Nested in th (<th>foo!bar</th>)
18943 #### 3b. Nested in th (<th>foo!!bar</th>)
18944 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
18948 #### 4c. No escaping needed
18949 #### --------------------------------------
18952 Tables: 1a. Simple example
18963 Tables: 1b. No escaping needed
18972 Tables: 1c. No escaping needed
18981 Tables: 1d. No escaping needed
18990 Tables: 2a. Nested in td
18995 |<nowiki>foo|bar</nowiki>
18997 |x<div><nowiki>a|b</nowiki></div>
19001 <td>foo|bar</td></tr>
19002 <tr><td>x<div>a|b</div></td>
19007 Tables: 2b. Nested in td
19012 |<nowiki>foo||bar</nowiki>
19013 |''it''<nowiki>foo||bar</nowiki>
19017 <td><span typeof="mw:Nowiki">foo||bar</span></td>
19018 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
19022 Tables: 2c. Nested in td -- no escaping needed
19030 <table><tbody><tr><td>foo!!bar
19031 </td></tr></tbody></table>
19036 Tables: 3a. Nested in th
19044 <table><tbody><tr><th>foo!bar
19045 </th></tr></tbody></table>
19050 Tables: 3b. Nested in th
19055 !<nowiki>foo!!bar</nowiki>
19059 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
19064 Tables: 3c. Nested in th -- no escaping needed
19069 !<nowiki>foo||bar</nowiki>
19073 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
19077 Tables: 4a. Escape -
19084 |<nowiki>-bar</nowiki>
19088 <tr><th>-bar</th></tr>
19090 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
19094 Tables: 4b. Escape +
19101 |<nowiki>+bar</nowiki>
19105 <tr><th>+bar</th></tr>
19107 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
19111 Tables: 4c. No escaping needed
19132 <tr><td>foo-bar</td><td>foo+bar</td></tr>
19133 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
19139 <div>a|b</div></td>
19144 Tables: 4d. No escaping needed
19155 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo">Foo</a>-bar</td>
19156 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
19157 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
19162 Tables: Digest broken attributes on table and tr tag
19178 #### --------------- Links ----------------
19179 #### 1. Quote marks in link text
19180 #### 2. Wikilinks: Escapes needed
19181 #### 3. Wikilinks: No escapes needed
19182 #### 4. Extlinks: Escapes needed
19183 #### 5. Extlinks: No escapes needed
19184 #### --------------------------------------
19186 Links 1. Quote marks in link text
19190 [[Foo|Foo<nowiki>''boo''</nowiki>]]
19192 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
19196 Links 2. WikiLinks: Escapes needed
19201 [[Foo|<nowiki>Foobar]</nowiki>]]
19202 [[Foo|x [Foobar] x]]
19203 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
19204 [[Foo|<nowiki>[[Bar]]</nowiki>]]
19205 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
19206 [[Foo|<nowiki>|Bar</nowiki>]]
19207 [[Foo|<nowiki>]]bar</nowiki>]]
19208 [[Foo|<nowiki>[[bar</nowiki>]]
19209 [[Foo|<nowiki>x [[ y</nowiki>]]
19210 [[Foo|<nowiki>x ]] y</nowiki>]]
19211 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
19213 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
19214 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
19215 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
19216 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
19217 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
19218 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
19219 <a href="Foo" rel="mw:WikiLink">|Bar</a>
19220 <a href="Foo" rel="mw:WikiLink">]]bar</a>
19221 <a href="Foo" rel="mw:WikiLink">[[bar</a>
19222 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
19223 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
19224 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
19228 Links 3. WikiLinks: No escapes needed
19235 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
19236 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
19240 Links 4. ExtLinks: Escapes needed
19244 [http://google.com <nowiki>[google]</nowiki>]
19245 [http://google.com <nowiki>google]</nowiki>]
19247 <nowiki>[http://google.com]</nowiki>
19249 <nowiki>[http://google.com google]</nowiki>
19252 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
19253 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
19254 <p>[http://google.com]</p>
19255 <p>[http://google.com google]</p>
19259 Links 5. ExtLinks: No escapes needed
19263 [http://google.com [google]
19265 <a href="http://google.com" rel="mw:ExtLink">[google</a>
19269 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
19271 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
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" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
19278 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
19279 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
19280 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
19281 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
19282 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
19283 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
19286 x<nowiki/>http://example.com<nowiki/>y
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<nowiki/>;x
19293 http://example.com<nowiki/>:x
19294 http://example.com<nowiki/>;x
19295 http://example.com<nowiki/>!x
19296 http://example.com<nowiki/>=x
19297 http://example.com<nowiki/>(x)
19298 http://example.com(x<nowiki/>)
19302 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19305 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
19307 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
19308 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
19309 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
19310 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
19311 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
19317 "http://example.com"
19318 (http://example.com)
19319 (http://example.com) foo
19320 http://example.com,
19321 http://example.com, foo
19324 ## Parsoid currently fails wt2html on this one!
19326 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19328 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
19330 http://example.com.,;:!?
19334 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
19336 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
19342 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
19344 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19345 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19346 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
19347 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
19357 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
19359 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
19365 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
19367 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19368 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19369 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
19370 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
19380 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
19382 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
19383 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
19384 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
19387 ISBN 1234567890<nowiki/>1
19388 ISBN 1234567890<nowiki/>x
19389 ISBN 1234567890<nowiki/>b
19393 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
19395 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
19400 #### --------------- Quotes ---------------
19401 #### 1. Quotes inside <b> and <i>
19402 #### 2. Link fragments separated by <i> and <b> tags
19403 #### 3. Link fragments inside <i> and <b>
19404 #### 4. No escaping needed
19405 #### --------------------------------------
19407 1. Quotes inside <b> and <i>
19409 parsoid=html2wt,wt2wt
19411 ''<nowiki>'foo'</nowiki>''
19412 ''<nowiki>''foo''</nowiki>''
19413 ''<nowiki>'''foo'''</nowiki>''
19415 '''<nowiki>'foo'</nowiki>'''
19416 '''<nowiki>''foo''</nowiki>'''
19417 '''<nowiki>'''foo'''</nowiki>'''
19418 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
19419 '''foo'''<nowiki/>'s
19422 '<nowiki/>''foo''<nowiki/>'
19424 '''foo'''<nowiki/>'
19425 '<nowiki/>'''foo'''<nowiki/>'
19426 ''fools'<span> errand</span>''
19427 ''<span>fool</span>'s errand''
19436 <b>foo'<i>bar'</i>baz</b>
19444 <i>fools'<span> errand</span></i>
19445 <i><span>fool</span>'s errand</i>
19449 2. Link fragments separated by <i> and <b> tags
19451 [[''foo''<nowiki>hello]]</nowiki>
19453 [['''foo'''<nowiki>hello]]</nowiki>
19455 <p>[[<i>foo</i>hello]]
19456 </p><p>[[<b>foo</b>hello]]
19461 3. Link fragments inside <i> and <b>
19462 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
19463 this is one of the shortcomings of this format)
19465 ''[[foo''<nowiki>]]</nowiki>
19467 '''[[foo'''<nowiki>]]</nowiki>
19470 </p><p><b>[[foo</b>]]
19475 4. No escaping needed
19477 '<span>''bar''</span>'
19478 '<span>'''bar'''</span>'
19480 <p>'<span><i>bar</i></span>'
19481 '<span><b>bar</b></span>'
19485 #### ----------- Paragraphs ---------------
19486 #### 1. No unnecessary escapes
19487 #### --------------------------------------
19490 1. No unnecessary escapes
19492 bar <span><nowiki>[[foo]]</nowiki></span>
19494 =bar <span><nowiki>[[foo]]</nowiki></span>
19496 [[bar <span><nowiki>[[foo]]</nowiki></span>
19498 ]]bar <span><nowiki>[[foo]]</nowiki></span>
19500 =bar <span>foo]]</span><nowiki>=</nowiki>
19502 <p>bar <span>[[foo]]</span>
19503 </p><p>=bar <span>[[foo]]</span>
19504 </p><p>[[bar <span>[[foo]]</span>
19505 </p><p>]]bar <span>[[foo]]</span>
19506 </p><p>=bar <span>foo]]</span>=
19510 #### ----------------------- PRE --------------------------
19511 #### 1. Leading whitespace in SOL context should be escaped
19512 #### ------------------------------------------------------
19514 1. Leading whitespace in SOL context should be escaped
19518 <nowiki> </nowiki>a
19520 <nowiki> </nowiki> a
19522 <nowiki> </nowiki>a(tab)
19524 <nowiki> </nowiki> a
19526 <nowiki> </nowiki> a
19529 <nowiki> </nowiki>b
19532 <nowiki> </nowiki>b
19535 <nowiki> </nowiki> b
19541 <p><!--cmt--> a</p>
19551 2. Leading whitespace in non-indent-pre contexts should not be escaped
19558 <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>
19562 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
19581 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
19585 [[File:Foobar.jpg|thumb|caption]]
19588 <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>
19591 #### --------------- Behavior Switches --------------------
19593 1. Valid behavior switches should be escaped
19597 <nowiki>__TOC__</nowiki>
19598 ''<nowiki>__TOC__</nowiki>''
19605 2. Invalid behavior switches should not be escaped
19616 #### --------------- HTML tags ---------------
19619 #### 3. multi-line html tag
19620 #### 4. extension tags
19621 #### -----------------------------------------
19627 <a href="http://google.com">google</a>
19629 <a href="http://google.com">google</a>
19635 <nowiki><div>foo</div>
19636 <div style="color:red">foo</div></nowiki>
19638 <p><div>foo</div>
19639 <div style="color:red">foo</div>
19644 3. multi-line html tag
19659 <nowiki><ref>foo</ref></nowiki>
19661 <nowiki><ref>bar</nowiki>
19663 baz<nowiki></ref></nowiki>
19665 <p><ref>foo</ref>
19666 </p><p><ref>bar
19667 </p><p>baz</ref>
19671 #### --------------- Others ---------------
19675 <nowiki>foo</nowiki>
19677 <p><nowiki>foo</nowiki>
19681 ## The quote-char in the input is necessary for triggering the bug
19683 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
19685 parsoid=wt2wt,html2wt
19694 Tag-like HTML structures are passed through as text
19716 </p><p>1<d e>f
19721 # This was a bug in the PHP parser (see bug 17663 and its dups,
19722 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
19724 Tag names followed by punctuation should not be recognized as tags
19728 <p><s.ome> text
19733 HTML tag with necessary entities in attributes
19735 <span title="&amp;">foo</span>
19737 <p><span title="&amp;">foo</span>
19742 HTML tag with 'unnecessary' entity encoding in attributes
19744 <span title="&">foo</span>
19746 <p><span title="&">foo</span>
19751 HTML tag with broken attribute value quoting
19753 <span title="Hello world>Foo</span>
19755 <p><span>Foo</span>
19760 Parsoid-only: HTML tag with broken attribute value quoting
19764 <span title="Hello world>Foo</span>
19766 <p><span title="Hello world">Foo</span>
19771 Table with broken attribute value quoting
19774 | title="Hello world|Foo
19785 Table with broken attribute value quoting on consecutive lines
19788 | title="Hello world|Foo
19789 | style="color:red|Bar
19802 Parsoid-only: Table with broken attribute value quoting on consecutive lines
19807 | title="Hello world|Foo
19808 | style="color:red|Bar
19813 <td title="Hello world">Foo
19814 </td><td style="color: red">Bar
19815 </td></tr></tbody></table>
19820 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19830 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19840 Accept empty td cell attribute
19843 | align="center" | foo || |
19848 <td align="center"> foo </td>
19855 Non-empty attributes in th-cells
19858 ! Foo !! style="color: red" | Bar
19864 <th style="color: red"> Bar
19870 Accept empty attributes in th-cells
19885 Empty table rows go away
19906 ### Parsoid-centric tests for testing RTing of inter-element separators
19907 ### Edge cases not tested by existing parser tests and specific to
19908 ### Parsoid-specific serialization strategies.
19912 RT-ed inter-element separators should be valid separators
19925 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
19926 (Parsoid-only since PHP parser relies on Tidy for correct output)
19942 Empty TD followed by TD with tpl-generated attribute
19947 |{{echo|style='color:red'}}|foo
19961 Indented table with an empty td
19980 Indented block & table
19987 <div data-parsoid='{"stx":"html"}'>foo</div>
19989 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
19994 Indent and comment before table row
20001 <table data-parsoid='{}'>
20002 <!--hi--><tbody data-parsoid='{}'><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
20003 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
20008 Empty TR followed by a template-generated TR
20009 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
20015 {{echo|<tr><td>foo</td></tr>}}
20021 <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}}]}'>
20026 ## PHP and parsoid output differ for this, and since this is primarily
20027 ## for testing Parsoid's serializer, marking this Parsoid only
20029 Empty TR followed by mixed-ws-comment line should RT correctly
20045 <!--c--> </tr><!--d-->
20051 Multi-line image caption generated by templates with/without trailing newlines
20055 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
20056 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
20058 <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>
20059 <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>
20064 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
20068 <includeonly>foo</includeonly>
20075 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
20077 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
20080 ## PHP emits broken html for this, and since this is primarily
20081 ## a Parsoid serializer test, marking this Parsoid only
20083 Improperly nested inline or quotes tags with whitespace in between
20087 <span> <s>x</span> </s>
20090 <p><span> <s>x</s></span><s> </s>
20091 <b> <i>x</i></b><i> </i>
20096 Encapsulate protected attributes from wt
20100 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
20102 <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>
20106 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
20107 ## Having nested or stray pre tags results in the attempt to add duplicates,
20108 ## causing an assertion fail. This test tries to prevent that situation.
20110 Ensure ParagraphWrapper can deal with stray closing pre tags
20120 1. Ensure fostered text content is wrapped in spans
20124 <table>hi</table><table>ho</table>
20133 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
20135 parsoid=wt2html,wt2wt
20142 <span> || ||</span>
20151 Encapsulation properly handles null DSR information from foster box
20153 parsoid=wt2html,wt2wt
20155 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
20157 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20160 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
20164 <td>bar</td></tr></tbody></table>
20168 1. Encapsulate foster-parented transclusion content
20170 parsoid=wt2wt,wt2html
20172 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
20174 <span typeof="mw:Transclusion" data-mw="{"parts":["
20175 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
20177 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
20181 <td>bar</td></tr></tbody></table>
20185 2. Encapsulate foster-parented transclusion content
20187 parsoid=wt2wt,wt2html
20189 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
20191 <div typeof="mw:Transclusion" data-mw="{"parts":["
20193 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
20195 <td>bar</td></tr></table>"]}">foo</div>
20199 <td>bar</td></tr></tbody></table>
20203 3. Encapsulate foster-parented transclusion content
20205 parsoid=wt2wt,wt2html
20207 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20209 <div typeof="mw:Transclusion" data-mw="{"parts":["
20212 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20214 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20219 <td>bar</td></tr></tbody></table>
20223 4. Encapsulate foster-parented transclusion content
20225 parsoid=wt2wt,wt2html
20227 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20229 <div typeof="mw:Transclusion" data-mw="{"parts":["
20232 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20234 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20239 <td>bar</td></tr></tbody></table>
20243 5. Encapsulate foster-parented transclusion content
20245 parsoid=wt2wt,wt2html
20247 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
20249 <span typeof="mw:Transclusion" data-mw="{"parts":["
20254 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
20260 <p>foo</p></div></td></tr></tbody></table>
20264 6. Encapsulate foster-parented transclusion content
20266 parsoid=wt2wt,wt2html
20268 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
20270 <span typeof="mw:Transclusion" data-mw="{"parts":["
20275 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
20281 <p>foo</p></div></td></tr></tbody></table>
20286 7. Encapsulate foster-parented transclusion content
20288 parsoid=wt2wt,wt2html
20290 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
20292 <p typeof="mw:Transclusion" data-mw="{"parts":["
20293 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20294 <p>foo</p>"}},"i":0}},"
20295 <td>bar</td></table>"]}">foo</p>
20299 <td>bar</td></tr></tbody></table>
20303 8. Encapsulate foster-parented transclusion content
20305 parsoid=wt2wt,wt2html
20308 }}{|{{echo|style='color:red'}}
20313 <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>
20317 <td>b</td></tr></tbody></table>
20321 9. Encapsulate foster-parented transclusion content
20323 parsoid=wt2wt,wt2html
20325 <table>{{echo|hi</table>hello}}
20327 <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>
20328 <table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2" data-parsoid="{}">hello</span>
20332 Table in fosterable position
20334 parsoid=wt2html,wt2wt
20343 <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="{}">
20345 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
20351 # Parsoid only for bug 64747
20353 Properly encapsulate empty-content transclusions in fosterable positions
20361 <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>"}'>
20367 Support <object> element with .data attribute
20371 <object data="test.swf"></object>
20373 <object data="test.swf"></object>
20376 # -----------------------------------------------------------------
20377 # The following section of tests are primarily to spec requirements
20378 # around serialization of new/edited content.
20380 # All these tests are marked Parsoid html2wt and html2html only
20381 # ----------------------------------------------------------------
20384 Image: Modifying size of an image (1)
20387 "modes": ["wt2wt"],
20389 ["img[height]", "attr", "height", "22"],
20390 ["img[width]", "attr", "width", "200"]
20394 [[Image:Foobar.jpg|230x230px]]
20396 [[Image:Foobar.jpg|200x200px]]
20400 Image: Modifying size of an image (2)
20403 "modes": ["wt2wt"],
20405 ["img[height]", "attr", "height", "100"],
20406 ["img[width]", "attr", "width", "500"]
20410 [[Image:Foobar.jpg|230x230px]]
20412 [[Image:Foobar.jpg|500x500px]]
20415 # Change in size is ignored so long as class='mw-default-size'
20417 Image: Modifying size of an image (3)
20420 "modes": ["wt2wt"],
20422 ["figure[class]", "removeClass", "mw-default-size"],
20423 ["figure img", "attr", "height", "19"],
20424 ["figure img", "attr", "width", "170"]
20428 [[Image:Foobar.jpg|thumb]]
20430 [[Image:Foobar.jpg|thumb|170x170px]]
20434 Image: Modifying alignment of an image (bug 48665)
20437 "modes": ["wt2wt"],
20439 ["figure[class]", "removeClass", "mw-halign-right"],
20440 ["figure[class]", "addClass", "mw-halign-left"]
20444 [[Image:Foobar.jpg|thumb|caption|right]]
20446 [[Image:Foobar.jpg|thumb|caption|left]]
20450 Image: Modifying mw-default-size of an frameless image (bug 62805)
20453 "modes": ["wt2wt"],
20455 ["figure.mw-default-size", "removeClass", "mw-default-size"]
20459 [[Image:Foobar.jpg|frameless|right]]
20461 [[Image:Foobar.jpg|frameless|right|220x220px]]
20465 Image: Modifying valign of an image (bug 49221)
20468 "modes": ["wt2wt"],
20470 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
20471 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
20475 [[File:Foobar.jpg|20px|middle]]
20477 [[File:Foobar.jpg|20px|text-top]]
20481 Image: Modifying alt attribute of an image (bug 56400)
20484 "modes": ["wt2wt"],
20486 ["img[alt]", "attr", "alt", "some alternate edited text"]
20490 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
20492 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
20496 Image: Modifying caption of an image
20499 "modes": ["wt2wt"],
20501 ["figcaption", "text", "new caption"]
20505 [[Image:Foobar.jpg|thumb|original caption]]
20507 [[Image:Foobar.jpg|thumb|new caption]]
20511 Image: empty alt attribute (bug 48924)
20515 [[File:Foobar.jpg|thumb|alt=|bar]]
20517 <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>
20521 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
20526 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
20528 #<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>
20532 Image: Block level image should have \n before and after
20537 [[File:Foobar.jpg|right|thumb|150x150px]]
20540 <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>
20544 Image: New block level image should have \n before and after (existing
20550 [[File:Foobar.jpg|right|thumb|150x150px]]
20553 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
20554 <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>
20555 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
20559 Image: upright option (parsoid)
20563 [[File:Foobar.jpg|thumb|upright|caption]]
20564 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
20565 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
20567 <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>
20571 Image: upright option is ignored on inline and frame images (parsoid)
20575 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
20577 <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>
20581 Image: from basic HTML (1)
20585 <span typeof="mw:Image">
20586 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20589 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20593 Image: from basic HTML (2)
20597 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20599 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20603 Image: from basic HTML (3)
20607 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
20609 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
20613 Image: from basic HTML (4)
20617 <img src="File:Foobar.jpg">
20619 [[File:Foobar.jpg|link=]]
20623 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
20630 <li><p>foo</p></li>
20635 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
20641 <ul> <li>foo</li></ul>
20645 Don't strip leading whitespace when handling indent-pre suppressing tags
20653 '''This is very bold of you!'''
20657 indented cell (no pre-wrapping!)
20664 <tr><td> indented row</td></tr>
20667 <b>This is very bold of you!</b>
20670 indented cell (no pre-wrapping!)
20678 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
20683 <nowiki> </nowiki><span>bar</span>
20686 <nowiki> </nowiki></span>bar2
20689 <nowiki> </nowiki><span>bar</span>
20692 <nowiki> </nowiki><span>foo</span>
20710 Lists: Add space after bullets
20716 * <span> baz</span>
20721 <li><span> baz</span></li>
20726 Lists: Dont insert newlines in a serialized list item.
20733 <ul><li>a<br>b</li><li>c</li></ul>
20737 Headings: Add space before/after == (Bug 51744)
20747 == <span> baz</span> ==
20752 <h2><span> baz</span></h2>
20756 Parsoid: Serialize positional parameters with = in them as named parameter
20762 {{echo|1 = f=oo|2 = bar}}
20764 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20765 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20766 {{echo|<nowiki>f=oo</nowiki>|bar}}
20768 <p about="#mwt1" typeof="mw:Transclusion"
20769 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
20771 <p about="#mwt1" typeof="mw:Transclusion"
20772 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
20774 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20775 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20776 <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>
20780 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
20796 <div>a<p>b</p></div>
20805 Substrings resembling wikitext in hrefs should not get nowiki escapes
20811 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
20814 #-----------------------------
20815 # I/B quote minimization tests
20816 #-----------------------------
20819 1. I/B quote minimization: wikitext-only tags should be combined
20839 <p><i>A</i><i>B</i></p>
20840 <p><b>A</b><b>B</b></p>
20841 <p><i>A</i><b><i>B</i></b></p>
20842 <p><b>A</b><i><b>B</b></i></p>
20843 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
20844 <p><i><b>A</b></i><i><b>B</b></i></p>
20845 <p><i><b>A</b></i><b><i>B</i></b></p>
20846 <p><b><i>A</i></b><i><b>B</b></i></p>
20850 2. I/B quote minimization: wikitext and html tags should not be combined
20856 ''A'''''<i>B</i>'''
20858 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
20859 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
20863 3. I/B quote minimization: templated content stops minimization
20867 ''A''{{echo|''B''}}
20869 ''A''{{echo|'''''B'''''}}
20871 <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>
20872 <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>
20876 4. I/B quote minimization: new content should be mimimized with adjacent old content
20886 <p><i>A</i><i data-parsoid='{}'>B</i></p>
20887 <p><b data-parsoid='{}'>A</b><b>B</b></p>
20888 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
20891 #------------------------------------
20892 # End of I/B quote minimization tests
20893 #------------------------------------
20896 Bug 54262: New entities
20902 <span typeof="mw:Entity"> </span>
20905 ## Note that there is no wikitext output for 'unknownproperty' ##
20906 ## Unknown magic words are silently dropped ##
20921 __NOCONTENTCONVERT__
20923 <meta property='mw:PageProp/toc' />
20924 <meta property='mw:PageProp/notoc' />
20925 <meta property='mw:PageProp/forcetoc' />
20926 <meta property='mw:PageProp/index' />
20927 <meta property='mw:PageProp/noindex' />
20928 <meta property='mw:PageProp/nogallery' />
20929 <meta property='mw:PageProp/noeditsection' />
20930 <meta property='mw:PageProp/notitleconvert' />
20931 <meta property='mw:PageProp/nocontentconvert' />
20932 <meta property='mw:PageProp/unknownproperty' />
20936 Consecutive <pre>s should not get merged
20938 parsoid=html2wt,html2html
20954 <pre>a</pre><pre>b</pre>
20968 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
20972 [[Special:BookSources/1234567890|ISBN 1234567895]]
20974 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
20978 Edited RFC links not serializable as RFC links should serialize as extlinks
20982 [//tools.ietf.org/html/rfc123 New RFC]
20984 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
20988 Edited PMID links not serializable as PMID links should serialize as extlinks
20992 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
20994 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
20998 Edited Redirect link should emit a non-piped wikitext link
21004 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
21007 # -----------------------------------------------------------------
21008 # End of section for Parsoid-only html2wt tests for serialization
21010 # -----------------------------------------------------------------
21017 Try for 100% code coverage