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>
429 * plain''italic''plain
430 * plain''italic''plain''italic''plain
431 * plain'''bold'''plain
432 * plain'''bold'''plain'''bold'''plain
433 * plain''italic''plain'''bold'''plain
434 * plain'''bold'''plain''italic''plain
435 * plain''italic'''bold-italic'''italic''plain
436 * plain'''bold''bold-italic''bold'''plain
437 * plain'''''bold-italic'''italic''plain
438 * plain'''''bold-italic''bold'''plain
439 * plain''italic'''bold-italic'''''plain
440 * plain'''bold''bold-italic'''''plain
441 * plain l'''italic''plain
442 * plain l''''bold''' plain
447 <li> plain<i>italic</i>plain
449 <li> plain<i>italic</i>plain<i>italic</i>plain
451 <li> plain<b>bold</b>plain
453 <li> plain<b>bold</b>plain<b>bold</b>plain
455 <li> plain<i>italic</i>plain<b>bold</b>plain
457 <li> plain<b>bold</b>plain<i>italic</i>plain
459 <li> plain<i>italic<b>bold-italic</b>italic</i>plain
461 <li> plain<b>bold<i>bold-italic</i>bold</b>plain
463 <li> plain<i><b>bold-italic</b>italic</i>plain
465 <li> plain<b><i>bold-italic</i>bold</b>plain
467 <li> plain<i>italic<b>bold-italic</b></i>plain
469 <li> plain<b>bold<i>bold-italic</i></b>plain
471 <li> plain l'<i>italic</i>plain
473 <li> plain l'<b>bold</b> plain
479 # this example taken from the [[simple:Moon]] article (bug 47326)
481 Italics and possessives (1)
483 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
485 <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
489 # this example taken from [[en:Flaming Pie]] (bug 49926)
491 Italics and possessives (2)
493 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
495 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
499 # this example taken from [[en:Dictionary]] (bug 49926)
501 Italics and possessives (3)
503 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''.
505 <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>.
511 ### 2-quote opening sequence tests
514 Italics and bold: 2-quote opening sequence: (2,2)
524 Italics and bold: 2-quote opening sequence: (2,3)
535 # same html as previous, but wikitext adjusted to match parsoid html2wt
537 Italics and bold: 2-quote opening sequence: (2,3) w/ nowiki
539 ''<nowiki>foo'</nowiki>''
547 Italics and bold: 2-quote opening sequence: (2,4)
558 # same html as previous, but wikitext adjusted to match parsoid html2wt
560 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
562 ''<nowiki>foo''</nowiki>''
569 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
571 Italics and bold: 2-quote opening sequence: (2,5)
584 # same html as previous, but wikitext adjusted to match parsoid html2wt
586 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
588 ''foo'''''<nowiki/>'''
599 ### 3-quote opening sequence tests
603 Italics and bold: 3-quote opening sequence: (3,2)
613 Italics and bold: 3-quote opening sequence: (3,3)
623 Italics and bold: 3-quote opening sequence: (3,4)
634 # same html as previous, but wikitext adjusted to match parsoid html2wt
636 Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki
638 '''<nowiki>foo'</nowiki>'''
645 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
647 Italics and bold: 3-quote opening sequence: (3,5)
660 # same html as previous, but wikitext adjusted to match parsoid html2wt
662 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
664 '''foo'''''<nowiki/>''
675 ### 4-quote opening sequence tests
679 Italics and bold: 4-quote opening sequence: (4,2)
690 # same html as previous, but wikitext adjusted to match parsoid html2wt
692 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
694 <nowiki>''</nowiki>''foo''
702 Italics and bold: 4-quote opening sequence: (4,3)
712 Italics and bold: 4-quote opening sequence: (4,4)
723 # same html as previous, but wikitext adjusted to match parsoid html2wt
725 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
727 ''''<nowiki>foo'</nowiki>'''
734 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
736 Italics and bold: 4-quote opening sequence: (4,5)
745 <p>'<b>foo</b><i></i>
749 # same html as previous, but wikitext adjusted to match parsoid html2wt
751 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
753 ''''foo'''''<nowiki/>''
758 <p>'<b>foo</b><i></i>
764 ### 5-quote opening sequence tests
768 Italics and bold: 5-quote opening sequence: (5,2)
779 # same html as previous, but wikitext adjusted to match parsoid html2wt
780 # skipping wt2html and html2html because it wants to put <i> before <b>
782 Italics and bold: 5-quote opening sequence: (5,2+3)
784 parsoid=wt2wt,html2wt
793 Italics and bold: 5-quote opening sequence: (5,3)
804 # same html as previous, but wikitext adjusted to match parsoid html2wt
806 Italics and bold: 5-quote opening sequence: (5,3+2)
816 Italics and bold: 5-quote opening sequence: (5,4)
822 <p><i><b>foo'</b></i>
827 # same html as previous, but wikitext adjusted to match parsoid html2wt
829 Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki
831 '''''<nowiki>foo'</nowiki>'''''
833 <p><i><b>foo'</b></i>
839 Italics and bold: 5-quote opening sequence: (5,5)
848 ### multiple quote sequences in a line
851 Italics and bold: multiple quote sequences: (2,4,2)
857 <p><i>foo'<b>bar</b></i>
862 # same html as previous, but wikitext adjusted to match parsoid html2wt
864 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
866 ''<nowiki>foo'</nowiki>'''bar'''''
868 <p><i>foo'<b>bar</b></i>
874 Italics and bold: multiple quote sequences: (2,4,3)
880 <p><i>foo'<b>bar</b></i>
885 # same html as previous, but wikitext adjusted to match parsoid html2wt
887 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
889 ''<nowiki>foo'</nowiki>'''bar'''''
891 <p><i>foo'<b>bar</b></i>
897 Italics and bold: multiple quote sequences: (2,4,4)
903 <p><i>foo'<b>bar'</b></i>
908 # same html as previous, but wikitext adjusted to match parsoid html2wt
910 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
912 ''<nowiki>foo'</nowiki>'''<nowiki>bar'</nowiki>'''''
914 <p><i>foo'<b>bar'</b></i>
919 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
921 Italics and bold: multiple quote sequences: (3,4,2)
930 <p><b>foo'</b>bar<i></i>
934 # same html as previous, but wikitext adjusted to match parsoid html2wt
936 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
940 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
945 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
950 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
952 Italics and bold: multiple quote sequences: (3,4,3)
961 <p><b>foo'</b>bar<b></b>
965 # same html as previous, but wikitext adjusted to match parsoid html2wt
967 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
969 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
974 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
979 ### other quote tests
982 Italics and bold: other quote tests: (2,3,5)
984 ''this is about '''foo's family'''''
986 <p><i>this is about <b>foo's family</b></i>
992 Italics and bold: other quote tests: (2,(3,3),2)
994 ''this is about '''foo's''' family''
996 <p><i>this is about <b>foo's</b> family</i>
1002 Italics and bold: other quote tests: (3,2,3,2)
1006 '''this is about ''foo'''s family''
1008 <p><b>this is about <i>foo</i></b><i>s family</i>
1013 # same html as previous, but wikitext adjusted to match parsoid html2wt
1014 # add 'parsoid' option to use 'parsoid' normalization of the placeholder
1016 Italics and bold: other quote tests: (3,2,3+2+2,2)
1020 '''this is about ''foo'''''<nowiki/>''s family''
1022 <p><b>this is about <i>foo</i></b><i>s family</i>
1028 Italics and bold: other quote tests: (3,2,3,3)
1031 '''this is about ''foo'''s family'''
1033 <p>'<i>this is about </i>foo<b>s family</b>
1039 Italics and bold: other quote tests: (3,(2,2),3)
1041 '''this is about ''foo's'' family'''
1043 <p><b>this is about <i>foo's</i> family</b>
1049 Italicized possessive
1051 The ''[[Main Page]]'''s talk page.
1053 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1058 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1059 (Requires tidy for PHP parser output to be fixed up)
1061 parsoid=wt2html,wt2wt
1069 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1070 <td><i>a</i></td><td><i>b</i></td></tr>
1079 Non-html5 tags should be accepted
1081 <center>''foo''</center>
1083 <font>''foo''</font>
1084 <strike>''foo''</strike>
1087 <center><i>foo</i></center>
1088 <p><big><i>foo</i></big>
1089 <font><i>foo</i></font>
1090 <strike><i>foo</i></strike>
1096 <wbr> is valid wikitext (bug 52468)
1104 # <strike> is HTML4, <s> is HTML4/5.
1106 <s> or <strike> for strikethrough
1108 <strike>strike</strike>
1112 <p><strike>strike</strike>
1118 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1120 <b→> doesn't work! </b→>
1122 <bä> doesn't work! </bä>
1124 <boo> works fine </boo>
1126 <s.foo>s.foo</s.foo>
1130 <p><b→> doesn't work! </b→>
1131 </p><p><bä> doesn't work! </bä>
1132 </p><p><boo> works fine </boo>
1133 </p><p><s.foo>s.foo</s.foo>
1134 </p><p><sub-ID#1>
1139 Isolated close tags should be treated as literal text (bug 52760)
1146 </p><p><s.foo>s</s>
1151 ### Special characters
1155 Bare pipe character (bug 52363)
1164 Bare pipe character from a template (bug 52363)
1173 ### <nowiki> test cases
1177 <nowiki> unordered list
1179 <nowiki>* This is not an unordered list item.</nowiki>
1181 <p>* This is not an unordered list item.
1188 <nowiki>Lorem ipsum dolor
1196 <p>Lorem ipsum dolor
1209 :There is not nowiki.
1210 :There is <nowiki>nowiki</nowiki>.
1212 #There is not nowiki.
1213 #There is <nowiki>nowiki</nowiki>.
1215 *There is not nowiki.
1216 *There is <nowiki>nowiki</nowiki>.
1219 <dd>There is not nowiki.
1221 <dd>There is nowiki.
1225 <li>There is not nowiki.
1227 <li>There is nowiki.
1231 <li>There is not nowiki.
1233 <li>There is nowiki.
1240 Entities inside <nowiki>
1242 <nowiki><</nowiki>
1249 Entities inside template parameters
1255 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span>
1263 Comments and Indent-Pre
1265 <!-- comment 1 --> asdf
1267 <!-- comment 1 --> asdf
1270 <!-- comment 1 --> asdf
1271 <!-- comment 2 -->xyz
1273 <!-- comment 1 --> asdf
1274 <!-- comment 2 --> xyz
1330 asdf<!-- comment 1 -->jkl
1340 <!-- foo --> b <!-- bar -->
1354 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1360 Comment semantics and delimiters
1362 <!-- --><!----><!-----><!------>
1368 Comment semantics and delimiters, redux
1370 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1371 -- foo -- funky huh? ... -->
1377 Comment semantics and delimiters: directors cut
1379 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1380 everything starting with < followed by !-- until the first -- and > we see,
1381 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1389 Comment semantics: nesting
1391 <!--<!-- no, we're not going to do anything fancy here -->-->
1398 Comment semantics: unclosed comment at end
1400 <!--This comment will run out to the end of the document
1406 Comment in template title
1415 Comment on its own line post-expand
1427 Comment on its own line post-expand with non-significant whitespace
1439 Multiple comments should still parse as SOL-transparent
1441 parsoid=wt2html,wt2wt
1444 <!--c2--><!--c3--><!--c4-->*b
1455 ### paragraph wrapping tests
1470 Block tag on one line (<div>)
1482 Block tag on one line (<blockquote>)
1484 a <blockquote>foo</blockquote>
1488 a <blockquote>foo</blockquote>
1494 Block tag on both lines (<div>)
1506 Block tag on both lines (<blockquote>)
1508 a <blockquote>foo</blockquote>
1510 b <blockquote>foo</blockquote>
1512 a <blockquote>foo</blockquote>
1513 b <blockquote>foo</blockquote>
1518 Multiple lines without block tags
1536 Empty lines between lines with block tags
1565 ## PHP parser emits output which is broken
1567 Unclosed HTML p-tags should be handled properly
1574 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1580 ### Preformatted text
1589 And a [[Main Page|link]]
1595 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1600 Tabs don't trigger preformatted text
1604 This is preformatted text.
1610 <pre>This is preformatted text.
1616 Ident preformatting with inline content
1627 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1644 Regression with preformatted in <center>
1658 Bug 52763: Preformatted in <blockquote>
1664 indented cell (no pre-wrapping!)
1674 <p> indented cell (no pre-wrapping!)
1682 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1699 Bug 15491: <ins>/<del> in blockquote
1702 Foo <del>bar</del> <ins>baz</ins> quux
1706 <p>Foo <del>bar</del> <ins>baz</ins> quux
1712 # Note that the p-wrapping is newline sensitive, which could be
1713 # considered a bug: tidy will wrap only the 'Foo' in the example
1714 # below in a <p> tag. (see comment 23-25 of bug #6200)
1716 Bug 15491: <ins>/<del> in blockquote (2)
1718 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1721 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1727 <pre> with attributes (bug 3202)
1729 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1731 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1736 <pre> with width attribute (bug 3202)
1738 <pre width="8">Narrow screen goodies</pre>
1740 <pre width="8">Narrow screen goodies</pre>
1745 <pre> with forbidden attribute (bug 3202)
1747 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1749 <pre width="8">Narrow screen goodies</pre>
1754 Entities inside <pre>
1763 <pre> with forbidden attribute values (bug 3202)
1765 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1767 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1772 <nowiki> inside <pre> (bug 13238)
1780 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1788 <pre><nowiki>Foo</nowiki></pre>
1793 <nowiki> and <pre> preference (first one wins)
1824 </pre> inside nowiki
1826 <nowiki></pre></nowiki>
1833 Empty pre; pre inside other HTML tags (bug 54946)
1852 HTML pre followed by indent-pre
1867 <p><pre>foo</pre></p>
1869 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
1873 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1881 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1891 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1903 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1924 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1928 {{echo| foo}}{{echo| bar}}
1933 {{echo|<!--cmt--> foo}}
1935 <!--cmt-->{{echo| foo}}
1937 {{echo|{{echo| }}bar}}
1955 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1992 Things that look like <pre> tags aren't treated as such
1994 Barack Obama <President> of the United States
1996 <p>Barack Obama <President> of the United States
2001 Parsoid: handle pre with space after attribute
2005 <pre style="width:50%;" >{{echo|foo}}</pre>
2007 <pre style="width:50%;">{{echo|foo}}</pre>
2010 # TODO / maybe: fix wt2wt for this
2012 Parsoid: Don't paragraph-wrap fosterable content
2038 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2066 #--------------------------------------------------------------------
2067 # Transclusion parameter whitespace stripping tests
2068 # Behavior is different for positional and named parameters
2069 #--------------------------------------------------------------------
2071 Templates: Strip leading and trailing whitespace from named-param values
2075 {{echo|1= {{echo|b}} }}
2096 Templates: Don't strip whitespace from positional-param values
2100 {{echo|{{echo|b}} }}
2143 Templates: Handle empty comment-and-ws-only lines correctly
2146 <!--should be ignored-->
2147 <!--should be ignored as well-->
2156 Templates: Handle comments in the target
2159 <!-- should be ignored -->
2162 {{echo<!-- should be ignored -->
2165 {{echo<!-- should be ignored -->|foo}}
2167 {{<!-- should be ignored -->echo|foo}}
2169 <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>
2171 <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>
2173 <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>
2175 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2178 #--------------------------------------------------------------------
2179 # Transclusion parameter escaping tests
2180 #--------------------------------------------------------------------
2182 Templates: Parsoid parameter escaping test 1
2186 {{echo|[foo]|{{echo|[bar]}}}}
2188 <p about="#mwt1" typeof="mw:Transclusion"
2189 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2193 Parsoid: Pipes in external links in template parameter
2197 {{echo|[{{echo|http://example.com}} link]}}
2199 <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>
2203 Parsoid: pipe in transclusion parameter
2207 {{echo|http://foo.com/a|b}}
2209 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2210 typeof="mw:Transclusion"
2211 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>
2215 Parsoid: Pipe in external link target and content in template parameter
2217 parsoid=html2wt,wt2wt
2219 {{echo|[http://foo.com/a|b a|b]}}
2221 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2222 typeof="mw:Transclusion"
2223 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2224 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2228 Templates: Don't escape already nowiki-escaped text in template parameters
2230 parsoid=html2wt,wt2wt
2232 {{echo|foo<nowiki>|</nowiki>bar}}
2233 {{echo|<nowiki><div></nowiki>}}
2234 {{echo|<nowiki></nowiki>}}
2236 <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>
2237 <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>
2238 <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>
2244 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2246 parsoid=html2wt,wt2wt
2248 {{echo|{{echo|1=bar}}}}
2250 <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>
2255 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2261 <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>
2265 ### Parsoid-centric tests for testing RT edge cases for pre
2269 1a. Indent-Pre and Comments
2282 1b. Indent-Pre and Comments
2295 1c. Indent-Pre and Comments
2308 1d. Indent-Pre and Comments
2309 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2322 2a. Indent-Pre and tables
2343 2b. Indent-Pre and tables
2359 2c. Indent-Pre and tables (bug 42252)
2376 3a. Indent-Pre and block tags (single-line html)
2380 c <blockquote> foo </blockquote>
2385 c <blockquote> foo </blockquote>
2386 <pre><span> foo </span>
2391 3b. Indent-Pre and block tags (multi-line html)
2396 <pre>a <span>foo</span>
2403 3c. Indent-Pre and block tags (pre-content on separate line)
2467 4. Indent-Pre and extension tags
2473 a <ul class="gallery mw-gallery-traditional">
2474 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2475 <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>
2476 <div class="gallerytext">
2484 Leading pipes outside of tables
2494 Leading pipes outside of tables 2
2508 Leading pipes outside of tables 3
2513 | class="foo bar" | baz
2517 | class="foo bar" | baz
2522 Render paragraphs when indent-pre is suppressed in blocklevels
2539 4. Multiple spaces at start-of-line
2557 ## NOTE: the leading white-space chars on empty line are significant
2559 5a. White-space in indent-pre
2571 ## NOTE: the leading white-space chars on empty line are significant
2573 5b. White-space in indent-pre
2592 5c. White-space in indent-pre
2605 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2628 7a. Indent-pre and category links
2630 parsoid=wt2html,wt2wt
2632 [[Category:foo]] <!-- No pre-wrapping -->
2633 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2635 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2636 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span>
2637 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2641 7b. Indent-pre and category links
2643 parsoid=wt2html,wt2wt
2646 [[Category:foo]] {{echo|b}}
2649 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
2651 <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>
2655 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2659 HTML-pre: 1. embedded newlines
2695 HTML-pre: 2: indented text
2708 HTML-pre: 3: other wikitext
2729 ### Definition lists
2737 <dt> name </dt>
2745 Definition list for indentation only
2757 Definition list with no space
2770 Definition list with URL link
2772 ; http://example.com/ : definition
2775 <dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
2783 Definition list with bracketed URL link
2785 ;[http://www.example.com/ Example]:Something about it
2788 <dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
2789 <dd>Something about it
2796 Definition list with wikilink containing colon
2798 ; [[Help:FAQ]]: The least-read page on Wikipedia
2801 <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>
2802 <dd> The least-read page on Wikipedia
2808 # At Brion's and JeLuF's insistence... :)
2810 Definition list with news link containing colon
2812 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2815 <dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
2816 <dd> This isn't even a real newsgroup!
2823 Malformed definition list with colon
2825 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2828 <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
2835 Definition lists: colon in external link text
2837 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2840 <dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
2841 <dd> OK, I made that up
2848 Definition lists: colon in HTML attribute
2850 ;<b style="display: inline">bold</b>
2853 <dt><b style="display: inline">bold</b>
2860 Definition lists: self-closed tag
2862 ;one<br/>two : two-line fun
2865 <dt>one<br />two </dt>
2873 Bug 11748: Literal closing tags
2877 <dd>test test test test test</dd>
2879 <dd>test test test test test</dd>
2884 <dd>test test test test test</dd>
2886 <dd>test test test test test</dd>
2892 Definition and unordered list using wiki syntax nested in unordered list using html tags.
2895 ; term : description
2901 <dt> term </dt>
2915 Definition list with empty definition and following paragraph
2930 Nested definition lists using html syntax
2947 Definition Lists: No nesting: Multiple dd's
2965 Definition Lists: Indentation: Regular
2987 Definition Lists: Indentation: Missing 1st level
3007 Definition Lists: Indentation: Multi-level indent
3025 Definition Lists: Hacky use to indent tables
3032 should be left alone
3034 <dl><dd><dl><dd><table>
3039 </td></tr></table></dd></dl></dd></dl>
3041 should be left alone
3046 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3054 should be left alone
3057 <dl><dd><dl><dd><table><tr>
3060 </tr></table><!-- bar --></dd></dl></dd></dl>
3062 should be left alone</p>
3066 Definition Lists: Hacky use to indent tables, with comment before table
3072 <dl><dd><dl><dd><!-- foo --><table><tr>
3074 </tr></table></dd></dl></dd></dl>
3079 Definition Lists: Hacky use to indent tables (WS-insensitive)
3088 <dd> <table><tr><td>a</td></tr></table> </dd>
3091 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3092 ## as an empty dt item. It also ignores all but the last ";" when followed
3093 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3094 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3097 ## Ex: ";;t2 ::d2" is transformed into:
3109 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3110 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3121 ## All Parsoid only definition list tests have this difference.
3123 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3124 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3127 Table / list interaction: indented table with lists in table contents
3153 </td></tr></table></dd></dl>
3158 Table / list interaction: lists nested in tables nested in indented lists
3189 </td></tr></table></dd></dl>
3200 Definition Lists: Nesting: Multi-level (Parsoid only)
3230 Definition Lists: Nesting: Test 2 (Parsoid only)
3250 Definition Lists: Nesting: Test 3 (Parsoid only)
3278 Definition Lists: Nesting: Test 4
3299 ## The Parsoid team believes the following three test exposes a
3300 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3301 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3303 Definition Lists: Mixed Lists: Test 1
3343 Definition Lists: Mixed Lists: Test 2
3362 Definition Lists: Mixed Lists: Test 3
3387 Definition Lists: Mixed Lists: Test 4
3408 Definition Lists: Mixed Lists: Test 5
3429 Definition Lists: Mixed Lists: Test 6
3456 Definition Lists: Mixed Lists: Test 7
3475 Definition Lists: Mixed Lists: Test 8
3499 Definition Lists: Mixed Lists: Test 9
3516 Definition Lists: Mixed Lists: Test 10
3534 # The Parsoid team disagrees with the PHP parser's seemingly-random
3535 # rules regarding dd/dt on the next two tests. Parsoid is more
3536 # consistent, and recognizes the shared nesting and keeps the
3537 # still-open tags around until the nesting is complete.
3540 Definition Lists: Mixed Lists: Test 11
3593 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3594 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3598 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3599 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3609 Definition Lists: Weird Ones: Test 1
3611 *#;*::;; foo : bar (who uses this?)
3622 <dt> bar (who uses this?)
3656 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3657 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3672 External links: non-bracketed
3674 Non-bracketed: http://example.com
3676 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3680 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3682 External links: numbered
3684 Numbered: [http://example.com]
3685 Numbered: [http://example.net]
3686 Numbered: [http://example.com]
3688 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
3689 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
3690 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
3693 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
3694 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
3695 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
3699 External links: specified text
3701 Specified text: [http://example.com link]
3703 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
3708 External links: trail
3710 Linktrails should not work for external links: [http://example.com link]s
3712 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3717 External links: dollar sign in URL
3719 http://example.com/1$2345
3721 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3725 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3727 External links: dollar sign in URL (autonumber)
3729 [http://example.com/1$2345]
3731 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3734 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
3738 External links: open square bracket forbidden in URL (bug 4377)
3740 parsoid=wt2html,wt2wt,html2html
3742 http://example.com/1[2345
3744 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3747 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
3751 External links: open square bracket forbidden in URL (named) (bug 4377)
3753 parsoid=wt2html,html2html
3755 [http://example.com/1[2345]
3757 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3760 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
3763 # parsoid adds a space before the link name
3765 External links: open square bracket forbidden in URL (named) (bug 4377)
3768 [http://example.com/1 [2345]
3770 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3775 External links: nowiki in URL link text (bug 6230)
3777 [http://example.com/ <nowiki>''example site''</nowiki>]
3779 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
3784 External links: newline forbidden in text (bug 6230 regression check)
3786 [http://example.com/ first
3789 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
3795 External links: Pipe char between url and text
3797 [http://example.com | link]
3799 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
3804 External links: protocol-relative URL in brackets
3806 [//example.com/ Test]
3808 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
3812 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3814 External links: protocol-relative URL in brackets without text
3818 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
3821 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
3825 External links: protocol-relative URL in free text is left alone
3829 <p>//example.com/Foo
3834 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
3836 foo//example.com/Foo
3838 <p>foo//example.com/Foo
3845 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3847 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3852 External image from https
3854 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3856 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3861 External image (when not allowed)
3863 wgAllowExternalImages=0
3865 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3867 <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>
3872 Link to non-http image, no img tag
3874 Link to non-http image, no img tag: ftp://example.com/test.jpg
3876 <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>
3881 External links: terminating separator
3883 Terminating separator: http://example.com/thing,
3885 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
3890 External links: intervening separator
3892 Intervening separator: http://example.com/1,2,3
3894 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
3899 External links: old bug with URL in query
3901 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
3903 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
3908 External links: old URL-in-URL bug, mixed protocols
3910 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
3912 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
3917 External links: URL in text
3919 URL in text: [http://example.com http://example.com]
3921 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3926 External links: Clickable images
3928 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
3930 <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>
3935 External links: raw ampersand
3937 Old & use: http://x&y
3939 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3944 External links: encoded ampersand
3946 Old & use: http://x&y
3948 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3951 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
3955 External links: encoded equals (bug 6102)
3957 http://example.com/?foo=bar
3959 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
3962 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
3966 ## Note that parsoid doesn't explicit mark autonumbered links, nor
3967 ## does it number them. As discussed in bug 53505, we can identify
3968 ## autonumbered links via CSS.
3972 External links: [raw ampersand]
3974 Old & use: [http://x&y]
3976 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3979 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
3982 # note that parsoid html is identical to [raw ampersand] case; so html2wt
3983 # mode will return the [raw ampersand] wikitext
3985 External links: [encoded ampersand]
3987 parsoid=wt2html,wt2wt,html2html
3989 Old & use: [http://x&y]
3991 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3994 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
3998 External links: [raw equals]
4000 [http://example.com/?foo=bar]
4002 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4005 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4008 # note that parsoid html is identical to [raw equals] case; so html2wt
4009 # mode will return the [raw equals] wikitext
4011 External links: [encoded equals] (bug 6102)
4013 parsoid=wt2html,wt2wt,html2html
4015 [http://example.com/?foo=bar]
4017 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4020 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4023 # xxx parsoid strips the IDN character, so the round-trip tests will
4024 # obviously fail and are disabled. --cscott
4026 External links: [IDN ignored character reference in hostname; strip it right off]
4028 parsoid=wt2html,wt2wt,html2html
4030 [http://e‌xample.com/]
4032 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4035 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4038 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4039 # Where an external link could easily circumvent the sanitization of the text of
4040 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4041 # test demands a higher standard. That's a bit strange.
4045 # http://example.com -> [http://example.com|http://example.com]
4046 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4048 # The first example is sanitized, but the second is not. Any security benefits
4049 # from this production are trivial to circumvent. Either remove this test and
4050 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4051 # the test accordingly.
4055 # xxx parsoid strips the IDN character, so the round-trip tests will
4056 # obviously fail and are disabled. --cscott
4058 External links: IDN ignored character reference in hostname; strip it right off
4060 parsoid=wt2html,html2html
4062 http://e‌xample.com/
4064 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4067 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4071 External links: www.jpeg.org (bug 554)
4075 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4079 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4081 External links: URL within URL (original bug 2)
4083 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4085 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4088 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4092 BUG 361: URL inside bracketed URL
4094 [http://www.example.com/foo http://www.example.com/bar]
4096 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4101 BUG 361: URL within URL, not bracketed
4103 http://www.example.com/foo?=http://www.example.com/bar
4105 <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>
4110 BUG 289: ">"-token in URL-tail
4112 http://www.example.com/<hello>
4114 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4119 BUG 289: literal ">"-token in URL-tail
4121 http://www.example.com/<b>html</b>
4123 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4128 BUG 289: ">"-token in bracketed URL
4130 [http://www.example.com/<hello> stuff]
4132 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4137 BUG 289: literal ">"-token in bracketed URL
4139 [http://www.example.com/<b>html</b> stuff]
4141 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4146 BUG 289: literal double quote at end of URL
4148 http://www.example.com/"hello"
4150 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4155 BUG 289: literal double quote in bracketed URL
4157 [http://www.example.com/"hello" stuff]
4159 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4164 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4166 [http://www.example.com test]
4168 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4173 External links: link text with spaces
4175 [http://www.example.com a b c]
4176 [http://www.example.com ''a'' ''b'']
4178 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4179 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4184 External links: wiki links within external link (Bug 3695)
4186 [http://example.com [[wikilink]] embedded in ext link]
4188 <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>
4191 <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>
4195 BUG 787: Links with one slash after the url protocol are invalid
4199 [http:/example.com title]
4201 <p>http:/example.com
4202 </p><p>[http:/example.com title]
4207 Bracketed external links with template-generated invalid target
4209 [{{echo|http:/example.com}} title]
4211 <p>[http:/example.com title]
4216 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4218 ''[http://example.com text'']
4219 [http://example.com '''text]'''
4220 ''Something [http://example.com in italic'']
4221 ''Something [http://example.com mixed''''', even bold]'''
4222 '''''Now [http://example.com both''''']
4224 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4225 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4226 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4227 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4228 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4234 Bug 4781: %26 in URL
4236 http://www.example.com/?title=AT%26T
4238 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4241 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4244 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4245 # % is actually legal in HTML5. Any change in output would need testing though.
4247 Bug 4781, 5267: %25 in URL
4249 http://www.example.com/?title=100%25_Bran
4251 <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>
4254 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4258 Bug 4781, 5267: %28, %29 in URL
4260 http://www.example.com/?title=Ben-Hur_%281959_film%29
4262 <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>
4265 <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>
4270 Bug 4781: %26 in autonumber URL
4272 [http://www.example.com/?title=AT%26T]
4274 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4277 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4281 Bug 4781, 5267: %26 in autonumber URL
4283 [http://www.example.com/?title=100%25_Bran]
4285 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4288 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4292 Bug 4781, 5267: %28, %29 in autonumber URL
4294 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4296 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4299 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4304 Bug 4781: %26 in bracketed URL
4306 [http://www.example.com/?title=AT%26T link]
4308 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4311 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4315 Bug 4781, 5267: %25 in bracketed URL
4317 [http://www.example.com/?title=100%25_Bran link]
4319 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4324 Bug 4781, 5267: %28, %29 in bracketed URL
4326 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4328 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4331 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4334 # Note that parsoid does not munge anchor text; all non-space
4335 # characters are valid in HTML5 ids.
4337 Anchor containing a #. (bug 63430)
4339 [[Main Page#And#Link]]
4341 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
4344 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link">Main Page#And#Link</a></p>
4348 External link containing a period in the anchor. (bug 63947)
4350 [//foo.org/bar#baz. bang]
4352 [//foo.org/bar. bang]
4354 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4355 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4358 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4359 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4363 External link containing a single quote. (bug 63947)
4367 [//foo.org/bar'baz bang]
4369 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4370 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4373 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4374 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4379 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4381 Some [http://example.com/ pretty ''italics'' and stuff]!
4383 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4388 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4390 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4392 <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>
4397 External link containing double-single-quotes with no space separating the url from text in italics
4399 [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]].]
4401 <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>
4404 <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>
4408 External link with comments in link text
4410 [http://www.google.com Google <!-- comment -->]
4412 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4417 URL-encoding in URL functions (single parameter)
4419 {{localurl:Some page|amp=&}}
4421 <p>/index.php?title=Some_page&amp=&
4426 URL-encoding in URL functions (multiple parameters)
4428 {{localurl:Some page|q=?&=&}}
4430 <p>/index.php?title=Some_page&q=?&amp=&
4437 http://example.com/index.php?foozoid%5B%5D=bar
4439 http://example.com/index.php?foozoid[]=bar
4441 <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>
4442 </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>
4445 <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>
4447 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4451 IPv6 urls (bug 21261)
4455 http://[2404:130:0:1000::187:2]/index.php
4457 <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>
4462 Non-extlinks in brackets
4471 [{{echo|foo}} ''bar'']
4472 [{{echo|foo}}l's] errand
4473 [{{echo|foo}}l's errand]
4475 [url=http://example.com]
4488 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4493 Percent encoding in external links
4495 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4497 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4500 <p><a rel="mw:ExtLink"
4501 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4505 Use url link syntax for links where the content is equal the link target
4509 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4512 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4516 Parenthesis in external links, especially URL links
4520 http://example.com/test)
4522 http://example.com/(test)
4524 http://example.com/((test)
4526 (http://example.com/(test))
4528 (http://example.com/(test)))))
4530 http://example.com/a)b
4532 [http://example.com) foo]
4534 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4535 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4536 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4537 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4538 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4539 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4540 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4541 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4544 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4545 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4546 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4547 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4548 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4549 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4550 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4551 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4555 Parenthesis in external links, w/ transclusion or comment
4557 (http://example.com/{{echo|hi}})
4559 (http://example.com<!-- hi -->)
4561 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4562 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4565 <p>(<a data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;hi&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[20,31,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">hi</span>"}]]}' typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}'>http://example.com/hi</a>)</p>
4567 <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>
4577 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4579 Normal text. '''''Bold italic text.''''' Normal text.
4581 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4582 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4587 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4588 # parser strips. The wikitext contains just the first half of the bold
4591 Unclosed and unmatched quotes
4593 '''''Bold italic text '''with bold deactivated''' in between.'''''
4595 '''''Bold italic text ''with italic deactivated'' in between.'''''
4599 ..spanning two paragraphs (should not work).'''
4601 '''Bold tag left open
4603 ''Italic tag left open
4607 <!-- Unmatching number of opening, closing tags: -->
4608 '''This year''''s election ''should'' beat '''last year''''s.
4610 ''Tom'''s car is bigger than ''Susan'''s.
4612 Plain ''italic'''s plain
4614 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4615 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4616 </p><p><b>Bold text..</b>
4617 </p><p>..spanning two paragraphs (should not work).
4618 </p><p><b>Bold tag left open</b>
4619 </p><p><i>Italic tag left open</i>
4621 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4622 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4623 </p><p>Plain <i>italic'</i>s plain
4626 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4627 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4628 </p><p><b>Bold text..</b>
4629 </p><p>..spanning two paragraphs (should not work).<b></b>
4630 </p><p><b>Bold tag left open</b>
4631 </p><p><i>Italic tag left open</i>
4633 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4634 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4635 </p><p>Plain <i>italic'</i>s plain
4642 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
4645 # This should not produce <table></table> as <table><tr><td></td></tr></table>
4646 # is the bare minimum required by the spec, see:
4647 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
4648 # Parsoid team replies: empty table tags are legal in HTML5
4650 A table with no data.
4663 A table with stray table end tags on start tag line (wt2html)
4667 {|style="color: red;"|}
4669 {|style="color: red;" |}
4673 {|style="color: red;"|} id="foo"
4677 {|style="color: red;" |} id="foo"
4681 <table style="color: red;"></table>
4683 <table style="color: red;">
4689 <table style="color: red;" id="foo">
4695 <table style="color: red;" id="foo">
4704 A table with no data (take 2)
4712 # A table with nothing but a caption is invalid XHTML, we might want to render
4713 # this as <p>caption</p>
4714 # Parsoid team replies: table with only a caption is legal in HTML5
4716 A table with nothing but a caption
4724 </caption><tr><td></td></tr></table>
4727 <table><caption> caption</caption></table>
4731 A table with caption with default-spaced attributes and a table row
4734 |+ style="color: red;" | caption1
4740 <caption style="color: red;"> caption1
4749 A table with captions with non-default spaced attributes and a table row
4752 |+style="color: red;"|caption2
4753 |+ style="color: red;"| caption3
4759 <caption style="color: red;">caption2
4761 <caption style="color: red;"> caption3
4770 Table td-cell syntax variations
4774 | foo bar foo || baz
4775 | style='color:red;' | baz
4776 | style='color:red;' || baz
4783 <td> foo bar foo </td>
4786 <td style="color:red;"> baz
4788 <td> style='color:red;' </td>
4816 Simple table but with multiple dashes for row wikitext
4834 Multiplication table
4836 {| border="1" cellpadding="2"
4837 |+Multiplication table
4839 ! × !! 1 !! 2 !! 3
4857 <table border="1" cellpadding="2">
4858 <caption>Multiplication table
4905 Accept "||" in table headings
4920 Accept "||" in indented table headings
4930 </th></tr></table></dd></dl>
4935 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
4952 Accept "| !" at start of line in tables (ignore !-attribute)
4956 | !style="color:red" | bar
4968 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 +/-
4972 |style='color:red;'|+1
4973 |style='color:blue;'|-1
4985 <td style="color:red;">+1
4987 <td style="color:blue;">-1
5011 |rowspan=2| Cell 2, row 1 (and 2)
5022 <td rowspan="2"> Cell 2, row 1 (and 2)
5040 {| bgcolor=#ABCDEF border=2
5045 |the original table again
5053 <table bgcolor="#ABCDEF" border="2">
5061 <td>the original table again
5067 Invalid attributes in table cell (bug 1830)
5081 # The "|}" to close the table is missing from the input, so parsoid's
5082 # *2wt modes will fail.
5084 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5086 parsoid=wt2html,html2html
5089 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5093 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5094 <td>]" onmouseover="alert(document.cookie)">test
5102 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5107 Indented table markup mixed with indented pre content (proposed in bug 6200)
5112 Text that should be rendered preformatted
5120 <pre>Text that should be rendered preformatted
5129 Template-generated table cell attributes and cell content
5138 <td style="color: red"> Foo
5140 <td style="color: red"> Foo
5146 Template-generated table cell attributes and cell content (2)
5149 |align=center {{table_attribs}}
5154 <td align="center" style="color: red"> Foo
5160 Template-generated table cell attributes and cell content (3)
5163 |align=center {{table_cells}}
5168 <td align="center" style="color: red"> Foo </td>
5176 Table with row followed by newlines and table heading
5194 Table with empty line following the start tag
5211 # FIXME: Preserve the attribute properly (with an empty string as value) in
5212 # the PHP parser. Parsoid implements the behavior below.
5214 Table attributes with empty value
5224 </td></tr></tbody></table>
5229 Wikitext table with a lot of comments
5252 Wikitext table with double-line table cell
5269 Table cell with a single comment
5285 # The expected HTML structure in this test is debatable. The PHP parser does
5286 # not parse this kind of table at all. The main focus for Parsoid is on
5287 # round-tripping, so this output is ok for now. TODO: revisit!
5289 Wikitext table with html-syntax row
5299 <td>foo</td></tr></tbody></table>
5303 Implicit <td> after a |-
5304 (PHP parser relies on Tidy to add the missing <td> tags)
5306 parsoid=wt2html,wt2wt
5319 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
5320 (PHP parser relies on Tidy to add the missing <td> tags)
5322 parsoid=wt2html,wt2wt
5334 <tr><td><pre>a</pre></td></tr>
5335 <tr><td> b</td></tr>
5341 Lists should be recognized in an implicit <td> context
5342 (PHP parser relies on Tidy to add the missing <td> tags)
5344 parsoid=wt2html,wt2wt
5361 Parsoid: Round-trip tables directly followed by content (bug 51219)
5363 parsoid=wt2html,wt2wt
5375 <td>foo</td></tr></tbody></table> bar
5379 <td>baz</td></tr></tbody></table><b>quux</b>
5383 Parsoid: Default to a newline after tables in new content (bug 51219)
5390 <nowiki> </nowiki>bar
5397 <tr><td>foo</td></tr></tbody></table> bar
5399 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5403 Parsoid: newline inducing block nodes don't suppress <nowiki>
5418 Plain link, capitalized
5422 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5427 Plain link, uncapitalized
5431 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
5438 [[Main Page|The Main Page]]
5440 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5445 Piped link with comment in link text
5447 [[Main Page|The Main<!--front--> Page]]
5449 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5454 Piped link with multiple pipe characters in link text
5456 [[Main Page||The|Main|Page|]]
5458 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
5461 <p><a rel="mw:WikiLink" href="Main_Page">|The|Main|Page|</a></p>
5469 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
5474 Broken link with fragment
5476 [[Zigzagzogzagzig#zug]]
5478 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
5483 Special page link with fragment
5485 [[Special:Version#anchor]]
5487 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
5492 Nonexistent special page link with fragment
5494 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
5496 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
5503 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
5505 <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>
5512 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
5514 <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>!!!
5525 Bug 43661: Piped links with identical prefixes
5527 [[prefixed article|prefixed articles with spaces]]
5529 [[prefixed article|prefixed articlesaoeu]]
5531 [[Main Page|Main Page test]]
5533 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
5534 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
5535 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
5541 Link with HTML entity in suffix / tail
5543 [[Main Page]]", [[Main Page]]a
5545 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
5550 Link with 3 brackets
5559 Link with 4 brackets
5563 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
5568 Piped link with 3 brackets
5570 [[[main page|the main page]]]
5572 <p>[[[main page|the main page]]]
5577 Piped link with extlink-like text
5580 [[Main Page|This is a [bar]]]
5582 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
5583 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
5588 Link with multiple pipes
5590 [[Main Page|The|Main|Page]]
5592 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
5599 [[Talk:Parser testing]], [[Meta:Disclaimers]]
5601 <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>
5606 MemoryAlpha:AlphaTest
5608 This is an article in the MemoryAlpha namespace
5609 (which shadows the memoryalpha interwiki link).
5613 Namespace takes precedence over interwiki link (bug 51680)
5615 [[MemoryAlpha:AlphaTest]]
5617 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5621 # The previous test doesn't work correctly in html2*, due to not recognizing the
5622 # link as an internal one. This one checks for the correct behavior.
5624 Link to namespace preferred over interwiki with correct rel attribute
5626 parsoid=html2wt,html2html
5628 [[MemoryAlpha:AlphaTest]]
5630 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5635 Piped link to namespace
5637 [[Meta:Disclaimers|The disclaimers]]
5639 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
5646 [[Usually caused by a typo (oops}]]
5648 <p>[[Usually caused by a typo (oops}]]
5655 Just a test of an article title containing a percent.
5659 Link containing % (not as a hex sequence)
5663 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
5666 <p><a rel="mw:WikiLink" href="./7%25_Solution">7% Solution</a></p>
5669 # note that the parsoid HTML is identical to the previous test output,
5670 # so the previous test ensures that the html2wt mode will generate the
5671 # "not as a hex sequence" wikitext.
5673 Link containing % as a single hex sequence interpreted to char
5675 parsoid=wt2wt,wt2html,html2html
5679 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
5682 <p><a rel="mw:WikiLink" href="./7%25_Solution">7% Solution</a></p>
5686 Link containing % as a double hex sequence interpreted to hex sequence
5690 <p>[[7%2525 Solution]]
5694 # note that parsoid does not munge anchor text; all non-space
5695 # characters are valid in HTML5 anchors.
5697 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
5698 Example for such a section: == < ==
5700 [[%23%3c]][[%23%3e]]
5702 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
5705 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E">#></a></p>
5709 Link containing "<#" and ">#" as a hex sequences
5711 [[%3c%23]][[%3e%23]]
5713 <p>[[%3c%23]][[%3e%23]]
5718 Link containing an equals sign
5720 [[Special:BookSources/isbn=4-00-026157-6]]
5722 <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>
5725 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
5731 Just a test of an article title containing a tilde.
5734 # note that links containing signatures, like [[Foo~~~~]], are
5735 # massaged by the pre-save transform (PST) and so the tildes are never
5736 # seen by the parser.
5738 Link containing a tilde
5742 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
5745 <p><a rel="mw:WikiLink" href="./Foo~bar">Foo~bar</a></p>
5749 Link containing double-single-quotes '' (bug 4598)
5751 [[Lista d''e paise d''o munno]]
5753 <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>
5756 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno">Lista d''e paise d''o munno</a></p>
5760 Link containing double-single-quotes '' in text (bug 4598 sanity check)
5762 Some [[Link|pretty ''italics'' and stuff]]!
5764 <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>!
5767 <p>Some <a rel="mw:WikiLink" href="Link">pretty <i>italics</i> and stuff</a>!</p>
5771 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
5773 ''Some [[Link|pretty ''italics'' and stuff]]!''
5775 <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>
5780 Link with double quotes in title part (literal) and alternate part (interpreted)
5782 [[File:Denys Savchenko ''Pentecoste''.jpg]]
5786 [[''Pentecoste''|Pentecoste]]
5788 [[''Pentecoste''|''Pentecoste'']]
5790 <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>
5791 </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>
5792 </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>
5793 </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>
5796 <meta typeof="mw:Placeholder"/>
5797 <p><a rel="mw:WikiLink" href="''Pentecoste''">''Pentecoste''</a></p>
5798 <p><a rel="mw:WikiLink" href="''Pentecoste''">Pentecoste</a></p>
5799 <p><a rel="mw:WikiLink" href="''Pentecoste''"><i>Pentecoste</i></a></p>
5803 Broken image links with HTML captions (bug 39700)
5805 [[File:Nonexistent|<script></script>]]
5806 [[File:Nonexistent|100px|<script></script>]]
5807 [[File:Nonexistent|<]]
5808 [[File:Nonexistent|a<i>b</i>c]]
5810 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5811 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5812 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
5813 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
5820 [[http://www.example.com]]
5822 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
5825 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
5829 Plain link to URL with link text
5831 [[http://www.example.com Link text]]
5833 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
5838 Plain link to protocol-relative URL
5840 [[//www.example.com]]
5842 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
5845 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
5849 Plain link to protocol-relative URL with link text
5851 [[//www.example.com Link text]]
5853 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
5858 Plain link to page with question mark in title
5864 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
5865 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
5870 # I'm fairly sure the expected result here is wrong.
5871 # We want these to be URL links, not pseudo-pages with URLs for titles....
5872 # However the current output is also pretty screwy.
5875 # I'm changing it to match the current output--it arguably makes more
5876 # sense in the light of the test above. Old expected result was:
5877 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
5879 # But I think this test is bordering on "garbage in, garbage out" anyway.
5884 Piped link to URL: [[http://www.example.com|an example URL]]
5886 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
5889 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
5893 BUG 2: [[page|http://url/]] should link to page, not http://url/
5895 [[Main Page|http://url/]]
5897 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
5900 <p><a rel="mw:WikiLink" href="./Main_Page">http://url/</a></p>
5903 # Parsoid does not mark self-links, by design.
5905 BUG 337: Escaped self-links should be bold
5909 [[Bug462]] [[Bug462]]
5911 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
5914 <p><a rel="mw:WikiLink" href="./Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462">Bug462</a></p>
5918 Self-link to section should not be bold
5922 [[Main Page#section]]
5924 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
5935 Self-link to numeric title
5941 <p><strong class="selflink">0</strong>
5946 Link to numeric-equivalent title
5952 <p><a href="/wiki/00" title="00">00</a>
5957 <nowiki> inside a link
5959 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
5961 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
5966 Non-breaking spaces in title
5968 [[ Main Page ]]
5970 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
5975 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
5981 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
5986 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
5992 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
5997 Internal link with en linktrail: no apostrophes (bug 27473)
6003 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6008 Internal link with ca linktrail with apostrophes (bug 27473)
6014 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6019 Internal link with kaa linktrail with apostrophes (bug 27473)
6025 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6030 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6032 [[User:Foo/Test/63636:Bar|Test]]
6034 <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>
6037 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar">Test</a></p>
6041 1. Interaction of linktrail and template encapsulation
6047 <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>
6051 2. Interaction of linktrail and template encapsulation
6055 {{echo|Some [[Fool]]}}s
6057 <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>
6061 3. Interaction of linktrail and template encapsulation
6065 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6067 <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>
6077 Internal link with is link prefix
6081 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6083 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6094 Internal link with is link trail and link prefix
6098 [[mótmælendatrú|xxx]]ar
6100 mótmælenda[[söfnuður]]
6101 mótmælenda[[söfnuður|söfnuðir]]
6102 mótmælenda[[söfnuður|söfnuðir]]xxx
6104 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6105 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6106 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6107 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6108 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6113 Parsoid link trail escaping
6115 parsoid=html2wt,html2html
6119 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
6123 Parsoid link prefix escaping
6126 parsoid=html2wt,html2html
6128 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6130 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
6134 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6142 [http://wp.org ''foo'']
6144 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
6145 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
6146 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6147 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6152 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6156 [[Foo|{{echo|a}} b {{echo|c}}]]
6158 <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>
6162 ### Interwiki links (see maintenance/interwiki.sql)
6166 Inline interwiki link
6168 [[MeatBall:SoftSecurity]]
6170 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6175 Inline interwiki link with empty title (bug 2372)
6179 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6184 Interwiki link encoding conversion (bug 1636)
6186 *[[Wikipedia:ro:Olteniţa]]
6187 *[[Wikipedia:ro:Olteniţa]]
6190 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a>
6192 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a>
6199 Interwiki link with fragment (bug 2130)
6201 [[MeatBall:SoftSecurity#foo]]
6203 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6207 # Ideally the wikipedia: prefix here should be proto-relative too
6209 Different interwiki prefixes mapping to the same URL
6217 [[:wikipedia:Foo|Foo]]
6219 [[wikipedia:en:Foo]]
6221 [[:wikipedia:en:Foo]]
6223 <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>
6225 <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>
6227 <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>
6229 <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>
6231 <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>
6233 <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>
6237 Interwiki links that cannot be represented in wiki syntax
6240 [[meatball:ok#foo|ok with fragment]]
6241 [[meatball:ok_as_well?|ok ending with ? mark]]
6242 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6243 [http://de.wikipedia.org/wiki/#foo is just fragment]
6246 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok">meatball:ok</a>
6247 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo">ok with fragment</a>
6248 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?">ok ending with ? mark</a>
6249 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6250 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6254 Interwiki links: trail
6258 [[wikipedia:Foo|Ba]]r
6260 <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>
6264 ### Interlanguage links
6265 ### Language links (so that searching for '### language' matches..)
6279 Double interlanguage link
6290 Interlanguage link, with prefix links
6302 Double interlanguage link, with prefix links (bug 8897)
6315 Parsoid-specific test: Wikilinks with should RT properly
6321 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
6326 Parsoid bug 53221: Wikilinks should be properly entity-escaped
6330 He&nbsp;llo [[Foo|He&nbsp;llo]]
6332 He&nbsp;llo [[He&nbsp;llo]]
6334 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6335 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6339 Parsoid: handle constructor well
6347 <p><a rel="mw:WikiLink" href="./Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
6349 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
6353 Parsoid: recognize interlanguage links without a target page
6360 <link rel="mw:PageProp/Language" href="http://ko.wikipedia.org/wiki/"></p>
6364 Parsoid: recognize interwiki links without a target page
6370 <p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/">ko:</a></p>
6374 Parsoid: Bug #45209, handle interwiki links pointing to the current wiki as plain wiki links
6380 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"en:Foo"}}'>Foo</a></p>
6384 ### Redirects, Parsoid-only
6387 1. Simple redirect to page
6391 #REDIRECT [[Main Page]]
6393 <link rel="mw:PageProp/redirect" href="./Main_Page">
6396 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
6398 2. Other redirect variants
6400 parsoid=wt2html,wt2wt
6402 #REDIRECT [[Main_Page]]
6403 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
6405 <link rel="mw:PageProp/redirect" href="./Main_Page">
6406 <link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
6410 Optional colon in #REDIRECT
6412 # the colon is archaic syntax. we support it for wt2html, but we
6413 # don't care that it roundtrips back to the modern syntax.
6414 parsoid=wt2html,html2html
6416 #REDIRECT:[[Main Page]]
6418 <link rel="mw:PageProp/redirect" href="./Main_Page">
6422 Whitespace in #REDIRECT with optional colon
6424 # the colon and gratuitous whitespace is archaic syntax. we support
6425 # it for wt2html, but we don't care that it roundtrips back to the
6426 # modern syntax (without extra whitespace)
6427 parsoid=wt2html,html2html
6434 <link rel="mw:PageProp/redirect" href="./Main_Page">
6438 Piped link in #REDIRECT
6440 # content after piped link is ignored. we support this syntax,
6441 # but don't care that the piped link is lost when we roundtrip this.
6444 #REDIRECT [[Main Page|bar]]
6446 <link rel="mw:PageProp/redirect" href="./Main_Page">
6450 Redirect to category
6454 #REDIRECT [[Category:Foo]]
6456 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6460 Redirect to category with URL encoding
6464 #REDIRECT [[Category%3AFoo]]
6466 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6470 Redirect to category page
6472 parsoid=wt2html,html2html
6474 #REDIRECT [[:Category:Foo]]
6476 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
6480 Redirect to image page (1)
6484 #REDIRECT [[File:Wiki.png]]
6486 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6490 Redirect to image page (2)
6494 #REDIRECT [[Image:Wiki.png]]
6496 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6500 Redirect to language
6504 #REDIRECT [[en:File:Wiki.png]]
6506 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6510 Redirect to interwiki
6514 #REDIRECT [[meatball:File:Wiki.png]]
6516 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6520 Non-English #REDIRECT
6525 #TILVÍSUN [[Main Page]]
6527 <link rel="mw:PageProp/redirect" href="./Main_Page">
6538 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
6555 Broken br tag sanitization
6563 # TODO: Fix html2html mode (bug 51055)!
6565 Parsoid: Broken br tag recognition
6575 Incorrecly removing closing slashes from correctly formed XHTML
6577 <br style="clear:both;" />
6579 <p><br style="clear:both;" />
6584 Failing to transform badly formed HTML into correct XHTML
6586 <br style="clear: left;">
6587 <br style="clear: right;">
6588 <br style="clear: both;">
6590 <p><br style="clear: left;" />
6591 <br style="clear: right;" />
6592 <br style="clear: both;" />
6597 Handling html with a div self-closing tag
6606 <p><div title />
6610 <p><div title=bar />
6611 <div title=bar/>
6613 <div title="bar/"></div>
6619 Handling html with a br self-closing tag
6628 <p><br title="title" />
6629 <br title="title" />
6638 Horizontal ruler (should it add that extra space?)
6652 Horizontal ruler -- 4+ dashes render hr
6661 Horizontal ruler -- eats additional dashes on the same line
6670 Horizontal ruler -- does not collapse dashes on consecutive lines
6681 Horizontal ruler -- <4 dashes render as plain text
6690 Horizontal ruler -- Supports content following dashes on same line
6699 ### Block-level elements
6747 ***#Number on level 4
6749 **#Number on level 3
6750 **#Number on level 3
6754 #** Level 3, but ordered
6777 <li>Number on level 4
6785 <li>Number on level 3
6787 <li>Number on level 3
6810 <li> Level 3, but ordered
6856 Nested lists 3 (first element empty)
6873 Nested lists 4 (first element empty)
6891 Nested lists 5 (both elements empty)
6909 Nested lists 6 (both elements empty)
6926 Nested lists 7 (skip initial nesting levels)
6944 Nested lists 8 (multiple nesting transitions)
6970 1. Lists with start-of-line-transparent tokens before bullets: Comments
6988 2. Lists with start-of-line-transparent tokens before bullets: Template close
7003 List items are not parsed correctly following a <pre> block (bug 785)
7021 List items from template
7032 * notSOL{{inner list}}
7063 List interrupted by empty line or heading
7082 <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>
7084 <li> Another list item
7091 Multiple list tags generated by templates
7106 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7109 <!--This line will NOT split the list-->
7111 <!--This line will NOT split the list either-->
7113 <!--foo--> <!----> <!--This line NOT split the list either-->
7130 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7133 <!--This line will NOT split the list-->
7135 <!--This line will NOT split the list either-->
7137 <!--foo--> <!----> <!--This line NOT split the list
7156 (Cannot test this with PHP parser since it relies on Tidy for the hack)
7158 parsoid=wt2html,wt2wt
7162 * {{echo|<li>templated li-hack}}
7163 * <!--foo--> <li> unsupported li-hack with preceding comments
7166 <li><li>not a li-hack
7173 <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>
7174 <li> <!--foo--> </li>
7175 <li> li-hack with preceding comments</li>
7186 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7213 Parsoid: Test of whitespace serialization with Templated bullets
7220 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7224 # ------------------------------------------------------------------------
7225 # The next set of tests are about Parsoid's ability to handle badly nested
7226 # tags (parse, minimize scope of fixup, and roundtrip back)
7227 # ------------------------------------------------------------------------
7230 Unbalanced closing block tags break a list
7231 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7249 Unbalanced closing non-block tags don't break a list
7250 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7267 Unclosed formatting tags that straddle lists are closed and reopened
7268 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7282 List embedded in a non-block tag
7283 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
7289 <p><small></small></p>
7295 <p><small></small></p>
7299 Table with missing opening <tr> tag
7301 parsoid=wt2html,wt2wt
7319 # Note that the current date is hard-coded as
7320 # 1970-01-01T00:02:03Z (a Thursday)
7321 # when running parser tests. The timezone is also fixed to GMT, so
7322 # local date will be identical to current date.
7325 Magic Word: {{CURRENTDAY}}
7334 Magic Word: {{CURRENTDAY2}}
7343 Magic Word: {{CURRENTDAYNAME}}
7352 Magic Word: {{CURRENTDOW}}
7361 Magic Word: {{CURRENTMONTH}}
7370 Magic Word: {{CURRENTMONTH1}}
7379 Magic Word: {{CURRENTMONTHABBREV}}
7381 {{CURRENTMONTHABBREV}}
7388 Magic Word: {{CURRENTMONTHNAME}}
7390 {{CURRENTMONTHNAME}}
7397 Magic Word: {{CURRENTMONTHNAMEGEN}}
7399 {{CURRENTMONTHNAMEGEN}}
7406 Magic Word: {{CURRENTTIME}}
7415 Magic Word: {{CURRENTHOUR}}
7424 Magic Word: {{CURRENTWEEK}} (@bug 4594)
7433 Magic Word: {{CURRENTYEAR}}
7442 Magic Word: {{CURRENTTIMESTAMP}}
7444 {{CURRENTTIMESTAMP}}
7451 Magic Words LOCAL (UTC)
7455 * {{LOCALMONTHNAME}}
7456 * {{LOCALMONTHNAMEGEN}}
7457 * {{LOCALMONTHABBREV}}
7466 * {{LOCALTIMESTAMP}}
7502 Magic Word: {{FULLPAGENAME}}
7504 title=[[User:Ævar Arnfjörð Bjarmason]]
7508 <p>User:Ævar Arnfjörð Bjarmason
7513 Magic Word: {{FULLPAGENAMEE}}
7515 title=[[User:Ævar Arnfjörð Bjarmason]]
7519 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7524 Magic Word: {{TALKSPACE}}
7526 title=[[User:Ævar Arnfjörð Bjarmason]]
7535 Magic Word: {{TALKSPACE}}, same namespace
7537 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7546 Magic Word: {{TALKSPACE}}, main namespace
7548 title=[[Parser Test]]
7557 Magic Word: {{TALKSPACEE}}
7559 title=[[User:Ævar Arnfjörð Bjarmason]]
7568 Magic Word: {{SUBJECTSPACE}}
7570 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7579 Magic Word: {{SUBJECTSPACE}}, same namespace
7581 title=[[User:Ævar Arnfjörð Bjarmason]]
7590 Magic Word: {{SUBJECTSPACE}}, main namespace
7592 title=[[Parser Test]]
7600 Magic Word: {{SUBJECTSPACEE}}
7602 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7611 Magic Word: {{NAMESPACE}}
7613 title=[[User:Ævar Arnfjörð Bjarmason]]
7622 Magic Word: {{NAMESPACEE}}
7624 title=[[User:Ævar Arnfjörð Bjarmason]]
7633 Magic Word: {{NAMESPACENUMBER}}
7635 title=[[User:Ævar Arnfjörð Bjarmason]]
7644 Magic Word: {{SUBPAGENAME}}
7646 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7655 Magic Word: {{SUBPAGENAMEE}}
7657 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7666 Magic Word: {{ROOTPAGENAME}}
7668 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7672 <p>Ævar Arnfjörð Bjarmason
7677 Magic Word: {{ROOTPAGENAMEE}}
7679 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7683 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7688 Magic Word: {{BASEPAGENAME}}
7690 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7694 <p>Ævar Arnfjörð Bjarmason
7699 Magic Word: {{BASEPAGENAMEE}}
7701 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7705 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7710 Magic Word: {{TALKPAGENAME}}
7712 title=[[User:Ævar Arnfjörð Bjarmason]]
7716 <p>User talk:Ævar Arnfjörð Bjarmason
7721 Magic Word: {{TALKPAGENAMEE}}
7723 title=[[User:Ævar Arnfjörð Bjarmason]]
7727 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7732 Magic Word: {{SUBJECTPAGENAME}}
7734 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7738 <p>User:Ævar Arnfjörð Bjarmason
7743 Magic Word: {{SUBJECTPAGENAMEE}}
7745 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7747 {{SUBJECTPAGENAMEE}}
7749 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7754 Magic Word: {{NUMBEROFFILES}}
7763 Magic Word: {{PAGENAME}}
7765 title=[[User:Ævar Arnfjörð Bjarmason]]
7769 <p>Ævar Arnfjörð Bjarmason
7774 Magic Word: {{PAGENAME}} with metacharacters
7776 title=[['foo & bar = baz']]
7780 <p><i>'foo & bar = baz'</i>
7785 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
7787 title=[[*RFC 1234 http://example.com/]]
7791 <p>*RFC 1234 http://example.com/
7796 Magic Word: {{PAGENAMEE}}
7798 title=[[User:Ævar Arnfjörð Bjarmason]]
7802 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7807 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
7809 title=[[*RFC 1234 http://example.com/]]
7813 <p>*RFC_1234_http://example.com/
7818 Magic Word: {{REVISIONID}}
7827 Magic Word: {{SCRIPTPATH}}
7836 Magic Word: {{STYLEPATH}}
7845 Magic Word: {{SERVER}}
7849 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7854 Magic Word: {{SERVERNAME}}
7863 Magic Word: {{SITENAME}}
7872 Case-sensitive magic words, when cased differently, should just be template transclusions
7879 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
7880 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
7881 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
7882 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
7887 Case-insensitive magic words should still work with weird casing.
7897 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7902 Namespace 1 {{ns:1}}
7911 Namespace 1 {{ns:01}}
7920 Namespace 0 {{ns:0}} (bug 4783)
7928 Namespace 0 {{ns:00}} (bug 4783)
7936 Namespace -1 {{ns:-1}}
7945 Namespace User {{ns:User}}
7954 Namespace User talk {{ns:User_talk}}
7963 Namespace User talk {{ns:uSeR tAlK}}
7972 Namespace File {{ns:File}}
7981 Namespace File {{ns:Image}}
7990 Namespace (lang=de) Benutzer {{ns:User}}
8001 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8007 <p>Benutzer Diskussion
8015 {{urlencode:hi world?!}}
8016 {{urlencode:hi world?!|WIKI}}
8017 {{urlencode:hi world?!|PATH}}
8018 {{urlencode:hi world?!|QUERY}}
8028 Magic Word: prioritize type info over data-parsoid
8034 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8038 Magic Word: serialize on separate line (parsoid)
8040 parsoid=wt2wt,html2wt
8046 foo<meta property="mw:PageProp/notoc"/>bar
8050 Magic Word: rt non-english wikis
8057 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8064 Magic links: internal link to RFC (bug 479)
8068 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8073 Magic links: RFC (bug 479)
8077 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8082 Magic links: ISBN (bug 1937)
8086 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8091 Magic links: PMID incorrectly converts space to underscore
8095 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8104 Nonexistent template
8106 {{thistemplatedoesnotexist}}
8108 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8113 Template with invalid target containing tags
8115 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8117 <p>{{a<b>b</b>|foo|a=b|a = b}}
8122 Template with invalid target containing unclosed tag
8124 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8126 <p>{{a<b>|foo|a=b|a = b}}</b>
8131 Template with invalid target containing wikilink
8135 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8138 <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>
8144 This is a test template
8152 <p>This is a test template
8157 Template with explicit namespace
8161 <p>This is a test template
8169 This is a test template with parameter {{{param}}}
8175 {{paramtest|param=foo}}
8177 <p>This is a test template with parameter foo
8182 Template:paramtestnum
8188 Template unnamed parameter
8190 {{paramtestnum|Main Page|the main page}}
8192 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8197 Template:templatesimple
8203 Template:templateredirect
8205 #redirect [[Template:templatesimple]]
8209 Template:templateasargtestnum
8215 Template:templateasargtest
8217 {{template{{{templ}}}}}
8221 Template:templateasargtest2
8227 Template with template name as unnamed argument
8229 {{templateasargtestnum|templatesimple}}
8236 Template with template name as argument
8238 {{templateasargtest|templ=simple}}
8245 Template with template name as argument (2)
8247 {{templateasargtest2|templ=templatesimple}}
8254 Template:templateasargtestdefault
8256 {{{{{templ|templatesimple}}}}}
8266 Template with default value
8268 {{templateasargtestdefault}}
8275 Template with default value (value set)
8277 {{templateasargtestdefault|templ=templa}}
8286 {{templateredirect}}
8293 Template with argument in separate line
8295 {{ templateasargtest |
8303 Template with complex template as argument
8306 param ={{ templateasargtest |
8309 <p>This is a test template with parameter (test)
8314 Template with thumb image (with link in description)
8317 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
8319 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>
8324 Template:complextemplate
8326 {{{1}}} {{paramtest|
8327 param ={{{param}}}}}
8331 Template with complex arguments
8334 param ={{ templateasargtest |
8335 templ = simple }}|[[Template:complextemplate|link]]}}
8337 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
8342 BUG 553: link with two variables in a piped link
8345 |[[{{{1}}}|{{{2}}}]]
8350 <td>[[{{{1}}}|{{{2}}}]]
8356 Magic variable as template parameter
8358 {{paramtest|param={{SITENAME}}}}
8360 <p>This is a test template with parameter MediaWiki
8367 [[{{{param}}}|link]]
8371 Template parameter as link source
8373 {{linktest|param=Main Page}}
8375 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
8380 Template-generated attribute string (k='v')
8382 <span {{attr_str|id|v1}}>bar</span>
8384 <p><span id="v1">bar</span>
8391 including another template, {{paramtest|param={{{arg}}}}}
8395 Template passing argument to another template
8397 {{paramtest2|arg='hmm'}}
8399 <p>including another template, This is a test template with parameter 'hmm'
8410 Template as link source
8414 [[{{linktest2}}|Main Page]]
8416 [[{{linktest2}}]]Page
8418 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8419 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8420 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
8438 Template infinite loop
8442 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
8447 Template from main namespace
8466 BUG 529: Template with table, not included at beginning of line
8485 BUG 523: Template shouldn't eat newline (or add an extra one before table)
8505 BUG 41: Template parameters shown as broken links
8514 Template with targets containing wikilinks
8518 {{[[{{echo|foo}}]]}}
8520 {{{{echo|[[foo}}]]}}
8522 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8523 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8531 ''None'' of '''this''' should be
8533 but rather passed unmodified
8537 # hmm, fix this or just deprecate msgnw and document its behavior?
8543 {{msgnw:MSGNW test}}
8545 <p>''None'' of '''this''' should be
8547 but rather passed unmodified
8555 {{int:youhavenewmessages|lots of money|not!}}
8557 <p>You have lots of money (not!).
8564 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8568 <includeonly> and <noinclude> being included
8579 <onlyinclude>Foo</onlyinclude>bar
8583 <onlyinclude> being included
8595 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
8599 <onlyinclude> and <includeonly> being included
8608 <includeonly> and <noinclude> on a page
8610 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8617 Un-closed <noinclude>
8624 <onlyinclude> on a page
8626 <onlyinclude>Foo</onlyinclude>bar
8633 Un-closed <onlyinclude>
8640 Self-closed noinclude, includeonly, onlyinclude tags
8651 Unbalanced includeonly and noinclude tags
8655 |b</noinclude></noinclude>
8656 |c</noinclude></includeonly>
8657 |d</includeonly></includeonly>
8666 <td>c</includeonly>
8668 <td>d</includeonly></includeonly>
8674 Template:Includeonly section
8677 ==Includeonly section==
8683 Bug 6563: Edit link generation for section shown by <includeonly>
8685 {{includeonly section}}
8687 <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>
8688 <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>
8692 # Uses same input as the contents of [[Template:Includeonly section]]
8694 Bug 6563: Section extraction for section shown by <includeonly>
8699 ==Includeonly section==
8707 Bug 6563: Edit link generation for section suppressed by <includeonly>
8710 ==Includeonly section==
8714 <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>
8719 Bug 6563: Section extraction for section suppressed by <includeonly>
8724 ==Includeonly section==
8732 Un-closed <includeonly>
8738 # TODO: test with DOM fragment reuse!
8740 Parsoid: DOM fragment reuse
8742 parsoid=wt2wt,wt2html
8744 a{{echo|b<table></table>c}}d
8756 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
8757 <table></table>c"}},"i":0}}]}'>b</span>
8758 <table about="#mwt1"></table><span about="#mwt1">c</span>d
8761 <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">
8763 <table about="#mwt2"></table><span about="#mwt2">
8765 <p about="#mwt2">cd</p>
8768 <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">
8771 <table about="#mwt3"></table><span about="#mwt3">
8774 <p about="#mwt3">b</p>
8778 Parsoid: Merge double tds (bug 50603)
8787 <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>
8792 Parsoid: Merge double tds in nested transclusion content (bug 50603)
8802 <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}}]}'>
8804 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
8810 ### <includeonly> and <noinclude> in attributes
8813 0. includeonly around the entire attribute
8815 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
8817 <p><span id="v2">bar</span>
8822 1. includeonly in html attr key
8824 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
8826 <p><span id="foo">bar</span>
8831 2. includeonly in html attr value
8833 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
8834 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
8836 <p><span id="v1">bar</span>
8837 <span id="v1">bar</span>
8842 3. includeonly in part of an attr value
8844 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
8846 <p><span style="color:red;">bar</span>
8851 4. includeonly in table attributes
8875 ### Testing parsing of templates where a template arg
8876 ### has the same name as the template itself.
8886 Templates: Template Name/Arg clash: 1. Use of positional param
8895 Templates: Template Name/Arg clash: 2. Use of named param
8904 Templates: Template Name/Arg clash: 3. Use of named param with empty input
8913 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
8917 Templates: 1. Simple use
8926 Templates: 2. Inside a block tag
8928 <div>{{echo|Foo}}</div>
8929 <blockquote>{{echo|Foo}}</blockquote>
8932 <blockquote>Foo</blockquote>
8937 Templates: P-wrapping: 1a. Templates on consecutive lines
8948 Templates: P-wrapping: 1b. Templates on consecutive lines
8962 Templates: P-wrapping: 1c. Templates on consecutive lines
8965 {{echo|bar}} <div>baz</div>
8974 Templates: P-wrapping: 1d. Template preceded by comment-only line
8983 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
8987 Templates: Inline Text: 1. Multiple template uses
8989 {{echo|Foo}}bar{{echo|baz}}
8996 Templates: Inline Text: 2. Back-to-back template uses
8998 {{echo|Foo}}{{echo|bar}}
9005 Templates: Block Tags: 1. Multiple template uses
9007 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
9009 <div>Foo</div><div>bar</div><div>baz</div>
9014 Templates: Block Tags: 2. Back-to-back template uses
9016 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
9018 <div>Foo</div><div>bar</div>
9023 Templates: Links: 1. Simple example
9025 {{echo|[[Foo|bar]]}}
9027 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9032 Templates: Links: 2. Generation of link href
9034 [[{{echo|Foo}}|bar]]
9036 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9041 Templates: Links: 3. Generation of part of a link href
9043 [[Fo{{echo|o}}|bar]]
9047 [[Foo{{echo|bar}}baz]]
9049 [[Foo{{echo|bar}}|bar]]
9051 [[:Foo{{echo|bar}}]]
9053 [[:Foo{{echo|bar}}|bar]]
9055 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9056 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9057 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9058 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9059 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9060 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9065 Templates: Links: 4. Multiple templates generating link href
9067 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9069 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9074 Templates: Links: 5. Generation of link text
9076 [[Foo|{{echo|bar}}]]
9078 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9083 Templates: Links: 5. Nested templates (only outermost template should be marked)
9085 {{echo|[[{{echo|Foo}}|bar]]}}
9087 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
9092 Templates: HTML Tag: 1. Generation of HTML attr. key
9094 <div {{echo|style}}="color:red;">foo</div>
9096 <div style="color:red;">foo</div>
9101 Templates: HTML Tag: 2. Generation of HTML attr. value
9103 <div style={{echo|'color:red;'}}>foo</div>
9105 <div style="color:red;">foo</div>
9110 Templates: HTML Tag: 3. Generation of HTML attr key and value
9112 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9114 <div style="color:red;">foo</div>
9119 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9121 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9123 <div title="This is a long title with just one piece templated">foo</div>
9128 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9130 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9132 <div title="This is a long title with just one piece templated">foo</div>
9137 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9139 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9141 <div title="This is a long title with just one piece templated">foo</div>
9146 Templates: HTML Tag: 7. Generation of partial attribute key string
9148 <div st{{echo|yle}}="color:red;">foo</div>
9150 <div style="color:red;">foo</div>
9155 Templates: HTML Tables: 1. Generating start of a HTML table
9157 {{echo|<table><tr><td>foo</td>}}</tr></table>
9159 <table><tr><td>foo</td></tr></table>
9164 Templates: HTML Tables: 2a. Generating middle of a HTML table
9166 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9168 <table><tr><td>foo</td></tr></table>
9173 Templates: HTML Tables: 2b. Generating middle of a HTML table
9175 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9177 <table><tr><td>foo</td></tr></table>
9182 Templates: HTML Tables: 3. Generating end of a HTML table
9184 <table><tr>{{echo|<td>foo</td></tr></table>}}
9186 <table><tr><td>foo</td></tr></table>
9191 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9193 {{echo|<table>}}<tr><td>foo</td></tr></table>
9195 <table><tr><td>foo</td></tr></table>
9200 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9202 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9204 <table><tr><td>foo</td></tr></table>
9209 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9211 <table><tr>{{echo|<td>}}foo</td></tr></table>
9213 <table><tr><td>foo</td></tr></table>
9218 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9220 <table><tr><td>foo{{echo|</td>}}</tr></table>
9222 <table><tr><td>foo</td></tr></table>
9227 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9229 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9231 <table><tr><td>foo</td></tr></table>
9236 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
9238 <table><tr><td>foo</td></tr>{{echo|</table>}}
9240 <table><tr><td>foo</td></tr></table>
9245 Templates: HTML Tables: 5. Proper fostering of categories from inside
9247 parsoid=wt2html,wt2wt
9249 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
9250 <!--Two categories (Bug 50330)-->
9251 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
9253 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
9254 <!--Two categories (Bug 50330)-->
9255 <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>
9259 Templates: Wiki Tables: 1a. Fostering of entire template content
9267 <tr><td></td></tr></table>
9272 Templates: Wiki Tables: 1b. Fostering of entire template content
9285 <tr><td></td></tr></table>
9290 Templates: Wiki Tables: 2. Fostering of partial template content
9300 <tr><td></td></tr></table>
9305 Templates: Wiki Tables: 3. td-content via multiple templates
9308 {{echo|{{pipe}}a}}{{echo|b}}
9319 Templates: Wiki Tables: 4. Templated tags, no content
9325 <tr><td></td></tr></table>
9330 Templates: Wiki Tables: 5. Templated tags, regular td-tags
9344 Templates: Wiki Tables: 6. Templated tags, templated td-tags
9358 Templates: Lists: Multi-line list-items via templates
9360 *{{echo|a {{nonexistent|
9362 *{{echo|b {{nonexistent|
9366 <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>
9368 <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>
9375 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
9377 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
9379 <p><i>ab</i>c<i>d</i>e
9384 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
9385 (PHP parser generates misnested html)
9387 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
9389 <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>
9393 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
9394 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
9396 parsoid=wt2html,wt2wt
9398 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
9400 <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>
9401 <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>
9402 <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>
9406 Templates: Ugly nesting: 4. Divs opened/closed across templates
9408 a<div>b{{echo|c</div>d}}e
9415 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
9421 |{{echo|foo</table>}}
9425 <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|}"]}'>
9429 <td>foo</td></tr></tbody></table><span about="#mwt1">
9430 </span><span about="#mwt1">|bar</span><span about="#mwt1">
9435 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
9445 <td>1. {{echo|foo </table>}}</td>
9447 <td>2. {{echo|baz </table>}}</td>
9460 <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>"]}'>
9465 <td>1. foo </td></tr></tbody></table></td>
9467 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
9468 </span><span about="#mwt2">
9469 </span><span about="#mwt2">
9470 </span><span about="#mwt2">abc</span><span about="#mwt2">
9471 </span><span about="#mwt2">
9472 </span><span about="#mwt2">
9473 </span><span about="#mwt2">
9474 </span><span about="#mwt2">
9475 </span><span about="#mwt2">
9476 </span><span about="#mwt2">xyz</span><span about="#mwt2">
9477 </span><span about="#mwt2">
9482 Templates: Ugly templates: 3. newline-only template parameter
9491 # This looks like a bug: a single newline triggers p/br for some reason.
9493 Templates: Ugly templates: 4. newline-only template parameter inconsistency
9502 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
9503 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
9505 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
9511 <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
9512 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9516 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
9517 # that are "identical" and generate nesting cycles in the algorithm
9519 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
9521 {{echo|<table><tr><td><table>}}
9525 <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"}'>
9526 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9527 </table></td></tr></tbody></table>
9531 Parser Functions: 1. Simple example
9540 Parser Functions: 2. Nested use (only outermost should be marked up)
9549 ### Pre-save transform tests
9552 pre-save transform: subst:
9558 This is a test template
9562 pre-save transform: normal template
9572 pre-save transform: nonexistent template
9576 {{thistemplatedoesnotexist}}
9578 {{thistemplatedoesnotexist}}
9583 pre-save transform: subst magic variables
9592 # This is bug 89, which I fixed. -- wtm
9594 pre-save transform: subst: templates with parameters
9598 {{subst:paramtest|param="something else"}}
9600 This is a test template with parameter "something else"
9606 <nowiki>'''not wiki'''</nowiki>
9610 pre-save transform: nowiki in subst (bug 1188)
9614 {{subst:nowikitest}}
9616 <nowiki>'''not wiki'''</nowiki>
9621 Template:commenttest
9623 This template has <!-- a comment --> in it.
9627 pre-save transform: comment in subst (bug 1936)
9631 {{subst:commenttest}}
9633 This template has <!-- a comment --> in it.
9637 pre-save transform: unclosed tag
9641 <nowiki>'''not wiki'''
9643 <nowiki>'''not wiki'''
9647 pre-save transform: mixed tag case
9651 <NOwiki>'''not wiki'''</noWIKI>
9653 <NOwiki>'''not wiki'''</noWIKI>
9657 pre-save transform: unclosed comment in <nowiki>
9661 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9663 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9666 # Leading @ in this template definition works around a limitation
9667 # in parsoid's parserTests which otherwise strips the <span> from the
9668 # result (confusing it for a template wrapper)
9672 @<span onmouseover="alert('crap')">Oh no</span>
9676 (confirming safety of fix for subst bug 1936)
9678 {{Template:dangerous}}
9680 <p>@<span>Oh no</span>
9685 pre-save transform: comment containing gallery (bug 5024)
9689 <!-- <gallery>data</gallery> -->
9691 <!-- <gallery>data</gallery> -->
9695 pre-save transform: comment containing extension
9699 <!-- <tag>data</tag> -->
9701 <!-- <tag>data</tag> -->
9705 pre-save transform: comment containing nowiki
9709 <!-- <nowiki>data</nowiki> -->
9711 <!-- <nowiki>data</nowiki> -->
9715 pre-save transform: <noinclude> in subst (bug 3298)
9725 pre-save transform: <onlyinclude> in subst (bug 3298)
9737 {{<includeonly>subst:</includeonly>Includes}}
9741 Template:SafeSubstTest
9743 {{<includeonly>safesubst:</includeonly>Includes}}
9747 bug 22297: safesubst: works during PST
9751 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
9757 bug 22297: safesubst: works during normal parse
9766 subst: does not work during normal parse
9770 <p>{{subst:Includes}}
9775 pre-save transform: context links ("pipe trick")
9779 [[Article (context)|]]
9782 [[Bar:Article (context)|]]
9783 [[:Bar:Article (context)|]]
9785 [[|Article (context)]]
9789 [[Article (context)|Article]]
9790 [[Bar:Article|Article]]
9791 [[:Bar:Article|Article]]
9792 [[Bar:Article (context)|Article]]
9793 [[:Bar:Article (context)|Article]]
9795 [[Article (context)]]
9796 [[Bar:X (Y) Z|X (Y) Z]]
9797 [[:Bar:X (Y) Z|X (Y) Z]]
9801 pre-save transform: context links ("pipe trick") with interwiki prefix
9805 [[interwiki:Article|]]
9806 [[:interwiki:Article|]]
9807 [[interwiki:Bar:Article|]]
9808 [[:interwiki:Bar:Article|]]
9810 [[interwiki:Article|Article]]
9811 [[:interwiki:Article|Article]]
9812 [[interwiki:Bar:Article|Bar:Article]]
9813 [[:interwiki:Bar:Article|Bar:Article]]
9817 pre-save transform: context links ("pipe trick") with parens in title
9819 pst title=[[Somearticle (context)]]
9823 [[Article (context)|Article]]
9827 pre-save transform: context links ("pipe trick") with comma in title
9829 pst title=[[Someplace, Somewhere]]
9832 [[Otherplace, Elsewhere|]]
9833 [[Otherplace, Elsewhere, Anywhere|]]
9835 [[Otherplace, Somewhere|Otherplace]]
9836 [[Otherplace, Elsewhere|Otherplace]]
9837 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
9841 pre-save transform: context links ("pipe trick") with parens and comma
9843 pst title=[[Someplace (IGNORED), Somewhere]]
9846 [[Otherplace (place), Elsewhere|]]
9848 [[Otherplace, Somewhere|Otherplace]]
9849 [[Otherplace (place), Elsewhere|Otherplace]]
9853 pre-save transform: context links ("pipe trick") with comma and parens
9855 pst title=[[Who, me? (context)]]
9858 [[Me, Myself, and I (1937 song)|]]
9860 [[Yes, you. (context)|Yes, you.]]
9861 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
9865 pre-save transform: context links ("pipe trick") with namespace
9867 pst title=[[Ns:Somearticle]]
9871 [[Ns:Article|Article]]
9875 pre-save transform: context links ("pipe trick") with namespace and parens
9877 pst title=[[Ns:Somearticle (context)]]
9881 [[Ns:Article (context)|Article]]
9885 pre-save transform: context links ("pipe trick") with namespace and comma
9887 pst title=[[Ns:Somearticle, Context, Whatever]]
9891 [[Ns:Article, Context, Whatever|Article]]
9895 pre-save transform: context links ("pipe trick") with namespace, comma and parens
9897 pst title=[[Ns:Somearticle, Context (context)]]
9901 [[Ns:Article (context)|Article]]
9905 pre-save transform: context links ("pipe trick") with namespace, parens and comma
9907 pst title=[[Ns:Somearticle (IGNORED), Context]]
9911 [[Ns:Article, Context|Article]]
9915 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
9919 [[Article(context)|]]
9920 [[Bar:Article(context)|]]
9921 [[:Bar:Article(context)|]]
9922 [[|Article(context)]]
9926 [[Article(context)|Article]]
9927 [[Bar:Article(context)|Article]]
9928 [[:Bar:Article(context)|Article]]
9929 [[Article(context)]]
9931 [[:Bar:X(Y)Z|X(Y)Z]]
9935 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
9939 [[Article (context)|]]
9940 [[Bar:Article (context)|]]
9941 [[:Bar:Article (context)|]]
9942 [[|Article (context)]]
9946 [[Article (context)|Article]]
9947 [[Bar:Article (context)|Article]]
9948 [[:Bar:Article (context)|Article]]
9949 [[Article (context)]]
9950 [[Bar:X (Y) Z|X (Y) Z]]
9951 [[:Bar:X (Y) Z|X (Y) Z]]
9955 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
9959 [[Article(context)|]]
9960 [[Bar:Article(context)|]]
9961 [[:Bar:Article(context)|]]
9962 [[|Article(context)]]
9966 [[Article(context)|Article]]
9967 [[Bar:Article(context)|Article]]
9968 [[:Bar:Article(context)|Article]]
9969 [[Article(context)]]
9971 [[:Bar:X(Y)Z|X(Y)Z]]
9975 pre-save transform: context links ("pipe trick") with commas (bug 21660)
9979 [[Article (context), context|]]
9980 [[Article (context),context|]]
9981 [[Bar:Article (context), context|]]
9982 [[Bar:Article (context),context|]]
9983 [[:Bar:Article (context), context|]]
9984 [[:Bar:Article (context),context|]]
9986 [[Article (context), context|Article]]
9987 [[Article (context),context|Article]]
9988 [[Bar:Article (context), context|Article]]
9989 [[Bar:Article (context),context|Article]]
9990 [[:Bar:Article (context), context|Article]]
9991 [[:Bar:Article (context),context|Article]]
9995 pre-save transform: trim trailing empty lines
9999 Empty lines are trimmed
10005 Empty lines are trimmed
10009 pre-save transform: Signature expansion
10014 * <noinclude>~~~</noinclude>
10015 * <includeonly>~~~</includeonly>
10016 * <onlyinclude>~~~</onlyinclude>
10018 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
10019 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
10020 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
10021 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
10026 pre-save transform: Signature expansion in nowiki tags (bug 93)
10032 <nowiki>~~~~</nowiki>
10034 <includeonly><nowiki>~~~~</nowiki></includeonly>
10036 <noinclude><nowiki>~~~~</nowiki></noinclude>
10038 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10040 {{subst:Foo}} shall be converted to FOO
10042 As well as inside noinclude/onlyinclude
10043 <noinclude>{{subst:Foo}}</noinclude>
10044 <onlyinclude>{{subst:Foo}}</onlyinclude>
10046 But not inside includeonly
10047 <includeonly>{{subst:Foo}}</includeonly>
10051 <nowiki>~~~~</nowiki>
10053 <includeonly><nowiki>~~~~</nowiki></includeonly>
10055 <noinclude><nowiki>~~~~</nowiki></noinclude>
10057 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10059 FOO shall be converted to FOO
10061 As well as inside noinclude/onlyinclude
10062 <noinclude>FOO</noinclude>
10063 <onlyinclude>FOO</onlyinclude>
10065 But not inside includeonly
10066 <includeonly>{{subst:Foo}}</includeonly>
10070 Parsoid: Recognize nowiki with trailing space in tags
10074 <nowiki ><div>[[foo]]</nowiki >
10082 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10089 Parsoid: Recognize nowiki with odd capitalization
10093 <noWikI ><div>[[foo]]</Nowiki >
10095 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10100 Parsoid: Escape nowiki with trailing space in tags
10104 <nowiki > foo </nowiki >
10110 <p><nowiki > foo </nowiki ></p>
10111 <p>a<nowiki />b</p>
10112 <p>c<nowiki/ >d</p>
10116 Parsoid: Escape weird noWikI capitalizations
10120 <noWikI > foo </NoWikI >
10122 <p><noWikI > foo </NoWikI ></p>
10126 ### Message transform tests
10129 message transform: magic variables
10139 message transform: should not transform wiki markup
10149 message transform: <noinclude> in transcluded template (bug 4926)
10159 message transform: <onlyinclude> in transcluded template (bug 4926)
10169 {{#special:}} page name, known
10173 {{#special:Recentchanges}}
10175 Special:RecentChanges
10179 {{#special:}} page name with subpage, known
10183 {{#special:Recentchanges/param}}
10185 Special:RecentChanges/param
10189 {{#special:}} page name, unknown
10193 {{#special:foobar nonexistent}}
10195 Special:Foobar nonexistent
10199 {{#speciale:}} page name, known
10203 {{#speciale:Recentchanges}}
10205 Special:RecentChanges
10209 {{#speciale:}} page name with subpage, known
10213 {{#speciale:Recentchanges/param}}
10215 Special:RecentChanges/param
10219 {{#speciale:}} page name, unknown
10223 {{#speciale:foobar nonexistent}}
10225 Special:Foobar_nonexistent
10231 ### For Parsoid-specific tests, see
10232 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
10237 parsoid=wt2html,wt2wt,html2html
10239 [[Image:foobar.jpg]]
10241 <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>
10244 <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>
10249 Simple image (using File: namespace, now canonical)
10251 [[File:Foobar.jpg]]
10253 <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>
10256 <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>
10261 Right-aligned image
10263 [[File:Foobar.jpg|right]]
10265 <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>
10268 <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>
10274 [[File:Foobar.jpg|right|Caption text]]
10276 <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>
10279 <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>
10283 Image with caption, bug 53312 #1
10285 [[File:Foobar.jpg|right|Caption page stuff]]
10287 <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>
10290 <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>
10294 Image with caption, bug 53312 #2
10296 [[File:Foobar.jpg|right|Caption page=]]
10298 <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>
10301 <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>
10305 Image with caption, bug 53312 #3
10307 [[File:Foobar.jpg|right|Caption page=stuff]]
10309 <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>
10312 <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>
10316 Allow empty links in image captions (Bug 60753)
10320 [[File:Foobar.jpg|thumb|Caption [[Link1]]
10325 <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>
10328 <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>
10330 <a rel="mw:WikiLink" href="./Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"},"dsr":[47,56,2,2]}'>Link2</a>
10331 </figcaption></figure>
10335 Link with empty target
10344 Image with empty attribute
10346 parsoid=wt2html,wt2wt,html2html
10348 [[File:Foobar.jpg|right||Caption text]]
10350 <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>
10353 <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>
10357 1. Block image with individual attributes from templates
10359 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
10361 <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>
10364 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[24,38,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">137px</span>"}]]}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
10368 2. Block Image with individual attributes from templates
10370 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
10372 <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>
10375 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;thumb&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[18,32,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[33,47,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">137px</span>"}]]}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
10379 3. Inline image with individual attributes from templates
10381 [[File:Foobar.jpg|{{echo|50px}}]]
10383 <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>
10386 <p><span typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;50px&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;dsr&quot;:[18,31,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\">50px</span>"}]]}' data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
10389 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
10390 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
10392 Image with multiple attributes from the same template
10394 [[File:Foobar.jpg|{{image_attribs}}]]
10396 <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>
10399 <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>
10403 Image with link tails
10407 123[[File:Foobar.jpg]]456
10408 123[[File:Foobar.jpg|right]]456
10409 123[[File:Foobar.jpg|thumb]]456
10411 <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
10413 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
10414 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
10417 <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>
10418 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
10419 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
10423 Image with multiple captions -- only last one is accepted
10425 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
10427 <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>
10430 <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>
10434 Image with multiple widths -- use last
10436 [[File:Foobar.jpg|200px|300px|caption]]
10438 <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>
10441 <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>
10445 Image with multiple alignments -- use first (bug 48664)
10449 [[File:Foobar.jpg|thumb|left|right|center|caption]]
10451 [[File:Foobar.jpg|middle|text-top|caption]]
10453 <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>
10454 <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>
10457 <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>
10458 <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>
10462 Image with width attribute at different positions
10464 [[File:Foobar.jpg|200px|right|Caption]]
10465 [[File:Foobar.jpg|right|200px|Caption]]
10466 [[File:Foobar.jpg|right|Caption|200px]]
10468 <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>
10469 <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>
10470 <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>
10473 <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>
10474 <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>
10475 <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>
10478 # a sad bit of backward-compatibility
10480 Image with size specified with pxpx (bug 13500, 51628)
10482 parsoid=wt2html,wt2wt,html2html
10484 [[File:Foobar.jpg|20pxpx]]
10485 [[File:Foobar.jpg|200x20pxpx]]
10487 <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>
10488 <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>
10491 <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>
10495 Image with link parameter, wiki target
10497 [[File:Foobar.jpg|link=Main Page]]
10499 <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>
10502 <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>
10505 # parsoid bug 49293 (part 1)
10507 Image with link parameter, URL target
10509 [[File:Foobar.jpg|link=http://example.com/]]
10511 <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>
10514 <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>
10517 # parsoid bug 49293 (part 2)
10519 Image with link parameter, protocol-less URL target
10521 [[File:Foobar.jpg|link=//example.com/]]
10523 <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>
10526 <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>
10530 Image with link parameter, wgExternalLinkTarget
10532 [[Image:foobar.jpg|link=http://example.com/]]
10534 wgExternalLinkTarget='foobar'
10536 <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>
10541 Image with link parameter, wgNoFollowLinks set to false
10543 [[Image:foobar.jpg|link=http://example.com/]]
10545 wgNoFollowLinks=false
10547 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10552 Image with link parameter, wgNoFollowDomainExceptions
10554 [[Image:foobar.jpg|link=http://example.com/]]
10556 wgNoFollowDomainExceptions='example.com'
10558 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10563 Image with link parameter, wgExternalLinkTarget, unnamed parameter
10565 [[Image:foobar.jpg|link=http://example.com/|Title]]
10567 wgExternalLinkTarget='foobar'
10569 <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>
10574 Image with empty link parameter
10576 [[File:Foobar.jpg|link=]]
10578 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
10581 <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>
10585 Image with link parameter (wiki target) and unnamed parameter
10587 [[File:Foobar.jpg|link=Main_Page|Title]]
10589 <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>
10592 <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>
10596 Image with link parameter (URL target) and unnamed parameter
10598 [[File:Foobar.jpg|link=http://example.com/|Title]]
10600 <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>
10603 <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>
10607 Thumbnail image with link parameter
10610 parsoid=wt2html,wt2wt,html2html
10612 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
10614 <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>
10617 <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>
10621 Manually-specified thumbnail image
10625 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
10627 <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>
10630 <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>
10634 Manually-specified thumbnail image with explicit link to wiki page
10637 parsoid=wt2html,wt2wt,html2html
10639 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
10641 <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>
10644 <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>
10648 Manually-specified thumbnail image with explicit link to url
10651 parsoid=wt2html,wt2wt,html2html
10653 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
10655 <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>
10658 <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>
10662 Manually-specified thumbnail image with explicit no link
10665 parsoid=wt2html,wt2wt,html2html
10667 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
10669 <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>
10672 <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>
10676 Manually-specified thumbnail image with explicit link and alt text
10679 parsoid=wt2html,wt2wt,html2html
10681 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
10683 <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>
10686 <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>
10690 Image with frame and link
10692 parsoid=wt2html,wt2wt,html2html
10694 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
10696 <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>
10699 <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>
10703 Image with frame and link and explicit alt
10705 parsoid=wt2html,wt2wt,html2html
10707 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
10709 <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>
10712 <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>
10716 Image with wiki markup in implicit alt
10718 parsoid=wt2html,wt2wt,html2html
10720 [[Image:Foobar.jpg|testing '''bold''' in alt]]
10722 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
10724 <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>
10725 </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>
10728 <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>
10729 <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>
10732 ###################
10733 # Conflicting image format options.
10734 # First option specified should 'win'.
10735 # All three cases in each test should be identical.
10738 Image with 'frameless' first.
10740 parsoid=wt2html,wt2wt,html2html
10742 [[File:Foobar.jpg|frameless|caption]]
10744 [[File:Foobar.jpg|frameless|frame|caption]]
10746 [[File:Foobar.jpg|frameless|thumb|caption]]
10748 <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>
10749 </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>
10750 </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>
10753 <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>
10754 <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>
10755 <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>
10759 Image with 'frame' first.
10761 parsoid=wt2html,wt2wt,html2html
10763 [[File:Foobar.jpg|frame|caption]]
10764 [[File:Foobar.jpg|frame|frameless|caption]]
10765 [[File:Foobar.jpg|frame|thumb|caption]]
10767 <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>
10768 <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>
10769 <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>
10772 <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>
10776 Image with 'thumb' first.
10778 parsoid=wt2html,wt2wt,html2html
10780 [[File:Foobar.jpg|thumb|caption]]
10781 [[File:Foobar.jpg|thumb|frameless|caption]]
10782 [[File:Foobar.jpg|thumb|frame|caption]]
10784 <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>
10785 <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>
10786 <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>
10789 <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>
10792 ###################
10794 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
10795 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
10796 # Foobar.jpg has actual size of 1941x220
10797 # Portrait.svg has actual size of 180x240
10798 # Portrait.png has actual size of 180x240
10799 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
10800 # a scalable format.
10801 # 2. Framed images always ignore size options; always render at default size.
10802 # 3. "Unspecified format" and border are the only types which can be
10804 # 4. Without an explicit size specification, thumbnails are
10805 # resized to a square bounding box.
10808 Image: "unspecified format" and border enlarge
10810 parsoid=wt2html,wt2wt,html2html
10812 [[File:Foobar.jpg|2000px]]
10814 [[File:Foobar.jpg|border|2000px]]
10816 <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>
10817 </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>
10820 <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>
10821 <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>
10825 Image: "unspecified format" and border reduce
10827 parsoid=wt2html,wt2wt,html2html
10829 [[File:Foobar.jpg|1000px]]
10831 [[File:Foobar.jpg|border|1000px]]
10833 <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>
10834 </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>
10837 <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>
10838 <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>
10842 Image: thumbs reduce
10844 parsoid=wt2html,wt2wt,html2html
10846 [[File:Foobar.jpg|thumb|50px]]
10848 <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>
10851 <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>
10855 Image: bitmap thumbs can't be enlarged past original size, but vector can.
10857 parsoid=wt2html,wt2wt,html2html
10859 [[File:Foobar.jpg|thumb|2000px]]
10861 [[File:Foobar.svg|thumb|2000px]]
10863 <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>
10864 <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>
10867 <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>
10868 <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>
10872 Image: frameless can reduce in size
10874 parsoid=wt2html,wt2wt,html2html
10876 [[File:Foobar.jpg|frameless|50px]]
10878 <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>
10881 <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>
10885 Image: bitmap frameless can't be enlarged past original size, but vector can
10887 parsoid=wt2html,wt2wt,html2html
10889 [[File:Foobar.jpg|frameless|2000px]]
10891 [[File:Foobar.svg|frameless|2000px]]
10893 <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>
10894 </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>
10897 <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>
10898 <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>
10902 Image: framed images are always unscaled.
10904 parsoid=wt2html,wt2wt,html2html
10906 [[File:Foobar.jpg|frame]]
10908 [[File:Foobar.jpg|frame|50px]]
10910 [[File:Foobar.jpg|frame|50x50px]]
10912 [[File:Foobar.jpg|frame|2000px]]
10914 <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>
10915 <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>
10916 <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>
10917 <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>
10920 <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>
10924 Image: thumbnails of the default size use a square bounding box.
10928 [[File:Foobar.jpg|thumb|landscape thumb]]
10930 [[File:Foobar.jpg|frameless|landscape frameless]]
10932 [[File:Portrait.png|thumb|should use 220x220px bounding box]]
10934 [[File:Portrait.png|frameless|should use 220x220px bounding box]]
10936 [[File:Portrait.svg|thumb|should use 220x220px bounding box]]
10938 [[File:Portrait.svg|frameless|should use 220x220px bounding box]]
10940 <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>landscape thumb</div></div></div>
10941 <p><a href="/wiki/File:Foobar.jpg" class="image" title="landscape frameless"><img alt="landscape frameless" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" 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>
10943 <div class="thumb tright"><div class="thumbinner" style="width:167px;"><a href="/wiki/File:Portrait.png" class="image"><img alt="" src="http://example.com/images/thumb/9/93/Portrait.png/165px-Portrait.png" width="165" height="220" class="thumbimage" srcset="http://example.com/images/9/93/Portrait.png 1.5x, http://example.com/images/9/93/Portrait.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Portrait.png" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>should use 220x220px bounding box</div></div></div>
10944 <p><a href="/wiki/File:Portrait.png" class="image" title="should use 220x220px bounding box"><img alt="should use 220x220px bounding box" src="http://example.com/images/thumb/9/93/Portrait.png/165px-Portrait.png" width="165" height="220" srcset="http://example.com/images/9/93/Portrait.png 1.5x, http://example.com/images/9/93/Portrait.png 2x" /></a>
10946 <div class="thumb tright"><div class="thumbinner" style="width:167px;"><a href="/wiki/File:Portrait.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/fc/Portrait.svg/165px-Portrait.svg.png" width="165" height="220" class="thumbimage" srcset="http://example.com/images/thumb/f/fc/Portrait.svg/247px-Portrait.svg.png 1.5x, http://example.com/images/thumb/f/fc/Portrait.svg/330px-Portrait.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Portrait.svg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>should use 220x220px bounding box</div></div></div>
10947 <p><a href="/wiki/File:Portrait.svg" class="image" title="should use 220x220px bounding box"><img alt="should use 220x220px bounding box" src="http://example.com/images/thumb/f/fc/Portrait.svg/165px-Portrait.svg.png" width="165" height="220" srcset="http://example.com/images/thumb/f/fc/Portrait.svg/247px-Portrait.svg.png 1.5x, http://example.com/images/thumb/f/fc/Portrait.svg/330px-Portrait.svg.png 2x" /></a>
10952 Image: bitmap thumbnails reduce only if thumb size is smaller than inherent size.
10956 [[File:Portrait.png|thumb|should use inherent 180x240px size]]
10958 [[File:Portrait.png|frameless|should use inherent 180x240px size]]
10960 [[File:Portrait.svg|thumb|will resize to 300x300px]]
10962 [[File:Portrait.svg|frameless|will resize to 300x300px]]
10964 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Portrait.png" class="image"><img alt="" src="http://example.com/images/9/93/Portrait.png" width="180" height="240" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Portrait.png" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>should use inherent 180x240px size</div></div></div>
10965 <p><a href="/wiki/File:Portrait.png" class="image" title="should use inherent 180x240px size"><img alt="should use inherent 180x240px size" src="http://example.com/images/9/93/Portrait.png" width="180" height="240" /></a>
10967 <div class="thumb tright"><div class="thumbinner" style="width:227px;"><a href="/wiki/File:Portrait.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/fc/Portrait.svg/225px-Portrait.svg.png" width="225" height="300" class="thumbimage" srcset="http://example.com/images/thumb/f/fc/Portrait.svg/337px-Portrait.svg.png 1.5x, http://example.com/images/thumb/f/fc/Portrait.svg/450px-Portrait.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Portrait.svg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>will resize to 300x300px</div></div></div>
10968 <p><a href="/wiki/File:Portrait.svg" class="image" title="will resize to 300x300px"><img alt="will resize to 300x300px" src="http://example.com/images/thumb/f/fc/Portrait.svg/225px-Portrait.svg.png" width="225" height="300" srcset="http://example.com/images/thumb/f/fc/Portrait.svg/337px-Portrait.svg.png 1.5x, http://example.com/images/thumb/f/fc/Portrait.svg/450px-Portrait.svg.png 2x" /></a>
10972 ###################
10975 Link to image page- image page normally doesn't exists, hence edit link
10976 Add test with existing image page
10977 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
10981 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
10986 bug 18784 Link to non-existent image page with caption should use caption as link text
10988 [[:Image:test|caption]]
10990 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
10995 Frameless image caption with a free URL
10997 [[File:Foobar.jpg|http://example.com]]
10999 <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>
11002 <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>
11006 Thumbnail image caption with a free URL
11010 [[File:Foobar.jpg|thumb|http://example.com]]
11012 <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>
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><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
11019 Thumbnail image caption with a free URL and explicit alt
11022 parsoid=wt2html,wt2wt,html2html
11024 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
11026 <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>
11029 <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>
11033 SVG thumbnails with no language set
11036 [[File:Foobar.svg|thumb|caption]]
11038 <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>
11041 <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>
11045 SVG thumbnails with language de
11047 parsoid=wt2html,wt2wt,html2html
11049 [[File:Foobar.svg|thumb|caption|lang=de]]
11051 <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>
11054 <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>
11058 SVG thumbnails with invalid language code
11060 parsoid=wt2html,wt2wt,html2html
11062 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
11064 <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>
11067 <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>
11071 BUG 1887: A ISBN with a thumbnail
11073 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11075 <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>
11078 <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>
11082 BUG 1887: A RFC with a thumbnail
11084 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11086 <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>
11089 <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>
11093 BUG 1887: A mailto link with a thumbnail
11095 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11097 <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>
11100 <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>
11103 # Pending resolution to bug 368
11105 BUG 648: Frameless image caption with a link
11107 [[File:Foobar.jpg|text with a [[link]] in it]]
11109 <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>
11112 <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>
11116 BUG 648: Frameless image caption with a link (suffix)
11118 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11120 <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>
11123 <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>
11127 BUG 648: Frameless image caption with an interwiki link
11129 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11131 <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>
11134 <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>
11138 BUG 648: Frameless image caption with a piped interwiki link
11140 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11142 <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>
11145 <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>
11149 Escape HTML special chars in image alt text
11151 [[File:Foobar.jpg|& < > "]]
11153 <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>
11156 <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>
11160 BUG 499: Alt text should have Ӓ, not &1234;
11162 [[File:Foobar.jpg|♀]]
11164 <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>
11167 <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>
11171 Broken image caption with link
11173 parsoid=wt2html,wt2wt,html2html
11175 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11177 <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.
11180 <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>
11184 Image caption containing another image
11186 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
11188 <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>
11191 <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>
11195 Image: caption containing a newline
11197 [[File:Foobar.jpg|This
11200 <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>
11203 <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>
11207 Image: caption containing leading space
11208 (The leading space should not trigger nowiki escaping in wt2wt mode)
11210 [[File:Foobar.jpg|thumb| bar]]
11212 <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>
11215 <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>
11219 Image: caption containing a table
11221 parsoid=wt2html,wt2wt,html2html
11223 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11229 and some more text.]]
11231 <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>
11234 <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
11237 <tr><th>Foo </th><th>Bar</th></tr>
11240 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11244 Bug 3090: External links other than http: in image captions
11246 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11248 <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>
11251 <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>
11257 parsoid=wt2html,wt2wt,html2html
11259 [[Image:foobar.jpg|a|class=b]]
11261 <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>
11264 <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>
11268 Localized image handling (1).
11270 parsoid=wt2html,wt2wt,html2html
11273 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
11275 <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>
11278 <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>
11282 Localized image handling (2).
11285 parsoid=wt2html,wt2wt,html2html
11288 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
11290 <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>
11293 <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>
11297 "border", "frameless" and "class" attributes on an image.
11300 parsoid=wt2html,wt2wt,html2html
11302 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
11304 <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>
11307 <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>
11310 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
11312 Invalid image attributes (bug 62500)
11315 parsoid=wt2html,wt2wt,html2html
11317 [[File:Foobar.jpg|thumb|float|left|caption]]
11319 [[File:Foobar.jpg|thumb|righ|caption]]
11321 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
11323 <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>
11324 <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>
11325 <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>
11328 <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>
11334 #REDIRECT [[File:Barfoo.jpg]]
11340 [[Image:Barfoo.jpg]]
11342 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
11347 Missing image with uploads disabled
11351 [[Image:Foobaz.jpg]]
11353 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
11357 # Parsoid-specific testing for images
11358 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11359 # Currently imperfect due to a flaw in the Parsoid testrunner
11361 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
11365 Parsoid-specific image handling - simple image with size and middle alignment
11367 [[File:Foobar.jpg|middle|50px]]
11369 <p><span class="mw-valign-middle" typeof="mw:Image">
11370 <a href="File:Foobar.jpg">
11371 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11378 Parsoid-specific image handling - simple image with size, middle alignment,
11379 non-standard namespace alias
11381 parsoid=wt2wt,wt2html,html2html
11383 [[Image:Foobar.jpg|middle|50px]]
11385 <p><span class="mw-valign-middle" typeof="mw:Image">
11386 <a href="File:Foobar.jpg">
11387 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11394 Parsoid-specific image handling - simple image with size and middle alignment
11397 [[File:Foobar.jpg|50px|middle]]
11399 <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>
11403 Parsoid-specific image handling - simple image with size and middle alignment
11404 and non-standard namespace name
11406 parsoid=wt2html,wt2wt,html2html
11408 [[Image:Foobar.jpg|50px|middle]]
11410 <p><span class="mw-valign-middle" typeof="mw:Image">
11411 <a href="File:Foobar.jpg">
11412 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11419 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
11421 [[File:Foobar.jpg|500x10px|baseline|caption]]
11423 <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>
11427 Parsoid-specific image handling - simple image with border and size spec
11429 [[File:Foobar.jpg|50px|border|caption]]
11431 <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>
11435 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11437 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
11439 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
11440 <a href="File:Foobar.jpg">
11441 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
11443 <figcaption>caption content</figcaption>
11448 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11451 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
11453 <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>
11457 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
11459 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
11461 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
11462 <a href="File:Foobar.jpg">
11463 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
11465 <figcaption>caption</figcaption>
11470 Parsoid-specific image handling - thumbnail with specific size, halign,
11471 valign, and caption (existing content)
11473 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
11475 <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>
11479 Parsoid-specific image handling - framed image with specific size and caption
11482 parsoid=wt2html,wt2wt,html2html
11484 [[File:Foobar.jpg|frame|500x50px|caption]]
11486 <figure typeof="mw:Image/Frame">
11487 <a href="File:Foobar.jpg">
11488 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11490 <figcaption>caption</figcaption>
11495 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
11498 parsoid=wt2html,wt2wt,html2html
11500 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
11502 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
11503 <a href="File:Foobar.jpg">
11504 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11506 <figcaption>caption</figcaption>
11511 Parsoid-specific image handling - frameless image with specific size, border, and caption
11513 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
11515 <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>
11519 Parsoid-specific image handling - simple image with a formatted caption
11521 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
11523 <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>"}'>
11524 <a href="File:Foobar.jpg">
11525 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
11530 Parsoid-specific image handling - caption with a template in it
11532 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
11534 <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>
11538 Parsoid-specific image handling - caption with unbalanced tags in it
11540 parsoid=wt2html,wt2wt,html2html
11543 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
11547 <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>
11552 Parsoid-specific image handling - empty caption (1)
11554 parsoid=wt2html,wt2wt
11556 [[File:Foobar.jpg|thumb|]]
11558 <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>
11561 # empty captions don't get serialized unless we're in the "round trip" case
11563 Parsoid-specific image handling - empty caption (2)
11567 <figure class="mw-default-size" typeof="mw:Image/Thumb">
11568 <a href="File:Foobar.jpg">
11569 <img resource="./File:Foobar.jpg"
11570 src="//example.com/images/3/3a/Foobar.jpg"
11571 height="25" width="220"/>
11573 <figcaption></figcaption>
11576 [[File:Foobar.jpg|thumb]]
11580 Parsoid-specific image handling - whitespace caption
11582 [[File:Foobar.jpg|thumb| ]]
11584 <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>
11588 Parsoid-specific image handling - lang option
11591 [[File:Foobar.svg|lang=de|caption]]
11595 <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>
11604 Subpage test/subpage
11612 subpage title=[[Subpage test]]
11616 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
11621 Subpage noslash link
11623 subpage title=[[Subpage test]]
11627 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
11631 # TODO: make this PHP-parser compatible!
11633 Relative subpage noslash link
11635 parsoid=wt2wt,wt2html,html2html
11636 subpage title=[[Subpage test/1/2/3/4]]
11642 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
11643 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
11647 Parsoid: dot-slash prefixed wikilinks
11657 </p><p>[[././baz/]]
11662 </p><p>[[././baz/]]
11667 Render invalid page names as plain text (bug 51090)
11680 [[{{echo|./../foo}}|bar]]
11681 [[{{echo|foo/.}}|bar]]
11682 [[{{echo|foo/..}}|bar]]
11683 [[{{echo|foo~~~~bar}}]]
11684 [[{{echo|foo>bar}}]]
11685 [[{{echo|foo././bar}}]]
11686 [[{{echo|foo{bar}}]]
11687 [[{{echo|foo}bar}}]]
11688 [[{{echo|foo[bar}}]]
11689 [[{{echo|foo]bar}}]]
11690 [[{{echo|foo<bar}}]]
11692 <p>[[./../foo|bar]]
11702 </p><p>[[./../foo|bar]]
11715 <p>[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]</p>
11716 <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>
11724 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
11729 BUG 561: {{/Subpage}}
11731 subpage title=[[Page]]
11735 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
11743 Category:MediaWiki User's Guide
11751 [[:Category:MediaWiki User's Guide]]
11753 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
11762 [[Category:MediaWiki User's Guide]]
11764 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11768 PAGESINCATEGORY invalid title fatal (r33546 fix)
11770 {{PAGESINCATEGORY:<bogus>}}
11777 Category with different sort key
11781 [[Category:MediaWiki User's Guide|Foo]]
11783 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11787 Category with identical sort key
11791 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11793 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11797 Category with empty sort key
11802 [[Category:MediaWiki User's Guide|]]
11804 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11808 Category with empty sort key and parentheses
11813 [[Category:Foo (bar)|]]
11815 [[Category:Foo (bar)|Foo]]
11819 Category with link tail
11824 123[[Category:Foo]]456
11826 123[[Category:Foo]]456
11830 Category with template
11835 [[Category:{{echo|Foo}}]]
11837 [[Category:{{echo|Foo}}]]
11841 Category with template in sort key
11846 [[Category:Foo|{{echo|Bar}}]]
11848 [[Category:Foo|{{echo|Bar}}]]
11852 Category with template in sort key and title
11857 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11859 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11863 Category / paragraph interactions
11865 Foo [[Category:Baz]] Bar
11867 Foo [[Category:Baz]]
11875 [[Category:Baz]] Bar
11888 {{echo|[[Category:Baz]]}}
11903 Parsoid: Serialize link to category page with colon escape
11909 [[:Category:Foo|Bar]]
11912 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
11913 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
11918 Parsoid: Link prefix/suffixes aren't applied to category links
11920 parsoid=wt2html,wt2wt,html2html
11925 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
11929 Parsoid: Serialize link to file page with colon escape
11935 [[:File:Foo.png|Bar]]
11938 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
11939 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
11944 Parsoid: Serialize a genuine category link without colon escape
11949 [[Category:Foo|Bar]]
11951 <link rel="mw:PageProp/Category" href="Category:Foo">
11952 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
11956 Parsoid: Defaultsort
11960 {{DEFAULTSORT:Foo}}
11962 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
11966 ### Inter-language links
11969 Inter-language links
11975 [[zh:食品]]
11977 es:Alimento fr:Nourriture zh:食品
11981 Duplicate interlanguage links (bug 24502)
11997 Basic section headings
12004 ===Smaller headline===
12007 <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>
12010 <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>
12013 <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>
12019 Section headings with TOC
12022 === Subheadline 1 ===
12023 ===== Skipping a level =====
12024 ====== Skipping a level ======
12028 ===Another headline===
12030 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12032 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
12034 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
12036 <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>
12038 <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>
12045 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
12047 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
12053 <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>
12054 <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>
12055 <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>
12056 <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>
12057 <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>
12060 <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>
12064 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
12066 Handling of sections up to level 6 and beyond
12069 == Level 2 Heading==
12070 === Level 3 Heading===
12071 ==== Level 4 Heading====
12072 ===== Level 5 Heading=====
12073 ====== Level 6 Heading======
12074 ======= Level 7 Heading=======
12075 ======== Level 8 Heading========
12076 ========= Level 9 Heading=========
12077 ========== Level 10 Heading==========
12079 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12081 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12083 <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>
12085 <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>
12087 <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>
12089 <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>
12091 <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>
12092 <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>
12093 <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>
12094 <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>
12095 <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>
12109 <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>
12110 <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>
12111 <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>
12112 <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>
12113 <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>
12114 <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>
12115 <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>
12116 <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>
12117 <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>
12118 <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>
12123 TOC regression (bug 9764)
12127 ==== title 1.1.1 ====
12132 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12134 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12136 <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>
12138 <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>
12141 <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>
12144 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12146 <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>
12152 <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>
12153 <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>
12154 <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>
12155 <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>
12156 <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>
12157 <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>
12162 TOC with wgMaxTocLevel=3 (bug 6204)
12168 ==== title 1.1.1 ====
12173 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12175 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12177 <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>
12178 <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>
12181 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12183 <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>
12189 <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>
12190 <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>
12191 <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>
12192 <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>
12193 <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>
12194 <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>
12199 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
12205 ====Section 1.1.1====
12206 ====Section 1.1.1.1====
12209 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12211 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
12213 <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>
12216 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
12220 <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>
12221 <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>
12222 <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>
12223 <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>
12224 <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>
12230 Resolving duplicate section names
12235 <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>
12236 <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>
12241 Resolving duplicate section names with differing case (bug 10721)
12246 <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>
12247 <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>
12259 Template with sections, __NOTOC__
12266 <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>
12267 <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>
12268 <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>
12269 <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>
12274 __NOEDITSECTION__ keyword
12280 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
12281 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
12286 Link inside a section heading
12288 ==Section with a [[Main Page|link]] in it==
12290 <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>
12295 TOC regression (bug 12077)
12302 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12304 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12306 <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>
12309 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
12313 <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>
12314 <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>
12315 <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>
12320 BUG 1219 URL next to image (good)
12322 http://example.com [[Image:foobar.jpg]]
12324 <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>
12329 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
12332 The line above must have a trailing space!
12335 But just in case it doesn't...
12337 <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>
12338 <p>The line above must have a trailing space!
12340 <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>
12341 <p>But just in case it doesn't...
12346 Header with special characters (bug 25462)
12348 The tooltips shall not show entities to the user (ie. be double escaped)
12365 <p>The tooltips shall not show entities to the user (ie. be double escaped)
12367 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12369 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
12370 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
12371 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
12372 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
12373 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
12377 <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>
12380 <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>
12383 <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>
12386 <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>
12389 <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>
12395 Headers with excess '=' characters
12396 (Are similar tests necessary beyond the 1st level?)
12400 =''italic'' heading==
12401 ==''italic'' heading=
12403 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12405 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
12406 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
12407 <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>
12408 <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>
12412 <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>
12413 <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>
12414 <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>
12415 <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>
12420 HTML headers vs TOC (bug 23393)
12421 (__NOEDITSECTION__ for clearer output, doesn't matter here)
12433 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12435 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
12437 <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>
12438 <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>
12441 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
12443 <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>
12444 <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>
12450 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
12451 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
12452 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
12453 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
12454 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
12455 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
12460 Single-line or multiline-comments can follow headings
12462 parsoid=wt2html,wt2wt
12470 <h2><span class="mw-headline" id="foo">foo</span></h2>
12471 <h2><span class="mw-headline" id="bar">bar</span></h2>
12472 <h2><span class="mw-headline" id="baz">baz</span></h2>
12477 BUG 1219 URL next to image (broken)
12479 http://example.com[[Image:foobar.jpg]]
12481 <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>
12486 Bug 1186 news: in the middle of text
12488 http://en.wikinews.org/wiki/Wikinews:Workplace
12490 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
12496 Namespaced link must have a title
12505 Namespaced link must have a title (bad fragment version)
12507 [[Project:#fragment]]
12509 <p>[[Project:#fragment]]
12515 ### HTML tags and HTML attributes
12519 div with no attributes
12521 <div>HTML rocks</div>
12523 <div>HTML rocks</div>
12528 div with double-quoted attribute
12530 <div id="rock">HTML rocks</div>
12532 <div id="rock">HTML rocks</div>
12537 div with single-quoted attribute
12539 <div id='rock'>HTML rocks</div>
12541 <div id="rock">HTML rocks</div>
12546 div with unquoted attribute
12548 <div id=rock>HTML rocks</div>
12550 <div id="rock">HTML rocks</div>
12555 div with illegal double attributes
12557 <div id="a" id="b">HTML rocks</div>
12559 <div id="b">HTML rocks</div>
12563 # FIXME: produce empty string instead of "class" in the PHP parser, following
12566 div with empty attribute value, space before equals
12570 <div class =>HTML rocks</div>
12572 <div class="">HTML rocks</div>
12576 # The PHP parser escapes the opening brace to { for some reason, so
12577 # disabled this test for it.
12579 div with braces in attribute value
12583 <div title="{}">Foo</div>
12585 <div title="{}">Foo</div>
12588 # This it very inconsistent in the PHP parser: it returns
12589 # class="class" if there is a space between the name and the equal sign (see
12590 # 'div with empty attribute value, space before equals'), but strips the
12591 # attribute completely if the space is missing. We hope that not much content
12592 # depends on this, so are implementing the behavior below in Parsoid for
12593 # consistencies' sake. Disabled for the PHP parser.
12594 # FIXME: fix this behavior in the PHP parser?
12596 div with empty attribute value, no space before equals
12600 <div class=>HTML rocks</div>
12602 <div class="">HTML rocks</div>
12607 HTML multiple attributes correction
12609 <p class="error" class="awesome">Awesome!</p>
12611 <p class="awesome">Awesome!</p>
12616 Table multiple attributes correction
12619 !+ class="error" class="awesome"| status
12624 <th class="awesome"> status
12632 <DIV ID="x">HTML ROCKS</DIV>
12634 <div id="x">HTML ROCKS</div>
12639 Non-ASCII pseudo-tags are rendered as text
12648 Pseudo-tag with URL 'name' renders as url link
12650 <http://example.com/>
12652 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
12657 text with amp in the middle of nowhere
12661 <p>Remember AT&T?
12666 text with character entity: eacute
12668 I always thought é was a cute letter.
12670 <p>I always thought é was a cute letter.
12675 text with entity-escaped character entity-like string: eacute
12677 I always thought &eacute; was a cute letter.
12679 <p>I always thought &eacute; was a cute letter.
12684 text with undefined character entity: xacute
12686 I always thought &xacute; was a cute letter.
12688 <p>I always thought &xacute; was a cute letter.
12692 # TODO: generalize to PHP parser?
12698 <data value="5">five</data>
12699 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12700 <mark>This highlighted text</mark>
12702 <p><data value="5">five</data>
12703 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12704 <mark>This highlighted text</mark></p>
12708 HTML tag with leading space is parsed as text
12712 <p>< div>foo< /div>
12717 ### Nesting tests (see bug 41545, 50604, 51081)
12720 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
12721 # Note that html2wt is considerably more difficult if we use <b> in
12722 # the test case, instead of <big>
12724 Ensure that HTML adoption agency algorithm is properly implemented.
12726 <big>X<big>Y</big>Z</big>
12728 <p><big>X<big>Y</big>Z</big>
12732 # This was bug 41545 in the PHP parser.
12736 <kbd>X<kbd>Y</kbd>Z</kbd>
12738 <p><kbd>X<kbd>Y</kbd>Z</kbd>
12742 # The following cases were bug 51081 in the PHP parser.
12743 # Note that there are some other nestable tags (b, i, etc) which are
12744 # not covered; see bug 51081 for discussion.
12748 <em>X<em>Y</em>Z</em>
12750 <p><em>X<em>Y</em>Z</em>
12755 Nesting of <strong>
12757 <strong>X<strong>Y</strong>Z</strong>
12759 <p><strong>X<strong>Y</strong>Z</strong>
12768 <p><q>X<q>Y</q>Z</q>
12775 <ruby>X<ruby>Y</ruby>Z</ruby>
12777 <p><ruby>X<ruby>Y</ruby>Z</ruby>
12784 <bdo>X<bdo>Y</bdo>Z</bdo>
12786 <p><bdo>X<bdo>Y</bdo>Z</bdo>
12798 [[Media:Foobar.jpg]]
12800 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
12805 Media link with text
12807 [[Media:Foobar.jpg|A neat file to look at]]
12809 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
12813 # FIXME: this is still bad HTML tag nesting
12815 Media link with nasty text
12816 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
12818 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
12820 <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>
12825 Media link to nonexistent file (bug 1702)
12827 [[Media:No such.jpg]]
12829 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
12834 Image link to nonexistent file (bug 1850 - good)
12836 [[Image:No such.jpg]]
12838 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
12843 :Image link to nonexistent file (bug 1850 - bad)
12845 [[:Image:No such.jpg]]
12847 <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>
12854 Character reference normalization in link text (bug 1938)
12856 [[Main Page|this&that]]
12858 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
12865 Test for unicode normalization
12867 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
12871 (bug 19451) Links should refer to the normalized form.
12879 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12880 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12881 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12882 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12883 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12888 Empty attribute crash test (bug 2067)
12890 <font color="">foo</font>
12892 <p><font color="">foo</font>
12897 Empty attribute crash test single-quotes (bug 2067)
12899 <font color=''>foo</font>
12901 <p><font color="">foo</font>
12906 Attribute test: equals, then nothing
12908 <font color=>foo</font>
12910 <p><font>foo</font>
12915 Attribute test: unquoted value
12917 <font color=x>foo</font>
12919 <p><font color="x">foo</font>
12924 Attribute test: unquoted but illegal value (hash)
12926 <font color=#x>foo</font>
12928 <p><font color="#x">foo</font>
12933 Attribute test: no value
12935 <font color>foo</font>
12937 <p><font color="color">foo</font>
12942 Bug 2095: link with three closing brackets
12946 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
12949 <p><a rel="mw:WikiLink" href="./Main_Page">Main Page</a>]</p>
12953 Bug 2095: link with pipe and three closing brackets
12955 [[Main Page|link]]]
12957 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
12960 <p><a rel="mw:WikiLink" href="./Main_Page">link</a>]</p>
12964 Bug 2095: link with pipe and three closing brackets, version 2
12966 [[Main Page|[http://example.com/]]]
12968 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
12971 <p><a rel="mw:WikiLink" href="./Main_Page">[http://example.com/]</a></p>
12980 Template:Dangerous attribute
12982 " onmouseover="alert(document.cookie)
12986 Template:Dangerous style attribute
12988 border-size: expression(alert(document.cookie))
12994 <div style="float: right; {{{1}}}">Magic div</div>
12998 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
13000 <div title="{{test}}"></div>
13002 <div title="This is a test template"></div>
13007 Bug 2304: HTML attribute safety (dangerous template; 2309)
13009 <div title="{{dangerous attribute}}"></div>
13011 <div title=""></div>
13016 Bug 2304: HTML attribute safety (dangerous style template; 2309)
13018 <div style="{{dangerous style attribute}}"></div>
13020 <div style="/* insecure input */"></div>
13025 Bug 2304: HTML attribute safety (safe parameter; 2309)
13027 {{div style|width: 200px}}
13029 <div style="float: right; width: 200px">Magic div</div>
13034 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
13036 {{div style|width: expression(alert(document.cookie))}}
13038 <div style="/* insecure input */">Magic div</div>
13043 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
13045 {{div style|"><script>alert(document.cookie)</script>}}
13047 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13052 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
13054 {{div style|" ><script>alert(document.cookie)</script>}}
13056 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13061 Bug 2304: HTML attribute safety (link)
13063 <div title="[[Main Page]]"></div>
13065 <div title="[[Main Page]]"></div>
13070 Bug 2304: HTML attribute safety (italics)
13072 <div title="''foobar''"></div>
13074 <div title="''foobar''"></div>
13079 Bug 2304: HTML attribute safety (bold)
13081 <div title="'''foobar'''"></div>
13083 <div title="'''foobar'''"></div>
13089 Bug 2304: HTML attribute safety (ISBN)
13091 <div title="ISBN 1234567890"></div>
13093 <div title="ISBN 1234567890"></div>
13098 Bug 2304: HTML attribute safety (RFC)
13100 <div title="RFC 1234"></div>
13102 <div title="RFC 1234"></div>
13107 Bug 2304: HTML attribute safety (PMID)
13109 <div title="PMID 1234567890"></div>
13111 <div title="PMID 1234567890"></div>
13116 Bug 2304: HTML attribute safety (web link)
13118 <div title="http://example.com/"></div>
13120 <div title="http://example.com/"></div>
13125 Bug 2304: HTML attribute safety (named web link)
13127 <div title="[http://example.com/ link]"></div>
13129 <div title="[http://example.com/ link]"></div>
13134 Bug 3244: HTML attribute safety (extension; safe)
13136 <div style="<nowiki>background:blue</nowiki>"></div>
13138 <div style="background:blue"></div>
13143 Bug 3244: HTML attribute safety (extension; unsafe)
13145 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
13147 <div style="/* insecure input */"></div>
13151 # More MSIE fun discovered by Tom Gilder
13154 MSIE CSS safety test: spurious slash
13156 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
13158 <div style="/* insecure input */">evil</div>
13163 MSIE CSS safety test: hex code
13165 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
13167 <div style="/* insecure input */">evil</div>
13172 MSIE CSS safety test: comment in url
13174 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
13176 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
13181 MSIE CSS safety test: comment in expression
13183 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
13185 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
13190 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
13192 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
13194 <p style="/* invalid control char */">A</p>
13199 MSIE 6 CSS safety test: Fullwidth (bug 55332)
13201 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
13202 <div style="top:EXPRESSION(alert())">B</div>
13204 <p style="/* insecure input */">A</p>
13205 <div style="/* insecure input */">B</div>
13210 MSIE 6 CSS safety test: IPA extensions (bug 55332)
13212 <div style="background-image:uʀʟ(javascript:alert())">A</div>
13213 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
13215 <div style="/* insecure input */">A</div>
13216 <p style="/* insecure input */">B</p>
13221 MSIE 6 CSS safety test: sup/sub script (bug 55332)
13223 <div style="background-image:url⁽javascript:alert())">A</div>
13224 <div style="background-image:url₍javascript:alert())">B</div>
13225 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
13227 <div style="/* insecure input */">A</div>
13228 <div style="/* insecure input */">B</div>
13229 <p style="/* insecure input */">C</p>
13237 title="data:text/html,<img src=1 onerror=alert(1)>"
13238 style="-o-link:attr(title);-o-link-source:current">X</div>
13240 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
13245 MSIE 6 CSS safety test: Repetition markers (bug 55332)
13247 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
13248 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
13249 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
13250 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
13251 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
13252 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
13253 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
13255 <p style="/* insecure input */">A</p>
13256 <p style="/* insecure input */">B</p>
13257 <p style="/* insecure input */">C</p>
13258 <p style="/* insecure input */">D</p>
13259 <p style="/* insecure input */">E</p>
13260 <p style="/* insecure input */">F</p>
13261 <p style="/* insecure input */">G</p>
13266 Table attribute legitimate extension
13269 !+ style="<nowiki>color:blue</nowiki>"| status
13274 <th style="color:blue"> status
13280 Table attribute safety
13283 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
13288 <th style="/* insecure input */"> status
13294 CSS line continuation 1
13296 <div style="background-image: u\ rl(test.jpg);"></div>
13298 <div style="/* insecure input */"></div>
13303 CSS line continuation 2
13305 <div style="background-image: u\ rl(test.jpg); "></div>
13307 <div style="/* insecure input */"></div>
13318 Expansion of multi-line templates in attribute values (bug 6255)
13320 <div style="background: {{identity|#00FF00}}">-</div>
13322 <div style="background: #00FF00">-</div>
13328 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
13330 <div style="background:
13333 <div style="background: #00FF00">-</div>
13338 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
13340 <div style="background: #00FF00">-</div>
13342 <div style="background: #00FF00">-</div>
13347 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
13350 Parser hook: empty input
13363 Parser hook: empty input using terminated empty elements
13376 Parser hook: empty input using terminated empty elements (space before)
13389 Parser hook: basic input
13403 Parser hook: case insensitive
13417 Parser hook: case insensitive, redux
13430 Parser hook: nested tags
13434 <tag><tag></tag></tag>
13445 Parser hook: basic arguments
13447 <tag width=200 height = "100" depth = '50' square></tag>
13455 'square' => 'square',
13462 Parser hook: argument containing a forward slash (bug 5344)
13464 <tag filename='/tmp/bla'></tag>
13469 'filename' => '/tmp/bla',
13476 Parser hook: empty input using terminated empty elements (bug 2374)
13489 # </tag> should be output literally since there is no matching tag that begins it
13491 Parser hook: basic arguments using terminated empty elements (bug 2374)
13493 <tag width=200 height = "100" depth = '50' square/>
13503 'square' => 'square',
13512 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
13516 Parser hook: static parser hook not inside a comment
13518 <statictag>hello, world</statictag>
13519 <statictag action=flush/>
13527 Parser hook: static parser hook inside a comment
13529 <!-- <statictag>hello, world</statictag> -->
13530 <statictag action=flush/>
13536 # Nested template calls; this case was broken by Parser.php rev 1.506,
13540 Template:One-parameter
13542 (My parameter is: {{{1}}})
13546 Template:Map-one-parameter
13548 {{{{{1}}}|{{{2}}}}}
13552 Nested template calls
13554 {{Map-one-parameter|One-parameter|param}}
13556 <p>(My parameter is: param)
13565 Sanitizer: Closing of open tags
13567 <s></s><table></table>
13569 <s></s><table></table>
13574 Sanitizer: Closing of open but not closed tags
13583 Sanitizer: Closing of closed but not open tags
13592 Sanitizer: Closing of closed but not open table tags
13594 Table not started</td></tr></table>
13596 <p>Table not started</td></tr></table>
13601 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
13603 <span id="æ: v">byte</span>[[#æ: v|backlink]]
13605 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
13610 Sanitizer: Validating the contents of the id attribute (bug 4515)
13616 Something, but definitely not <br id="9" />...
13620 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
13624 <br id="foo" /><br id="foo" />
13626 Something need to be done. foo-2 ?
13630 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
13633 <meta itemprop="hello" content="world">
13634 <meta http-equiv="refresh" content="5">
13635 <meta itemprop="hello" http-equiv="refresh" content="5">
13636 <link itemprop="hello" href="{{SERVER}}">
13637 <link rel="stylesheet" href="{{SERVER}}">
13638 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
13641 <div itemscope="itemscope">
13642 <p> <meta itemprop="hello" content="world" />
13643 <meta http-equiv="refresh" content="5">
13644 <meta itemprop="hello" content="5" />
13646 <link itemprop="hello" href="http://example.org" />
13647 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
13648 <link itemprop="hello" href="http://example.org" />
13654 Language converter: output gets cut off unexpectedly (bug 5757)
13658 this bit is safe: }-
13660 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
13662 then we get cut off here: }-
13664 all additional text is vanished
13666 <p>this bit is safe: }-
13667 </p><p>but if we add a conversion instance: xxx
13668 </p><p>then we get cut off here: }-
13669 </p><p>all additional text is vanished
13674 Self closed html pairs (bug 5487)
13677 <center><font id="bug" />Centered text</center>
13678 <div><font id="bug2" />In div text</div>
13680 <center><font id="bug" />Centered text</center>
13681 <div><font id="bug2" />In div text</div>
13690 Punctuation: nbsp before exclamation
13694 <p>C'est grave !
13699 Punctuation: CSS !important (bug 11874)
13701 <div style="width:50% !important">important</div>
13703 <div style="width:50% !important">important</div>
13708 Punctuation: CSS ! important (bug 11874; with space after)
13710 <div style="width:50% ! important">important</div>
13712 <div style="width:50% ! important">important</div>
13718 HTML bullet list, closed tags (bug 5497)
13733 HTML bullet list, unclosed tags (bug 5497)
13752 HTML ordered list, closed tags (bug 5497)
13767 HTML ordered list, unclosed tags (bug 5497)
13786 HTML nested bullet list, closed tags (bug 5497)
13811 HTML nested bullet list, open tags (bug 5497)
13840 HTML nested ordered list, closed tags (bug 5497)
13865 HTML nested ordered list, open tags (bug 5497)
13894 HTML ordered list item with parameters oddity
13896 <ol><li id="fragment">One</li>
13899 <ol><li id="fragment">One</li>
13904 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
13906 bug 5918: autonumbering
13908 [http://first/] [http://second] [ftp://ftp]
13912 [mailto:enclosed@mail.tld With target]
13914 [mailto:enclosed@mail.tld]
13916 mailto:inline@mail.tld
13918 <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>
13919 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
13920 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
13921 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
13922 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
13925 <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>
13926 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
13927 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
13928 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
13929 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
13934 # Security and HTML correctness
13935 # From Nick Jenkins' fuzz testing
13939 Fuzz testing: Parser13
13954 Fuzz testing: Parser14
13959 <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>
13960 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13962 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
13970 Fuzz testing: Parser14-table
13975 <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>
13976 <table style="__TOC__">
13982 # Known to produce bogus xml (extra </td>)
13984 Fuzz testing: Parser16
14004 Fuzz testing: Parser21
14007 ! irc://{{ftp://a" onmouseover="alert('hello world');"
14012 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
14022 Fuzz testing: Parser22
14024 http://===r:::https://b
14028 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
14036 # Known to produce bad XML for now
14038 Fuzz testing: Parser24
14045 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
14046 <br style="onmouseover='alert(document.cookie);' " />
14048 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14053 <u class="|">}}}} >
14054 <br style="onmouseover='alert(document.cookie);'" />
14056 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14065 # Note: the current result listed for this is not what the original one was,
14066 # but the original bug was JavaScript injection, which is fixed in any case.
14067 # It's not clear that the original result listed was any more correct than the
14068 # current one. Original result:
14071 # <li class="||">
14072 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14074 Fuzz testing: Parser25 (bug 6055)
14080 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
14082 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14087 Fuzz testing: URL adjacent extension (with space, clean)
14090 http://example.com <nowiki>junk</nowiki>
14092 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
14097 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
14100 http://example.com<nowiki>junk</nowiki>
14102 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
14107 Fuzz testing: URL adjacent extension (no space, dirty; pre)
14110 http://example.com<pre>junk</pre>
14112 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
14117 Fuzz testing: image with bogus manual thumbnail
14119 [[Image:foobar.jpg|thumbnail= ]]
14121 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
14124 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,null,null]}'/>
14128 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
14130 <pre dir=" "></pre>
14132 <pre dir=" "></pre>
14137 Parsing optional HTML elements (Bug 6171)
14142 <td> Some tabular data</td>
14143 <td> More tabular data ...
14144 <td> And yet som tabular data</td>
14150 <td> Some tabular data</td>
14151 <td> More tabular data ...
14152 </td><td> And yet som tabular data</td>
14159 Correct handling of <td>, <tr> (Bug 6171)
14164 <td> Some tabular data</td>
14165 <td> More tabular data ...</td>
14166 <td> And yet som tabular data</td>
14172 <td> Some tabular data</td>
14173 <td> More tabular data ...</td>
14174 <td> And yet som tabular data</td>
14182 Parsing crashing regression (fr:JavaScript)
14186 <p></body></x>
14191 Inline wiki vs wiki block nesting
14197 <p><b>Bold paragraph</b>
14198 </p><p>New wiki paragraph
14203 Inline HTML vs wiki block nesting
14211 <p><b>Bold paragraph</b>
14212 </p><p>New wiki paragraph
14216 # Original result was this:
14217 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
14219 # While that might be marginally more intuitive, maybe, the six-apostrophe
14220 # construct is clearly pathological and the result stated here (which is what
14221 # the parser actually does) is about as reasonable as anything.
14223 Mixing markup for italics and bold
14226 '''bold''''''bold''bolditalics'''''
14228 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
14236 Article for special page transclusion test
14240 Special page transclusion
14243 {{Special:Prefixindex/Xyzzyx}}
14245 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14250 Special page transclusion twice (bug 5021)
14253 {{Special:Prefixindex/Xyzzyx}}
14254 {{Special:Prefixindex/Xyzzyx}}
14256 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14257 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14262 Transclusion of default MediaWiki message
14264 {{MediaWiki:Mainpage}}
14271 Transclusion of nonexistent MediaWiki message
14273 {{MediaWiki:Mainpagexxx}}
14275 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
14280 Transclusion of MediaWiki message with underscore
14282 {{MediaWiki:history_short}}
14289 Transclusion of MediaWiki message with space
14291 {{MediaWiki:history short}}
14298 Invalid header with following text
14308 Section extraction test (section 0)
14328 Section extraction test (section 1)
14350 Section extraction test (section 2)
14371 Section extraction test (section 3)
14391 Section extraction test (section 4)
14415 Section extraction test (section 5)
14435 Section extraction test (section 6)
14456 Section extraction test (section 7)
14476 Section extraction test (section 8)
14496 Section extraction test (section 9)
14517 Section extraction test (section 10)
14537 Section extraction test (nonexistent section 11)
14556 Section extraction test with bogus heading (section 1)
14561 ==bogus== not a legal section
14565 ==bogus== not a legal section
14569 Section extraction test with bogus heading (section 2)
14574 ==bogus== not a legal section
14581 Section extraction test with comment after heading (section 1)
14593 Section extraction test with comment after heading (section 2)
14605 Section extraction test with bogus <nowiki> heading (section 1)
14610 ==bogus== <nowiki>not a legal section</nowiki>
14614 ==bogus== <nowiki>not a legal section</nowiki>
14618 Section extraction test with bogus <nowiki> heading (section 2)
14623 ==bogus== <nowiki>not a legal section</nowiki>
14630 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
14631 # instead of respecting commented sections
14633 Section extraction prefixed by comment (section 1)
14644 Section extraction prefixed by comment (section 2)
14655 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
14656 # instead of respecting HTML-style headings
14658 Section extraction, mixed wiki and html (section 1)
14674 Section extraction, mixed wiki and html (section 2)
14690 # Formerly testing for bug 3342
14692 Section extraction, heading surrounded by <noinclude>
14696 <noinclude>==unmarked==</noinclude>
14702 # Test behavior of bug 19910
14704 Sectiion with all-equals
14709 The line above must have a trailing space
14712 But just in case it doesn't...
14716 But just in case it doesn't...
14720 Section replacement test (section 0)
14751 Section replacement test (section 1)
14780 Section replacement test (section 2)
14810 Section replacement test (section 3)
14841 Section replacement test (section 4)
14868 Section replacement test (section 5)
14899 Section replacement test (section 6)
14929 Section replacement test (section 7)
14960 Section replacement test (section 8)
14991 Section replacement test (section 9)
15020 Section replacement test (section 10)
15050 Section replacement test with initial whitespace (bug 13728)
15054 Preformatted initial line
15058 Preformatted initial line
15065 Section extraction, heading followed by pre with 20 spaces (bug 6398)
15077 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
15090 Section extraction, <pre> around bogus header (bug 10309)
15107 Section replacement, <pre> around bogus header (bug 10309)
15109 noxml replace=2,"xxx"
15130 Handling of 
 in URLs
15136 <li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
15143 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
15145 a</a></li></ul></li></ul>
15149 Handling of %0A in URLs
15155 <li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
15162 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15166 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
15168 5 quotes, code coverage +1 line
15175 <p><b><i></i></b></p>
15178 # same html as previous, but wikitext adjusted to match parsoid html2wt
15179 # note that wt2html and html2html will put the <i> before the <b>
15181 5 quotes, code coverage +1 line w/ nowiki (1)
15183 parsoid=wt2wt,html2wt
15185 '''''<nowiki/>'''''
15190 <p><b><i></i></b></p>
15193 # same as previous, just swapping the <i> and <b>
15195 5 quotes, code coverage +1 line w/ nowiki (2)
15197 '''''<nowiki/>'''''
15202 <p><i><b></b></i></p>
15206 Special:Search page linking.
15210 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
15217 title=[[Parser test]]
15222 * {{FULLPAGENAMEE}}
15224 * {{BASEPAGENAMEE}}
15228 * {{ROOTPAGENAMEE}}
15230 * {{TALKPAGENAMEE}}
15231 * {{SUBJECTPAGENAME}}
15232 * {{SUBJECTPAGENAMEE}}
15235 * {{NAMESPACENUMBER}}
15239 * {{SUBJECTSPACEE}}
15240 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
15263 <li> Talk:Parser test
15265 <li> Talk:Parser_test
15285 <li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a>
15290 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
15300 image4 |300px| centre
15301 image5.svg| http://///////
15306 <ul class="gallery mw-gallery-traditional">
15307 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15308 <div class="thumb" style="height: 150px;">Image1.png</div>
15309 <div class="gallerytext">
15312 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15313 <div class="thumb" style="height: 150px;">Image2.gif</div>
15314 <div class="gallerytext">
15319 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15320 <div class="thumb" style="height: 150px;">Image3</div>
15321 <div class="gallerytext">
15324 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15325 <div class="thumb" style="height: 150px;">Image4</div>
15326 <div class="gallerytext">
15331 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15332 <div class="thumb" style="height: 150px;">Image5.svg</div>
15333 <div class="gallerytext">
15334 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
15338 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15339 <div class="thumb" style="height: 150px;">* image6</div>
15340 <div class="gallerytext">
15348 Gallery (with options)
15350 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
15351 File:Nonexistant.jpg|caption
15352 File:Nonexistant.jpg
15353 image:foobar.jpg|some '''caption''' [[Main Page]]
15355 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
15358 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
15359 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
15360 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15361 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15362 <div class="gallerytext">
15367 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15368 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15369 <div class="gallerytext">
15372 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15373 <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>
15374 <div class="gallerytext">
15375 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15379 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15380 <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>
15381 <div class="gallerytext">
15384 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15385 <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>
15386 <div class="gallerytext">
15396 Gallery with wikitext inside caption
15399 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
15400 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
15403 <ul class="gallery mw-gallery-traditional">
15404 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15405 <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>
15406 <div class="gallerytext">
15407 <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>
15411 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15412 <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>
15413 <div class="gallerytext">
15414 <p>This is a test template
15423 gallery (with showfilename option)
15425 <gallery showfilename>
15426 File:Nonexistant.jpg|caption
15427 File:Nonexistant.jpg
15428 image:foobar.jpg|some '''caption''' [[Main Page]]
15432 <ul class="gallery mw-gallery-traditional">
15433 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15434 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15435 <div class="gallerytext">
15436 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15441 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15442 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15443 <div class="gallerytext">
15444 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15448 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15449 <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>
15450 <div class="gallerytext">
15451 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15452 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15456 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15457 <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>
15458 <div class="gallerytext">
15459 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15468 Gallery (with namespace-less filenames)
15471 File:Nonexistant.jpg
15477 <ul class="gallery mw-gallery-traditional">
15478 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15479 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15480 <div class="gallerytext">
15483 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15484 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15485 <div class="gallerytext">
15488 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15489 <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>
15490 <div class="gallerytext">
15493 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15494 <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>
15495 <div class="gallerytext">
15503 HTML Hex character encoding (spells the word "JavaScript")
15505 parsoid=wt2html,wt2wt,html2html
15507 JavaScript
15509 <p>JavaScript
15512 <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>
15516 HTML Hex character encoding bogus encoding (bug 26437 regression check)
15520 <p>&#xsee;&#XSEE;
15523 <p>&#xsee;&#XSEE;</p>
15527 HTML Hex character encoding mixed case
15529 parsoid=wt2html,wt2wt,html2html
15536 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
15540 __FORCETOC__ override
15552 ISBN 978-0-1234-56 789
15554 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
15559 ISBN followed by 5 spaces
15570 ISBN ISBN 1234567890
15572 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15581 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
15586 ISBN with empty prefix (parsoid test)
15590 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
15594 Bug 22905: <abbr> followed by ISBN followed by </a>
15596 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
15598 <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>
15607 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
15612 Double RFC with a wiki link
15616 <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>
15625 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
15630 Centre-aligned image
15632 [[Image:foobar.jpg|centre]]
15634 <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>
15641 [[Image:foobar.jpg|none]]
15643 <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>
15648 Width + Height sized image (using px) (height is ignored)
15650 [[Image:foobar.jpg|640x480px]]
15652 <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>
15657 Width-sized image (using px, no following whitespace)
15659 [[Image:foobar.jpg|640px]]
15661 <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>
15666 Width-sized image (using px, with following whitespace - test regression from r39467)
15668 [[Image:foobar.jpg|640px ]]
15670 <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>
15675 Width-sized image (using px, with preceding whitespace - test regression from r39467)
15677 [[Image:foobar.jpg| 640px]]
15679 <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>
15684 Image with page parameter
15688 [[File:LoremIpsum.djvu|page=2]]
15690 <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>
15695 Another italics / bold test
15703 # Note the results may be incorrect, as parserTest output included this:
15704 # XML error: Mismatched tag at byte 6120:
15705 # ...<dd> </dt></dl> </dd...
15736 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
15738 Images with the "|" character in the comment
15740 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
15742 <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>
15745 <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>
15749 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
15751 <html><script>alert(1);</script></html>
15753 <p><html><script>alert(1);</script></html>
15758 HTML with raw HTML ($wgRawHtml==true)
15762 <html><script>alert(1);</script></html>
15764 <p><script>alert(1);</script>
15769 Parents of subpages, one level up
15771 subpage title=[[Subpage test/L1/L2/L3]]
15775 <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>
15781 Parents of subpages, one level up, not named
15783 subpage title=[[Subpage test/L1/L2/L3]]
15787 <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>
15794 Parents of subpages, two levels up
15796 subpage title=[[Subpage test/L1/L2/L3]]
15802 <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
15803 </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>
15808 Parents of subpages, two levels up, without trailing slash or name.
15810 subpage title=[[Subpage test/L1/L2/L3]]
15819 Parents of subpages, two levels up, with lots of extra trailing slashes.
15821 subpage title=[[Subpage test/L1/L2/L3]]
15825 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
15830 Subpage test/L1/L2/L3Sibling
15836 Transclusion of a sibling page (one level up)
15838 subpage title=[[Subpage test/L1/L2/L3]]
15847 Transclusion of a child page
15849 subpage title=[[Subpage test/L1/L2]]
15858 Non-transclusion because of too many up levels
15860 subpage title=[[Subpage test/L1/L2/L3]]
15862 {{../../../../More than parent}}
15864 <p>{{../../../../More than parent}}
15869 Definition list code coverage
15876 <dt> title  </dt>
15879 <dt> title </dt>
15890 Don't fall for the self-closing div
15892 <div>hello world</div/>
15894 <div>hello world</div>
15903 <p>[[:Template:Msg]]
15912 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
15916 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
15918 Always escape literal '>' in output, not just after '<'
15932 <p>This is a test template
15933 This is a test template
15945 Inclusion of !userCanEdit() content
15949 <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>
15955 Out-of-order TOC heading levels
15964 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15966 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
15968 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
15969 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
15972 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
15974 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
15975 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
15981 <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>
15982 <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>
15983 <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>
15984 <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>
15985 <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>
15986 <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>
15992 ISBN with a dummy number
16002 ISBN with space-delimited number
16006 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
16012 ISBN with multiple spaces, no number
16031 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16032 </p><p>ISBN 12345678901
16038 ISBN with trailing year (bug 8110)
16040 ISBN 1-234-56789-0 - 2006
16042 ISBN 1 234 56789 0 - 2006
16044 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
16045 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
16053 {{anchorencode:foo bar©#%n}}
16055 <p>foo_bar.C2.A9.23.25n
16060 anchorencode trims spaces
16062 {{anchorencode: __pretty__please__}}
16069 anchorencode deals with links
16071 {{anchorencode: [[hello|world]] [[hi]]}}
16078 anchorencode deals with templates
16080 {{anchorencode: {{Foo}} }}
16087 anchorencode encodes like the TOC generator: (bug 18431)
16089 === _ +:.3A%3A&&]] ===
16090 {{anchorencode: _ +:.3A%3A&&]] }}
16093 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
16094 <p>.2B:.3A.253A.26.26.5D.5D
16099 Bug 6200: blockquotes and paragraph formatting
16120 Bug 8293: Use of center tag ruins paragraph formatting
16141 Parsing of overlapping (improperly nested) inline html tags
16143 <span><s>x</span></s>
16145 <p><span><s>x</span></s></span>
16148 <p><span><s>x</s></span>
16153 ### Language variants related tests
16156 Self-link in language variants
16158 title=[[Dunav]] language=sr
16160 Both [[Dunav]] and [[Дунав]] are names for this river.
16162 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
16173 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
16175 title=[[Duna]] language=sr
16177 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
16179 <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.
16184 Link to a section of a variant of this title shouldn't be parsed as self-link
16186 title=[[Duna]] language=sr
16188 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
16190 <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.
16195 Link to pages in language variants
16199 Main Page can be written as [[Маин Паге]]
16201 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
16207 Multiple links to pages in language variants
16211 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
16213 <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>.
16219 Simple template in language variants
16225 <p>This is a test template
16231 Template with explicit namespace in language variants
16237 <p>This is a test template
16243 Basic test for template parameter in language variants
16247 {{парамтест|param=foo}}
16249 <p>This is a test template with parameter foo
16255 Simple category in language variants
16259 [[Category:МедиаWики Усер'с Гуиде]]
16261 <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>
16278 Don't convert blue categorylinks to another variant (bug 33210)
16282 [[A]][[Category:分类]]
16284 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
16289 Stripping -{}- tags (language variants)
16293 Latin proverb: -{Ne nuntium necare}-
16295 <p>Latin proverb: Ne nuntium necare
16301 Prevent conversion with -{}- tags (language variants)
16303 language=sr variant=sr-ec
16305 Latinski: -{Ne nuntium necare}-
16307 <p>Латински: Ne nuntium necare
16313 Prevent conversion of text with -{}- tags (language variants)
16315 language=sr variant=sr-ec
16317 Latinski: -{Ne nuntium necare}-
16319 <p>Латински: Ne nuntium necare
16325 Prevent conversion of links with -{}- tags (language variants)
16327 language=sr variant=sr-ec
16331 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16337 -{}- tags within headlines (within html for parserConvert())
16339 language=sr variant=sr-ec
16343 <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>
16349 Explicit definition of language variant alternatives
16351 language=zh variant=zh-tw
16353 -{zh:China;zh-tw:Taiwan}-, not China
16355 <p>Taiwan, not China
16361 Conversion around HTML tags
16363 language=sr variant=sr-ec
16365 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
16366 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
16369 <span title="ЛаCтин">ски</span>
16375 Explicit session-wise language variant mapping (A flag and - flag)
16377 language=zh variant=zh-tw
16379 Taiwan is not China.
16380 But -{A|zh:China;zh-tw:Taiwan}- is China,
16381 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
16382 and -{China}- is China.
16384 <p>Taiwan is not China.
16385 But Taiwan is Taiwan,
16386 (This should be stripped!)
16387 and China is China.
16392 Explicit session-wise language variant mapping (H flag for hide)
16394 language=zh variant=zh-tw
16396 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
16399 <p>(This should be stripped!)
16405 Adding explicit conversion rule for title (T flag)
16407 language=zh variant=zh-tw showtitle
16409 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16412 <p>Should be stripped!
16417 Testing that changing the language variant here in the tests actually works
16419 language=zh variant=zh showtitle
16421 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16424 <p>Should be stripped!
16429 Recursive conversion of alt and title attrs shouldn't clear converter state
16431 language=zh variant=zh-cn showtitle
16433 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
16434 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
16438 Should be stripped<span title="Exclamation">!</span>
16443 Bug 24072: more test on conversion rule for title
16445 language=zh variant=zh-tw showtitle
16447 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16448 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
16451 <p>This should be stripped!
16452 This won't take interferes with the title rule.
16457 Partly disable title conversion if variant == main language code
16459 language=zh variant=zh title=[[ZH]] showtitle
16461 -{T|zh-cn:CN;zh-tw:TW}-
16469 Partly disable title conversion if variant == main language code, more
16471 language=zh variant=zh title=[[ZH]] showtitle
16481 Raw output of variant escape tags (R flag)
16483 language=zh variant=zh-tw
16485 Raw: -{R|zh:China;zh-tw:Taiwan}-
16487 <p>Raw: zh:China;zh-tw:Taiwan
16492 Nested using of manual convert syntax
16494 language=zh variant=zh-hk
16496 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
16498 <p>Nested: Hello Hong Kong!
16503 Proper conversion of text in external links
16505 language=sr variant=sr-ec
16507 http://www.google.com
16508 gopher://www.google.com
16509 [http://www.google.com http://www.google.com]
16510 [gopher://www.google.com gopher://www.google.com]
16511 [https://www.google.com irc://www.google.com]
16512 [ftp://www.google.com www.google.com/ftp://dir]
16513 [//www.google.com www.google.com]
16515 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16516 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16517 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16518 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16519 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
16520 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
16521 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
16526 Do not convert roman numbers to language variants
16528 language=sr variant=sr-ec
16532 <p>Фридрих IV је цар.
16537 Unclosed language converter markup "-{"
16548 Don't convert raw rule "-{R|=>}-" to "=>"
16559 Don't break link parsing if language converter markup is in the caption.
16561 language=sr variant=sr-ec
16563 [[Main Page|-{R|main page}-]]
16565 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
16569 # This test is currently broken in the PHP parser (bug 52661)
16571 Don't break image parsing if language converter markup is in the caption.
16576 [[File:Foobar.jpg|-{R|caption}-]]
16578 <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>
16582 # This test is currently broken in the PHP parser (bug 52661)
16584 Don't break list handling if language converter markup is in the item.
16586 language=zh variant=zh-cn
16589 ;-{zh-cn:AAA;zh-tw:BBB}-
16596 # This test is currently broken in the PHP parser (bug 52661)
16598 Don't break table handling if language converter markup is in the cell.
16600 language=sr variant=sr-ec
16617 Bug 529: Uncovered bullet
16630 # Plain MediaWiki does not remove empty lists, but tidy actually does.
16631 # Templates in Wikipedia rely on this behavior, as tidy has always been
16632 # enabled there. These tests are normally run *without* tidy, so specify the
16633 # full output here.
16634 # To test realistic parsing behavior, apply a tidy-like transformation to both
16635 # the expected output and your parser's output.
16637 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
16639 ******* Foo {{bullet}}
16669 Bug 529: Uncovered table already at line-start
16692 Bug 529: Uncovered bullet in parser function result
16694 * Foo {{lc:{{bullet}} }}
16706 Bug 5678: Double-parsed template argument
16708 {{lc:{{{1}}}|hello}}
16715 Bug 5678: Double-parsed template invocation
16717 {{lc:{{paramtest {{!}} param = hello }} }}
16719 <p>{{paramtest | param = hello }}
16724 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
16727 title=[[Main Page]]
16729 {{PRVNÍVELKÉ:ěščř}}
16730 {{prvnívelké:ěščř}}
16750 Morwen/13: Unclosed link followed by heading
16757 <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>
16762 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
16769 <h1><span class="mw-headline" id="heading">heading</span></h1>
16774 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
16781 <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>
16796 Paragraphs inside divs (no extra line breaks)
16808 Paragraphs inside divs (extra line break on open)
16823 Paragraphs inside divs (extra line break on close)
16838 Paragraphs inside divs (extra line break on open and close)
16855 Nesting tags, paragraphs on lines which begin with <div>
16859 <div></div><strong>A
16868 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
16870 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
16872 <blockquote>Line one
16874 Line two</blockquote>
16876 <blockquote>Line one
16877 Line two</blockquote>
16882 Bug 6200: paragraphs inside blockquotes (extra line break on open)
16887 Line two</blockquote>
16892 Line two</blockquote>
16897 Bug 6200: paragraphs inside blockquotes (extra line break on close)
16899 <blockquote>Line one
16904 <blockquote>Line one
16912 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
16929 Paragraphs inside blockquotes/divs (no extra line breaks)
16931 <blockquote><div>Line one
16933 Line two</div></blockquote>
16935 <blockquote><div>Line one
16936 Line two</div></blockquote>
16941 Paragraphs inside blockquotes/divs (extra line break on open)
16946 Line two</div></blockquote>
16951 Line two</div></blockquote>
16956 Paragraphs inside blockquotes/divs (extra line break on close)
16958 <blockquote><div>Line one
16961 </div></blockquote>
16963 <blockquote><div>Line one
16966 </div></blockquote>
16971 Paragraphs inside blockquotes/divs (extra line break on open and close)
16977 </div></blockquote>
16983 </div></blockquote>
16988 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
16990 wgLinkHolderBatchSize=0
16996 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
16997 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
16998 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
17003 Free external link invading image caption
17005 [[Image:Foobar.jpg|thumb|http://x|hello]]
17007 <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>
17012 Bug 15196: localised external link numbers
17016 [http://en.wikipedia.org/]
17018 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
17021 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
17025 Multibyte character in padleft
17027 {{padleft:-Hello|7|Æ}}
17034 Multibyte character in padright
17036 {{padright:Hello-|7|Æ}}
17043 formatdate parser function
17045 {{#formatdate:2009-03-24}}
17047 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
17052 formatdate parser function, with default format
17054 {{#formatdate:2009-03-24|mdy}}
17056 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
17061 Spacing of numbers in formatted dates
17063 {{#formatdate:January 15}}
17065 <p><span class="mw-formatted-date" title="01-15">January 15</span>
17070 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
17072 language=nl title=[[MediaWiki:Common.css]]
17074 {{#formatdate:2009-03-24|dmy}}
17076 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
17089 Edit comment with link
17093 I like the [[Main Page]] a lot
17095 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
17099 Edit comment with link and link text
17103 I like the [[Main Page|best pages]] a lot
17105 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
17109 Edit comment with link and link text with suffix
17113 I like the [[Main Page|best page]]s a lot
17115 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
17119 Edit comment with section link (non-local, eg in history list)
17121 comment title=[[Main Page]]
17123 /* External links */ removed bogus entries
17125 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17129 Edit comment with section link and text before it (non-local, eg in history list)
17131 comment title=[[Main Page]]
17133 pre-comment text /* External links */ removed bogus entries
17135 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>
17139 Edit comment with section link (local, eg in diff view)
17141 comment local title=[[Main Page]]
17143 /* External links */ removed bogus entries
17145 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17149 Edit comment with subpage link (bug 14080)
17153 title=[[Subpage test]]
17155 Poked at a [[/subpage]] here...
17157 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
17161 Edit comment with subpage link and link text (bug 14080)
17165 title=[[Subpage test]]
17167 Poked at a [[/subpage|neat little page]] here...
17169 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
17173 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
17176 title=[[Subpage test]]
17178 Poked at a [[/subpage]] here...
17180 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
17184 Edit comment with bare anchor link (local, as on diff)
17188 title=[[Main Page]]
17192 <a href="#section">#section</a>
17196 Edit comment with bare anchor link (non-local, as on history)
17199 title=[[Main Page]]
17203 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
17207 Anchor starting with underscore
17211 <p><a href="#_ref">One</a>
17216 Id starting with underscore
17218 <div id="_ref"></div>
17220 <div id="_ref"></div>
17225 Space normalisation on autocomment (bug 22784)
17228 title=[[Main Page]]
17230 /* __hello__world__ */
17232 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
17236 percent-encoding and + signs in comments (Bug 26410)
17240 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
17242 <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>
17246 Bad images - basic functionality
17255 Bad images - bug 16039: text after bad image disappears
17269 Verify that displaytitle works (bug #22501) no displaytitle
17273 wgAllowDisplayTitle=true
17274 wgRestrictDisplayTitle=false
17276 this is not the the title
17279 <p>this is not the the title
17284 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
17289 wgAllowDisplayTitle=true
17290 wgRestrictDisplayTitle=false
17292 this is not the the title
17293 {{DISPLAYTITLE:whatever}}
17296 <p>this is not the the title
17301 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
17306 wgAllowDisplayTitle=true
17307 wgRestrictDisplayTitle=true
17309 this is not the the title
17310 {{DISPLAYTITLE:whatever}}
17313 <p>this is not the the title
17318 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
17323 wgAllowDisplayTitle=true
17324 wgRestrictDisplayTitle=true
17326 this is not the the title
17327 {{DISPLAYTITLE:screen}}
17330 <p>this is not the the title
17335 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
17340 wgAllowDisplayTitle=false
17342 this is not the the title
17343 {{DISPLAYTITLE:screen}}
17346 <p>this is not the the title
17347 <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>
17352 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
17357 wgAllowDisplayTitle=false
17359 this is not the the title
17362 <p>this is not the the title
17367 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
17372 wgAllowDisplayTitle=true
17373 wgRestrictDisplayTitle=true
17375 this is not the the title
17376 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
17378 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
17379 <p>this is not the the title
17384 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
17389 wgAllowDisplayTitle=true
17390 wgRestrictDisplayTitle=true
17392 this is not the the title
17393 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
17395 <span style="color: red;">s</span>creen
17396 <p>this is not the the title
17401 preload: check <noinclude> and <includeonly>
17405 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
17411 preload: check <onlyinclude>
17415 Goodbye <onlyinclude>Hello world</onlyinclude>
17421 preload: can pass tags through if we want to
17425 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
17427 <includeonly>Hello world</includeonly>
17431 preload: check that it doesn't try to do tricks
17435 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17437 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17441 Play a bit with r67090 and bug 3158
17445 <div style="width:50% !important"> </div>
17446 <div style="width:50% !important"> </div>
17447 <div style="width:50% !important"> </div>
17448 <div style="border : solid;"> </div>
17450 <div style="width:50% !important"> </div>
17451 <div style="width:50% !important"> </div>
17452 <div style="width:50% !important"> </div>
17453 <div style="border : solid;"> </div>
17458 HTML5 data attributes
17460 <span data-foo="bar">Baz</span>
17461 <p data-abc-def_hij="">Quuz</p>
17463 <p><span data-foo="bar">Baz</span>
17465 <p data-abc-def_hij="">Quuz</p>
17470 percent-encoding and + signs in internal links (Bug 26410)
17472 [[User:+%]] [[Page+title%]]
17473 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
17474 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
17475 [[%33%45]] [[%33%45+]]
17477 <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>
17478 <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>
17479 <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>
17480 <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>
17485 Special characters in embedded file links (bug 27679)
17487 [[File:Contains & ampersand.jpg]]
17488 [[File:Does not exist.jpg|Title with & ampersand]]
17490 <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>
17491 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
17497 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
17499 Text's been normalized?
17501 <p>Text's been normalized?
17506 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
17508 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
17510 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
17515 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
17517 [http://www.example.org/ ideograms]
17519 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
17524 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
17526 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
17528 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
17552 Bug 31098 Template which includes system messages which includes the template
17556 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17557 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17562 Bug31490 Turkish: ucfirst 'blah'
17573 Bug31490 Turkish: ucfirst 'ix'
17584 Bug31490 Turkish: lcfirst 'BLAH'
17595 Bug31490 Turkish: ucfırst (with a dotless i)
17601 <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>
17606 Bug31490 ucfırst (with a dotless i) with English language
17612 <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>
17617 Bug 26375: TOC with italics
17619 title=[[Main Page]]
17622 == ''Lost'' episodes ==
17624 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17626 <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>
17630 <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>
17635 Bug 26375: TOC with bold
17637 title=[[Main Page]]
17640 == '''should be bold''' then normal text ==
17642 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17644 <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>
17648 <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>
17653 Bug 33845: Headings become cursive in TOC when they contain an image
17655 title=[[Main Page]]
17658 == Image [[Image:foobar.jpg]] ==
17660 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17662 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
17666 <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>
17671 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
17673 title=[[Main Page]]
17676 == <blockquote>Quote</blockquote> ==
17678 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17680 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
17684 <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>
17689 Unclosed tags in TOC
17691 title=[[Main Page]]
17695 <small>Hanc marginis exiguitas non caperet.</small>
17698 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17700 <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>
17704 <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>
17705 <p><small>Hanc marginis exiguitas non caperet.</small>
17711 Multiple tags in TOC
17714 == <i>Foo</i> <b>Bar</b> ==
17716 == <i>Foo</i> <blockquote>Bar</blockquote> ==
17718 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17720 <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>
17721 <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>
17725 <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>
17726 <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>
17731 Tags with parameters in TOC
17734 == <sup class="in-h2">Hello</sup> ==
17736 == <sup class="a > b">Evilbye</sup> ==
17738 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17740 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
17741 <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>
17745 <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>
17746 <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>
17751 span tags with directionality in TOC
17754 == <span dir="ltr">C++</span> ==
17756 == <span dir="rtl">זבנג!</span> ==
17758 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
17760 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
17762 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
17764 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17766 <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>
17767 <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>
17768 <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>
17769 <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>
17770 <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>
17774 <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>
17775 <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>
17776 <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>
17777 <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>
17778 <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>
17785 == {{int:headline_sample}} ==
17789 Bug 32057: Title needed when expanding <h> nodes.
17791 title=[[Main Page]]
17795 <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>
17800 Strip marker in urlencode
17802 {{urlencode:x<nowiki/>y}}
17803 {{urlencode:x<nowiki/>y|wiki}}
17804 {{urlencode:x<nowiki/>y|path}}
17831 Strip marker in formatNum
17833 {{formatnum:1<nowiki/>2}}
17834 {{formatnum:1<nowiki/>2|R}}
17842 Check noCommafy in formatNum
17846 {{formatnum:123456.78}}
17847 {{formatnum:123456.78|NOSEP}}
17855 Wrong option for formatNum (bug 56199)
17857 {{formatnum:1,234.56|Random}}
17858 {{formatnum:1,234.56|EVERYTHING}}
17859 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
17868 Strip marker in grammar
17872 {{grammar:elative|foo<nowiki/>bar}}
17879 Strip marker in padleft
17881 {{padleft:|2|x<nowiki/>y}}
17888 Strip marker in padright
17890 {{padright:|2|x<nowiki/>y}}
17897 Strip marker in anchorencode
17899 {{anchorencode:x<nowiki/>y}}
17906 nowiki inside link inside heading (bug 18295)
17908 ==[[foo|x<nowiki>y</nowiki>z]]==
17910 <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>
17915 new support for bdi element (bug 31817)
17917 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17919 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17924 Ignore pipe between table row attributes
17928 |- id=foo | style='color: red'
17936 <tr id="foo" style="color: red">
17943 Gallery override link with WikiLink (bug 34852)
17946 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
17949 <ul class="gallery mw-gallery-traditional">
17950 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17951 <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>
17952 <div class="gallerytext">
17962 Gallery override link with absolute external link (bug 34852)
17965 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
17968 <ul class="gallery mw-gallery-traditional">
17969 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17970 <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>
17971 <div class="gallerytext">
17981 Gallery override link with malicious javascript (bug 34852)
17984 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
17987 <ul class="gallery mw-gallery-traditional">
17988 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17989 <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>
17990 <div class="gallerytext">
18000 Gallery with invalid title as link (bug 43964)
18003 File:foobar.jpg|link=<
18006 <ul class="gallery mw-gallery-traditional">
18007 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18008 <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>
18009 <div class="gallerytext">
18017 Language parser function
18026 Padleft and padright as substr
18028 {{padleft:|3|abcde}}
18029 {{padright:|3|abcde}}
18037 Special parser function
18039 {{#special:RandomPage}}
18040 {{#special:BaDtItLe}}
18041 {{#special:Foobar}}
18050 Bug 34939 - Case insensitive link parsing ([HttP://])
18052 [HttP://MediaWiki.Org/]
18054 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
18057 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
18061 Bug 34939 - Case insensitive link parsing ([HttP:// title])
18063 [HttP://MediaWiki.Org/ MediaWiki]
18065 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
18070 Bug 34939 - Case insensitive link parsing (HttP://)
18072 HttP://MediaWiki.Org/
18074 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
18077 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
18095 <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>
18096 <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>
18097 <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>
18098 <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>
18099 <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>
18105 ### Parsoids-specific tests
18106 ### Parsoid-PHP parser incompatibilities
18109 1. SOL-sensitive wikitext tokens as template-args
18111 parsoid=wt2html,wt2wt
18117 <span about="#mwt1" typeof="mw:Transclusion">
18118 </span><ul about="#mwt1"><li>a</li>
18120 <span about="#mwt2" typeof="mw:Transclusion">
18121 </span><ol about="#mwt2"><li>a</li>
18123 <span about="#mwt3" typeof="mw:Transclusion">
18124 </span><dl about="#mwt3"><dd>a</dd>
18128 #### ----------------------------------------------------------------
18129 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
18130 #### tags. Parsoid's output for these tags differs from that of the
18132 #### ----------------------------------------------------------------
18135 Ref: 1. ref-location should be replaced with an index span
18140 B <ref name="x">foo</ref>
18143 <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>
18144 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>
18145 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>
18149 Ref: 2. ref-tags with identical names should all get the same index
18153 A <ref name="x">foo</ref>
18156 <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>
18157 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>
18161 Ref: 3. spaces in ref-names should be ignored
18165 A <ref name="x">foo</ref>
18166 B <ref name=" x " />
18169 <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>
18170 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>
18171 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>
18175 Ref: 4. 'constructor' should be accepted as a valid ref-name
18176 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
18180 A <ref name="constructor">foo</ref>
18182 <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>
18186 Ref: 5. body should accept generic wikitext
18191 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
18196 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"This is a <b data-parsoid='{\"dsr\":[19,40,3,3]}'><a rel=\"mw:WikiLink\" href=\"./Bolded_link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bolded_link\"},\"sa\":{\"href\":\"bolded link\"},\"dsr\":[22,37,2,2]}'>bolded link</a></b> and this is a <span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"transclusion\"}},\"i\":0}}]}' data-parsoid='{\"dsr\":[55,76,null,null],\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]]}'>transclusion</span>\n"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
18198 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
18199 <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>
18205 Ref: 6. indent-pres should not be output in ref-body
18217 <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>
18219 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
18220 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18228 Ref: 7. No p-wrapping in ref-body
18247 <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>
18249 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18250 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18265 Ref: 8. transclusion wikitext has lower precedence
18269 A <ref> foo {{echo|</ref> B C}}
18273 <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>
18274 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
18275 <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>
18280 Ref: 9. unclosed comments should not leak out of ref-body
18284 A <ref> foo <!--</ref> B C
18287 <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>
18288 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18289 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
18294 Ref: 10. Unclosed HTML tags should not leak out of ref-body
18298 A <ref> <b> foo </ref> B C
18302 <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>
18305 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18306 <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>
18311 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
18318 <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
18319 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>
18323 Ref: 12. ref-tags act as trailing newline migration barrier
18327 <!--the newline at the end of this line moves out of the p-tag-->a
18329 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
18334 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
18337 <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>
18338 <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>
18345 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
18353 <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
18354 <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>
18358 Ref: 14. A nested ref-tag should be emitted as plain text
18362 <ref>foo <ref>bar</ref> baz</ref>
18366 <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>
18368 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18369 <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>
18374 Ref: 15. ref-tags with identical names should get identical indexes
18378 A1 <ref name="a">foo</ref> A2 <ref name="a" />
18379 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
18383 <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>
18384 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>
18386 <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>
18390 ## We don't bother wt2wt-ing non-standard whitespace
18392 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
18400 <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>
18402 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18403 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
18407 References: 1. references tag without any refs should be handled properly
18413 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
18417 References: 2. references tag with group only outputs references from that group
18421 A <ref group="a">foo</ref>
18422 B <ref group="b">bar</ref>
18424 <references group="a" />
18426 <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>
18427 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>
18429 <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>
18434 References: 3. ref list should be cleared after processing references
18446 <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>
18448 <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>
18451 <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>
18453 <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>
18458 References: 4. only referenced group should be cleared after processing references
18462 A <ref group="a">afoo</ref>
18465 <references group="a" />
18471 <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>
18472 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>
18474 <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>
18477 <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>
18479 <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>
18484 References: 5. ref tags in references should be processed while ignoring all other content
18489 B <ref name="b">bar</ref>
18492 <ref name="a">foo</ref>
18493 This should just get lost.
18496 <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>
18497 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>
18500 <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":{}}'>
18501 <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>
18502 <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>
18507 References: 6. <references /> from a transclusion
18511 <ref>Foo</ref> {{echo|<references />}}
18513 <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>
18517 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
18521 A <ref>foo bar for a</ref>
18522 B <ref group="X" name="b" />
18526 <references group="X">
18527 <ref name="b">foo</ref>
18530 <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>
18531 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>
18533 <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>
18535 <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>
18539 Entities in ref name
18543 <ref name="test & me">hi</ref>
18545 <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>
18548 # This test is wt2html only because we're permitting the serializer to produce
18549 # dirty diffs, normalizing the unclosed references to the self-closed version.
18551 Generate references for unclosed references tag
18559 <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>
18562 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
18563 <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>
18567 New reference serializes on its own line
18569 parsoid=wt2wt,html2wt
18574 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
18577 #### ----------------------------------------------------------------
18578 #### The following section of tests are primarily to test
18579 #### wikitext escaping capabilities of Parsoid. Given that
18580 #### escaping can be done any number of ways, the wikitext (input)
18581 #### is always adjusted to reflect how Parsoid adds nowiki
18584 #### We are marking several tests as parsoid-only since the
18585 #### HTML in the result section is different from what the
18586 #### PHP parser generates for it.
18587 #### ----------------------------------------------------------------
18590 #### --------------- Headings ---------------
18592 #### 1. Nested inside html <h1>=foo=</h1>
18593 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
18594 #### 3. Nested inside html with wikitext split by html tags
18595 #### 4. No escape needed
18596 #### 5. Empty headings <h1></h1>
18597 #### 6. Heading chars in SOL context
18598 #### ----------------------------------------
18600 Headings: 0. Unnested
18604 <nowiki>=foo=</nowiki>
18606 <nowiki> =foo= </nowiki>
18608 <nowiki>=foo=</nowiki>
18610 =foo''a''<nowiki>=</nowiki>
18612 <p><span typeof="mw:Nowiki">=foo=</span></p>
18614 <p><span typeof="mw:Nowiki"> =foo= </span>
18616 <span typeof="mw:Nowiki">=foo=</span></p>
18618 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
18622 Headings: 1. Nested inside html
18623 (New headings and existing headings are handled differently)
18633 =<nowiki>=foo=</nowiki>=
18634 ==<nowiki>=foo=</nowiki>==
18635 ===<nowiki>=foo=</nowiki>===
18636 ====<nowiki>=foo=</nowiki>====
18637 =====<nowiki>=foo=</nowiki>=====
18638 ======<nowiki>=foo=</nowiki>======
18645 <h1 data-parsoid='{}'>=foo=</h1>
18646 <h2 data-parsoid='{}'>=foo=</h2>
18647 <h3 data-parsoid='{}'>=foo=</h3>
18648 <h4 data-parsoid='{}'>=foo=</h4>
18649 <h5 data-parsoid='{}'>=foo=</h5>
18650 <h6 data-parsoid='{}'>=foo=</h6>
18654 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
18659 <nowiki>*</nowiki>bar
18665 <nowiki>=bar=</nowiki>
18673 Headings: 3. Nested inside html with wikitext split by html tags
18677 = ='''bold'''<nowiki>foo=</nowiki> =
18679 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
18683 Headings: 4a. No escaping needed (testing just h1 and h2)
18701 = <nowiki>=</nowiki> =
18709 <h1><i>=</i>foo=</h1>
18710 <h1><span typeof="mw:Nowiki">=</span></h1>
18714 Headings: 4b. No escaping needed (inside p-tags)
18729 Headings: 5. Empty headings
18741 =====<nowiki/>=====
18743 ======<nowiki/>======
18754 Headings: 6a. Heading chars in SOL context (with trailing spaces)
18758 <nowiki>=a=</nowiki>
18760 <nowiki>=a=</nowiki>
18762 <nowiki>=a=</nowiki>
18764 <nowiki>=a=</nowiki>
18773 Headings: 6b. Heading chars in SOL context (with trailing newlines)
18801 Headings: 6c. Heading chars in SOL context (leading newline break)
18806 <nowiki>=b=</nowiki>
18813 Headings: 6d. Heading chars in SOL context (with interspersed comments)
18817 <!--c0--><nowiki>=a=</nowiki>
18819 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
18821 <p><!--c0-->=a=</p>
18822 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
18826 Headings: 6d. Heading chars in SOL context (No escaping needed)
18835 #### --------------- Lists ---------------
18836 #### 0. Outside nests (*foo, etc.)
18837 #### 1. Nested inside html <ul><li>*foo</li></ul>
18838 #### 2. Inside definition lists
18839 #### 3. Only bullets at start should be escaped
18840 #### 4. No escapes needed
18841 #### 5. No unnecessary escapes
18842 #### 6. Escape bullets in SOL position
18843 #### 7. Escape bullets in a multi-line context
18844 #### ----------------------------------------
18847 Lists: 0. Outside nests
18849 <nowiki>*</nowiki>foo
18851 <nowiki>#</nowiki>foo
18859 Lists: 1. Nested inside html
18861 *<nowiki>*foo</nowiki>
18863 *<nowiki>#foo</nowiki>
18865 *<nowiki>:foo</nowiki>
18867 *<nowiki>;foo</nowiki>
18869 #<nowiki>*foo</nowiki>
18871 #<nowiki>#foo</nowiki>
18873 #<nowiki>:foo</nowiki>
18875 #<nowiki>;foo</nowiki>
18913 Lists: 2. Inside definition lists
18915 ;<nowiki>;foo</nowiki>
18917 ;<nowiki>:foo</nowiki>
18919 ;<nowiki>:foo</nowiki>
18922 :<nowiki>:foo</nowiki>
18946 Lists: 3. Only bullets at start of text should be escaped
18948 *<nowiki>*foo*bar</nowiki>
18950 *<nowiki>*foo</nowiki>''it''*bar
18957 <li>*foo<i>it</i>*bar
18964 Lists: 4. No escapes needed
18985 <li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
18989 <li><a rel="mw:WikiLink" href="Foo">Foo</a>*bar
18995 Lists: 5. No unnecessary escapes
18997 * bar <span><nowiki>[[foo]]</nowiki></span>
18999 *=bar <span><nowiki>[[foo]]</nowiki></span>
19001 *[[bar <span><nowiki>[[foo]]</nowiki></span>
19003 *]]bar <span><nowiki>[[foo]]</nowiki></span>
19005 *=bar <span>foo]]</span>=
19010 <li> bar <span>[[foo]]</span>
19014 <li>=bar <span>[[foo]]</span>
19018 <li>[[bar <span>[[foo]]</span>
19022 <li>]]bar <span>[[foo]]</span>
19026 <li>=bar <span>foo]]</span>=
19037 Lists: 6. Escape bullets in SOL position
19041 <!--cmt--><nowiki>*foo</nowiki>
19043 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
19047 Lists: 7. Escape bullets in a multi-line context
19050 <nowiki>*</nowiki>b
19057 #### --------------- HRs ---------------
19058 #### 1. Single line
19059 #### -----------------------------------
19062 HRs: 1. Single line
19066 ----<nowiki>----</nowiki>
19070 <hr><span typeof="mw:Nowiki">----</span>
19075 #### --------------- Tables ---------------
19076 #### 1a. Simple example
19077 #### 1b. No escaping needed (!foo)
19078 #### 1c. No escaping needed (|foo)
19079 #### 1d. No escaping needed (|}foo)
19081 #### 2a. Nested in td (<td>foo|bar</td>)
19082 #### 2b. Nested in td (<td>foo||bar</td>)
19083 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
19085 #### 3a. Nested in th (<th>foo!bar</th>)
19086 #### 3b. Nested in th (<th>foo!!bar</th>)
19087 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
19091 #### 4c. No escaping needed
19092 #### --------------------------------------
19095 Tables: 1a. Simple example
19106 Tables: 1b. No escaping needed
19115 Tables: 1c. No escaping needed
19124 Tables: 1d. No escaping needed
19133 Tables: 2a. Nested in td
19138 |<nowiki>foo|bar</nowiki>
19140 |x<div><nowiki>a|b</nowiki></div>
19144 <td>foo|bar</td></tr>
19145 <tr><td>x<div>a|b</div></td>
19150 Tables: 2b. Nested in td
19155 |<nowiki>foo||bar</nowiki>
19156 |''it''<nowiki>foo||bar</nowiki>
19160 <td><span typeof="mw:Nowiki">foo||bar</span></td>
19161 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
19165 Tables: 2c. Nested in td -- no escaping needed
19173 <table><tbody><tr><td>foo!!bar
19174 </td></tr></tbody></table>
19179 Tables: 3a. Nested in th
19187 <table><tbody><tr><th>foo!bar
19188 </th></tr></tbody></table>
19193 Tables: 3b. Nested in th
19198 !<nowiki>foo!!bar</nowiki>
19202 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
19207 Tables: 3c. Nested in th -- no escaping needed
19212 !<nowiki>foo||bar</nowiki>
19216 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
19220 Tables: 4a. Escape -
19227 |<nowiki>-bar</nowiki>
19231 <tr><th>-bar</th></tr>
19233 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
19237 Tables: 4b. Escape +
19244 |<nowiki>+bar</nowiki>
19248 <tr><th>+bar</th></tr>
19250 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
19254 Tables: 4c. No escaping needed
19275 <tr><td>foo-bar</td><td>foo+bar</td></tr>
19276 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
19282 <div>a|b</div></td>
19287 Tables: 4d. No escaping needed
19298 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo">Foo</a>-bar</td>
19299 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
19300 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
19305 Tables: Digest broken attributes on table and tr tag
19321 #### --------------- Links ----------------
19322 #### 1. Quote marks in link text
19323 #### 2. Wikilinks: Escapes needed
19324 #### 3. Wikilinks: No escapes needed
19325 #### 4. Extlinks: Escapes needed
19326 #### 5. Extlinks: No escapes needed
19327 #### --------------------------------------
19329 Links 1. Quote marks in link text
19333 [[Foo|Foo<nowiki>''boo''</nowiki>]]
19335 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
19339 Links 2. WikiLinks: Escapes needed
19344 [[Foo|<nowiki>Foobar]</nowiki>]]
19345 [[Foo|x [Foobar] x]]
19346 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
19347 [[Foo|<nowiki>[[Bar]]</nowiki>]]
19348 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
19349 [[Foo|<nowiki>|Bar</nowiki>]]
19350 [[Foo|<nowiki>]]bar</nowiki>]]
19351 [[Foo|<nowiki>[[bar</nowiki>]]
19352 [[Foo|<nowiki>x [[ y</nowiki>]]
19353 [[Foo|<nowiki>x ]] y</nowiki>]]
19354 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
19356 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
19357 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
19358 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
19359 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
19360 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
19361 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
19362 <a href="Foo" rel="mw:WikiLink">|Bar</a>
19363 <a href="Foo" rel="mw:WikiLink">]]bar</a>
19364 <a href="Foo" rel="mw:WikiLink">[[bar</a>
19365 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
19366 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
19367 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
19371 Links 3. WikiLinks: No escapes needed
19378 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
19379 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
19383 Links 4. ExtLinks: Escapes needed
19387 [http://google.com <nowiki>[google]</nowiki>]
19388 [http://google.com <nowiki>google]</nowiki>]
19390 <nowiki>[http://google.com]</nowiki>
19392 <nowiki>[http://google.com google]</nowiki>
19395 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
19396 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
19397 <p>[http://google.com]</p>
19398 <p>[http://google.com google]</p>
19402 Links 5. ExtLinks: No escapes needed
19406 [http://google.com [google]
19408 <a href="http://google.com" rel="mw:ExtLink">[google</a>
19411 #### --------------- Quotes ---------------
19412 #### 1. Quotes inside <b> and <i>
19413 #### 2. Link fragments separated by <i> and <b> tags
19414 #### 3. Link fragments inside <i> and <b>
19415 #### 4. No escaping needed
19416 #### --------------------------------------
19418 1. Quotes inside <b> and <i>
19420 parsoid=html2wt,wt2wt
19422 ''<nowiki>'foo'</nowiki>''
19423 ''<nowiki>''foo''</nowiki>''
19424 ''<nowiki>'''foo'''</nowiki>''
19426 '''<nowiki>'foo'</nowiki>'''
19427 '''<nowiki>''foo''</nowiki>'''
19428 '''<nowiki>'''foo'''</nowiki>'''
19429 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
19430 '''foo'''<nowiki/>'s
19433 '<nowiki/>''foo''<nowiki/>'
19435 '''foo'''<nowiki/>'
19436 '<nowiki/>'''foo'''<nowiki/>'
19437 ''fools'<span> errand</span>''
19438 ''<span>fool</span>'s errand''
19447 <b>foo'<i>bar'</i>baz</b>
19455 <i>fools'<span> errand</span></i>
19456 <i><span>fool</span>'s errand</i>
19460 2. Link fragments separated by <i> and <b> tags
19462 [[''foo''<nowiki>hello]]</nowiki>
19464 [['''foo'''<nowiki>hello]]</nowiki>
19466 <p>[[<i>foo</i>hello]]
19467 </p><p>[[<b>foo</b>hello]]
19472 3. Link fragments inside <i> and <b>
19473 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
19474 this is one of the shortcomings of this format)
19476 ''[[foo''<nowiki>]]</nowiki>
19478 '''[[foo'''<nowiki>]]</nowiki>
19481 </p><p><b>[[foo</b>]]
19486 4. No escaping needed
19488 '<span>''bar''</span>'
19489 '<span>'''bar'''</span>'
19491 <p>'<span><i>bar</i></span>'
19492 '<span><b>bar</b></span>'
19496 #### ----------- Paragraphs ---------------
19497 #### 1. No unnecessary escapes
19498 #### --------------------------------------
19501 1. No unnecessary escapes
19503 bar <span><nowiki>[[foo]]</nowiki></span>
19505 =bar <span><nowiki>[[foo]]</nowiki></span>
19507 [[bar <span><nowiki>[[foo]]</nowiki></span>
19509 ]]bar <span><nowiki>[[foo]]</nowiki></span>
19511 =bar <span>foo]]</span><nowiki>=</nowiki>
19513 <p>bar <span>[[foo]]</span>
19514 </p><p>=bar <span>[[foo]]</span>
19515 </p><p>[[bar <span>[[foo]]</span>
19516 </p><p>]]bar <span>[[foo]]</span>
19517 </p><p>=bar <span>foo]]</span>=
19521 #### ----------------------- PRE --------------------------
19522 #### 1. Leading whitespace in SOL context should be escaped
19523 #### ------------------------------------------------------
19525 1. Leading whitespace in SOL context should be escaped
19529 <nowiki> </nowiki>a
19531 <nowiki> </nowiki> a
19533 <nowiki> </nowiki>a(tab)
19535 <nowiki> </nowiki> a
19537 <nowiki> </nowiki> a
19540 <nowiki> </nowiki>b
19543 <nowiki> </nowiki>b
19546 <nowiki> </nowiki> b
19552 <p><!--cmt--> a</p>
19561 #### --------------- Behavior Switches --------------------
19563 1. Valid behavior switches should be escaped
19567 <nowiki>__TOC__</nowiki>
19573 2. Invalid behavior switches should not be escaped
19584 #### --------------- HTML tags ---------------
19587 #### 3. multi-line html tag
19588 #### 4. extension tags
19589 #### -----------------------------------------
19595 <a href="http://google.com">google</a>
19597 <a href="http://google.com">google</a>
19603 <nowiki><div>foo</div>
19604 <div style="color:red">foo</div></nowiki>
19606 <p><div>foo</div>
19607 <div style="color:red">foo</div>
19612 3. multi-line html tag
19627 <nowiki><ref>foo</ref></nowiki>
19629 <nowiki><ref>bar</nowiki>
19631 baz<nowiki></ref></nowiki>
19633 <p><ref>foo</ref>
19634 </p><p><ref>bar
19635 </p><p>baz</ref>
19639 #### --------------- Others ---------------
19643 <nowiki>foo</nowiki>
19645 <p><nowiki>foo</nowiki>
19649 ## The quote-char in the input is necessary for triggering the bug
19651 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
19653 parsoid=wt2wt,html2wt
19662 Tag-like HTML structures are passed through as text
19684 </p><p>1<d e>f
19689 # This was a bug in the PHP parser (see bug 17663 and its dups,
19690 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
19692 Tag names followed by punctuation should not be recognized as tags
19696 <p><s.ome> text
19701 HTML tag with necessary entities in attributes
19703 <span title="&amp;">foo</span>
19705 <p><span title="&amp;">foo</span>
19710 HTML tag with 'unnecessary' entity encoding in attributes
19712 <span title="&">foo</span>
19714 <p><span title="&">foo</span>
19719 HTML tag with broken attribute value quoting
19721 <span title="Hello world>Foo</span>
19723 <p><span>Foo</span>
19728 Parsoid-only: HTML tag with broken attribute value quoting
19732 <span title="Hello world>Foo</span>
19734 <p><span title="Hello world">Foo</span>
19739 Table with broken attribute value quoting
19742 | title="Hello world|Foo
19753 Table with broken attribute value quoting on consecutive lines
19756 | title="Hello world|Foo
19757 | style="color:red|Bar
19770 Parsoid-only: Table with broken attribute value quoting on consecutive lines
19775 | title="Hello world|Foo
19776 | style="color:red|Bar
19781 <td title="Hello world">Foo
19782 </td><td style="color: red">Bar
19783 </td></tr></tbody></table>
19788 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19798 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19808 Accept empty td cell attribute
19811 | align="center" | foo || |
19816 <td align="center"> foo </td>
19823 Non-empty attributes in th-cells
19826 ! Foo !! style="color: red" | Bar
19832 <th style="color: red"> Bar
19838 Accept empty attributes in th-cells
19853 Empty table rows go away
19874 ### Parsoid-centric tests for testing RTing of inter-element separators
19875 ### Edge cases not tested by existing parser tests and specific to
19876 ### Parsoid-specific serialization strategies.
19880 RT-ed inter-element separators should be valid separators
19893 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
19894 (Parsoid-only since PHP parser relies on Tidy for correct output)
19910 Empty TD followed by TD with tpl-generated attribute
19915 |{{echo|style='color:red'}}|foo
19929 Indented table with an empty td
19948 Empty TR followed by a template-generated TR
19949 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
19955 {{echo|<tr><td>foo</td></tr>}}
19961 <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}}]}'>
19966 ## PHP and parsoid output differ for this, and since this is primarily
19967 ## for testing Parsoid's serializer, marking this Parsoid only
19969 Empty TR followed by mixed-ws-comment line should RT correctly
19985 <!--c--> </tr><!--d-->
19991 Multi-line image caption generated by templates with/without trailing newlines
19995 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
19996 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
19998 <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>
19999 <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>
20004 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
20008 <includeonly>foo</includeonly>
20015 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
20017 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
20020 ## PHP emits broken html for this, and since this is primarily
20021 ## a Parsoid serializer test, marking this Parsoid only
20023 Improperly nested inline or quotes tags with whitespace in between
20027 <span> <s>x</span> </s>
20030 <p><span> <s>x</s></span><s> </s>
20031 <b> <i>x</i></b><i> </i>
20036 Encapsulate protected attributes from wt
20040 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
20042 <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>
20046 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
20047 ## Having nested or stray pre tags results in the attempt to add duplicates,
20048 ## causing an assertion fail. This test tries to prevent that situation.
20050 Ensure ParagraphWrapper can deal with stray closing pre tags
20060 1. Ensure fostered text content is wrapped in spans
20064 <table>hi</table><table>ho</table>
20073 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
20075 parsoid=wt2html,wt2wt
20082 <span> || ||</span>
20091 Encapsulation properly handles null DSR information from foster box
20093 parsoid=wt2html,wt2wt
20095 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
20097 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20100 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
20104 <td>bar</td></tr></tbody></table>
20108 1. Encapsulate foster-parented transclusion content
20110 parsoid=wt2wt,wt2html
20112 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
20114 <span typeof="mw:Transclusion" data-mw="{"parts":["
20115 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
20117 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
20121 <td>bar</td></tr></tbody></table>
20125 2. Encapsulate foster-parented transclusion content
20127 parsoid=wt2wt,wt2html
20129 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
20131 <div typeof="mw:Transclusion" data-mw="{"parts":["
20133 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
20135 <td>bar</td></tr></table>"]}">foo</div>
20139 <td>bar</td></tr></tbody></table>
20143 3. Encapsulate foster-parented transclusion content
20145 parsoid=wt2wt,wt2html
20147 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20149 <div typeof="mw:Transclusion" data-mw="{"parts":["
20152 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20154 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20159 <td>bar</td></tr></tbody></table>
20163 4. Encapsulate foster-parented transclusion content
20165 parsoid=wt2wt,wt2html
20167 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20169 <div typeof="mw:Transclusion" data-mw="{"parts":["
20172 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20174 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20179 <td>bar</td></tr></tbody></table>
20183 5. Encapsulate foster-parented transclusion content
20185 parsoid=wt2wt,wt2html
20187 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
20189 <span typeof="mw:Transclusion" data-mw="{"parts":["
20194 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
20200 <p>foo</p></div></td></tr></tbody></table>
20204 6. Encapsulate foster-parented transclusion content
20206 parsoid=wt2wt,wt2html
20208 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
20210 <span typeof="mw:Transclusion" data-mw="{"parts":["
20215 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
20221 <p>foo</p></div></td></tr></tbody></table>
20226 7. Encapsulate foster-parented transclusion content
20228 parsoid=wt2wt,wt2html
20230 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
20232 <p typeof="mw:Transclusion" data-mw="{"parts":["
20233 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20234 <p>foo</p>"}},"i":0}},"
20235 <td>bar</td></table>"]}">foo</p>
20239 <td>bar</td></tr></tbody></table>
20243 8. Encapsulate foster-parented transclusion content
20245 parsoid=wt2wt,wt2html
20248 }}{|{{echo|style='color:red'}}
20253 <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>
20257 <td>b</td></tr></tbody></table>
20261 9. Encapsulate foster-parented transclusion content
20263 parsoid=wt2wt,wt2html
20265 <table>{{echo|hi</table>hello}}
20267 <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>
20268 <table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2" data-parsoid="{}">hello</span>
20272 Table in fosterable position
20274 parsoid=wt2html,wt2wt
20283 <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="{}">
20285 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
20292 Support <object> element with .data attribute
20296 <object data="test.swf"></object>
20298 <object data="test.swf"></object>
20301 # -----------------------------------------------------------------
20302 # The following section of tests are primarily to spec requirements
20303 # around serialization of new/edited content.
20305 # All these tests are marked Parsoid html2wt and html2html only
20306 # ----------------------------------------------------------------
20309 Image: Modifying size of an image (1)
20312 "modes": ["wt2wt"],
20314 ["img[height]", "attr", "height", "22"],
20315 ["img[width]", "attr", "width", "200"]
20319 [[Image:Foobar.jpg|230x230px]]
20321 [[Image:Foobar.jpg|200x200px]]
20325 Image: Modifying size of an image (2)
20328 "modes": ["wt2wt"],
20330 ["img[height]", "attr", "height", "100"],
20331 ["img[width]", "attr", "width", "500"]
20335 [[Image:Foobar.jpg|230x230px]]
20337 [[Image:Foobar.jpg|500x500px]]
20340 # Change in size is ignored so long as class='mw-default-size'
20342 Image: Modifying size of an image (3)
20345 "modes": ["wt2wt"],
20347 ["figure[class]", "removeClass", "mw-default-size"],
20348 ["figure img", "attr", "height", "19"],
20349 ["figure img", "attr", "width", "170"]
20353 [[Image:Foobar.jpg|thumb]]
20355 [[Image:Foobar.jpg|thumb|170x170px]]
20359 Image: Modifying alignment of an image (bug 48665)
20362 "modes": ["wt2wt"],
20364 ["figure[class]", "removeClass", "mw-halign-right"],
20365 ["figure[class]", "addClass", "mw-halign-left"]
20369 [[Image:Foobar.jpg|thumb|caption|right]]
20371 [[Image:Foobar.jpg|thumb|caption|left]]
20375 Image: Modifying mw-default-size of an frameless image (bug 62805)
20378 "modes": ["wt2wt"],
20380 ["figure.mw-default-size", "removeClass", "mw-default-size"]
20384 [[Image:Foobar.jpg|frameless|right]]
20386 [[Image:Foobar.jpg|frameless|right|220x220px]]
20390 Image: Modifying valign of an image (bug 49221)
20393 "modes": ["wt2wt"],
20395 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
20396 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
20400 [[File:Foobar.jpg|20px|middle]]
20402 [[File:Foobar.jpg|20px|text-top]]
20406 Image: Modifying alt attribute of an image (bug 56400)
20409 "modes": ["wt2wt"],
20411 ["img[alt]", "attr", "alt", "some alternate edited text"]
20415 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
20417 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
20421 Image: Modifying caption of an image
20424 "modes": ["wt2wt"],
20426 ["figcaption", "text", "new caption"]
20430 [[Image:Foobar.jpg|thumb|original caption]]
20432 [[Image:Foobar.jpg|thumb|new caption]]
20436 Image: empty alt attribute (bug 48924)
20440 [[File:Foobar.jpg|thumb|alt=|bar]]
20442 <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>
20446 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
20451 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
20453 #<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>
20457 Image: Block level image should have \n before and after
20462 [[File:Foobar.jpg|right|thumb|150x150px]]
20465 <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>
20469 Image: New block level image should have \n before and after (existing
20475 [[File:Foobar.jpg|right|thumb|150x150px]]
20478 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
20479 <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>
20480 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
20484 Image: upright option (parsoid)
20488 [[File:Foobar.jpg|thumb|upright|caption]]
20489 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
20490 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
20492 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="19" width="170"/></a><figcaption>caption</figcaption></figure><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="19" width="170"/></a><figcaption>caption</figcaption></figure><figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="57" width="500"/></a><figcaption>caption</figcaption></figure>
20496 Image: upright option is ignored on inline and frame images (parsoid)
20500 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
20502 <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>
20506 Image: from basic HTML (1)
20510 <span typeof="mw:Image">
20511 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20514 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20518 Image: from basic HTML (2)
20522 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20524 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20528 Image: from basic HTML (3)
20532 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
20534 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
20538 Image: from basic HTML (4)
20542 <img src="File:Foobar.jpg">
20544 [[File:Foobar.jpg|link=]]
20548 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
20555 <li><p>foo</p></li>
20560 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
20566 <ul> <li>foo</li></ul>
20570 Don't strip leading whitespace when handling indent-pre suppressing tags
20578 '''This is very bold of you!'''
20582 indented cell (no pre-wrapping!)
20589 <tr><td> indented row</td></tr>
20592 <b>This is very bold of you!</b>
20595 indented cell (no pre-wrapping!)
20603 Strip leading whitespace when handling indent-pre inducing tags
20635 Lists: Add space after bullets
20641 * <span> baz</span>
20646 <li><span> baz</span></li>
20651 Lists: Dont insert newlines in a serialized list item.
20658 <ul><li>a<br>b</li><li>c</li></ul>
20662 Headings: Add space before/after == (Bug 51744)
20672 == <span> baz</span> ==
20677 <h2><span> baz</span></h2>
20681 Parsoid: Serialize positional parameters with = in them as named parameter
20687 {{echo|1 = f=oo|2 = bar}}
20689 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20690 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20691 {{echo|<nowiki>f=oo</nowiki>|bar}}
20693 <p about="#mwt1" typeof="mw:Transclusion"
20694 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
20696 <p about="#mwt1" typeof="mw:Transclusion"
20697 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
20699 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20700 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20701 <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>
20705 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
20721 <div>a<p>b</p></div>
20730 Substrings resembling wikitext in hrefs should not get nowiki escapes
20736 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
20739 #-----------------------------
20740 # I/B quote minimization tests
20741 #-----------------------------
20744 1. I/B quote minimization: wikitext-only tags should be combined
20764 <p><i>A</i><i>B</i></p>
20765 <p><b>A</b><b>B</b></p>
20766 <p><i>A</i><b><i>B</i></b></p>
20767 <p><b>A</b><i><b>B</b></i></p>
20768 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
20769 <p><i><b>A</b></i><i><b>B</b></i></p>
20770 <p><i><b>A</b></i><b><i>B</i></b></p>
20771 <p><b><i>A</i></b><i><b>B</b></i></p>
20775 2. I/B quote minimization: wikitext and html tags should not be combined
20781 ''A'''''<i>B</i>'''
20783 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
20784 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
20788 3. I/B quote minimization: templated content stops minimization
20792 ''A''{{echo|''B''}}
20794 ''A''{{echo|'''''B'''''}}
20796 <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>
20797 <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>
20801 4. I/B quote minimization: new content should be mimimized with adjacent old content
20811 <p><i>A</i><i data-parsoid='{}'>B</i></p>
20812 <p><b data-parsoid='{}'>A</b><b>B</b></p>
20813 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
20816 #------------------------------------
20817 # End of I/B quote minimization tests
20818 #------------------------------------
20821 Bug 54262: New entities
20827 <span typeof="mw:Entity"> </span>
20830 ## Note that there is no wikitext output for 'unknownproperty' ##
20831 ## Unknown magic words are silently dropped ##
20846 __NOCONTENTCONVERT__
20848 <meta property='mw:PageProp/toc' />
20849 <meta property='mw:PageProp/notoc' />
20850 <meta property='mw:PageProp/forcetoc' />
20851 <meta property='mw:PageProp/index' />
20852 <meta property='mw:PageProp/noindex' />
20853 <meta property='mw:PageProp/nogallery' />
20854 <meta property='mw:PageProp/noeditsection' />
20855 <meta property='mw:PageProp/notitleconvert' />
20856 <meta property='mw:PageProp/nocontentconvert' />
20857 <meta property='mw:PageProp/unknownproperty' />
20861 Consecutive <pre>s should not get merged
20863 parsoid=html2wt,html2html
20879 <pre>a</pre><pre>b</pre>
20893 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
20897 [[Special:BookSources/1234567890|ISBN 1234567895]]
20899 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
20903 Edited RFC links not serializable as RFC links should serialize as extlinks
20907 [//tools.ietf.org/html/rfc123 New RFC]
20909 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
20913 Edited PMID links not serializable as PMID links should serialize as extlinks
20917 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
20919 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
20923 Edited Redirect link should emit a non-piped wikitext link
20929 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
20932 # -----------------------------------------------------------------
20933 # End of section for Parsoid-only html2wt tests for serialization
20935 # -----------------------------------------------------------------
20942 Try for 100% code coverage