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 has actual size of 1941x220
10797 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
10798 # a scalable format.
10799 # 2. Framed images always ignore size options; always render at default size.
10800 # 3. "Unspecified format" and border are the only types which can be
10804 Image: "unspecified format" and border enlarge
10806 parsoid=wt2html,wt2wt,html2html
10808 [[File:Foobar.jpg|2000px]]
10810 [[File:Foobar.jpg|border|2000px]]
10812 <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>
10813 </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>
10816 <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>
10817 <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>
10821 Image: "unspecified format" and border reduce
10823 parsoid=wt2html,wt2wt,html2html
10825 [[File:Foobar.jpg|1000px]]
10827 [[File:Foobar.jpg|border|1000px]]
10829 <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>
10830 </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>
10833 <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>
10834 <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>
10838 Image: thumbs reduce
10840 parsoid=wt2html,wt2wt,html2html
10842 [[File:Foobar.jpg|thumb|50px]]
10844 <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>
10847 <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>
10851 Image: bitmap thumbs can't be enlarged past original size, but vector can.
10853 parsoid=wt2html,wt2wt,html2html
10855 [[File:Foobar.jpg|thumb|2000px]]
10857 [[File:Foobar.svg|thumb|2000px]]
10859 <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>
10860 <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>
10863 <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>
10864 <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>
10868 Image: frameless can reduce in size
10870 parsoid=wt2html,wt2wt,html2html
10872 [[File:Foobar.jpg|frameless|50px]]
10874 <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>
10877 <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>
10881 Image: bitmap frameless can't be enlarged past original size, but vector can
10883 parsoid=wt2html,wt2wt,html2html
10885 [[File:Foobar.jpg|frameless|2000px]]
10887 [[File:Foobar.svg|frameless|2000px]]
10889 <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>
10890 </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>
10893 <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>
10894 <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>
10898 Image: framed images are always unscaled.
10900 parsoid=wt2html,wt2wt,html2html
10902 [[File:Foobar.jpg|frame]]
10904 [[File:Foobar.jpg|frame|50px]]
10906 [[File:Foobar.jpg|frame|50x50px]]
10908 [[File:Foobar.jpg|frame|2000px]]
10910 <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>
10911 <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>
10912 <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>
10913 <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 <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>
10919 ###################
10922 Link to image page- image page normally doesn't exists, hence edit link
10923 Add test with existing image page
10924 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
10928 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
10933 bug 18784 Link to non-existent image page with caption should use caption as link text
10935 [[:Image:test|caption]]
10937 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
10942 Frameless image caption with a free URL
10944 [[File:Foobar.jpg|http://example.com]]
10946 <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>
10949 <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>
10953 Thumbnail image caption with a free URL
10957 [[File:Foobar.jpg|thumb|http://example.com]]
10959 <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>
10962 <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>
10966 Thumbnail image caption with a free URL and explicit alt
10969 parsoid=wt2html,wt2wt,html2html
10971 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
10973 <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>
10976 <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>
10980 SVG thumbnails with no language set
10983 [[File:Foobar.svg|thumb|caption]]
10985 <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>
10988 <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>
10992 SVG thumbnails with language de
10994 parsoid=wt2html,wt2wt,html2html
10996 [[File:Foobar.svg|thumb|caption|lang=de]]
10998 <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>
11001 <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>
11005 SVG thumbnails with invalid language code
11007 parsoid=wt2html,wt2wt,html2html
11009 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
11011 <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>
11014 <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>
11018 BUG 1887: A ISBN with a thumbnail
11020 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11022 <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>
11025 <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>
11029 BUG 1887: A RFC with a thumbnail
11031 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11033 <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>
11036 <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>
11040 BUG 1887: A mailto link with a thumbnail
11042 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11044 <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>
11047 <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>
11050 # Pending resolution to bug 368
11052 BUG 648: Frameless image caption with a link
11054 [[File:Foobar.jpg|text with a [[link]] in it]]
11056 <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>
11059 <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>
11063 BUG 648: Frameless image caption with a link (suffix)
11065 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11067 <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>
11070 <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>
11074 BUG 648: Frameless image caption with an interwiki link
11076 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11078 <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>
11081 <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>
11085 BUG 648: Frameless image caption with a piped interwiki link
11087 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11089 <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>
11092 <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>
11096 Escape HTML special chars in image alt text
11098 [[File:Foobar.jpg|& < > "]]
11100 <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>
11103 <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>
11107 BUG 499: Alt text should have Ӓ, not &1234;
11109 [[File:Foobar.jpg|♀]]
11111 <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>
11114 <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>
11118 Broken image caption with link
11120 parsoid=wt2html,wt2wt,html2html
11122 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11124 <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.
11127 <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>
11131 Image caption containing another image
11133 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
11135 <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>
11138 <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>
11142 Image: caption containing a newline
11144 [[File:Foobar.jpg|This
11147 <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>
11150 <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>
11154 Image: caption containing leading space
11155 (The leading space should not trigger nowiki escaping in wt2wt mode)
11157 [[File:Foobar.jpg|thumb| bar]]
11159 <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>
11162 <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>
11166 Image: caption containing a table
11168 parsoid=wt2html,wt2wt,html2html
11170 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11176 and some more text.]]
11178 <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>
11181 <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
11184 <tr><th>Foo </th><th>Bar</th></tr>
11187 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11191 Bug 3090: External links other than http: in image captions
11193 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11195 <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>
11198 <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>
11204 parsoid=wt2html,wt2wt,html2html
11206 [[Image:foobar.jpg|a|class=b]]
11208 <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>
11211 <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>
11215 Localized image handling (1).
11217 parsoid=wt2html,wt2wt,html2html
11220 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
11222 <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>
11225 <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>
11229 Localized image handling (2).
11232 parsoid=wt2html,wt2wt,html2html
11235 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
11237 <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>
11240 <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>
11244 "border", "frameless" and "class" attributes on an image.
11247 parsoid=wt2html,wt2wt,html2html
11249 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
11251 <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>
11254 <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>
11257 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
11259 Invalid image attributes (bug 62500)
11262 parsoid=wt2html,wt2wt,html2html
11264 [[File:Foobar.jpg|thumb|float|left|caption]]
11266 [[File:Foobar.jpg|thumb|righ|caption]]
11268 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
11270 <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>
11271 <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>
11272 <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>
11275 <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>
11281 #REDIRECT [[File:Barfoo.jpg]]
11287 [[Image:Barfoo.jpg]]
11289 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
11294 Missing image with uploads disabled
11298 [[Image:Foobaz.jpg]]
11300 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
11304 # Parsoid-specific testing for images
11305 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11306 # Currently imperfect due to a flaw in the Parsoid testrunner
11308 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
11312 Parsoid-specific image handling - simple image with size and middle alignment
11314 [[File:Foobar.jpg|middle|50px]]
11316 <p><span class="mw-valign-middle" typeof="mw:Image">
11317 <a href="File:Foobar.jpg">
11318 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11325 Parsoid-specific image handling - simple image with size, middle alignment,
11326 non-standard namespace alias
11328 parsoid=wt2wt,wt2html,html2html
11330 [[Image:Foobar.jpg|middle|50px]]
11332 <p><span class="mw-valign-middle" typeof="mw:Image">
11333 <a href="File:Foobar.jpg">
11334 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11341 Parsoid-specific image handling - simple image with size and middle alignment
11344 [[File:Foobar.jpg|50px|middle]]
11346 <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>
11350 Parsoid-specific image handling - simple image with size and middle alignment
11351 and non-standard namespace name
11353 parsoid=wt2html,wt2wt,html2html
11355 [[Image:Foobar.jpg|50px|middle]]
11357 <p><span class="mw-valign-middle" typeof="mw:Image">
11358 <a href="File:Foobar.jpg">
11359 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11366 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
11368 [[File:Foobar.jpg|500x10px|baseline|caption]]
11370 <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>
11374 Parsoid-specific image handling - simple image with border and size spec
11376 [[File:Foobar.jpg|50px|border|caption]]
11378 <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>
11382 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11384 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
11386 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
11387 <a href="File:Foobar.jpg">
11388 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
11390 <figcaption>caption content</figcaption>
11395 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11398 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
11400 <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>
11404 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
11406 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
11408 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
11409 <a href="File:Foobar.jpg">
11410 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
11412 <figcaption>caption</figcaption>
11417 Parsoid-specific image handling - thumbnail with specific size, halign,
11418 valign, and caption (existing content)
11420 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
11422 <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>
11426 Parsoid-specific image handling - framed image with specific size and caption
11429 parsoid=wt2html,wt2wt,html2html
11431 [[File:Foobar.jpg|frame|500x50px|caption]]
11433 <figure typeof="mw:Image/Frame">
11434 <a href="File:Foobar.jpg">
11435 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11437 <figcaption>caption</figcaption>
11442 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
11445 parsoid=wt2html,wt2wt,html2html
11447 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
11449 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
11450 <a href="File:Foobar.jpg">
11451 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11453 <figcaption>caption</figcaption>
11458 Parsoid-specific image handling - frameless image with specific size, border, and caption
11460 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
11462 <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>
11466 Parsoid-specific image handling - simple image with a formatted caption
11468 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
11470 <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>"}'>
11471 <a href="File:Foobar.jpg">
11472 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
11477 Parsoid-specific image handling - caption with a template in it
11479 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
11481 <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>
11485 Parsoid-specific image handling - caption with unbalanced tags in it
11487 parsoid=wt2html,wt2wt,html2html
11490 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
11494 <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>
11499 Parsoid-specific image handling - empty caption (1)
11501 parsoid=wt2html,wt2wt
11503 [[File:Foobar.jpg|thumb|]]
11505 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption></figcaption></figure>
11508 # empty captions don't get serialized unless we're in the "round trip" case
11510 Parsoid-specific image handling - empty caption (2)
11514 <figure class="mw-default-size" typeof="mw:Image/Thumb">
11515 <a href="File:Foobar.jpg">
11516 <img resource="./File:Foobar.jpg"
11517 src="//example.com/images/3/3a/Foobar.jpg"
11518 height="25" width="220"/>
11520 <figcaption></figcaption>
11523 [[File:Foobar.jpg|thumb]]
11527 Parsoid-specific image handling - whitespace caption
11529 [[File:Foobar.jpg|thumb| ]]
11531 <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>
11535 Parsoid-specific image handling - lang option
11538 [[File:Foobar.svg|lang=de|caption]]
11542 <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>
11551 Subpage test/subpage
11559 subpage title=[[Subpage test]]
11563 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
11568 Subpage noslash link
11570 subpage title=[[Subpage test]]
11574 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
11578 # TODO: make this PHP-parser compatible!
11580 Relative subpage noslash link
11582 parsoid=wt2wt,wt2html,html2html
11583 subpage title=[[Subpage test/1/2/3/4]]
11589 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
11590 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
11594 Parsoid: dot-slash prefixed wikilinks
11604 </p><p>[[././baz/]]
11609 </p><p>[[././baz/]]
11614 Render invalid page names as plain text (bug 51090)
11627 [[{{echo|./../foo}}|bar]]
11628 [[{{echo|foo/.}}|bar]]
11629 [[{{echo|foo/..}}|bar]]
11630 [[{{echo|foo~~~~bar}}]]
11631 [[{{echo|foo>bar}}]]
11632 [[{{echo|foo././bar}}]]
11633 [[{{echo|foo{bar}}]]
11634 [[{{echo|foo}bar}}]]
11635 [[{{echo|foo[bar}}]]
11636 [[{{echo|foo]bar}}]]
11637 [[{{echo|foo<bar}}]]
11639 <p>[[./../foo|bar]]
11649 </p><p>[[./../foo|bar]]
11662 <p>[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]</p>
11663 <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>
11671 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
11676 BUG 561: {{/Subpage}}
11678 subpage title=[[Page]]
11682 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
11690 Category:MediaWiki User's Guide
11698 [[:Category:MediaWiki User's Guide]]
11700 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
11709 [[Category:MediaWiki User's Guide]]
11711 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11715 PAGESINCATEGORY invalid title fatal (r33546 fix)
11717 {{PAGESINCATEGORY:<bogus>}}
11724 Category with different sort key
11728 [[Category:MediaWiki User's Guide|Foo]]
11730 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11734 Category with identical sort key
11738 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11740 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11744 Category with empty sort key
11749 [[Category:MediaWiki User's Guide|]]
11751 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11755 Category with empty sort key and parentheses
11760 [[Category:Foo (bar)|]]
11762 [[Category:Foo (bar)|Foo]]
11766 Category with link tail
11771 123[[Category:Foo]]456
11773 123[[Category:Foo]]456
11777 Category with template
11782 [[Category:{{echo|Foo}}]]
11784 [[Category:{{echo|Foo}}]]
11788 Category with template in sort key
11793 [[Category:Foo|{{echo|Bar}}]]
11795 [[Category:Foo|{{echo|Bar}}]]
11799 Category with template in sort key and title
11804 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11806 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11810 Category / paragraph interactions
11812 Foo [[Category:Baz]] Bar
11814 Foo [[Category:Baz]]
11822 [[Category:Baz]] Bar
11835 {{echo|[[Category:Baz]]}}
11850 Parsoid: Serialize link to category page with colon escape
11856 [[:Category:Foo|Bar]]
11859 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
11860 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
11865 Parsoid: Link prefix/suffixes aren't applied to category links
11867 parsoid=wt2html,wt2wt,html2html
11872 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
11876 Parsoid: Serialize link to file page with colon escape
11882 [[:File:Foo.png|Bar]]
11885 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
11886 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
11891 Parsoid: Serialize a genuine category link without colon escape
11896 [[Category:Foo|Bar]]
11898 <link rel="mw:PageProp/Category" href="Category:Foo">
11899 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
11903 Parsoid: Defaultsort
11907 {{DEFAULTSORT:Foo}}
11909 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
11913 ### Inter-language links
11916 Inter-language links
11922 [[zh:食品]]
11924 es:Alimento fr:Nourriture zh:食品
11928 Duplicate interlanguage links (bug 24502)
11944 Basic section headings
11951 ===Smaller headline===
11954 <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>
11957 <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>
11960 <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>
11966 Section headings with TOC
11969 === Subheadline 1 ===
11970 ===== Skipping a level =====
11971 ====== Skipping a level ======
11975 ===Another headline===
11977 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11979 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
11981 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
11983 <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>
11985 <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>
11992 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
11994 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
12000 <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>
12001 <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>
12002 <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>
12003 <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>
12004 <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>
12007 <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>
12011 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
12013 Handling of sections up to level 6 and beyond
12016 == Level 2 Heading==
12017 === Level 3 Heading===
12018 ==== Level 4 Heading====
12019 ===== Level 5 Heading=====
12020 ====== Level 6 Heading======
12021 ======= Level 7 Heading=======
12022 ======== Level 8 Heading========
12023 ========= Level 9 Heading=========
12024 ========== Level 10 Heading==========
12026 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12028 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12030 <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>
12032 <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>
12034 <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>
12036 <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>
12038 <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>
12039 <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>
12040 <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>
12041 <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>
12042 <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>
12056 <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>
12057 <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>
12058 <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>
12059 <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>
12060 <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>
12061 <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>
12062 <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>
12063 <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>
12064 <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>
12065 <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>
12070 TOC regression (bug 9764)
12074 ==== title 1.1.1 ====
12079 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12081 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12083 <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>
12085 <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>
12088 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
12091 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12093 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
12099 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12100 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12101 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
12102 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12103 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12104 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12109 TOC with wgMaxTocLevel=3 (bug 6204)
12115 ==== title 1.1.1 ====
12120 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12122 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12124 <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>
12125 <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>
12128 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12130 <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>
12136 <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>
12137 <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>
12138 <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>
12139 <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>
12140 <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>
12141 <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>
12146 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
12152 ====Section 1.1.1====
12153 ====Section 1.1.1.1====
12156 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12158 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
12160 <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>
12163 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
12167 <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>
12168 <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>
12169 <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>
12170 <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>
12171 <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>
12177 Resolving duplicate section names
12182 <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>
12183 <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>
12188 Resolving duplicate section names with differing case (bug 10721)
12193 <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>
12194 <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>
12206 Template with sections, __NOTOC__
12213 <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>
12214 <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>
12215 <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>
12216 <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>
12221 __NOEDITSECTION__ keyword
12227 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
12228 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
12233 Link inside a section heading
12235 ==Section with a [[Main Page|link]] in it==
12237 <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>
12242 TOC regression (bug 12077)
12249 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12251 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12253 <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>
12256 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
12260 <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>
12261 <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>
12262 <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>
12267 BUG 1219 URL next to image (good)
12269 http://example.com [[Image:foobar.jpg]]
12271 <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>
12276 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
12279 The line above must have a trailing space!
12282 But just in case it doesn't...
12284 <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>
12285 <p>The line above must have a trailing space!
12287 <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>
12288 <p>But just in case it doesn't...
12293 Header with special characters (bug 25462)
12295 The tooltips shall not show entities to the user (ie. be double escaped)
12312 <p>The tooltips shall not show entities to the user (ie. be double escaped)
12314 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12316 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
12317 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
12318 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
12319 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
12320 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
12324 <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>
12327 <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>
12330 <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>
12333 <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>
12336 <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>
12342 Headers with excess '=' characters
12343 (Are similar tests necessary beyond the 1st level?)
12347 =''italic'' heading==
12348 ==''italic'' heading=
12350 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12352 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
12353 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
12354 <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>
12355 <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>
12359 <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>
12360 <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>
12361 <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>
12362 <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>
12367 HTML headers vs TOC (bug 23393)
12368 (__NOEDITSECTION__ for clearer output, doesn't matter here)
12380 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12382 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
12384 <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>
12385 <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>
12388 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
12390 <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>
12391 <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>
12397 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
12398 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
12399 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
12400 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
12401 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
12402 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
12407 Single-line or multiline-comments can follow headings
12409 parsoid=wt2html,wt2wt
12417 <h2><span class="mw-headline" id="foo">foo</span></h2>
12418 <h2><span class="mw-headline" id="bar">bar</span></h2>
12419 <h2><span class="mw-headline" id="baz">baz</span></h2>
12424 BUG 1219 URL next to image (broken)
12426 http://example.com[[Image:foobar.jpg]]
12428 <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>
12433 Bug 1186 news: in the middle of text
12435 http://en.wikinews.org/wiki/Wikinews:Workplace
12437 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
12443 Namespaced link must have a title
12452 Namespaced link must have a title (bad fragment version)
12454 [[Project:#fragment]]
12456 <p>[[Project:#fragment]]
12462 ### HTML tags and HTML attributes
12466 div with no attributes
12468 <div>HTML rocks</div>
12470 <div>HTML rocks</div>
12475 div with double-quoted attribute
12477 <div id="rock">HTML rocks</div>
12479 <div id="rock">HTML rocks</div>
12484 div with single-quoted attribute
12486 <div id='rock'>HTML rocks</div>
12488 <div id="rock">HTML rocks</div>
12493 div with unquoted attribute
12495 <div id=rock>HTML rocks</div>
12497 <div id="rock">HTML rocks</div>
12502 div with illegal double attributes
12504 <div id="a" id="b">HTML rocks</div>
12506 <div id="b">HTML rocks</div>
12510 # FIXME: produce empty string instead of "class" in the PHP parser, following
12513 div with empty attribute value, space before equals
12517 <div class =>HTML rocks</div>
12519 <div class="">HTML rocks</div>
12523 # The PHP parser escapes the opening brace to { for some reason, so
12524 # disabled this test for it.
12526 div with braces in attribute value
12530 <div title="{}">Foo</div>
12532 <div title="{}">Foo</div>
12535 # This it very inconsistent in the PHP parser: it returns
12536 # class="class" if there is a space between the name and the equal sign (see
12537 # 'div with empty attribute value, space before equals'), but strips the
12538 # attribute completely if the space is missing. We hope that not much content
12539 # depends on this, so are implementing the behavior below in Parsoid for
12540 # consistencies' sake. Disabled for the PHP parser.
12541 # FIXME: fix this behavior in the PHP parser?
12543 div with empty attribute value, no space before equals
12547 <div class=>HTML rocks</div>
12549 <div class="">HTML rocks</div>
12554 HTML multiple attributes correction
12556 <p class="error" class="awesome">Awesome!</p>
12558 <p class="awesome">Awesome!</p>
12563 Table multiple attributes correction
12566 !+ class="error" class="awesome"| status
12571 <th class="awesome"> status
12579 <DIV ID="x">HTML ROCKS</DIV>
12581 <div id="x">HTML ROCKS</div>
12586 Non-ASCII pseudo-tags are rendered as text
12595 Pseudo-tag with URL 'name' renders as url link
12597 <http://example.com/>
12599 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
12604 text with amp in the middle of nowhere
12608 <p>Remember AT&T?
12613 text with character entity: eacute
12615 I always thought é was a cute letter.
12617 <p>I always thought é was a cute letter.
12622 text with entity-escaped character entity-like string: eacute
12624 I always thought &eacute; was a cute letter.
12626 <p>I always thought &eacute; was a cute letter.
12631 text with undefined character entity: xacute
12633 I always thought &xacute; was a cute letter.
12635 <p>I always thought &xacute; was a cute letter.
12639 # TODO: generalize to PHP parser?
12645 <data value="5">five</data>
12646 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12647 <mark>This highlighted text</mark>
12649 <p><data value="5">five</data>
12650 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12651 <mark>This highlighted text</mark></p>
12655 HTML tag with leading space is parsed as text
12659 <p>< div>foo< /div>
12664 ### Nesting tests (see bug 41545, 50604, 51081)
12667 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
12668 # Note that html2wt is considerably more difficult if we use <b> in
12669 # the test case, instead of <big>
12671 Ensure that HTML adoption agency algorithm is properly implemented.
12673 <big>X<big>Y</big>Z</big>
12675 <p><big>X<big>Y</big>Z</big>
12679 # This was bug 41545 in the PHP parser.
12683 <kbd>X<kbd>Y</kbd>Z</kbd>
12685 <p><kbd>X<kbd>Y</kbd>Z</kbd>
12689 # The following cases were bug 51081 in the PHP parser.
12690 # Note that there are some other nestable tags (b, i, etc) which are
12691 # not covered; see bug 51081 for discussion.
12695 <em>X<em>Y</em>Z</em>
12697 <p><em>X<em>Y</em>Z</em>
12702 Nesting of <strong>
12704 <strong>X<strong>Y</strong>Z</strong>
12706 <p><strong>X<strong>Y</strong>Z</strong>
12715 <p><q>X<q>Y</q>Z</q>
12722 <ruby>X<ruby>Y</ruby>Z</ruby>
12724 <p><ruby>X<ruby>Y</ruby>Z</ruby>
12731 <bdo>X<bdo>Y</bdo>Z</bdo>
12733 <p><bdo>X<bdo>Y</bdo>Z</bdo>
12745 [[Media:Foobar.jpg]]
12747 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
12752 Media link with text
12754 [[Media:Foobar.jpg|A neat file to look at]]
12756 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
12760 # FIXME: this is still bad HTML tag nesting
12762 Media link with nasty text
12763 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
12765 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
12767 <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>
12772 Media link to nonexistent file (bug 1702)
12774 [[Media:No such.jpg]]
12776 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
12781 Image link to nonexistent file (bug 1850 - good)
12783 [[Image:No such.jpg]]
12785 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
12790 :Image link to nonexistent file (bug 1850 - bad)
12792 [[:Image:No such.jpg]]
12794 <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>
12801 Character reference normalization in link text (bug 1938)
12803 [[Main Page|this&that]]
12805 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
12812 Test for unicode normalization
12814 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
12818 (bug 19451) Links should refer to the normalized form.
12826 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12827 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12828 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12829 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12830 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12835 Empty attribute crash test (bug 2067)
12837 <font color="">foo</font>
12839 <p><font color="">foo</font>
12844 Empty attribute crash test single-quotes (bug 2067)
12846 <font color=''>foo</font>
12848 <p><font color="">foo</font>
12853 Attribute test: equals, then nothing
12855 <font color=>foo</font>
12857 <p><font>foo</font>
12862 Attribute test: unquoted value
12864 <font color=x>foo</font>
12866 <p><font color="x">foo</font>
12871 Attribute test: unquoted but illegal value (hash)
12873 <font color=#x>foo</font>
12875 <p><font color="#x">foo</font>
12880 Attribute test: no value
12882 <font color>foo</font>
12884 <p><font color="color">foo</font>
12889 Bug 2095: link with three closing brackets
12893 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
12896 <p><a rel="mw:WikiLink" href="./Main_Page">Main Page</a>]</p>
12900 Bug 2095: link with pipe and three closing brackets
12902 [[Main Page|link]]]
12904 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
12907 <p><a rel="mw:WikiLink" href="./Main_Page">link</a>]</p>
12911 Bug 2095: link with pipe and three closing brackets, version 2
12913 [[Main Page|[http://example.com/]]]
12915 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
12918 <p><a rel="mw:WikiLink" href="./Main_Page">[http://example.com/]</a></p>
12927 Template:Dangerous attribute
12929 " onmouseover="alert(document.cookie)
12933 Template:Dangerous style attribute
12935 border-size: expression(alert(document.cookie))
12941 <div style="float: right; {{{1}}}">Magic div</div>
12945 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
12947 <div title="{{test}}"></div>
12949 <div title="This is a test template"></div>
12954 Bug 2304: HTML attribute safety (dangerous template; 2309)
12956 <div title="{{dangerous attribute}}"></div>
12958 <div title=""></div>
12963 Bug 2304: HTML attribute safety (dangerous style template; 2309)
12965 <div style="{{dangerous style attribute}}"></div>
12967 <div style="/* insecure input */"></div>
12972 Bug 2304: HTML attribute safety (safe parameter; 2309)
12974 {{div style|width: 200px}}
12976 <div style="float: right; width: 200px">Magic div</div>
12981 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
12983 {{div style|width: expression(alert(document.cookie))}}
12985 <div style="/* insecure input */">Magic div</div>
12990 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
12992 {{div style|"><script>alert(document.cookie)</script>}}
12994 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12999 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
13001 {{div style|" ><script>alert(document.cookie)</script>}}
13003 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13008 Bug 2304: HTML attribute safety (link)
13010 <div title="[[Main Page]]"></div>
13012 <div title="[[Main Page]]"></div>
13017 Bug 2304: HTML attribute safety (italics)
13019 <div title="''foobar''"></div>
13021 <div title="''foobar''"></div>
13026 Bug 2304: HTML attribute safety (bold)
13028 <div title="'''foobar'''"></div>
13030 <div title="'''foobar'''"></div>
13036 Bug 2304: HTML attribute safety (ISBN)
13038 <div title="ISBN 1234567890"></div>
13040 <div title="ISBN 1234567890"></div>
13045 Bug 2304: HTML attribute safety (RFC)
13047 <div title="RFC 1234"></div>
13049 <div title="RFC 1234"></div>
13054 Bug 2304: HTML attribute safety (PMID)
13056 <div title="PMID 1234567890"></div>
13058 <div title="PMID 1234567890"></div>
13063 Bug 2304: HTML attribute safety (web link)
13065 <div title="http://example.com/"></div>
13067 <div title="http://example.com/"></div>
13072 Bug 2304: HTML attribute safety (named web link)
13074 <div title="[http://example.com/ link]"></div>
13076 <div title="[http://example.com/ link]"></div>
13081 Bug 3244: HTML attribute safety (extension; safe)
13083 <div style="<nowiki>background:blue</nowiki>"></div>
13085 <div style="background:blue"></div>
13090 Bug 3244: HTML attribute safety (extension; unsafe)
13092 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
13094 <div style="/* insecure input */"></div>
13098 # More MSIE fun discovered by Tom Gilder
13101 MSIE CSS safety test: spurious slash
13103 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
13105 <div style="/* insecure input */">evil</div>
13110 MSIE CSS safety test: hex code
13112 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
13114 <div style="/* insecure input */">evil</div>
13119 MSIE CSS safety test: comment in url
13121 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
13123 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
13128 MSIE CSS safety test: comment in expression
13130 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
13132 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
13137 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
13139 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
13141 <p style="/* invalid control char */">A</p>
13146 MSIE 6 CSS safety test: Fullwidth (bug 55332)
13148 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
13149 <div style="top:EXPRESSION(alert())">B</div>
13151 <p style="/* insecure input */">A</p>
13152 <div style="/* insecure input */">B</div>
13157 MSIE 6 CSS safety test: IPA extensions (bug 55332)
13159 <div style="background-image:uʀʟ(javascript:alert())">A</div>
13160 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
13162 <div style="/* insecure input */">A</div>
13163 <p style="/* insecure input */">B</p>
13168 MSIE 6 CSS safety test: sup/sub script (bug 55332)
13170 <div style="background-image:url⁽javascript:alert())">A</div>
13171 <div style="background-image:url₍javascript:alert())">B</div>
13172 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
13174 <div style="/* insecure input */">A</div>
13175 <div style="/* insecure input */">B</div>
13176 <p style="/* insecure input */">C</p>
13184 title="data:text/html,<img src=1 onerror=alert(1)>"
13185 style="-o-link:attr(title);-o-link-source:current">X</div>
13187 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
13192 MSIE 6 CSS safety test: Repetition markers (bug 55332)
13194 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
13195 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
13196 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
13197 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
13198 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
13199 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
13200 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
13202 <p style="/* insecure input */">A</p>
13203 <p style="/* insecure input */">B</p>
13204 <p style="/* insecure input */">C</p>
13205 <p style="/* insecure input */">D</p>
13206 <p style="/* insecure input */">E</p>
13207 <p style="/* insecure input */">F</p>
13208 <p style="/* insecure input */">G</p>
13213 Table attribute legitimate extension
13216 !+ style="<nowiki>color:blue</nowiki>"| status
13221 <th style="color:blue"> status
13227 Table attribute safety
13230 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
13235 <th style="/* insecure input */"> status
13241 CSS line continuation 1
13243 <div style="background-image: u\ rl(test.jpg);"></div>
13245 <div style="/* insecure input */"></div>
13250 CSS line continuation 2
13252 <div style="background-image: u\ rl(test.jpg); "></div>
13254 <div style="/* insecure input */"></div>
13265 Expansion of multi-line templates in attribute values (bug 6255)
13267 <div style="background: {{identity|#00FF00}}">-</div>
13269 <div style="background: #00FF00">-</div>
13275 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
13277 <div style="background:
13280 <div style="background: #00FF00">-</div>
13285 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
13287 <div style="background: #00FF00">-</div>
13289 <div style="background: #00FF00">-</div>
13294 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
13297 Parser hook: empty input
13310 Parser hook: empty input using terminated empty elements
13323 Parser hook: empty input using terminated empty elements (space before)
13336 Parser hook: basic input
13350 Parser hook: case insensitive
13364 Parser hook: case insensitive, redux
13377 Parser hook: nested tags
13381 <tag><tag></tag></tag>
13392 Parser hook: basic arguments
13394 <tag width=200 height = "100" depth = '50' square></tag>
13402 'square' => 'square',
13409 Parser hook: argument containing a forward slash (bug 5344)
13411 <tag filename='/tmp/bla'></tag>
13416 'filename' => '/tmp/bla',
13423 Parser hook: empty input using terminated empty elements (bug 2374)
13436 # </tag> should be output literally since there is no matching tag that begins it
13438 Parser hook: basic arguments using terminated empty elements (bug 2374)
13440 <tag width=200 height = "100" depth = '50' square/>
13450 'square' => 'square',
13459 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
13463 Parser hook: static parser hook not inside a comment
13465 <statictag>hello, world</statictag>
13466 <statictag action=flush/>
13474 Parser hook: static parser hook inside a comment
13476 <!-- <statictag>hello, world</statictag> -->
13477 <statictag action=flush/>
13483 # Nested template calls; this case was broken by Parser.php rev 1.506,
13487 Template:One-parameter
13489 (My parameter is: {{{1}}})
13493 Template:Map-one-parameter
13495 {{{{{1}}}|{{{2}}}}}
13499 Nested template calls
13501 {{Map-one-parameter|One-parameter|param}}
13503 <p>(My parameter is: param)
13512 Sanitizer: Closing of open tags
13514 <s></s><table></table>
13516 <s></s><table></table>
13521 Sanitizer: Closing of open but not closed tags
13530 Sanitizer: Closing of closed but not open tags
13539 Sanitizer: Closing of closed but not open table tags
13541 Table not started</td></tr></table>
13543 <p>Table not started</td></tr></table>
13548 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
13550 <span id="æ: v">byte</span>[[#æ: v|backlink]]
13552 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
13557 Sanitizer: Validating the contents of the id attribute (bug 4515)
13563 Something, but definitely not <br id="9" />...
13567 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
13571 <br id="foo" /><br id="foo" />
13573 Something need to be done. foo-2 ?
13577 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
13580 <meta itemprop="hello" content="world">
13581 <meta http-equiv="refresh" content="5">
13582 <meta itemprop="hello" http-equiv="refresh" content="5">
13583 <link itemprop="hello" href="{{SERVER}}">
13584 <link rel="stylesheet" href="{{SERVER}}">
13585 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
13588 <div itemscope="itemscope">
13589 <p> <meta itemprop="hello" content="world" />
13590 <meta http-equiv="refresh" content="5">
13591 <meta itemprop="hello" content="5" />
13593 <link itemprop="hello" href="http://example.org" />
13594 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
13595 <link itemprop="hello" href="http://example.org" />
13601 Language converter: output gets cut off unexpectedly (bug 5757)
13605 this bit is safe: }-
13607 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
13609 then we get cut off here: }-
13611 all additional text is vanished
13613 <p>this bit is safe: }-
13614 </p><p>but if we add a conversion instance: xxx
13615 </p><p>then we get cut off here: }-
13616 </p><p>all additional text is vanished
13621 Self closed html pairs (bug 5487)
13624 <center><font id="bug" />Centered text</center>
13625 <div><font id="bug2" />In div text</div>
13627 <center><font id="bug" />Centered text</center>
13628 <div><font id="bug2" />In div text</div>
13637 Punctuation: nbsp before exclamation
13641 <p>C'est grave !
13646 Punctuation: CSS !important (bug 11874)
13648 <div style="width:50% !important">important</div>
13650 <div style="width:50% !important">important</div>
13655 Punctuation: CSS ! important (bug 11874; with space after)
13657 <div style="width:50% ! important">important</div>
13659 <div style="width:50% ! important">important</div>
13665 HTML bullet list, closed tags (bug 5497)
13680 HTML bullet list, unclosed tags (bug 5497)
13699 HTML ordered list, closed tags (bug 5497)
13714 HTML ordered list, unclosed tags (bug 5497)
13733 HTML nested bullet list, closed tags (bug 5497)
13758 HTML nested bullet list, open tags (bug 5497)
13787 HTML nested ordered list, closed tags (bug 5497)
13812 HTML nested ordered list, open tags (bug 5497)
13841 HTML ordered list item with parameters oddity
13843 <ol><li id="fragment">One</li>
13846 <ol><li id="fragment">One</li>
13851 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
13853 bug 5918: autonumbering
13855 [http://first/] [http://second] [ftp://ftp]
13859 [mailto:enclosed@mail.tld With target]
13861 [mailto:enclosed@mail.tld]
13863 mailto:inline@mail.tld
13865 <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>
13866 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
13867 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
13868 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
13869 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
13872 <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>
13873 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
13874 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
13875 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
13876 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
13881 # Security and HTML correctness
13882 # From Nick Jenkins' fuzz testing
13886 Fuzz testing: Parser13
13901 Fuzz testing: Parser14
13906 <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>
13907 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13909 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
13917 Fuzz testing: Parser14-table
13922 <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>
13923 <table style="__TOC__">
13929 # Known to produce bogus xml (extra </td>)
13931 Fuzz testing: Parser16
13951 Fuzz testing: Parser21
13954 ! irc://{{ftp://a" onmouseover="alert('hello world');"
13959 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
13969 Fuzz testing: Parser22
13971 http://===r:::https://b
13975 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
13983 # Known to produce bad XML for now
13985 Fuzz testing: Parser24
13992 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
13993 <br style="onmouseover='alert(document.cookie);' " />
13995 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14000 <u class="|">}}}} >
14001 <br style="onmouseover='alert(document.cookie);'" />
14003 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14012 # Note: the current result listed for this is not what the original one was,
14013 # but the original bug was JavaScript injection, which is fixed in any case.
14014 # It's not clear that the original result listed was any more correct than the
14015 # current one. Original result:
14018 # <li class="||">
14019 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14021 Fuzz testing: Parser25 (bug 6055)
14027 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
14029 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14034 Fuzz testing: URL adjacent extension (with space, clean)
14037 http://example.com <nowiki>junk</nowiki>
14039 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
14044 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
14047 http://example.com<nowiki>junk</nowiki>
14049 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
14054 Fuzz testing: URL adjacent extension (no space, dirty; pre)
14057 http://example.com<pre>junk</pre>
14059 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
14064 Fuzz testing: image with bogus manual thumbnail
14066 [[Image:foobar.jpg|thumbnail= ]]
14068 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
14071 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,null,null]}'/>
14075 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
14077 <pre dir=" "></pre>
14079 <pre dir=" "></pre>
14084 Parsing optional HTML elements (Bug 6171)
14089 <td> Some tabular data</td>
14090 <td> More tabular data ...
14091 <td> And yet som tabular data</td>
14097 <td> Some tabular data</td>
14098 <td> More tabular data ...
14099 </td><td> And yet som tabular data</td>
14106 Correct handling of <td>, <tr> (Bug 6171)
14111 <td> Some tabular data</td>
14112 <td> More tabular data ...</td>
14113 <td> And yet som tabular data</td>
14119 <td> Some tabular data</td>
14120 <td> More tabular data ...</td>
14121 <td> And yet som tabular data</td>
14129 Parsing crashing regression (fr:JavaScript)
14133 <p></body></x>
14138 Inline wiki vs wiki block nesting
14144 <p><b>Bold paragraph</b>
14145 </p><p>New wiki paragraph
14150 Inline HTML vs wiki block nesting
14158 <p><b>Bold paragraph</b>
14159 </p><p>New wiki paragraph
14163 # Original result was this:
14164 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
14166 # While that might be marginally more intuitive, maybe, the six-apostrophe
14167 # construct is clearly pathological and the result stated here (which is what
14168 # the parser actually does) is about as reasonable as anything.
14170 Mixing markup for italics and bold
14173 '''bold''''''bold''bolditalics'''''
14175 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
14183 Article for special page transclusion test
14187 Special page transclusion
14190 {{Special:Prefixindex/Xyzzyx}}
14192 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14197 Special page transclusion twice (bug 5021)
14200 {{Special:Prefixindex/Xyzzyx}}
14201 {{Special:Prefixindex/Xyzzyx}}
14203 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14204 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14209 Transclusion of default MediaWiki message
14211 {{MediaWiki:Mainpage}}
14218 Transclusion of nonexistent MediaWiki message
14220 {{MediaWiki:Mainpagexxx}}
14222 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
14227 Transclusion of MediaWiki message with underscore
14229 {{MediaWiki:history_short}}
14236 Transclusion of MediaWiki message with space
14238 {{MediaWiki:history short}}
14245 Invalid header with following text
14255 Section extraction test (section 0)
14275 Section extraction test (section 1)
14297 Section extraction test (section 2)
14318 Section extraction test (section 3)
14338 Section extraction test (section 4)
14362 Section extraction test (section 5)
14382 Section extraction test (section 6)
14403 Section extraction test (section 7)
14423 Section extraction test (section 8)
14443 Section extraction test (section 9)
14464 Section extraction test (section 10)
14484 Section extraction test (nonexistent section 11)
14503 Section extraction test with bogus heading (section 1)
14508 ==bogus== not a legal section
14512 ==bogus== not a legal section
14516 Section extraction test with bogus heading (section 2)
14521 ==bogus== not a legal section
14528 Section extraction test with comment after heading (section 1)
14540 Section extraction test with comment after heading (section 2)
14552 Section extraction test with bogus <nowiki> heading (section 1)
14557 ==bogus== <nowiki>not a legal section</nowiki>
14561 ==bogus== <nowiki>not a legal section</nowiki>
14565 Section extraction test with bogus <nowiki> heading (section 2)
14570 ==bogus== <nowiki>not a legal section</nowiki>
14577 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
14578 # instead of respecting commented sections
14580 Section extraction prefixed by comment (section 1)
14591 Section extraction prefixed by comment (section 2)
14602 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
14603 # instead of respecting HTML-style headings
14605 Section extraction, mixed wiki and html (section 1)
14621 Section extraction, mixed wiki and html (section 2)
14637 # Formerly testing for bug 3342
14639 Section extraction, heading surrounded by <noinclude>
14643 <noinclude>==unmarked==</noinclude>
14649 # Test behavior of bug 19910
14651 Sectiion with all-equals
14656 The line above must have a trailing space
14659 But just in case it doesn't...
14663 But just in case it doesn't...
14667 Section replacement test (section 0)
14698 Section replacement test (section 1)
14727 Section replacement test (section 2)
14757 Section replacement test (section 3)
14788 Section replacement test (section 4)
14815 Section replacement test (section 5)
14846 Section replacement test (section 6)
14876 Section replacement test (section 7)
14907 Section replacement test (section 8)
14938 Section replacement test (section 9)
14967 Section replacement test (section 10)
14997 Section replacement test with initial whitespace (bug 13728)
15001 Preformatted initial line
15005 Preformatted initial line
15012 Section extraction, heading followed by pre with 20 spaces (bug 6398)
15024 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
15037 Section extraction, <pre> around bogus header (bug 10309)
15054 Section replacement, <pre> around bogus header (bug 10309)
15056 noxml replace=2,"xxx"
15077 Handling of 
 in URLs
15083 <li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
15090 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
15092 a</a></li></ul></li></ul>
15096 Handling of %0A in URLs
15102 <li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
15109 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15113 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
15115 5 quotes, code coverage +1 line
15122 <p><b><i></i></b></p>
15125 # same html as previous, but wikitext adjusted to match parsoid html2wt
15126 # note that wt2html and html2html will put the <i> before the <b>
15128 5 quotes, code coverage +1 line w/ nowiki (1)
15130 parsoid=wt2wt,html2wt
15132 '''''<nowiki/>'''''
15137 <p><b><i></i></b></p>
15140 # same as previous, just swapping the <i> and <b>
15142 5 quotes, code coverage +1 line w/ nowiki (2)
15144 '''''<nowiki/>'''''
15149 <p><i><b></b></i></p>
15153 Special:Search page linking.
15157 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
15164 title=[[Parser test]]
15169 * {{FULLPAGENAMEE}}
15171 * {{BASEPAGENAMEE}}
15175 * {{ROOTPAGENAMEE}}
15177 * {{TALKPAGENAMEE}}
15178 * {{SUBJECTPAGENAME}}
15179 * {{SUBJECTPAGENAMEE}}
15182 * {{NAMESPACENUMBER}}
15186 * {{SUBJECTSPACEE}}
15187 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
15210 <li> Talk:Parser test
15212 <li> Talk:Parser_test
15232 <li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a>
15237 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
15247 image4 |300px| centre
15248 image5.svg| http://///////
15253 <ul class="gallery mw-gallery-traditional">
15254 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15255 <div class="thumb" style="height: 150px;">Image1.png</div>
15256 <div class="gallerytext">
15259 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15260 <div class="thumb" style="height: 150px;">Image2.gif</div>
15261 <div class="gallerytext">
15266 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15267 <div class="thumb" style="height: 150px;">Image3</div>
15268 <div class="gallerytext">
15271 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15272 <div class="thumb" style="height: 150px;">Image4</div>
15273 <div class="gallerytext">
15278 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15279 <div class="thumb" style="height: 150px;">Image5.svg</div>
15280 <div class="gallerytext">
15281 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
15285 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15286 <div class="thumb" style="height: 150px;">* image6</div>
15287 <div class="gallerytext">
15295 Gallery (with options)
15297 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
15298 File:Nonexistant.jpg|caption
15299 File:Nonexistant.jpg
15300 image:foobar.jpg|some '''caption''' [[Main Page]]
15302 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
15305 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
15306 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
15307 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15308 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15309 <div class="gallerytext">
15314 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15315 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15316 <div class="gallerytext">
15319 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15320 <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>
15321 <div class="gallerytext">
15322 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15326 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15327 <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>
15328 <div class="gallerytext">
15331 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15332 <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>
15333 <div class="gallerytext">
15343 Gallery with wikitext inside caption
15346 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
15347 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
15350 <ul class="gallery mw-gallery-traditional">
15351 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15352 <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>
15353 <div class="gallerytext">
15354 <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>
15358 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15359 <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>
15360 <div class="gallerytext">
15361 <p>This is a test template
15370 gallery (with showfilename option)
15372 <gallery showfilename>
15373 File:Nonexistant.jpg|caption
15374 File:Nonexistant.jpg
15375 image:foobar.jpg|some '''caption''' [[Main Page]]
15379 <ul class="gallery mw-gallery-traditional">
15380 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15381 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15382 <div class="gallerytext">
15383 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15388 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15389 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15390 <div class="gallerytext">
15391 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15395 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15396 <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>
15397 <div class="gallerytext">
15398 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15399 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15403 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15404 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
15405 <div class="gallerytext">
15406 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15415 Gallery (with namespace-less filenames)
15418 File:Nonexistant.jpg
15424 <ul class="gallery mw-gallery-traditional">
15425 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15426 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15427 <div class="gallerytext">
15430 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15431 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15432 <div class="gallerytext">
15435 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15436 <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>
15437 <div class="gallerytext">
15440 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15441 <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>
15442 <div class="gallerytext">
15450 HTML Hex character encoding (spells the word "JavaScript")
15452 parsoid=wt2html,wt2wt,html2html
15454 JavaScript
15456 <p>JavaScript
15459 <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>
15463 HTML Hex character encoding bogus encoding (bug 26437 regression check)
15467 <p>&#xsee;&#XSEE;
15470 <p>&#xsee;&#XSEE;</p>
15474 HTML Hex character encoding mixed case
15476 parsoid=wt2html,wt2wt,html2html
15483 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
15487 __FORCETOC__ override
15499 ISBN 978-0-1234-56 789
15501 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
15506 ISBN followed by 5 spaces
15517 ISBN ISBN 1234567890
15519 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15528 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
15533 ISBN with empty prefix (parsoid test)
15537 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
15541 Bug 22905: <abbr> followed by ISBN followed by </a>
15543 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
15545 <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>
15554 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
15559 Double RFC with a wiki link
15563 <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>
15572 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
15577 Centre-aligned image
15579 [[Image:foobar.jpg|centre]]
15581 <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>
15588 [[Image:foobar.jpg|none]]
15590 <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>
15595 Width + Height sized image (using px) (height is ignored)
15597 [[Image:foobar.jpg|640x480px]]
15599 <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>
15604 Width-sized image (using px, no following whitespace)
15606 [[Image:foobar.jpg|640px]]
15608 <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>
15613 Width-sized image (using px, with following whitespace - test regression from r39467)
15615 [[Image:foobar.jpg|640px ]]
15617 <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>
15622 Width-sized image (using px, with preceding whitespace - test regression from r39467)
15624 [[Image:foobar.jpg| 640px]]
15626 <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>
15631 Image with page parameter
15635 [[File:LoremIpsum.djvu|page=2]]
15637 <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>
15642 Another italics / bold test
15650 # Note the results may be incorrect, as parserTest output included this:
15651 # XML error: Mismatched tag at byte 6120:
15652 # ...<dd> </dt></dl> </dd...
15683 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
15685 Images with the "|" character in the comment
15687 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
15689 <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>
15692 <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>
15696 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
15698 <html><script>alert(1);</script></html>
15700 <p><html><script>alert(1);</script></html>
15705 HTML with raw HTML ($wgRawHtml==true)
15709 <html><script>alert(1);</script></html>
15711 <p><script>alert(1);</script>
15716 Parents of subpages, one level up
15718 subpage title=[[Subpage test/L1/L2/L3]]
15722 <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>
15728 Parents of subpages, one level up, not named
15730 subpage title=[[Subpage test/L1/L2/L3]]
15734 <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>
15741 Parents of subpages, two levels up
15743 subpage title=[[Subpage test/L1/L2/L3]]
15749 <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
15750 </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>
15755 Parents of subpages, two levels up, without trailing slash or name.
15757 subpage title=[[Subpage test/L1/L2/L3]]
15766 Parents of subpages, two levels up, with lots of extra trailing slashes.
15768 subpage title=[[Subpage test/L1/L2/L3]]
15772 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
15777 Subpage test/L1/L2/L3Sibling
15783 Transclusion of a sibling page (one level up)
15785 subpage title=[[Subpage test/L1/L2/L3]]
15794 Transclusion of a child page
15796 subpage title=[[Subpage test/L1/L2]]
15805 Non-transclusion because of too many up levels
15807 subpage title=[[Subpage test/L1/L2/L3]]
15809 {{../../../../More than parent}}
15811 <p>{{../../../../More than parent}}
15816 Definition list code coverage
15823 <dt> title  </dt>
15826 <dt> title </dt>
15837 Don't fall for the self-closing div
15839 <div>hello world</div/>
15841 <div>hello world</div>
15850 <p>[[:Template:Msg]]
15859 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
15863 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
15865 Always escape literal '>' in output, not just after '<'
15879 <p>This is a test template
15880 This is a test template
15892 Inclusion of !userCanEdit() content
15896 <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>
15902 Out-of-order TOC heading levels
15911 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15913 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
15915 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
15916 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
15919 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
15921 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
15922 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
15928 <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>
15929 <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>
15930 <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>
15931 <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>
15932 <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>
15933 <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>
15939 ISBN with a dummy number
15949 ISBN with space-delimited number
15953 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
15959 ISBN with multiple spaces, no number
15978 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15979 </p><p>ISBN 12345678901
15985 ISBN with trailing year (bug 8110)
15987 ISBN 1-234-56789-0 - 2006
15989 ISBN 1 234 56789 0 - 2006
15991 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
15992 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
16000 {{anchorencode:foo bar©#%n}}
16002 <p>foo_bar.C2.A9.23.25n
16007 anchorencode trims spaces
16009 {{anchorencode: __pretty__please__}}
16016 anchorencode deals with links
16018 {{anchorencode: [[hello|world]] [[hi]]}}
16025 anchorencode deals with templates
16027 {{anchorencode: {{Foo}} }}
16034 anchorencode encodes like the TOC generator: (bug 18431)
16036 === _ +:.3A%3A&&]] ===
16037 {{anchorencode: _ +:.3A%3A&&]] }}
16040 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
16041 <p>.2B:.3A.253A.26.26.5D.5D
16046 Bug 6200: blockquotes and paragraph formatting
16067 Bug 8293: Use of center tag ruins paragraph formatting
16088 Parsing of overlapping (improperly nested) inline html tags
16090 <span><s>x</span></s>
16092 <p><span><s>x</span></s></span>
16095 <p><span><s>x</s></span>
16100 ### Language variants related tests
16103 Self-link in language variants
16105 title=[[Dunav]] language=sr
16107 Both [[Dunav]] and [[Дунав]] are names for this river.
16109 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
16120 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
16122 title=[[Duna]] language=sr
16124 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
16126 <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.
16131 Link to a section of a variant of this title shouldn't be parsed as self-link
16133 title=[[Duna]] language=sr
16135 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
16137 <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.
16142 Link to pages in language variants
16146 Main Page can be written as [[Маин Паге]]
16148 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
16154 Multiple links to pages in language variants
16158 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
16160 <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>.
16166 Simple template in language variants
16172 <p>This is a test template
16178 Template with explicit namespace in language variants
16184 <p>This is a test template
16190 Basic test for template parameter in language variants
16194 {{парамтест|param=foo}}
16196 <p>This is a test template with parameter foo
16202 Simple category in language variants
16206 [[Category:МедиаWики Усер'с Гуиде]]
16208 <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>
16225 Don't convert blue categorylinks to another variant (bug 33210)
16229 [[A]][[Category:分类]]
16231 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
16236 Stripping -{}- tags (language variants)
16240 Latin proverb: -{Ne nuntium necare}-
16242 <p>Latin proverb: Ne nuntium necare
16248 Prevent conversion with -{}- tags (language variants)
16250 language=sr variant=sr-ec
16252 Latinski: -{Ne nuntium necare}-
16254 <p>Латински: Ne nuntium necare
16260 Prevent conversion of text with -{}- tags (language variants)
16262 language=sr variant=sr-ec
16264 Latinski: -{Ne nuntium necare}-
16266 <p>Латински: Ne nuntium necare
16272 Prevent conversion of links with -{}- tags (language variants)
16274 language=sr variant=sr-ec
16278 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16284 -{}- tags within headlines (within html for parserConvert())
16286 language=sr variant=sr-ec
16290 <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>
16296 Explicit definition of language variant alternatives
16298 language=zh variant=zh-tw
16300 -{zh:China;zh-tw:Taiwan}-, not China
16302 <p>Taiwan, not China
16308 Conversion around HTML tags
16310 language=sr variant=sr-ec
16312 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
16313 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
16316 <span title="ЛаCтин">ски</span>
16322 Explicit session-wise language variant mapping (A flag and - flag)
16324 language=zh variant=zh-tw
16326 Taiwan is not China.
16327 But -{A|zh:China;zh-tw:Taiwan}- is China,
16328 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
16329 and -{China}- is China.
16331 <p>Taiwan is not China.
16332 But Taiwan is Taiwan,
16333 (This should be stripped!)
16334 and China is China.
16339 Explicit session-wise language variant mapping (H flag for hide)
16341 language=zh variant=zh-tw
16343 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
16346 <p>(This should be stripped!)
16352 Adding explicit conversion rule for title (T flag)
16354 language=zh variant=zh-tw showtitle
16356 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16359 <p>Should be stripped!
16364 Testing that changing the language variant here in the tests actually works
16366 language=zh variant=zh showtitle
16368 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16371 <p>Should be stripped!
16376 Recursive conversion of alt and title attrs shouldn't clear converter state
16378 language=zh variant=zh-cn showtitle
16380 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
16381 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
16385 Should be stripped<span title="Exclamation">!</span>
16390 Bug 24072: more test on conversion rule for title
16392 language=zh variant=zh-tw showtitle
16394 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16395 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
16398 <p>This should be stripped!
16399 This won't take interferes with the title rule.
16404 Partly disable title conversion if variant == main language code
16406 language=zh variant=zh title=[[ZH]] showtitle
16408 -{T|zh-cn:CN;zh-tw:TW}-
16416 Partly disable title conversion if variant == main language code, more
16418 language=zh variant=zh title=[[ZH]] showtitle
16428 Raw output of variant escape tags (R flag)
16430 language=zh variant=zh-tw
16432 Raw: -{R|zh:China;zh-tw:Taiwan}-
16434 <p>Raw: zh:China;zh-tw:Taiwan
16439 Nested using of manual convert syntax
16441 language=zh variant=zh-hk
16443 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
16445 <p>Nested: Hello Hong Kong!
16450 Proper conversion of text in external links
16452 language=sr variant=sr-ec
16454 http://www.google.com
16455 gopher://www.google.com
16456 [http://www.google.com http://www.google.com]
16457 [gopher://www.google.com gopher://www.google.com]
16458 [https://www.google.com irc://www.google.com]
16459 [ftp://www.google.com www.google.com/ftp://dir]
16460 [//www.google.com www.google.com]
16462 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16463 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16464 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16465 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16466 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
16467 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
16468 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
16473 Do not convert roman numbers to language variants
16475 language=sr variant=sr-ec
16479 <p>Фридрих IV је цар.
16484 Unclosed language converter markup "-{"
16495 Don't convert raw rule "-{R|=>}-" to "=>"
16506 Don't break link parsing if language converter markup is in the caption.
16508 language=sr variant=sr-ec
16510 [[Main Page|-{R|main page}-]]
16512 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
16516 # This test is currently broken in the PHP parser (bug 52661)
16518 Don't break image parsing if language converter markup is in the caption.
16523 [[File:Foobar.jpg|-{R|caption}-]]
16525 <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>
16529 # This test is currently broken in the PHP parser (bug 52661)
16531 Don't break list handling if language converter markup is in the item.
16533 language=zh variant=zh-cn
16536 ;-{zh-cn:AAA;zh-tw:BBB}-
16543 # This test is currently broken in the PHP parser (bug 52661)
16545 Don't break table handling if language converter markup is in the cell.
16547 language=sr variant=sr-ec
16564 Bug 529: Uncovered bullet
16577 # Plain MediaWiki does not remove empty lists, but tidy actually does.
16578 # Templates in Wikipedia rely on this behavior, as tidy has always been
16579 # enabled there. These tests are normally run *without* tidy, so specify the
16580 # full output here.
16581 # To test realistic parsing behavior, apply a tidy-like transformation to both
16582 # the expected output and your parser's output.
16584 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
16586 ******* Foo {{bullet}}
16616 Bug 529: Uncovered table already at line-start
16639 Bug 529: Uncovered bullet in parser function result
16641 * Foo {{lc:{{bullet}} }}
16653 Bug 5678: Double-parsed template argument
16655 {{lc:{{{1}}}|hello}}
16662 Bug 5678: Double-parsed template invocation
16664 {{lc:{{paramtest {{!}} param = hello }} }}
16666 <p>{{paramtest | param = hello }}
16671 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
16674 title=[[Main Page]]
16676 {{PRVNÍVELKÉ:ěščř}}
16677 {{prvnívelké:ěščř}}
16697 Morwen/13: Unclosed link followed by heading
16704 <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>
16709 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
16716 <h1><span class="mw-headline" id="heading">heading</span></h1>
16721 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
16728 <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>
16743 Paragraphs inside divs (no extra line breaks)
16755 Paragraphs inside divs (extra line break on open)
16770 Paragraphs inside divs (extra line break on close)
16785 Paragraphs inside divs (extra line break on open and close)
16802 Nesting tags, paragraphs on lines which begin with <div>
16806 <div></div><strong>A
16815 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
16817 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
16819 <blockquote>Line one
16821 Line two</blockquote>
16823 <blockquote>Line one
16824 Line two</blockquote>
16829 Bug 6200: paragraphs inside blockquotes (extra line break on open)
16834 Line two</blockquote>
16839 Line two</blockquote>
16844 Bug 6200: paragraphs inside blockquotes (extra line break on close)
16846 <blockquote>Line one
16851 <blockquote>Line one
16859 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
16876 Paragraphs inside blockquotes/divs (no extra line breaks)
16878 <blockquote><div>Line one
16880 Line two</div></blockquote>
16882 <blockquote><div>Line one
16883 Line two</div></blockquote>
16888 Paragraphs inside blockquotes/divs (extra line break on open)
16893 Line two</div></blockquote>
16898 Line two</div></blockquote>
16903 Paragraphs inside blockquotes/divs (extra line break on close)
16905 <blockquote><div>Line one
16908 </div></blockquote>
16910 <blockquote><div>Line one
16913 </div></blockquote>
16918 Paragraphs inside blockquotes/divs (extra line break on open and close)
16924 </div></blockquote>
16930 </div></blockquote>
16935 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
16937 wgLinkHolderBatchSize=0
16943 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
16944 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
16945 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
16950 Free external link invading image caption
16952 [[Image:Foobar.jpg|thumb|http://x|hello]]
16954 <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>
16959 Bug 15196: localised external link numbers
16963 [http://en.wikipedia.org/]
16965 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
16968 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
16972 Multibyte character in padleft
16974 {{padleft:-Hello|7|Æ}}
16981 Multibyte character in padright
16983 {{padright:Hello-|7|Æ}}
16990 formatdate parser function
16992 {{#formatdate:2009-03-24}}
16994 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
16999 formatdate parser function, with default format
17001 {{#formatdate:2009-03-24|mdy}}
17003 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
17008 Spacing of numbers in formatted dates
17010 {{#formatdate:January 15}}
17012 <p><span class="mw-formatted-date" title="01-15">January 15</span>
17017 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
17019 language=nl title=[[MediaWiki:Common.css]]
17021 {{#formatdate:2009-03-24|dmy}}
17023 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
17036 Edit comment with link
17040 I like the [[Main Page]] a lot
17042 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
17046 Edit comment with link and link text
17050 I like the [[Main Page|best pages]] a lot
17052 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
17056 Edit comment with link and link text with suffix
17060 I like the [[Main Page|best page]]s a lot
17062 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
17066 Edit comment with section link (non-local, eg in history list)
17068 comment title=[[Main Page]]
17070 /* External links */ removed bogus entries
17072 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17076 Edit comment with section link and text before it (non-local, eg in history list)
17078 comment title=[[Main Page]]
17080 pre-comment text /* External links */ removed bogus entries
17082 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>
17086 Edit comment with section link (local, eg in diff view)
17088 comment local title=[[Main Page]]
17090 /* External links */ removed bogus entries
17092 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17096 Edit comment with subpage link (bug 14080)
17100 title=[[Subpage test]]
17102 Poked at a [[/subpage]] here...
17104 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
17108 Edit comment with subpage link and link text (bug 14080)
17112 title=[[Subpage test]]
17114 Poked at a [[/subpage|neat little page]] here...
17116 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
17120 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
17123 title=[[Subpage test]]
17125 Poked at a [[/subpage]] here...
17127 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
17131 Edit comment with bare anchor link (local, as on diff)
17135 title=[[Main Page]]
17139 <a href="#section">#section</a>
17143 Edit comment with bare anchor link (non-local, as on history)
17146 title=[[Main Page]]
17150 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
17154 Anchor starting with underscore
17158 <p><a href="#_ref">One</a>
17163 Id starting with underscore
17165 <div id="_ref"></div>
17167 <div id="_ref"></div>
17172 Space normalisation on autocomment (bug 22784)
17175 title=[[Main Page]]
17177 /* __hello__world__ */
17179 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
17183 percent-encoding and + signs in comments (Bug 26410)
17187 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
17189 <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>
17193 Bad images - basic functionality
17202 Bad images - bug 16039: text after bad image disappears
17216 Verify that displaytitle works (bug #22501) no displaytitle
17220 wgAllowDisplayTitle=true
17221 wgRestrictDisplayTitle=false
17223 this is not the the title
17226 <p>this is not the the title
17231 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
17236 wgAllowDisplayTitle=true
17237 wgRestrictDisplayTitle=false
17239 this is not the the title
17240 {{DISPLAYTITLE:whatever}}
17243 <p>this is not the the title
17248 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
17253 wgAllowDisplayTitle=true
17254 wgRestrictDisplayTitle=true
17256 this is not the the title
17257 {{DISPLAYTITLE:whatever}}
17260 <p>this is not the the title
17265 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
17270 wgAllowDisplayTitle=true
17271 wgRestrictDisplayTitle=true
17273 this is not the the title
17274 {{DISPLAYTITLE:screen}}
17277 <p>this is not the the title
17282 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
17287 wgAllowDisplayTitle=false
17289 this is not the the title
17290 {{DISPLAYTITLE:screen}}
17293 <p>this is not the the title
17294 <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>
17299 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
17304 wgAllowDisplayTitle=false
17306 this is not the the title
17309 <p>this is not the the title
17314 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
17319 wgAllowDisplayTitle=true
17320 wgRestrictDisplayTitle=true
17322 this is not the the title
17323 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
17325 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
17326 <p>this is not the the title
17331 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
17336 wgAllowDisplayTitle=true
17337 wgRestrictDisplayTitle=true
17339 this is not the the title
17340 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
17342 <span style="color: red;">s</span>creen
17343 <p>this is not the the title
17348 preload: check <noinclude> and <includeonly>
17352 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
17358 preload: check <onlyinclude>
17362 Goodbye <onlyinclude>Hello world</onlyinclude>
17368 preload: can pass tags through if we want to
17372 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
17374 <includeonly>Hello world</includeonly>
17378 preload: check that it doesn't try to do tricks
17382 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17384 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17388 Play a bit with r67090 and bug 3158
17392 <div style="width:50% !important"> </div>
17393 <div style="width:50% !important"> </div>
17394 <div style="width:50% !important"> </div>
17395 <div style="border : solid;"> </div>
17397 <div style="width:50% !important"> </div>
17398 <div style="width:50% !important"> </div>
17399 <div style="width:50% !important"> </div>
17400 <div style="border : solid;"> </div>
17405 HTML5 data attributes
17407 <span data-foo="bar">Baz</span>
17408 <p data-abc-def_hij="">Quuz</p>
17410 <p><span data-foo="bar">Baz</span>
17412 <p data-abc-def_hij="">Quuz</p>
17417 percent-encoding and + signs in internal links (Bug 26410)
17419 [[User:+%]] [[Page+title%]]
17420 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
17421 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
17422 [[%33%45]] [[%33%45+]]
17424 <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>
17425 <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>
17426 <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>
17427 <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>
17432 Special characters in embedded file links (bug 27679)
17434 [[File:Contains & ampersand.jpg]]
17435 [[File:Does not exist.jpg|Title with & ampersand]]
17437 <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>
17438 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
17444 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
17446 Text's been normalized?
17448 <p>Text's been normalized?
17453 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
17455 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
17457 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
17462 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
17464 [http://www.example.org/ ideograms]
17466 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
17471 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
17473 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
17475 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
17499 Bug 31098 Template which includes system messages which includes the template
17503 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17504 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17509 Bug31490 Turkish: ucfirst 'blah'
17520 Bug31490 Turkish: ucfirst 'ix'
17531 Bug31490 Turkish: lcfirst 'BLAH'
17542 Bug31490 Turkish: ucfırst (with a dotless i)
17548 <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>
17553 Bug31490 ucfırst (with a dotless i) with English language
17559 <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>
17564 Bug 26375: TOC with italics
17566 title=[[Main Page]]
17569 == ''Lost'' episodes ==
17571 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17573 <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>
17577 <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>
17582 Bug 26375: TOC with bold
17584 title=[[Main Page]]
17587 == '''should be bold''' then normal text ==
17589 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17591 <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>
17595 <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>
17600 Bug 33845: Headings become cursive in TOC when they contain an image
17602 title=[[Main Page]]
17605 == Image [[Image:foobar.jpg]] ==
17607 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17609 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
17613 <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>
17618 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
17620 title=[[Main Page]]
17623 == <blockquote>Quote</blockquote> ==
17625 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17627 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
17631 <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>
17636 Unclosed tags in TOC
17638 title=[[Main Page]]
17642 <small>Hanc marginis exiguitas non caperet.</small>
17645 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17647 <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>
17651 <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>
17652 <p><small>Hanc marginis exiguitas non caperet.</small>
17658 Multiple tags in TOC
17661 == <i>Foo</i> <b>Bar</b> ==
17663 == <i>Foo</i> <blockquote>Bar</blockquote> ==
17665 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17667 <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>
17668 <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>
17672 <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>
17673 <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>
17678 Tags with parameters in TOC
17681 == <sup class="in-h2">Hello</sup> ==
17683 == <sup class="a > b">Evilbye</sup> ==
17685 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17687 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
17688 <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>
17692 <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>
17693 <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>
17698 span tags with directionality in TOC
17701 == <span dir="ltr">C++</span> ==
17703 == <span dir="rtl">זבנג!</span> ==
17705 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
17707 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
17709 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
17711 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17713 <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>
17714 <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>
17715 <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>
17716 <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>
17717 <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>
17721 <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>
17722 <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>
17723 <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>
17724 <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>
17725 <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>
17732 == {{int:headline_sample}} ==
17736 Bug 32057: Title needed when expanding <h> nodes.
17738 title=[[Main Page]]
17742 <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>
17747 Strip marker in urlencode
17749 {{urlencode:x<nowiki/>y}}
17750 {{urlencode:x<nowiki/>y|wiki}}
17751 {{urlencode:x<nowiki/>y|path}}
17778 Strip marker in formatNum
17780 {{formatnum:1<nowiki/>2}}
17781 {{formatnum:1<nowiki/>2|R}}
17789 Check noCommafy in formatNum
17793 {{formatnum:123456.78}}
17794 {{formatnum:123456.78|NOSEP}}
17802 Wrong option for formatNum (bug 56199)
17804 {{formatnum:1,234.56|Random}}
17805 {{formatnum:1,234.56|EVERYTHING}}
17806 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
17815 Strip marker in grammar
17819 {{grammar:elative|foo<nowiki/>bar}}
17826 Strip marker in padleft
17828 {{padleft:|2|x<nowiki/>y}}
17835 Strip marker in padright
17837 {{padright:|2|x<nowiki/>y}}
17844 Strip marker in anchorencode
17846 {{anchorencode:x<nowiki/>y}}
17853 nowiki inside link inside heading (bug 18295)
17855 ==[[foo|x<nowiki>y</nowiki>z]]==
17857 <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>
17862 new support for bdi element (bug 31817)
17864 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17866 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17871 Ignore pipe between table row attributes
17875 |- id=foo | style='color: red'
17883 <tr id="foo" style="color: red">
17890 Gallery override link with WikiLink (bug 34852)
17893 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
17896 <ul class="gallery mw-gallery-traditional">
17897 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17898 <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>
17899 <div class="gallerytext">
17909 Gallery override link with absolute external link (bug 34852)
17912 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
17915 <ul class="gallery mw-gallery-traditional">
17916 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17917 <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>
17918 <div class="gallerytext">
17928 Gallery override link with malicious javascript (bug 34852)
17931 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
17934 <ul class="gallery mw-gallery-traditional">
17935 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17936 <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>
17937 <div class="gallerytext">
17947 Gallery with invalid title as link (bug 43964)
17950 File:foobar.jpg|link=<
17953 <ul class="gallery mw-gallery-traditional">
17954 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17955 <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>
17956 <div class="gallerytext">
17964 Language parser function
17973 Padleft and padright as substr
17975 {{padleft:|3|abcde}}
17976 {{padright:|3|abcde}}
17984 Special parser function
17986 {{#special:RandomPage}}
17987 {{#special:BaDtItLe}}
17988 {{#special:Foobar}}
17997 Bug 34939 - Case insensitive link parsing ([HttP://])
17999 [HttP://MediaWiki.Org/]
18001 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
18004 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
18008 Bug 34939 - Case insensitive link parsing ([HttP:// title])
18010 [HttP://MediaWiki.Org/ MediaWiki]
18012 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
18017 Bug 34939 - Case insensitive link parsing (HttP://)
18019 HttP://MediaWiki.Org/
18021 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
18024 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
18042 <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>
18043 <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>
18044 <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>
18045 <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>
18046 <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>
18052 ### Parsoids-specific tests
18053 ### Parsoid-PHP parser incompatibilities
18056 1. SOL-sensitive wikitext tokens as template-args
18058 parsoid=wt2html,wt2wt
18064 <span about="#mwt1" typeof="mw:Transclusion">
18065 </span><ul about="#mwt1"><li>a</li>
18067 <span about="#mwt2" typeof="mw:Transclusion">
18068 </span><ol about="#mwt2"><li>a</li>
18070 <span about="#mwt3" typeof="mw:Transclusion">
18071 </span><dl about="#mwt3"><dd>a</dd>
18075 #### ----------------------------------------------------------------
18076 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
18077 #### tags. Parsoid's output for these tags differs from that of the
18079 #### ----------------------------------------------------------------
18082 Ref: 1. ref-location should be replaced with an index span
18087 B <ref name="x">foo</ref>
18090 <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>
18091 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>
18092 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>
18096 Ref: 2. ref-tags with identical names should all get the same index
18100 A <ref name="x">foo</ref>
18103 <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>
18104 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>
18108 Ref: 3. spaces in ref-names should be ignored
18112 A <ref name="x">foo</ref>
18113 B <ref name=" x " />
18116 <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>
18117 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>
18118 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>
18122 Ref: 4. 'constructor' should be accepted as a valid ref-name
18123 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
18127 A <ref name="constructor">foo</ref>
18129 <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>
18133 Ref: 5. body should accept generic wikitext
18138 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
18143 <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>
18145 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
18146 <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>
18152 Ref: 6. indent-pres should not be output in ref-body
18164 <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>
18166 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
18167 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18175 Ref: 7. No p-wrapping in ref-body
18194 <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>
18196 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18197 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18212 Ref: 8. transclusion wikitext has lower precedence
18216 A <ref> foo {{echo|</ref> B C}}
18220 <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>
18221 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
18222 <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>
18227 Ref: 9. unclosed comments should not leak out of ref-body
18231 A <ref> foo <!--</ref> B C
18234 <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>
18235 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18236 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
18241 Ref: 10. Unclosed HTML tags should not leak out of ref-body
18245 A <ref> <b> foo </ref> B C
18249 <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>
18252 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18253 <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>
18258 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
18265 <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
18266 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>
18270 Ref: 12. ref-tags act as trailing newline migration barrier
18274 <!--the newline at the end of this line moves out of the p-tag-->a
18276 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
18281 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
18284 <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>
18285 <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>
18292 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
18300 <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
18301 <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>
18305 Ref: 14. A nested ref-tag should be emitted as plain text
18309 <ref>foo <ref>bar</ref> baz</ref>
18313 <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>
18315 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18316 <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>
18321 Ref: 15. ref-tags with identical names should get identical indexes
18325 A1 <ref name="a">foo</ref> A2 <ref name="a" />
18326 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
18330 <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>
18331 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>
18333 <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>
18337 ## We don't bother wt2wt-ing non-standard whitespace
18339 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
18347 <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>
18349 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18350 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
18354 References: 1. references tag without any refs should be handled properly
18360 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
18364 References: 2. references tag with group only outputs references from that group
18368 A <ref group="a">foo</ref>
18369 B <ref group="b">bar</ref>
18371 <references group="a" />
18373 <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>
18374 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>
18376 <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>
18381 References: 3. ref list should be cleared after processing references
18393 <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>
18395 <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>
18398 <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>
18400 <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>
18405 References: 4. only referenced group should be cleared after processing references
18409 A <ref group="a">afoo</ref>
18412 <references group="a" />
18418 <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>
18419 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>
18421 <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>
18424 <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>
18426 <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>
18431 References: 5. ref tags in references should be processed while ignoring all other content
18436 B <ref name="b">bar</ref>
18439 <ref name="a">foo</ref>
18440 This should just get lost.
18443 <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>
18444 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>
18447 <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":{}}'>
18448 <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>
18449 <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>
18454 References: 6. <references /> from a transclusion
18458 <ref>Foo</ref> {{echo|<references />}}
18460 <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>
18464 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
18468 A <ref>foo bar for a</ref>
18469 B <ref group="X" name="b" />
18473 <references group="X">
18474 <ref name="b">foo</ref>
18477 <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>
18478 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>
18480 <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>
18482 <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>
18486 Entities in ref name
18490 <ref name="test & me">hi</ref>
18492 <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>
18495 # This test is wt2html only because we're permitting the serializer to produce
18496 # dirty diffs, normalizing the unclosed references to the self-closed version.
18498 Generate references for unclosed references tag
18506 <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>
18509 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
18510 <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>
18514 New reference serializes on its own line
18516 parsoid=wt2wt,html2wt
18521 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
18524 #### ----------------------------------------------------------------
18525 #### The following section of tests are primarily to test
18526 #### wikitext escaping capabilities of Parsoid. Given that
18527 #### escaping can be done any number of ways, the wikitext (input)
18528 #### is always adjusted to reflect how Parsoid adds nowiki
18531 #### We are marking several tests as parsoid-only since the
18532 #### HTML in the result section is different from what the
18533 #### PHP parser generates for it.
18534 #### ----------------------------------------------------------------
18537 #### --------------- Headings ---------------
18539 #### 1. Nested inside html <h1>=foo=</h1>
18540 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
18541 #### 3. Nested inside html with wikitext split by html tags
18542 #### 4. No escape needed
18543 #### 5. Empty headings <h1></h1>
18544 #### 6. Heading chars in SOL context
18545 #### ----------------------------------------
18547 Headings: 0. Unnested
18551 <nowiki>=foo=</nowiki>
18553 <nowiki> =foo= </nowiki>
18555 <nowiki>=foo=</nowiki>
18557 =foo''a''<nowiki>=</nowiki>
18559 <p><span typeof="mw:Nowiki">=foo=</span></p>
18561 <p><span typeof="mw:Nowiki"> =foo= </span>
18563 <span typeof="mw:Nowiki">=foo=</span></p>
18565 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
18569 Headings: 1. Nested inside html
18570 (New headings and existing headings are handled differently)
18580 =<nowiki>=foo=</nowiki>=
18581 ==<nowiki>=foo=</nowiki>==
18582 ===<nowiki>=foo=</nowiki>===
18583 ====<nowiki>=foo=</nowiki>====
18584 =====<nowiki>=foo=</nowiki>=====
18585 ======<nowiki>=foo=</nowiki>======
18592 <h1 data-parsoid='{}'>=foo=</h1>
18593 <h2 data-parsoid='{}'>=foo=</h2>
18594 <h3 data-parsoid='{}'>=foo=</h3>
18595 <h4 data-parsoid='{}'>=foo=</h4>
18596 <h5 data-parsoid='{}'>=foo=</h5>
18597 <h6 data-parsoid='{}'>=foo=</h6>
18601 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
18606 <nowiki>*</nowiki>bar
18612 <nowiki>=bar=</nowiki>
18620 Headings: 3. Nested inside html with wikitext split by html tags
18624 = ='''bold'''<nowiki>foo=</nowiki> =
18626 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
18630 Headings: 4a. No escaping needed (testing just h1 and h2)
18648 = <nowiki>=</nowiki> =
18656 <h1><i>=</i>foo=</h1>
18657 <h1><span typeof="mw:Nowiki">=</span></h1>
18661 Headings: 4b. No escaping needed (inside p-tags)
18676 Headings: 5. Empty headings
18688 =====<nowiki/>=====
18690 ======<nowiki/>======
18701 Headings: 6a. Heading chars in SOL context (with trailing spaces)
18705 <nowiki>=a=</nowiki>
18707 <nowiki>=a=</nowiki>
18709 <nowiki>=a=</nowiki>
18711 <nowiki>=a=</nowiki>
18720 Headings: 6b. Heading chars in SOL context (with trailing newlines)
18748 Headings: 6c. Heading chars in SOL context (leading newline break)
18753 <nowiki>=b=</nowiki>
18760 Headings: 6d. Heading chars in SOL context (with interspersed comments)
18764 <!--c0--><nowiki>=a=</nowiki>
18766 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
18768 <p><!--c0-->=a=</p>
18769 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
18773 Headings: 6d. Heading chars in SOL context (No escaping needed)
18782 #### --------------- Lists ---------------
18783 #### 0. Outside nests (*foo, etc.)
18784 #### 1. Nested inside html <ul><li>*foo</li></ul>
18785 #### 2. Inside definition lists
18786 #### 3. Only bullets at start should be escaped
18787 #### 4. No escapes needed
18788 #### 5. No unnecessary escapes
18789 #### 6. Escape bullets in SOL position
18790 #### 7. Escape bullets in a multi-line context
18791 #### ----------------------------------------
18794 Lists: 0. Outside nests
18796 <nowiki>*</nowiki>foo
18798 <nowiki>#</nowiki>foo
18806 Lists: 1. Nested inside html
18808 *<nowiki>*foo</nowiki>
18810 *<nowiki>#foo</nowiki>
18812 *<nowiki>:foo</nowiki>
18814 *<nowiki>;foo</nowiki>
18816 #<nowiki>*foo</nowiki>
18818 #<nowiki>#foo</nowiki>
18820 #<nowiki>:foo</nowiki>
18822 #<nowiki>;foo</nowiki>
18860 Lists: 2. Inside definition lists
18862 ;<nowiki>;foo</nowiki>
18864 ;<nowiki>:foo</nowiki>
18866 ;<nowiki>:foo</nowiki>
18869 :<nowiki>:foo</nowiki>
18893 Lists: 3. Only bullets at start of text should be escaped
18895 *<nowiki>*foo*bar</nowiki>
18897 *<nowiki>*foo</nowiki>''it''*bar
18904 <li>*foo<i>it</i>*bar
18911 Lists: 4. No escapes needed
18932 <li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
18936 <li><a rel="mw:WikiLink" href="Foo">Foo</a>*bar
18942 Lists: 5. No unnecessary escapes
18944 * bar <span><nowiki>[[foo]]</nowiki></span>
18946 *=bar <span><nowiki>[[foo]]</nowiki></span>
18948 *[[bar <span><nowiki>[[foo]]</nowiki></span>
18950 *]]bar <span><nowiki>[[foo]]</nowiki></span>
18952 *=bar <span>foo]]</span>=
18957 <li> bar <span>[[foo]]</span>
18961 <li>=bar <span>[[foo]]</span>
18965 <li>[[bar <span>[[foo]]</span>
18969 <li>]]bar <span>[[foo]]</span>
18973 <li>=bar <span>foo]]</span>=
18984 Lists: 6. Escape bullets in SOL position
18988 <!--cmt--><nowiki>*foo</nowiki>
18990 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
18994 Lists: 7. Escape bullets in a multi-line context
18997 <nowiki>*</nowiki>b
19004 #### --------------- HRs ---------------
19005 #### 1. Single line
19006 #### -----------------------------------
19009 HRs: 1. Single line
19013 ----<nowiki>----</nowiki>
19017 <hr><span typeof="mw:Nowiki">----</span>
19022 #### --------------- Tables ---------------
19023 #### 1a. Simple example
19024 #### 1b. No escaping needed (!foo)
19025 #### 1c. No escaping needed (|foo)
19026 #### 1d. No escaping needed (|}foo)
19028 #### 2a. Nested in td (<td>foo|bar</td>)
19029 #### 2b. Nested in td (<td>foo||bar</td>)
19030 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
19032 #### 3a. Nested in th (<th>foo!bar</th>)
19033 #### 3b. Nested in th (<th>foo!!bar</th>)
19034 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
19038 #### 4c. No escaping needed
19039 #### --------------------------------------
19042 Tables: 1a. Simple example
19053 Tables: 1b. No escaping needed
19062 Tables: 1c. No escaping needed
19071 Tables: 1d. No escaping needed
19080 Tables: 2a. Nested in td
19085 |<nowiki>foo|bar</nowiki>
19087 |x<div><nowiki>a|b</nowiki></div>
19091 <td>foo|bar</td></tr>
19092 <tr><td>x<div>a|b</div></td>
19097 Tables: 2b. Nested in td
19102 |<nowiki>foo||bar</nowiki>
19103 |''it''<nowiki>foo||bar</nowiki>
19107 <td><span typeof="mw:Nowiki">foo||bar</span></td>
19108 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
19112 Tables: 2c. Nested in td -- no escaping needed
19120 <table><tbody><tr><td>foo!!bar
19121 </td></tr></tbody></table>
19126 Tables: 3a. Nested in th
19134 <table><tbody><tr><th>foo!bar
19135 </th></tr></tbody></table>
19140 Tables: 3b. Nested in th
19145 !<nowiki>foo!!bar</nowiki>
19149 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
19154 Tables: 3c. Nested in th -- no escaping needed
19159 !<nowiki>foo||bar</nowiki>
19163 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
19167 Tables: 4a. Escape -
19174 |<nowiki>-bar</nowiki>
19178 <tr><th>-bar</th></tr>
19180 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
19184 Tables: 4b. Escape +
19191 |<nowiki>+bar</nowiki>
19195 <tr><th>+bar</th></tr>
19197 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
19201 Tables: 4c. No escaping needed
19222 <tr><td>foo-bar</td><td>foo+bar</td></tr>
19223 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
19229 <div>a|b</div></td>
19234 Tables: 4d. No escaping needed
19245 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo">Foo</a>-bar</td>
19246 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
19247 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
19252 Tables: Digest broken attributes on table and tr tag
19268 #### --------------- Links ----------------
19269 #### 1. Quote marks in link text
19270 #### 2. Wikilinks: Escapes needed
19271 #### 3. Wikilinks: No escapes needed
19272 #### 4. Extlinks: Escapes needed
19273 #### 5. Extlinks: No escapes needed
19274 #### --------------------------------------
19276 Links 1. Quote marks in link text
19280 [[Foo|Foo<nowiki>''boo''</nowiki>]]
19282 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
19286 Links 2. WikiLinks: Escapes needed
19291 [[Foo|<nowiki>Foobar]</nowiki>]]
19292 [[Foo|x [Foobar] x]]
19293 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
19294 [[Foo|<nowiki>[[Bar]]</nowiki>]]
19295 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
19296 [[Foo|<nowiki>|Bar</nowiki>]]
19297 [[Foo|<nowiki>]]bar</nowiki>]]
19298 [[Foo|<nowiki>[[bar</nowiki>]]
19299 [[Foo|<nowiki>x [[ y</nowiki>]]
19300 [[Foo|<nowiki>x ]] y</nowiki>]]
19301 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
19303 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
19304 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
19305 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
19306 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
19307 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
19308 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
19309 <a href="Foo" rel="mw:WikiLink">|Bar</a>
19310 <a href="Foo" rel="mw:WikiLink">]]bar</a>
19311 <a href="Foo" rel="mw:WikiLink">[[bar</a>
19312 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
19313 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
19314 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
19318 Links 3. WikiLinks: No escapes needed
19325 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
19326 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
19330 Links 4. ExtLinks: Escapes needed
19334 [http://google.com <nowiki>[google]</nowiki>]
19335 [http://google.com <nowiki>google]</nowiki>]
19337 <nowiki>[http://google.com]</nowiki>
19339 <nowiki>[http://google.com google]</nowiki>
19342 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
19343 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
19344 <p>[http://google.com]</p>
19345 <p>[http://google.com google]</p>
19349 Links 5. ExtLinks: No escapes needed
19353 [http://google.com [google]
19355 <a href="http://google.com" rel="mw:ExtLink">[google</a>
19358 #### --------------- Quotes ---------------
19359 #### 1. Quotes inside <b> and <i>
19360 #### 2. Link fragments separated by <i> and <b> tags
19361 #### 3. Link fragments inside <i> and <b>
19362 #### 4. No escaping needed
19363 #### --------------------------------------
19365 1. Quotes inside <b> and <i>
19367 parsoid=html2wt,wt2wt
19369 ''<nowiki>'foo'</nowiki>''
19370 ''<nowiki>''foo''</nowiki>''
19371 ''<nowiki>'''foo'''</nowiki>''
19373 '''<nowiki>'foo'</nowiki>'''
19374 '''<nowiki>''foo''</nowiki>'''
19375 '''<nowiki>'''foo'''</nowiki>'''
19376 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
19377 '''foo'''<nowiki/>'s
19380 '<nowiki/>''foo''<nowiki/>'
19382 '''foo'''<nowiki/>'
19383 '<nowiki/>'''foo'''<nowiki/>'
19384 ''fools'<span> errand</span>''
19385 ''<span>fool</span>'s errand''
19394 <b>foo'<i>bar'</i>baz</b>
19402 <i>fools'<span> errand</span></i>
19403 <i><span>fool</span>'s errand</i>
19407 2. Link fragments separated by <i> and <b> tags
19409 [[''foo''<nowiki>hello]]</nowiki>
19411 [['''foo'''<nowiki>hello]]</nowiki>
19413 <p>[[<i>foo</i>hello]]
19414 </p><p>[[<b>foo</b>hello]]
19419 3. Link fragments inside <i> and <b>
19420 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
19421 this is one of the shortcomings of this format)
19423 ''[[foo''<nowiki>]]</nowiki>
19425 '''[[foo'''<nowiki>]]</nowiki>
19428 </p><p><b>[[foo</b>]]
19433 4. No escaping needed
19435 '<span>''bar''</span>'
19436 '<span>'''bar'''</span>'
19438 <p>'<span><i>bar</i></span>'
19439 '<span><b>bar</b></span>'
19443 #### ----------- Paragraphs ---------------
19444 #### 1. No unnecessary escapes
19445 #### --------------------------------------
19448 1. No unnecessary escapes
19450 bar <span><nowiki>[[foo]]</nowiki></span>
19452 =bar <span><nowiki>[[foo]]</nowiki></span>
19454 [[bar <span><nowiki>[[foo]]</nowiki></span>
19456 ]]bar <span><nowiki>[[foo]]</nowiki></span>
19458 =bar <span>foo]]</span><nowiki>=</nowiki>
19460 <p>bar <span>[[foo]]</span>
19461 </p><p>=bar <span>[[foo]]</span>
19462 </p><p>[[bar <span>[[foo]]</span>
19463 </p><p>]]bar <span>[[foo]]</span>
19464 </p><p>=bar <span>foo]]</span>=
19468 #### ----------------------- PRE --------------------------
19469 #### 1. Leading whitespace in SOL context should be escaped
19470 #### ------------------------------------------------------
19472 1. Leading whitespace in SOL context should be escaped
19476 <nowiki> </nowiki>a
19478 <nowiki> </nowiki> a
19480 <nowiki> </nowiki>a(tab)
19482 <nowiki> </nowiki> a
19484 <nowiki> </nowiki> a
19487 <nowiki> </nowiki>b
19490 <nowiki> </nowiki>b
19493 <nowiki> </nowiki> b
19499 <p><!--cmt--> a</p>
19508 #### --------------- Behavior Switches --------------------
19510 1. Valid behavior switches should be escaped
19514 <nowiki>__TOC__</nowiki>
19520 2. Invalid behavior switches should not be escaped
19531 #### --------------- HTML tags ---------------
19534 #### 3. multi-line html tag
19535 #### 4. extension tags
19536 #### -----------------------------------------
19542 <a href="http://google.com">google</a>
19544 <a href="http://google.com">google</a>
19550 <nowiki><div>foo</div>
19551 <div style="color:red">foo</div></nowiki>
19553 <p><div>foo</div>
19554 <div style="color:red">foo</div>
19559 3. multi-line html tag
19574 <nowiki><ref>foo</ref></nowiki>
19576 <nowiki><ref>bar</nowiki>
19578 baz<nowiki></ref></nowiki>
19580 <p><ref>foo</ref>
19581 </p><p><ref>bar
19582 </p><p>baz</ref>
19586 #### --------------- Others ---------------
19590 <nowiki>foo</nowiki>
19592 <p><nowiki>foo</nowiki>
19596 ## The quote-char in the input is necessary for triggering the bug
19598 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
19600 parsoid=wt2wt,html2wt
19609 Tag-like HTML structures are passed through as text
19631 </p><p>1<d e>f
19636 # This was a bug in the PHP parser (see bug 17663 and its dups,
19637 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
19639 Tag names followed by punctuation should not be recognized as tags
19643 <p><s.ome> text
19648 HTML tag with necessary entities in attributes
19650 <span title="&amp;">foo</span>
19652 <p><span title="&amp;">foo</span>
19657 HTML tag with 'unnecessary' entity encoding in attributes
19659 <span title="&">foo</span>
19661 <p><span title="&">foo</span>
19666 HTML tag with broken attribute value quoting
19668 <span title="Hello world>Foo</span>
19670 <p><span>Foo</span>
19675 Parsoid-only: HTML tag with broken attribute value quoting
19679 <span title="Hello world>Foo</span>
19681 <p><span title="Hello world">Foo</span>
19686 Table with broken attribute value quoting
19689 | title="Hello world|Foo
19700 Table with broken attribute value quoting on consecutive lines
19703 | title="Hello world|Foo
19704 | style="color:red|Bar
19717 Parsoid-only: Table with broken attribute value quoting on consecutive lines
19722 | title="Hello world|Foo
19723 | style="color:red|Bar
19728 <td title="Hello world">Foo
19729 </td><td style="color: red">Bar
19730 </td></tr></tbody></table>
19735 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19745 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19755 Accept empty td cell attribute
19758 | align="center" | foo || |
19763 <td align="center"> foo </td>
19770 Non-empty attributes in th-cells
19773 ! Foo !! style="color: red" | Bar
19779 <th style="color: red"> Bar
19785 Accept empty attributes in th-cells
19800 Empty table rows go away
19821 ### Parsoid-centric tests for testing RTing of inter-element separators
19822 ### Edge cases not tested by existing parser tests and specific to
19823 ### Parsoid-specific serialization strategies.
19827 RT-ed inter-element separators should be valid separators
19840 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
19841 (Parsoid-only since PHP parser relies on Tidy for correct output)
19857 Empty TD followed by TD with tpl-generated attribute
19862 |{{echo|style='color:red'}}|foo
19876 Indented table with an empty td
19895 Empty TR followed by a template-generated TR
19896 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
19902 {{echo|<tr><td>foo</td></tr>}}
19908 <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}}]}'>
19913 ## PHP and parsoid output differ for this, and since this is primarily
19914 ## for testing Parsoid's serializer, marking this Parsoid only
19916 Empty TR followed by mixed-ws-comment line should RT correctly
19932 <!--c--> </tr><!--d-->
19938 Multi-line image caption generated by templates with/without trailing newlines
19942 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
19943 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
19945 <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>
19946 <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>
19951 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
19955 <includeonly>foo</includeonly>
19962 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
19964 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
19967 ## PHP emits broken html for this, and since this is primarily
19968 ## a Parsoid serializer test, marking this Parsoid only
19970 Improperly nested inline or quotes tags with whitespace in between
19974 <span> <s>x</span> </s>
19977 <p><span> <s>x</s></span><s> </s>
19978 <b> <i>x</i></b><i> </i>
19983 Encapsulate protected attributes from wt
19987 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
19989 <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>
19993 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
19994 ## Having nested or stray pre tags results in the attempt to add duplicates,
19995 ## causing an assertion fail. This test tries to prevent that situation.
19997 Ensure ParagraphWrapper can deal with stray closing pre tags
20007 1. Ensure fostered text content is wrapped in spans
20011 <table>hi</table><table>ho</table>
20020 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
20022 parsoid=wt2html,wt2wt
20029 <span> || ||</span>
20038 Encapsulation properly handles null DSR information from foster box
20040 parsoid=wt2html,wt2wt
20042 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
20044 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20047 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
20051 <td>bar</td></tr></tbody></table>
20055 1. Encapsulate foster-parented transclusion content
20057 parsoid=wt2wt,wt2html
20059 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
20061 <span typeof="mw:Transclusion" data-mw="{"parts":["
20062 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
20064 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
20068 <td>bar</td></tr></tbody></table>
20072 2. Encapsulate foster-parented transclusion content
20074 parsoid=wt2wt,wt2html
20076 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
20078 <div typeof="mw:Transclusion" data-mw="{"parts":["
20080 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
20082 <td>bar</td></tr></table>"]}">foo</div>
20086 <td>bar</td></tr></tbody></table>
20090 3. Encapsulate foster-parented transclusion content
20092 parsoid=wt2wt,wt2html
20094 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20096 <div typeof="mw:Transclusion" data-mw="{"parts":["
20099 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20101 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20106 <td>bar</td></tr></tbody></table>
20110 4. Encapsulate foster-parented transclusion content
20112 parsoid=wt2wt,wt2html
20114 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
20116 <div typeof="mw:Transclusion" data-mw="{"parts":["
20119 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
20121 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20126 <td>bar</td></tr></tbody></table>
20130 5. Encapsulate foster-parented transclusion content
20132 parsoid=wt2wt,wt2html
20134 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
20136 <span typeof="mw:Transclusion" data-mw="{"parts":["
20141 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
20147 <p>foo</p></div></td></tr></tbody></table>
20151 6. Encapsulate foster-parented transclusion content
20153 parsoid=wt2wt,wt2html
20155 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
20157 <span typeof="mw:Transclusion" data-mw="{"parts":["
20162 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
20168 <p>foo</p></div></td></tr></tbody></table>
20173 7. Encapsulate foster-parented transclusion content
20175 parsoid=wt2wt,wt2html
20177 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
20179 <p typeof="mw:Transclusion" data-mw="{"parts":["
20180 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20181 <p>foo</p>"}},"i":0}},"
20182 <td>bar</td></table>"]}">foo</p>
20186 <td>bar</td></tr></tbody></table>
20190 8. Encapsulate foster-parented transclusion content
20192 parsoid=wt2wt,wt2html
20195 }}{|{{echo|style='color:red'}}
20200 <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>
20204 <td>b</td></tr></tbody></table>
20208 9. Encapsulate foster-parented transclusion content
20210 parsoid=wt2wt,wt2html
20212 <table>{{echo|hi</table>hello}}
20214 <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>
20215 <table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2" data-parsoid="{}">hello</span>
20219 Table in fosterable position
20221 parsoid=wt2html,wt2wt
20230 <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="{}">
20232 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
20239 Support <object> element with .data attribute
20243 <object data="test.swf"></object>
20245 <object data="test.swf"></object>
20248 # -----------------------------------------------------------------
20249 # The following section of tests are primarily to spec requirements
20250 # around serialization of new/edited content.
20252 # All these tests are marked Parsoid html2wt and html2html only
20253 # ----------------------------------------------------------------
20256 Image: Modifying size of an image (1)
20259 "modes": ["wt2wt"],
20261 ["img[height]", "attr", "height", "22"],
20262 ["img[width]", "attr", "width", "200"]
20266 [[Image:Foobar.jpg|230x230px]]
20268 [[Image:Foobar.jpg|200x200px]]
20272 Image: Modifying size of an image (2)
20275 "modes": ["wt2wt"],
20277 ["img[height]", "attr", "height", "100"],
20278 ["img[width]", "attr", "width", "500"]
20282 [[Image:Foobar.jpg|230x230px]]
20284 [[Image:Foobar.jpg|500x500px]]
20287 # Change in size is ignored so long as class='mw-default-size'
20289 Image: Modifying size of an image (3)
20292 "modes": ["wt2wt"],
20294 ["figure[class]", "removeClass", "mw-default-size"],
20295 ["figure img", "attr", "height", "19"],
20296 ["figure img", "attr", "width", "170"]
20300 [[Image:Foobar.jpg|thumb]]
20302 [[Image:Foobar.jpg|thumb|170x170px]]
20306 Image: Modifying alignment of an image (bug 48665)
20309 "modes": ["wt2wt"],
20311 ["figure[class]", "removeClass", "mw-halign-right"],
20312 ["figure[class]", "addClass", "mw-halign-left"]
20316 [[Image:Foobar.jpg|thumb|caption|right]]
20318 [[Image:Foobar.jpg|thumb|caption|left]]
20322 Image: Modifying mw-default-size of an frameless image (bug 62805)
20325 "modes": ["wt2wt"],
20327 ["figure.mw-default-size", "removeClass", "mw-default-size"]
20331 [[Image:Foobar.jpg|frameless|right]]
20333 [[Image:Foobar.jpg|frameless|right|220x220px]]
20337 Image: Modifying valign of an image (bug 49221)
20340 "modes": ["wt2wt"],
20342 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
20343 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
20347 [[File:Foobar.jpg|20px|middle]]
20349 [[File:Foobar.jpg|20px|text-top]]
20353 Image: Modifying alt attribute of an image (bug 56400)
20356 "modes": ["wt2wt"],
20358 ["img[alt]", "attr", "alt", "some alternate edited text"]
20362 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
20364 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
20368 Image: Modifying caption of an image
20371 "modes": ["wt2wt"],
20373 ["figcaption", "text", "new caption"]
20377 [[Image:Foobar.jpg|thumb|original caption]]
20379 [[Image:Foobar.jpg|thumb|new caption]]
20383 Image: empty alt attribute (bug 48924)
20387 [[File:Foobar.jpg|thumb|alt=|bar]]
20389 <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>
20393 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
20398 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
20400 #<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>
20404 Image: Block level image should have \n before and after
20409 [[File:Foobar.jpg|right|thumb|150x150px]]
20412 <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>
20416 Image: New block level image should have \n before and after (existing
20422 [[File:Foobar.jpg|right|thumb|150x150px]]
20425 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
20426 <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>
20427 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
20431 Image: upright option (parsoid)
20435 [[File:Foobar.jpg|thumb|upright|caption]]
20436 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
20437 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
20439 <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>
20443 Image: upright option is ignored on inline and frame images (parsoid)
20447 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
20449 <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>
20453 Image: from basic HTML (1)
20457 <span typeof="mw:Image">
20458 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20461 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20465 Image: from basic HTML (2)
20469 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20471 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20475 Image: from basic HTML (3)
20479 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
20481 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
20485 Image: from basic HTML (4)
20489 <img src="File:Foobar.jpg">
20491 [[File:Foobar.jpg|link=]]
20495 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
20502 <li><p>foo</p></li>
20507 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
20513 <ul> <li>foo</li></ul>
20517 Don't strip leading whitespace when handling indent-pre suppressing tags
20525 '''This is very bold of you!'''
20529 indented cell (no pre-wrapping!)
20536 <tr><td> indented row</td></tr>
20539 <b>This is very bold of you!</b>
20542 indented cell (no pre-wrapping!)
20550 Strip leading whitespace when handling indent-pre inducing tags
20582 Lists: Add space after bullets
20588 * <span> baz</span>
20593 <li><span> baz</span></li>
20598 Lists: Dont insert newlines in a serialized list item.
20605 <ul><li>a<br>b</li><li>c</li></ul>
20609 Headings: Add space before/after == (Bug 51744)
20619 == <span> baz</span> ==
20624 <h2><span> baz</span></h2>
20628 Parsoid: Serialize positional parameters with = in them as named parameter
20634 {{echo|1 = f=oo|2 = bar}}
20636 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20637 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20638 {{echo|<nowiki>f=oo</nowiki>|bar}}
20640 <p about="#mwt1" typeof="mw:Transclusion"
20641 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
20643 <p about="#mwt1" typeof="mw:Transclusion"
20644 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
20646 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20647 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20648 <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>
20652 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
20668 <div>a<p>b</p></div>
20677 Substrings resembling wikitext in hrefs should not get nowiki escapes
20683 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
20686 #-----------------------------
20687 # I/B quote minimization tests
20688 #-----------------------------
20691 1. I/B quote minimization: wikitext-only tags should be combined
20711 <p><i>A</i><i>B</i></p>
20712 <p><b>A</b><b>B</b></p>
20713 <p><i>A</i><b><i>B</i></b></p>
20714 <p><b>A</b><i><b>B</b></i></p>
20715 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
20716 <p><i><b>A</b></i><i><b>B</b></i></p>
20717 <p><i><b>A</b></i><b><i>B</i></b></p>
20718 <p><b><i>A</i></b><i><b>B</b></i></p>
20722 2. I/B quote minimization: wikitext and html tags should not be combined
20728 ''A'''''<i>B</i>'''
20730 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
20731 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
20735 3. I/B quote minimization: templated content stops minimization
20739 ''A''{{echo|''B''}}
20741 ''A''{{echo|'''''B'''''}}
20743 <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>
20744 <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>
20748 4. I/B quote minimization: new content should be mimimized with adjacent old content
20758 <p><i>A</i><i data-parsoid='{}'>B</i></p>
20759 <p><b data-parsoid='{}'>A</b><b>B</b></p>
20760 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
20763 #------------------------------------
20764 # End of I/B quote minimization tests
20765 #------------------------------------
20768 Bug 54262: New entities
20774 <span typeof="mw:Entity"> </span>
20777 ## Note that there is no wikitext output for 'unknownproperty' ##
20778 ## Unknown magic words are silently dropped ##
20793 __NOCONTENTCONVERT__
20795 <meta property='mw:PageProp/toc' />
20796 <meta property='mw:PageProp/notoc' />
20797 <meta property='mw:PageProp/forcetoc' />
20798 <meta property='mw:PageProp/index' />
20799 <meta property='mw:PageProp/noindex' />
20800 <meta property='mw:PageProp/nogallery' />
20801 <meta property='mw:PageProp/noeditsection' />
20802 <meta property='mw:PageProp/notitleconvert' />
20803 <meta property='mw:PageProp/nocontentconvert' />
20804 <meta property='mw:PageProp/unknownproperty' />
20808 Consecutive <pre>s should not get merged
20810 parsoid=html2wt,html2html
20826 <pre>a</pre><pre>b</pre>
20840 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
20844 [[Special:BookSources/1234567890|ISBN 1234567895]]
20846 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
20850 Edited RFC links not serializable as RFC links should serialize as extlinks
20854 [//tools.ietf.org/html/rfc123 New RFC]
20856 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
20860 Edited PMID links not serializable as PMID links should serialize as extlinks
20864 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
20866 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
20870 Edited Redirect link should emit a non-piped wikitext link
20876 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
20879 # -----------------------------------------------------------------
20880 # End of section for Parsoid-only html2wt tests for serialization
20882 # -----------------------------------------------------------------
20889 Try for 100% code coverage