1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well formdness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-specific options (not run by PHP parser unless
25 # the test includes an html/php section)
26 # php php-only test (not run by the parsoid parser unless
27 # the test includes an html/parsoid section)
28 # showtitle make the first line the title
29 # comment run through Linker::formatComment() instead of main parser
30 # local format section links in edit comment text as local links
31 # notoc disable table of contents
32 # thumbsize=NNN set the default thumb size to NNNpx for this test
34 # You can also set the following parser properties via test options:
35 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
36 # wgLinkHolderBatchSize, wgRawHtml
38 # For testing purposes, temporary articles can created:
39 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
40 # where '/' denotes a newline.
42 # This is the standard article assumed to exist.
67 MediaWiki:bad image list
69 * [[File:Bad.jpg]] except [[Nasty page]]
103 Template:echo_with_span
109 Template:echo_with_div
121 Template:table_attribs
124 |</noinclude>style="color: red"| Foo
130 {{table_attribs}} || Bar || Baz
134 Template:image_attribs
137 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
171 This is a simple paragraph.
173 <p>This is a simple paragraph.
178 Paragraphs with extra newline spacing
201 Paragraphs with newline spacing with comment lines in between
209 <!--foo--><!--More than 1 comment, still stripped-->
213 <!--foo--> <!----> <!-- bar -->
274 Paragraphs with newline spacing with non-empty white-space lines in between
301 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
309 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
348 Extra newlines: More paragraphs with indented comment
363 Extra newlines followed by heading
378 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
379 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
382 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
387 Extra newlines between heading and content are swallowed
395 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
396 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
403 http://fr.wikipedia.org/wiki/🍺
404 <!-- EasterEgg we love beer, better be able be able to link to it -->
406 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
417 <li> Item 2</li></ul>
425 * plain''italic''plain
426 * plain''italic''plain''italic''plain
427 * plain'''bold'''plain
428 * plain'''bold'''plain'''bold'''plain
429 * plain''italic''plain'''bold'''plain
430 * plain'''bold'''plain''italic''plain
431 * plain''italic'''bold-italic'''italic''plain
432 * plain'''bold''bold-italic''bold'''plain
433 * plain'''''bold-italic'''italic''plain
434 * plain'''''bold-italic''bold'''plain
435 * plain''italic'''bold-italic'''''plain
436 * plain'''bold''bold-italic'''''plain
437 * plain l'''italic''plain
438 * plain l''''bold''' plain
441 <li> plain<i>italic</i>plain</li>
442 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
443 <li> plain<b>bold</b>plain</li>
444 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
445 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
446 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
447 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
448 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
449 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
450 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
451 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
452 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
453 <li> plain l'<i>italic</i>plain</li>
454 <li> plain l'<b>bold</b> plain</li></ul>
458 # this example taken from the [[simple:Moon]] article (bug 47326)
460 Italics and possessives (1)
462 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
464 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
468 # this example taken from [[en:Flaming Pie]] (bug 49926)
470 Italics and possessives (2)
472 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
474 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
478 # this example taken from [[en:Dictionary]] (bug 49926)
480 Italics and possessives (3)
482 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
484 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
490 ### 2-quote opening sequence tests
493 Italics and bold: 2-quote opening sequence: (2,2)
503 Italics and bold: 2-quote opening sequence: (2,3)
514 # same html as previous, but wikitext adjusted to match parsoid html2wt
516 Italics and bold: 2-quote opening sequence: (2,3) w/ nowiki
518 ''<nowiki>foo'</nowiki>''
526 Italics and bold: 2-quote opening sequence: (2,4)
537 # same html as previous, but wikitext adjusted to match parsoid html2wt
539 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
541 ''<nowiki>foo''</nowiki>''
548 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
550 Italics and bold: 2-quote opening sequence: (2,5)
563 # same html as previous, but wikitext adjusted to match parsoid html2wt
565 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
567 ''foo'''''<nowiki/>'''
578 ### 3-quote opening sequence tests
582 Italics and bold: 3-quote opening sequence: (3,2)
592 Italics and bold: 3-quote opening sequence: (3,3)
602 Italics and bold: 3-quote opening sequence: (3,4)
613 # same html as previous, but wikitext adjusted to match parsoid html2wt
615 Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki
617 '''<nowiki>foo'</nowiki>'''
624 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
626 Italics and bold: 3-quote opening sequence: (3,5)
639 # same html as previous, but wikitext adjusted to match parsoid html2wt
641 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
643 '''foo'''''<nowiki/>''
654 ### 4-quote opening sequence tests
658 Italics and bold: 4-quote opening sequence: (4,2)
669 # same html as previous, but wikitext adjusted to match parsoid html2wt
671 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
673 <nowiki>''</nowiki>''foo''
681 Italics and bold: 4-quote opening sequence: (4,3)
691 Italics and bold: 4-quote opening sequence: (4,4)
702 # same html as previous, but wikitext adjusted to match parsoid html2wt
704 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
706 ''''<nowiki>foo'</nowiki>'''
713 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
715 Italics and bold: 4-quote opening sequence: (4,5)
724 <p>'<b>foo</b><i></i>
728 # same html as previous, but wikitext adjusted to match parsoid html2wt
730 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
732 ''''foo'''''<nowiki/>''
737 <p>'<b>foo</b><i></i>
743 ### 5-quote opening sequence tests
747 Italics and bold: 5-quote opening sequence: (5,2)
758 # same html as previous, but wikitext adjusted to match parsoid html2wt
759 # skipping wt2html and html2html because it wants to put <i> before <b>
761 Italics and bold: 5-quote opening sequence: (5,2+3)
763 parsoid=wt2wt,html2wt
772 Italics and bold: 5-quote opening sequence: (5,3)
783 # same html as previous, but wikitext adjusted to match parsoid html2wt
785 Italics and bold: 5-quote opening sequence: (5,3+2)
795 Italics and bold: 5-quote opening sequence: (5,4)
801 <p><i><b>foo'</b></i>
806 # same html as previous, but wikitext adjusted to match parsoid html2wt
808 Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki
810 '''''<nowiki>foo'</nowiki>'''''
812 <p><i><b>foo'</b></i>
818 Italics and bold: 5-quote opening sequence: (5,5)
827 ### multiple quote sequences in a line
830 Italics and bold: multiple quote sequences: (2,4,2)
836 <p><i>foo'<b>bar</b></i>
841 # same html as previous, but wikitext adjusted to match parsoid html2wt
843 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
845 ''<nowiki>foo'</nowiki>'''bar'''''
847 <p><i>foo'<b>bar</b></i>
853 Italics and bold: multiple quote sequences: (2,4,3)
859 <p><i>foo'<b>bar</b></i>
864 # same html as previous, but wikitext adjusted to match parsoid html2wt
866 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
868 ''<nowiki>foo'</nowiki>'''bar'''''
870 <p><i>foo'<b>bar</b></i>
876 Italics and bold: multiple quote sequences: (2,4,4)
882 <p><i>foo'<b>bar'</b></i>
887 # same html as previous, but wikitext adjusted to match parsoid html2wt
889 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
891 ''<nowiki>foo'</nowiki>'''<nowiki>bar'</nowiki>'''''
893 <p><i>foo'<b>bar'</b></i>
898 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
900 Italics and bold: multiple quote sequences: (3,4,2)
909 <p><b>foo'</b>bar<i></i>
913 # same html as previous, but wikitext adjusted to match parsoid html2wt
915 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
919 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
924 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
929 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
931 Italics and bold: multiple quote sequences: (3,4,3)
940 <p><b>foo'</b>bar<b></b>
944 # same html as previous, but wikitext adjusted to match parsoid html2wt
946 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
948 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
953 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
958 ### other quote tests
961 Italics and bold: other quote tests: (2,3,5)
963 ''this is about '''foo's family'''''
965 <p><i>this is about <b>foo's family</b></i>
971 Italics and bold: other quote tests: (2,(3,3),2)
973 ''this is about '''foo's''' family''
975 <p><i>this is about <b>foo's</b> family</i>
981 Italics and bold: other quote tests: (3,2,3,2)
985 '''this is about ''foo'''s family''
987 <p><b>this is about <i>foo</i></b><i>s family</i>
992 # same html as previous, but wikitext adjusted to match parsoid html2wt
993 # add 'parsoid' option to use 'parsoid' normalization of the placeholder
995 Italics and bold: other quote tests: (3,2,3+2+2,2)
999 '''this is about ''foo'''''<nowiki/>''s family''
1001 <p><b>this is about <i>foo</i></b><i>s family</i>
1007 Italics and bold: other quote tests: (3,2,3,3)
1010 '''this is about ''foo'''s family'''
1012 <p>'<i>this is about </i>foo<b>s family</b>
1018 Italics and bold: other quote tests: (3,(2,2),3)
1020 '''this is about ''foo's'' family'''
1022 <p><b>this is about <i>foo's</i> family</b>
1028 Italicized possessive
1030 The ''[[Main Page]]'''s talk page.
1032 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1037 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1038 (Requires tidy for PHP parser output to be fixed up)
1040 parsoid=wt2html,wt2wt
1048 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1049 <td><i>a</i></td><td><i>b</i></td></tr>
1058 Non-html5 tags should be accepted
1060 <center>''foo''</center>
1062 <font>''foo''</font>
1063 <strike>''foo''</strike>
1066 <center><i>foo</i></center>
1067 <p><big><i>foo</i></big>
1068 <font><i>foo</i></font>
1069 <strike><i>foo</i></strike>
1075 <wbr> is valid wikitext (bug 52468)
1083 # <strike> is HTML4, <s> is HTML4/5.
1085 <s> or <strike> for strikethrough
1087 <strike>strike</strike>
1091 <p><strike>strike</strike>
1097 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1099 <b→> doesn't work! </b→>
1101 <bä> doesn't work! </bä>
1103 <boo> works fine </boo>
1105 <s.foo>s.foo</s.foo>
1109 <p><b→> doesn't work! </b→>
1110 </p><p><bä> doesn't work! </bä>
1111 </p><p><boo> works fine </boo>
1112 </p><p><s.foo>s.foo</s.foo>
1113 </p><p><sub-ID#1>
1118 Isolated close tags should be treated as literal text (bug 52760)
1125 </p><p><s.foo>s</s>
1130 ### Special characters
1134 Bare pipe character (bug 52363)
1143 Bare pipe character from a template (bug 52363)
1152 ### <nowiki> test cases
1156 <nowiki> unordered list
1158 <nowiki>* This is not an unordered list item.</nowiki>
1160 <p>* This is not an unordered list item.
1167 <nowiki>Lorem ipsum dolor
1175 <p>Lorem ipsum dolor
1188 :There is not nowiki.
1189 :There is <nowiki>nowiki</nowiki>.
1191 #There is not nowiki.
1192 #There is <nowiki>nowiki</nowiki>.
1194 *There is not nowiki.
1195 *There is <nowiki>nowiki</nowiki>.
1197 <dl><dd>There is not nowiki.</dd>
1198 <dd>There is nowiki.</dd></dl>
1199 <ol><li>There is not nowiki.</li>
1200 <li>There is nowiki.</li></ol>
1201 <ul><li>There is not nowiki.</li>
1202 <li>There is nowiki.</li></ul>
1207 Entities inside <nowiki>
1209 <nowiki><</nowiki>
1216 Entities inside template parameters
1222 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span>
1230 Comments and Indent-Pre
1232 <!-- comment 1 --> asdf
1234 <!-- comment 1 --> asdf
1237 <!-- comment 1 --> asdf
1238 <!-- comment 2 -->xyz
1240 <!-- comment 1 --> asdf
1241 <!-- comment 2 --> xyz
1297 asdf<!-- comment 1 -->jkl
1307 <!-- foo --> b <!-- bar -->
1321 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1327 Comment semantics and delimiters
1329 <!-- --><!----><!-----><!------>
1335 Comment semantics and delimiters, redux
1337 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1338 -- foo -- funky huh? ... -->
1344 Comment semantics and delimiters: directors cut
1346 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1347 everything starting with < followed by !-- until the first -- and > we see,
1348 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1356 Comment semantics: nesting
1358 <!--<!-- no, we're not going to do anything fancy here -->-->
1365 Comment semantics: unclosed comment at end
1367 <!--This comment will run out to the end of the document
1373 Comment in template title
1382 Comment on its own line post-expand
1394 Comment on its own line post-expand with non-significant whitespace
1406 Multiple comments should still parse as SOL-transparent
1408 parsoid=wt2html,wt2wt
1411 <!--c2--><!--c3--><!--c4-->*b
1422 ### paragraph wrapping tests
1437 Block tag on one line (<div>)
1449 Block tag on one line (<blockquote>)
1451 a <blockquote>foo</blockquote>
1455 a <blockquote>foo</blockquote>
1461 Block tag on both lines (<div>)
1473 Block tag on both lines (<blockquote>)
1475 a <blockquote>foo</blockquote>
1477 b <blockquote>foo</blockquote>
1479 a <blockquote>foo</blockquote>
1480 b <blockquote>foo</blockquote>
1485 Multiple lines without block tags
1503 Empty lines between lines with block tags
1532 ## PHP parser emits output which is broken
1534 Unclosed HTML p-tags should be handled properly
1541 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1547 ### Preformatted text
1556 And a [[Main Page|link]]
1562 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1567 Tabs don't trigger preformatted text
1571 This is preformatted text.
1577 <pre>This is preformatted text.
1583 Ident preformatting with inline content
1594 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1611 Regression with preformatted in <center>
1625 Bug 52763: Preformatted in <blockquote>
1631 indented cell (no pre-wrapping!)
1641 <p> indented cell (no pre-wrapping!)
1649 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1666 Bug 15491: <ins>/<del> in blockquote
1669 Foo <del>bar</del> <ins>baz</ins> quux
1673 <p>Foo <del>bar</del> <ins>baz</ins> quux
1679 # Note that the p-wrapping is newline sensitive, which could be
1680 # considered a bug: tidy will wrap only the 'Foo' in the example
1681 # below in a <p> tag. (see comment 23-25 of bug #6200)
1683 Bug 15491: <ins>/<del> in blockquote (2)
1685 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1688 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1694 <pre> with attributes (bug 3202)
1696 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1698 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1703 <pre> with width attribute (bug 3202)
1705 <pre width="8">Narrow screen goodies</pre>
1707 <pre width="8">Narrow screen goodies</pre>
1712 <pre> with forbidden attribute (bug 3202)
1714 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1716 <pre width="8">Narrow screen goodies</pre>
1721 Entities inside <pre>
1730 <pre> with forbidden attribute values (bug 3202)
1732 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1734 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1739 <nowiki> inside <pre> (bug 13238)
1747 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1755 <pre><nowiki>Foo</nowiki></pre>
1760 <nowiki> and <pre> preference (first one wins)
1791 </pre> inside nowiki
1793 <nowiki></pre></nowiki>
1800 Empty pre; pre inside other HTML tags (bug 54946)
1819 HTML pre followed by indent-pre
1834 <p><pre>foo</pre></p>
1836 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
1840 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1848 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1858 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1870 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1891 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1895 {{echo| foo}}{{echo| bar}}
1900 {{echo|<!--cmt--> foo}}
1902 <!--cmt-->{{echo| foo}}
1904 {{echo|{{echo| }}bar}}
1922 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1959 Things that look like <pre> tags aren't treated as such
1961 Barack Obama <President> of the United States
1962 <President></President>
1964 <p>Barack Obama <President> of the United States
1965 <President></President>
1969 ## PHP parser discards the "<pre " string
1971 Handle broken pre-like tags (bug 64025)
1975 {{echo|<pre <pre>x</pre>}}
1977 <table><pre </table>
1980 <table><pre></pre></table>
1983 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'><pre </span>
1986 <span><pre </span>
1991 Parsoid: handle pre with space after attribute
1995 <pre style="width:50%;" >{{echo|foo}}</pre>
1997 <pre style="width:50%;">{{echo|foo}}</pre>
2000 # TODO / maybe: fix wt2wt for this
2002 Parsoid: Don't paragraph-wrap fosterable content
2028 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2056 #--------------------------------------------------------------------
2057 # Transclusion parameter whitespace stripping tests
2058 # Behavior is different for positional and named parameters
2059 #--------------------------------------------------------------------
2061 Templates: Strip leading and trailing whitespace from named-param values
2065 {{echo|1= {{echo|b}} }}
2078 <ul><li> d</li></ul>
2083 Templates: Don't strip whitespace from positional-param values
2087 {{echo|{{echo|b}} }}
2119 <ul><li> f</li></ul>
2127 Templates: Handle empty comment-and-ws-only lines correctly
2130 <!--should be ignored-->
2131 <!--should be ignored as well-->
2140 Templates: Handle comments in the target
2143 <!-- should be ignored -->
2146 {{echo<!-- should be ignored -->
2149 {{echo<!-- should be ignored -->|foo}}
2151 {{<!-- should be ignored -->echo|foo}}
2153 <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>
2155 <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>
2157 <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>
2159 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2162 #--------------------------------------------------------------------
2163 # Transclusion parameter escaping tests
2164 #--------------------------------------------------------------------
2166 Templates: Parsoid parameter escaping test 1
2170 {{echo|[foo]|{{echo|[bar]}}}}
2172 <p about="#mwt1" typeof="mw:Transclusion"
2173 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2177 Parsoid: Pipes in external links in template parameter
2181 {{echo|[{{echo|http://example.com}} link]}}
2183 <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>
2187 Parsoid: pipe in transclusion parameter
2191 {{echo|http://foo.com/a|b}}
2193 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2194 typeof="mw:Transclusion"
2195 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>
2199 Parsoid: Pipe in external link target and content in template parameter
2201 parsoid=html2wt,wt2wt
2203 {{echo|[http://foo.com/a|b a|b]}}
2205 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2206 typeof="mw:Transclusion"
2207 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2208 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2212 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2216 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2218 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
2222 Templates: Don't escape already nowiki-escaped text in template parameters
2224 parsoid=html2wt,wt2wt
2226 {{echo|foo<nowiki>|</nowiki>bar}}
2227 {{echo|<nowiki><div></nowiki>}}
2228 {{echo|<nowiki></nowiki>}}
2230 <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>
2231 <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>
2232 <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>
2238 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2240 parsoid=html2wt,wt2wt
2242 {{echo|{{echo|1=bar}}}}
2244 <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>
2249 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2255 <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>
2259 ### Parsoid-centric tests for testing RT edge cases for pre
2263 1a. Indent-Pre and Comments
2276 1b. Indent-Pre and Comments
2289 1c. Indent-Pre and Comments
2302 1d. Indent-Pre and Comments
2303 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2316 2a. Indent-Pre and tables
2337 2b. Indent-Pre and tables
2353 2c. Indent-Pre and tables (bug 42252)
2370 2d. Indent-Pre and tables
2396 2e. Indent-Pre and table-line syntax
2408 2f. Indent-pre started by table-line syntax
2421 3a. Indent-Pre and block tags (single-line html)
2425 c <blockquote> foo </blockquote>
2430 c <blockquote> foo </blockquote>
2431 <pre><span> foo </span>
2436 3b. Indent-Pre and block tags (multi-line html)
2441 <pre>a <span>foo</span>
2448 3c. Indent-Pre and block tags (pre-content on separate line)
2512 4. Indent-Pre and extension tags
2518 a <ul class="gallery mw-gallery-traditional">
2519 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2520 <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>
2521 <div class="gallerytext">
2529 Leading pipes outside of tables
2539 Leading pipes outside of tables 2
2553 Leading pipes outside of tables 3
2558 | class="foo bar" | baz
2562 | class="foo bar" | baz
2567 Render paragraphs when indent-pre is suppressed in blocklevels
2584 4. Multiple spaces at start-of-line
2602 ## NOTE: the leading white-space chars on empty line are significant
2604 5a. White-space in indent-pre
2616 ## NOTE: the leading white-space chars on empty line are significant
2618 5b. White-space in indent-pre
2637 5c. White-space in indent-pre
2650 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2673 7a. Indent-pre and category links
2675 parsoid=wt2html,wt2wt
2677 [[Category:foo]] <!-- No pre-wrapping -->
2678 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2680 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2681 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span>
2682 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2686 7b. Indent-pre and category links
2688 parsoid=wt2html,wt2wt
2691 [[Category:foo]] {{echo|b}}
2694 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
2696 <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>
2700 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2704 HTML-pre: 1. embedded newlines
2738 <pre data-parsoid='{"stx":"html"}'>foo</pre>
2740 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
2744 <pre data-parsoid='{"stx":"html"}'>
2749 <pre data-parsoid='{"stx":"html"}'>
2757 HTML-pre: big spaces
2794 <pre data-parsoid='{"stx":"html"}'>
2813 HTML-pre: 2: indented text
2826 HTML-pre: 3: other wikitext
2847 ### Definition lists
2854 <dl><dt> name </dt>
2855 <dd> Definition</dd></dl>
2860 Definition list for indentation only
2864 <dl><dd> Indented text</dd></dl>
2869 Definition list with no space
2874 <dd>Definition</dd></dl>
2879 Definition list with URL link
2881 ; http://example.com/ : definition
2883 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
2884 <dd> definition</dd></dl>
2889 Definition list with bracketed URL link
2891 ;[http://www.example.com/ Example]:Something about it
2893 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
2894 <dd>Something about it</dd></dl>
2899 Definition list with wikilink containing colon
2901 ; [[Help:FAQ]]: The least-read page on Wikipedia
2903 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
2904 <dd> The least-read page on Wikipedia</dd></dl>
2908 # At Brion's and JeLuF's insistence... :)
2910 Definition list with news link containing colon
2912 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
2914 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
2915 <dd> This isn't even a real newsgroup!</dd></dl>
2920 Malformed definition list with colon
2922 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
2924 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
2929 Definition lists: colon in external link text
2931 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
2933 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
2934 <dd> OK, I made that up</dd></dl>
2939 Definition lists: colon in HTML attribute
2941 ;<b style="display: inline">bold</b>
2943 <dl><dt><b style="display: inline">bold</b></dt></dl>
2948 Definition lists: self-closed tag
2950 ;one<br/>two : two-line fun
2952 <dl><dt>one<br />two </dt>
2953 <dd> two-line fun</dd></dl>
2958 Bug 11748: Literal closing tags
2962 <dd>test test test test test</dd>
2964 <dd>test test test test test</dd>
2969 <dd>test test test test test</dd>
2971 <dd>test test test test test</dd>
2977 Definition and unordered list using wiki syntax nested in unordered list using html tags.
2980 ; term : description
2985 <dl><dt> term </dt>
2986 <dd> description</dd></dl>
2987 <ul><li> unordered</li></ul>
2994 Definition list with empty definition and following paragraph
3006 Nested definition lists using html syntax
3015 Definition Lists: No nesting: Multiple dd's
3028 Definition Lists: Indentation: Regular
3036 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3041 Definition Lists: Indentation: Missing 1st level
3047 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3052 Definition Lists: Indentation: Multi-level indent
3056 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3061 Definition Lists: Hacky use to indent tables
3068 should be left alone
3070 <dl><dd><dl><dd><table>
3075 </td></tr></table></dd></dl></dd></dl>
3077 should be left alone
3082 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3090 should be left alone
3093 <dl><dd><dl><dd><table><tr>
3096 </tr></table><!-- bar --></dd></dl></dd></dl>
3098 should be left alone</p>
3102 Definition Lists: Hacky use to indent tables, with comment before table
3108 <dl><dd><dl><dd><!-- foo --><table><tr>
3110 </tr></table></dd></dl></dd></dl>
3115 Definition Lists: Hacky use to indent tables (WS-insensitive)
3124 <dd> <table><tr><td>a</td></tr></table> </dd>
3127 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3128 ## as an empty dt item. It also ignores all but the last ";" when followed
3129 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3130 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3133 ## Ex: ";;t2 ::d2" is transformed into:
3145 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3146 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3157 ## All Parsoid only definition list tests have this difference.
3159 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3160 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3163 Table / list interaction: indented table with lists in table contents
3178 <ul><li> b</li></ul>
3182 <ul><li> d</li></ul>
3183 </td></tr></table></dd></dl>
3188 Table / list interaction: lists nested in tables nested in indented lists
3211 </td></tr></table></dd></dl>
3218 Definition Lists: Nesting: Multi-level (Parsoid only)
3248 Definition Lists: Nesting: Test 2 (Parsoid only)
3268 Definition Lists: Nesting: Test 3 (Parsoid only)
3296 Definition Lists: Nesting: Test 4
3301 <dl><dd><dl><dd><dl><dt>t3</dt>
3302 <dd>d3</dd></dl></dd></dl></dd></dl>
3307 ## The Parsoid team believes the following three test exposes a
3308 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3309 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3311 Definition Lists: Mixed Lists: Test 1
3317 <dl><dd><dl><dt><ul><li> foo</li>
3318 <li> bar</li></ul></dt></dl>
3319 <dl><dt> baz</dt></dl></dd></dl>
3338 Definition Lists: Mixed Lists: Test 2
3343 <ul><li><dl><dd> d1</dd>
3344 <dd> d2</dd></dl></li></ul>
3350 Definition Lists: Mixed Lists: Test 3
3355 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3356 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3362 Definition Lists: Mixed Lists: Test 4
3367 <ul><li><dl><dt>d1 </dt>
3370 <dd>d4</dd></dl></li></ul>
3376 Definition Lists: Mixed Lists: Test 5
3382 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3388 Definition Lists: Mixed Lists: Test 6
3393 <ol><li><ul><li><dl><dd>d1
3394 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3400 Definition Lists: Mixed Lists: Test 7
3405 <dl><dd><ul><li> d1</li>
3406 <li> d2</li></ul></dd></dl>
3412 Definition Lists: Mixed Lists: Test 8
3417 <dl><dd><ul><li> d1</li></ul>
3418 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3424 Definition Lists: Mixed Lists: Test 9
3428 <ul><li><dl><dt>foo </dt>
3429 <dd>bar</dd></dl></li></ul>
3435 Definition Lists: Mixed Lists: Test 10
3439 <ul><li><ol><li><dl><dt>foo </dt>
3440 <dd>bar</dd></dl></li></ol></li></ul>
3444 # The Parsoid team disagrees with the PHP parser's seemingly-random
3445 # rules regarding dd/dt on the next two tests. Parsoid is more
3446 # consistent, and recognizes the shared nesting and keeps the
3447 # still-open tags around until the nesting is complete.
3450 Definition Lists: Mixed Lists: Test 11
3455 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3456 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3457 <dl><dt>boo </dt>
3458 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3476 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3477 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3481 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3482 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3492 Definition Lists: Weird Ones: Test 1
3494 *#;*::;; foo : bar (who uses this?)
3496 <ul><li><ol><li><dl><dt> foo </dt>
3497 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
3515 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3516 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3531 External links: non-bracketed
3533 Non-bracketed: http://example.com
3535 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3539 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3541 External links: numbered
3543 Numbered: [http://example.com]
3544 Numbered: [http://example.net]
3545 Numbered: [http://example.com]
3547 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
3548 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
3549 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
3552 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
3553 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
3554 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
3558 External links: specified text
3560 Specified text: [http://example.com link]
3562 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
3567 External links: trail
3569 Linktrails should not work for external links: [http://example.com link]s
3571 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3576 External links: dollar sign in URL
3578 http://example.com/1$2345
3580 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3584 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3586 External links: dollar sign in URL (autonumber)
3588 [http://example.com/1$2345]
3590 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3593 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
3597 External links: open square bracket forbidden in URL (bug 4377)
3599 parsoid=wt2html,wt2wt,html2html
3601 http://example.com/1[2345
3603 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3606 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
3610 External links: open square bracket forbidden in URL (named) (bug 4377)
3612 parsoid=wt2html,html2html
3614 [http://example.com/1[2345]
3616 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3619 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
3622 # parsoid adds a space before the link name
3624 External links: open square bracket forbidden in URL (named) (bug 4377)
3627 [http://example.com/1 [2345]
3629 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3634 External links: nowiki in URL link text (bug 6230)
3636 [http://example.com/ <nowiki>''example site''</nowiki>]
3638 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
3643 External links: newline forbidden in text (bug 6230 regression check)
3645 [http://example.com/ first
3648 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
3654 External links: Pipe char between url and text
3656 [http://example.com | link]
3658 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
3663 External links: protocol-relative URL in brackets
3665 [//example.com/ Test]
3667 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
3671 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3673 External links: protocol-relative URL in brackets without text
3677 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
3680 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
3684 External links: protocol-relative URL in free text is left alone
3688 <p>//example.com/Foo
3693 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
3695 foo//example.com/Foo
3697 <p>foo//example.com/Foo
3702 External links: with no contents
3704 [http://en.wikipedia.org/wiki/Foo]
3706 [[wikipedia:Foo|Bar]]
3708 [[wikipedia:Foo|<span>Bar</span>]]
3710 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
3711 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo">Bar</a></p>
3712 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"><span>Bar</span></a></p>
3718 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3720 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3725 External image from https
3727 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3729 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
3734 External image (when not allowed)
3736 wgAllowExternalImages=0
3738 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
3740 <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>
3745 Link to non-http image, no img tag
3747 Link to non-http image, no img tag: ftp://example.com/test.jpg
3749 <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>
3754 External links: terminating separator
3756 Terminating separator: http://example.com/thing,
3758 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
3763 External links: intervening separator
3765 Intervening separator: http://example.com/1,2,3
3767 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
3772 External links: old bug with URL in query
3774 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
3776 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
3781 External links: old URL-in-URL bug, mixed protocols
3783 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
3785 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
3790 External links: URL in text
3792 URL in text: [http://example.com http://example.com]
3794 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3799 External links: Clickable images
3801 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
3803 <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>
3808 External links: raw ampersand
3810 Old & use: http://x&y
3812 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3817 External links: encoded ampersand
3819 Old & use: http://x&y
3821 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
3824 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
3828 External links: encoded equals (bug 6102)
3830 http://example.com/?foo=bar
3832 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
3835 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
3839 ## Note that parsoid doesn't explicit mark autonumbered links, nor
3840 ## does it number them. As discussed in bug 53505, we can identify
3841 ## autonumbered links via CSS.
3845 External links: [raw ampersand]
3847 Old & use: [http://x&y]
3849 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3852 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
3855 # note that parsoid html is identical to [raw ampersand] case; so html2wt
3856 # mode will return the [raw ampersand] wikitext
3858 External links: [encoded ampersand]
3860 parsoid=wt2html,wt2wt,html2html
3862 Old & use: [http://x&y]
3864 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
3867 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
3871 External links: [raw equals]
3873 [http://example.com/?foo=bar]
3875 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3878 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
3881 # note that parsoid html is identical to [raw equals] case; so html2wt
3882 # mode will return the [raw equals] wikitext
3884 External links: [encoded equals] (bug 6102)
3886 parsoid=wt2html,wt2wt,html2html
3888 [http://example.com/?foo=bar]
3890 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
3893 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
3896 # xxx parsoid strips the IDN character, so the round-trip tests will
3897 # obviously fail and are disabled. --cscott
3899 External links: [IDN ignored character reference in hostname; strip it right off]
3901 parsoid=wt2html,wt2wt,html2html
3903 [http://e‌xample.com/]
3905 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
3908 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
3911 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
3912 # Where an external link could easily circumvent the sanitization of the text of
3913 # a link like this (where an IDN-ignore character is in the URL somewhere), this
3914 # test demands a higher standard. That's a bit strange.
3918 # http://example.com -> [http://example.com|http://example.com]
3919 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
3921 # The first example is sanitized, but the second is not. Any security benefits
3922 # from this production are trivial to circumvent. Either remove this test and
3923 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
3924 # the test accordingly.
3928 # xxx parsoid strips the IDN character, so the round-trip tests will
3929 # obviously fail and are disabled. --cscott
3931 External links: IDN ignored character reference in hostname; strip it right off
3933 parsoid=wt2html,html2html
3935 http://e‌xample.com/
3937 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
3940 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
3944 External links: www.jpeg.org (bug 554)
3948 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
3952 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3954 External links: URL within URL (original bug 2)
3956 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
3958 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
3961 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
3965 BUG 361: URL inside bracketed URL
3967 [http://www.example.com/foo http://www.example.com/bar]
3969 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
3974 BUG 361: URL within URL, not bracketed
3976 http://www.example.com/foo?=http://www.example.com/bar
3978 <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>
3983 BUG 289: ">"-token in URL-tail
3985 http://www.example.com/<hello>
3987 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
3992 BUG 289: literal ">"-token in URL-tail
3994 http://www.example.com/<b>html</b>
3996 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4001 BUG 289: ">"-token in bracketed URL
4003 [http://www.example.com/<hello> stuff]
4005 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4010 BUG 289: literal ">"-token in bracketed URL
4012 [http://www.example.com/<b>html</b> stuff]
4014 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4019 BUG 289: literal double quote at end of URL
4021 http://www.example.com/"hello"
4023 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4028 BUG 289: literal double quote in bracketed URL
4030 [http://www.example.com/"hello" stuff]
4032 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4037 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4039 [http://www.example.com test]
4041 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4046 External links: link text with spaces
4048 [http://www.example.com a b c]
4049 [http://www.example.com ''a'' ''b'']
4051 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4052 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4057 External links: wiki links within external link (Bug 3695)
4059 [http://example.com [[wikilink]] embedded in ext link]
4061 <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>
4064 <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>
4068 BUG 787: Links with one slash after the url protocol are invalid
4072 [http:/example.com title]
4074 <p>http:/example.com
4075 </p><p>[http:/example.com title]
4080 Bracketed external links with template-generated invalid target
4082 [{{echo|http:/example.com}} title]
4084 <p>[http:/example.com title]
4089 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4091 ''[http://example.com text'']
4092 [http://example.com '''text]'''
4093 ''Something [http://example.com in italic'']
4094 ''Something [http://example.com mixed''''', even bold]'''
4095 '''''Now [http://example.com both''''']
4097 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4098 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4099 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4100 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4101 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4107 Bug 4781: %26 in URL
4109 http://www.example.com/?title=AT%26T
4111 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4114 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4117 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4118 # % is actually legal in HTML5. Any change in output would need testing though.
4120 Bug 4781, 5267: %25 in URL
4122 http://www.example.com/?title=100%25_Bran
4124 <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>
4127 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4131 Bug 4781, 5267: %28, %29 in URL
4133 http://www.example.com/?title=Ben-Hur_%281959_film%29
4135 <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>
4138 <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>
4143 Bug 4781: %26 in autonumber URL
4145 [http://www.example.com/?title=AT%26T]
4147 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4150 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4154 Bug 4781, 5267: %26 in autonumber URL
4156 [http://www.example.com/?title=100%25_Bran]
4158 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4161 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4165 Bug 4781, 5267: %28, %29 in autonumber URL
4167 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4169 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4172 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4177 Bug 4781: %26 in bracketed URL
4179 [http://www.example.com/?title=AT%26T link]
4181 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4184 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4188 Bug 4781, 5267: %25 in bracketed URL
4190 [http://www.example.com/?title=100%25_Bran link]
4192 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4197 Bug 4781, 5267: %28, %29 in bracketed URL
4199 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4201 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4204 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4208 External link containing a period in the anchor. (bug 63947)
4210 [//foo.org/bar#baz. bang]
4212 [//foo.org/bar. bang]
4214 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4215 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4218 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4219 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4223 External link containing a single quote. (bug 63947)
4227 [//foo.org/bar'baz bang]
4229 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4230 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4233 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4234 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4239 External link containing a period in the anchor. (bug 63947)
4241 [//foo.org/bar#baz. bang]
4243 [//foo.org/bar. bang]
4245 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4246 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4249 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4250 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4254 External link containing a single quote. (bug 63947)
4258 [//foo.org/bar'baz bang]
4260 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4261 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4264 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4265 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4270 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4272 Some [http://example.com/ pretty ''italics'' and stuff]!
4274 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4279 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4281 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4283 <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>
4288 External link containing double-single-quotes with no space separating the url from text in italics
4290 [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]].]
4292 <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>
4295 <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>
4299 External link with comments in link text
4301 [http://www.google.com Google <!-- comment -->]
4303 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4308 URL-encoding in URL functions (single parameter)
4310 {{localurl:Some page|amp=&}}
4312 <p>/index.php?title=Some_page&amp=&
4317 URL-encoding in URL functions (multiple parameters)
4319 {{localurl:Some page|q=?&=&}}
4321 <p>/index.php?title=Some_page&q=?&amp=&
4328 http://example.com/index.php?foozoid%5B%5D=bar
4330 http://example.com/index.php?foozoid[]=bar
4332 <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>
4333 </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>
4336 <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>
4338 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4342 IPv6 urls (bug 21261)
4346 http://[2404:130:0:1000::187:2]/index.php
4348 <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>
4353 Non-extlinks in brackets
4362 [{{echo|foo}} ''bar'']
4363 [{{echo|foo}}l's] errand
4364 [{{echo|foo}}l's errand]
4366 [url=http://example.com]
4379 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4384 Percent encoding in external links
4386 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4388 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4391 <p><a rel="mw:ExtLink"
4392 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4396 Use url link syntax for links where the content is equal the link target
4400 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4403 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4407 Parenthesis in external links, especially URL links
4411 http://example.com/test)
4413 http://example.com/(test)
4415 http://example.com/((test)
4417 (http://example.com/(test))
4419 (http://example.com/(test)))))
4421 http://example.com/a)b
4423 [http://example.com) foo]
4425 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4426 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4427 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4428 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4429 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4430 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4431 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4432 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4435 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4436 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4437 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4438 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4439 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4440 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4441 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4442 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4446 Parenthesis in external links, w/ transclusion or comment
4448 (http://example.com/{{echo|hi}})
4450 (http://example.com<!-- hi -->)
4452 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4453 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4456 <p>(<a data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;hi&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[20,31,null,null]}\">hi</span>"}]]}' typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}'>http://example.com/hi</a>)</p>
4458 <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>
4468 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4470 Normal text. '''''Bold italic text.''''' Normal text.
4472 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4473 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4478 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4479 # parser strips. The wikitext contains just the first half of the bold
4482 Unclosed and unmatched quotes
4484 '''''Bold italic text '''with bold deactivated''' in between.'''''
4486 '''''Bold italic text ''with italic deactivated'' in between.'''''
4490 ..spanning two paragraphs (should not work).'''
4492 '''Bold tag left open
4494 ''Italic tag left open
4498 <!-- Unmatching number of opening, closing tags: -->
4499 '''This year''''s election ''should'' beat '''last year''''s.
4501 ''Tom'''s car is bigger than ''Susan'''s.
4503 Plain ''italic'''s plain
4505 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4506 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4507 </p><p><b>Bold text..</b>
4508 </p><p>..spanning two paragraphs (should not work).
4509 </p><p><b>Bold tag left open</b>
4510 </p><p><i>Italic tag left open</i>
4512 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4513 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4514 </p><p>Plain <i>italic'</i>s plain
4517 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4518 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4519 </p><p><b>Bold text..</b>
4520 </p><p>..spanning two paragraphs (should not work).<b></b>
4521 </p><p><b>Bold tag left open</b>
4522 </p><p><i>Italic tag left open</i>
4524 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4525 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4526 </p><p>Plain <i>italic'</i>s plain
4533 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
4536 # This should not produce <table></table> as <table><tr><td></td></tr></table>
4537 # is the bare minimum required by the spec, see:
4538 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
4539 # Parsoid team replies: empty table tags are legal in HTML5
4541 A table with no data.
4554 A table with stray table end tags on start tag line (wt2html)
4558 {|style="color: red;"|}
4560 {|style="color: red;" |}
4564 {|style="color: red;"|} id="foo"
4568 {|style="color: red;" |} id="foo"
4572 <table style="color: red;"></table>
4574 <table style="color: red;">
4580 <table style="color: red;" id="foo">
4586 <table style="color: red;" id="foo">
4595 A table with no data (take 2)
4603 # A table with nothing but a caption is invalid XHTML, we might want to render
4604 # this as <p>caption</p>
4605 # Parsoid team replies: table with only a caption is legal in HTML5
4607 A table with nothing but a caption
4615 </caption><tr><td></td></tr></table>
4618 <table><caption> caption</caption></table>
4622 A table with caption with default-spaced attributes and a table row
4625 |+ style="color: red;" | caption1
4631 <caption style="color: red;"> caption1
4640 A table with captions with non-default spaced attributes and a table row
4643 |+style="color: red;"|caption2
4644 |+ style="color: red;"| caption3
4650 <caption style="color: red;">caption2
4652 <caption style="color: red;"> caption3
4661 Table td-cell syntax variations
4665 | foo bar foo || baz
4666 | style='color:red;' | baz
4667 | style='color:red;' || baz
4674 <td> foo bar foo </td>
4677 <td style="color:red;"> baz
4679 <td> style='color:red;' </td>
4707 Simple table but with multiple dashes for row wikitext
4725 Multiplication table
4727 {| border="1" cellpadding="2"
4728 |+Multiplication table
4730 ! × !! 1 !! 2 !! 3
4748 <table border="1" cellpadding="2">
4749 <caption>Multiplication table
4796 Accept "||" in table headings
4811 Accept "!!" in table data
4817 <table data-parsoid='{}'>
4818 <tbody data-parsoid='{}'><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
4823 Accept "||" in indented table headings
4833 </th></tr></table></dd></dl>
4838 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
4855 Accept "| !" at start of line in tables (ignore !-attribute)
4859 | !style="color:red" | bar
4871 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 +/-
4875 |style='color:red;'|+1
4876 |style='color:blue;'|-1
4888 <td style="color:red;">+1
4890 <td style="color:blue;">-1
4914 |rowspan=2| Cell 2, row 1 (and 2)
4925 <td rowspan="2"> Cell 2, row 1 (and 2)
4943 {| bgcolor=#ABCDEF border=2
4948 |the original table again
4956 <table bgcolor="#ABCDEF" border="2">
4964 <td>the original table again
4970 Invalid attributes in table cell (bug 1830)
4984 # The "|}" to close the table is missing from the input, so parsoid's
4985 # *2wt modes will fail.
4987 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
4989 parsoid=wt2html,html2html
4992 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
4996 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
4997 <td>]" onmouseover="alert(document.cookie)">test
5005 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5010 Indented table markup mixed with indented pre content (proposed in bug 6200)
5015 Text that should be rendered preformatted
5023 <pre>Text that should be rendered preformatted
5032 Template-generated table cell attributes and cell content
5041 <td style="color: red"> Foo
5043 <td style="color: red"> Foo
5049 Template-generated table cell attributes and cell content (2)
5052 |align=center {{table_attribs}}
5057 <td align="center" style="color: red"> Foo
5063 Template-generated table cell attributes and cell content (3)
5066 |align=center {{table_cells}}
5071 <td align="center" style="color: red"> Foo </td>
5079 Table with row followed by newlines and table heading
5097 Table with empty line following the start tag
5114 # FIXME: Preserve the attribute properly (with an empty string as value) in
5115 # the PHP parser. Parsoid implements the behavior below.
5117 Table attributes with empty value
5127 </td></tr></tbody></table>
5132 Wikitext table with a lot of comments
5155 Wikitext table with double-line table cell
5172 Table cell with a single comment
5188 # The expected HTML structure in this test is debatable. The PHP parser does
5189 # not parse this kind of table at all. The main focus for Parsoid is on
5190 # round-tripping, so this output is ok for now. TODO: revisit!
5192 Wikitext table with html-syntax row
5202 <td>foo</td></tr></tbody></table>
5206 Implicit <td> after a |-
5207 (PHP parser relies on Tidy to add the missing <td> tags)
5209 parsoid=wt2html,wt2wt
5222 Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
5223 (PHP parser relies on Tidy to add the missing <td> tags)
5225 parsoid=wt2html,wt2wt
5237 <tr><td><pre>a</pre></td></tr>
5238 <tr><td> b</td></tr>
5244 Lists should be recognized in an implicit <td> context
5245 (PHP parser relies on Tidy to add the missing <td> tags)
5247 parsoid=wt2html,wt2wt
5264 Parsoid: Round-trip tables directly followed by content (bug 51219)
5266 parsoid=wt2html,wt2wt
5278 <td>foo</td></tr></tbody></table> bar
5282 <td>baz</td></tr></tbody></table><b>quux</b>
5286 Parsoid: Default to a newline after tables in new content (bug 51219)
5293 <nowiki> </nowiki>bar
5300 <tr><td>foo</td></tr></tbody></table> bar
5302 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5306 Parsoid: newline inducing block nodes don't suppress <nowiki>
5318 Parsoid: Row-syntax table headings followed by comment & table cells
5320 parsoid=wt2html,wt2wt
5324 <!-- foo --> || baz || quux
5329 <tr><th>foo </th><th>bar </th>
5331 <td>quux</td></tr></tbody></table>
5336 Parsoid: Recover better from broken table attributes
5348 <p>foo</p></td></tr>
5356 Plain link, capitalized
5360 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5365 Plain link, uncapitalized
5369 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
5376 [[Main Page|The Main Page]]
5378 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5383 Piped link with comment in link text
5385 [[Main Page|The Main<!--front--> Page]]
5387 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5392 Piped link with multiple pipe characters in link text
5394 [[Main Page||The|Main|Page|]]
5396 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
5399 <p><a rel="mw:WikiLink" href="Main_Page">|The|Main|Page|</a></p>
5407 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
5412 Broken link with fragment
5414 [[Zigzagzogzagzig#zug]]
5416 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
5421 Special page link with fragment
5423 [[Special:Version#anchor]]
5425 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
5430 Nonexistent special page link with fragment
5432 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
5434 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
5441 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
5443 <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>
5450 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
5452 <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>!!!
5463 Bug 43661: Piped links with identical prefixes
5465 [[prefixed article|prefixed articles with spaces]]
5467 [[prefixed article|prefixed articlesaoeu]]
5469 [[Main Page|Main Page test]]
5471 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
5472 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
5473 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
5479 Link with HTML entity in suffix / tail
5481 [[Main Page]]", [[Main Page]]a
5483 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
5488 Link with 3 brackets
5497 Link with 4 brackets
5501 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
5506 Piped link with 3 brackets
5508 [[[main page|the main page]]]
5510 <p>[[[main page|the main page]]]
5515 Piped link with extlink-like text
5518 [[Main Page|This is a [bar]]]
5520 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
5521 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
5526 Link with multiple pipes
5528 [[Main Page|The|Main|Page]]
5530 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
5534 # Note that parsoid does not munge anchor text; all non-space
5535 # characters are valid in HTML5 ids.
5537 Anchor containing a #. (bug 63430)
5539 [[Main Page#And#Link]]
5541 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
5544 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link">Main Page#And#Link</a></p>
5550 [[Talk:Parser testing]], [[Meta:Disclaimers]]
5552 <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>
5557 Link with space in namespace
5559 [[User talk:Foo bar]]
5561 <p><a href="/index.php?title=User_talk:Foo_bar&action=edit&redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
5566 MemoryAlpha:AlphaTest
5568 This is an article in the MemoryAlpha namespace
5569 (which shadows the memoryalpha interwiki link).
5573 Namespace takes precedence over interwiki link (bug 51680)
5575 [[MemoryAlpha:AlphaTest]]
5577 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5581 # The previous test doesn't work correctly in html2*, due to not recognizing the
5582 # link as an internal one. This one checks for the correct behavior.
5584 Link to namespace preferred over interwiki with correct rel attribute
5586 parsoid=html2wt,html2html
5588 [[MemoryAlpha:AlphaTest]]
5590 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
5595 Piped link to namespace
5597 [[Meta:Disclaimers|The disclaimers]]
5599 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
5606 [[Usually caused by a typo (oops}]]
5608 <p>[[Usually caused by a typo (oops}]]
5615 Just a test of an article title containing a percent.
5619 Link containing % (not as a hex sequence)
5623 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
5626 <p><a rel="mw:WikiLink" href="./7%25_Solution">7% Solution</a></p>
5629 # note that the parsoid HTML is identical to the previous test output,
5630 # so the previous test ensures that the html2wt mode will generate the
5631 # "not as a hex sequence" wikitext.
5633 Link containing % as a single hex sequence interpreted to char
5635 parsoid=wt2wt,wt2html,html2html
5639 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
5642 <p><a rel="mw:WikiLink" href="./7%25_Solution">7% Solution</a></p>
5646 Link containing % as a double hex sequence interpreted to hex sequence
5650 <p>[[7%2525 Solution]]
5654 # note that parsoid does not munge anchor text; all non-space
5655 # characters are valid in HTML5 anchors.
5657 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
5658 Example for such a section: == < ==
5660 [[%23%3c]][[%23%3e]]
5662 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
5665 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E">#></a></p>
5669 Link containing "<#" and ">#" as a hex sequences
5671 [[%3c%23]][[%3e%23]]
5673 <p>[[%3c%23]][[%3e%23]]
5678 Link containing an equals sign
5680 [[Special:BookSources/isbn=4-00-026157-6]]
5682 <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>
5685 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
5691 Just a test of an article title containing a tilde.
5694 # note that links containing signatures, like [[Foo~~~~]], are
5695 # massaged by the pre-save transform (PST) and so the tildes are never
5696 # seen by the parser.
5698 Link containing a tilde
5702 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
5705 <p><a rel="mw:WikiLink" href="./Foo~bar">Foo~bar</a></p>
5709 Link containing double-single-quotes '' (bug 4598)
5711 [[Lista d''e paise d''o munno]]
5713 <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>
5716 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno">Lista d''e paise d''o munno</a></p>
5720 Link containing double-single-quotes '' in text (bug 4598 sanity check)
5722 Some [[Link|pretty ''italics'' and stuff]]!
5724 <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>!
5727 <p>Some <a rel="mw:WikiLink" href="Link">pretty <i>italics</i> and stuff</a>!</p>
5731 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
5733 ''Some [[Link|pretty ''italics'' and stuff]]!''
5735 <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>
5740 Link with double quotes in title part (literal) and alternate part (interpreted)
5742 [[File:Denys Savchenko ''Pentecoste''.jpg]]
5746 [[''Pentecoste''|Pentecoste]]
5748 [[''Pentecoste''|''Pentecoste'']]
5750 <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>
5751 </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>
5752 </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>
5753 </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>
5756 <meta typeof="mw:Placeholder"/>
5757 <p><a rel="mw:WikiLink" href="''Pentecoste''">''Pentecoste''</a></p>
5758 <p><a rel="mw:WikiLink" href="''Pentecoste''">Pentecoste</a></p>
5759 <p><a rel="mw:WikiLink" href="''Pentecoste''"><i>Pentecoste</i></a></p>
5763 Broken image links with HTML captions (bug 39700)
5765 [[File:Nonexistent|<script></script>]]
5766 [[File:Nonexistent|100px|<script></script>]]
5767 [[File:Nonexistent|<]]
5768 [[File:Nonexistent|a<i>b</i>c]]
5770 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5771 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
5772 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
5773 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
5780 [[http://www.example.com]]
5782 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
5785 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
5789 Plain link to URL with link text
5791 [[http://www.example.com Link text]]
5793 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
5798 Plain link to protocol-relative URL
5800 [[//www.example.com]]
5802 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
5805 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
5809 Plain link to protocol-relative URL with link text
5811 [[//www.example.com Link text]]
5813 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
5818 Plain link to page with question mark in title
5824 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
5825 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
5830 # I'm fairly sure the expected result here is wrong.
5831 # We want these to be URL links, not pseudo-pages with URLs for titles....
5832 # However the current output is also pretty screwy.
5835 # I'm changing it to match the current output--it arguably makes more
5836 # sense in the light of the test above. Old expected result was:
5837 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
5839 # But I think this test is bordering on "garbage in, garbage out" anyway.
5844 Piped link to URL: [[http://www.example.com|an example URL]]
5846 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
5849 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
5853 BUG 2: [[page|http://url/]] should link to page, not http://url/
5855 [[Main Page|http://url/]]
5857 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
5860 <p><a rel="mw:WikiLink" href="./Main_Page">http://url/</a></p>
5863 # Parsoid does not mark self-links, by design.
5865 BUG 337: Escaped self-links should be bold
5869 [[Bug462]] [[Bug462]]
5871 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
5874 <p><a rel="mw:WikiLink" href="./Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462">Bug462</a></p>
5878 Self-link to section should not be bold
5882 [[Main Page#section]]
5884 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
5895 Self-link to numeric title
5901 <p><strong class="selflink">0</strong>
5906 Link to numeric-equivalent title
5912 <p><a href="/wiki/00" title="00">00</a>
5917 <nowiki> inside a link
5919 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
5921 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
5926 Non-breaking spaces in title
5928 [[ Main Page ]]
5930 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
5935 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
5941 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
5946 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
5952 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
5957 Internal link with en linktrail: no apostrophes (bug 27473)
5963 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
5968 Internal link with ca linktrail with apostrophes (bug 27473)
5974 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
5979 Internal link with kaa linktrail with apostrophes (bug 27473)
5985 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
5990 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
5992 [[User:Foo/Test/63636:Bar|Test]]
5994 <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>
5997 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar">Test</a></p>
6001 1. Interaction of linktrail and template encapsulation
6007 <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>
6011 2. Interaction of linktrail and template encapsulation
6015 {{echo|Some [[Fool]]}}s
6017 <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>
6021 3. Interaction of linktrail and template encapsulation
6025 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6027 <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>
6037 Internal link with is link prefix
6041 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6043 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6054 Internal link with is link trail and link prefix
6058 [[mótmælendatrú|xxx]]ar
6060 mótmælenda[[söfnuður]]
6061 mótmælenda[[söfnuður|söfnuðir]]
6062 mótmælenda[[söfnuður|söfnuðir]]xxx
6064 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6065 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6066 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6067 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6068 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6073 Parsoid link trail escaping
6075 parsoid=html2wt,html2html
6079 <p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
6083 Parsoid link prefix escaping
6086 parsoid=html2wt,html2html
6088 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6090 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
6094 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6102 [http://wp.org ''foo'']
6104 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
6105 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
6106 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6107 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6112 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6116 [[Foo|{{echo|a}} b {{echo|c}}]]
6118 <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>
6122 Link with angle bracket after anchor
6126 <p><a rel="mw:WikiLink" href="./Foo#%3Cbar%3E" data-parsoid='{"stx":"simple","a":{"href":"./Foo#%3Cbar%3E"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
6130 ### Interwiki links (see maintenance/interwiki.sql)
6134 Inline interwiki link
6136 [[MeatBall:SoftSecurity]]
6138 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6143 Inline interwiki link with empty title (bug 2372)
6147 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6152 Interwiki link encoding conversion (bug 1636)
6154 *[[Wikipedia:ro:Olteniţa]]
6155 *[[Wikipedia:ro:Olteniţa]]
6157 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
6158 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
6163 Interwiki link with fragment (bug 2130)
6165 [[MeatBall:SoftSecurity#foo]]
6167 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6171 # Ideally the wikipedia: prefix here should be proto-relative too
6173 Different interwiki prefixes mapping to the same URL
6181 [[:wikipedia:Foo|Foo]]
6183 [[wikipedia:en:Foo]]
6185 [[:wikipedia:en:Foo]]
6187 <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>
6189 <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>
6191 <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>
6193 <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>
6195 <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>
6197 <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>
6201 Interwiki links that cannot be represented in wiki syntax
6204 [[meatball:ok#foo|ok with fragment]]
6205 [[meatball:ok_as_well?|ok ending with ? mark]]
6206 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6207 [http://de.wikipedia.org/wiki/#foo is just fragment]
6210 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok">meatball:ok</a>
6211 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo">ok with fragment</a>
6212 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?">ok ending with ? mark</a>
6213 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6214 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6218 Interwiki links: trail
6222 [[wikipedia:Foo|Ba]]r
6224 <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>
6228 ### Interlanguage links
6229 ### Language links (so that searching for '### language' matches..)
6243 Double interlanguage link
6254 Interlanguage link, with prefix links
6266 Double interlanguage link, with prefix links (bug 8897)
6279 Parsoid-specific test: Wikilinks with should RT properly
6285 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
6290 Parsoid bug 53221: Wikilinks should be properly entity-escaped
6294 He&nbsp;llo [[Foo|He&nbsp;llo]]
6296 He&nbsp;llo [[He&nbsp;llo]]
6298 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6299 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6303 Parsoid: handle constructor well
6311 <p><a rel="mw:WikiLink" href="./Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
6313 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
6317 Parsoid: recognize interlanguage links without a target page
6323 <p><link rel="mw:PageProp/Language" href="http://ko.wikipedia.org/wiki/"></p>
6327 Parsoid: recognize interwiki links without a target page
6333 <p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/">ko:</a></p>
6337 Parsoid: Bug #45209, handle interwiki links pointing to the current wiki as plain wiki links
6343 <p><a rel="mw:WikiLink" href="./Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"en:Foo"}}'>Foo</a></p>
6347 ### Redirects, Parsoid-only
6350 1. Simple redirect to page
6354 #REDIRECT [[Main Page]]
6356 <link rel="mw:PageProp/redirect" href="./Main_Page">
6359 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
6361 2. Other redirect variants
6363 parsoid=wt2html,wt2wt
6365 #REDIRECT [[Main_Page]]
6366 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
6368 <link rel="mw:PageProp/redirect" href="./Main_Page">
6369 <link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
6375 parsoid=wt2html,wt2wt
6380 <li>REDIRECT [[]]</li></ol>
6384 Optional colon in #REDIRECT
6386 # the colon is archaic syntax. we support it for wt2html, but we
6387 # don't care that it roundtrips back to the modern syntax.
6388 parsoid=wt2html,html2html
6390 #REDIRECT:[[Main Page]]
6392 <link rel="mw:PageProp/redirect" href="./Main_Page">
6396 Whitespace in #REDIRECT with optional colon
6398 # the colon and gratuitous whitespace is archaic syntax. we support
6399 # it for wt2html, but we don't care that it roundtrips back to the
6400 # modern syntax (without extra whitespace)
6401 parsoid=wt2html,html2html
6408 <link rel="mw:PageProp/redirect" href="./Main_Page">
6412 Piped link in #REDIRECT
6414 # content after piped link is ignored. we support this syntax,
6415 # but don't care that the piped link is lost when we roundtrip this.
6418 #REDIRECT [[Main Page|bar]]
6420 <link rel="mw:PageProp/redirect" href="./Main_Page">
6424 Redirect to category
6428 #REDIRECT [[Category:Foo]]
6430 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6434 Redirect to category with URL encoding
6438 #REDIRECT [[Category%3AFoo]]
6440 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
6444 Redirect to category page
6446 parsoid=wt2html,html2html
6448 #REDIRECT [[:Category:Foo]]
6450 <p><a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a></p>
6454 Redirect to image page (1)
6458 #REDIRECT [[File:Wiki.png]]
6460 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6464 Redirect to image page (2)
6468 #REDIRECT [[Image:Wiki.png]]
6470 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
6474 Redirect to language
6478 #REDIRECT [[en:File:Wiki.png]]
6480 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6484 Redirect to interwiki
6488 #REDIRECT [[meatball:File:Wiki.png]]
6490 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
6494 Non-English #REDIRECT
6499 #TILVÍSUN [[Main Page]]
6501 <link rel="mw:PageProp/redirect" href="./Main_Page">
6512 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
6529 Broken br tag sanitization
6537 # TODO: Fix html2html mode (bug 51055)!
6539 Parsoid: Broken br tag recognition
6552 Incorrecly removing closing slashes from correctly formed XHTML
6554 <br style="clear:both;" />
6556 <p><br style="clear:both;" />
6561 Failing to transform badly formed HTML into correct XHTML
6563 <br style="clear: left;">
6564 <br style="clear: right;">
6565 <br style="clear: both;">
6567 <p><br style="clear: left;" />
6568 <br style="clear: right;" />
6569 <br style="clear: both;" />
6574 Handling html with a div self-closing tag
6583 <p><div title />
6587 <p><div title=bar />
6588 <div title=bar/>
6590 <div title="bar/"></div>
6596 Handling html with a br self-closing tag
6605 <p><br title="title" />
6606 <br title="title" />
6615 Horizontal ruler (should it add that extra space?)
6629 Horizontal ruler -- 4+ dashes render hr
6638 Horizontal ruler -- eats additional dashes on the same line
6647 Horizontal ruler -- does not collapse dashes on consecutive lines
6658 Horizontal ruler -- <4 dashes render as plain text
6667 Horizontal ruler -- Supports content following dashes on same line
6676 ### Block-level elements
6685 <ul><li>Common list</li>
6687 <li>item 3</li></ul>
6698 <ol><li>Numbered list</li>
6700 <li> item 3</li></ol>
6714 ***#Number on level 4
6716 **#Number on level 3
6717 **#Number on level 3
6721 #** Level 3, but ordered
6724 <ol><li> with numbers</li></ol>
6725 <ul><li> and bullets</li></ul>
6726 <ol><li> and numbers</li></ol></li>
6728 <ul><li>bullet level 2
6729 <ul><li>bullet level 3
6730 <ol><li>Number on level 4</li></ol></li></ul></li>
6732 <ol><li>Number on level 3</li>
6733 <li>Number on level 3</li></ol></li></ul>
6734 <ol><li>number level 2</li></ol></li>
6736 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
6737 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
6748 <ul><li>bar</li></ul></li></ul>
6758 <ul><li><ul><li>foo</li></ul></li>
6764 Nested lists 3 (first element empty)
6770 <ul><li>bar</li></ul></li></ul>
6775 Nested lists 4 (first element empty)
6780 <ul><li><ul><li></li></ul></li>
6786 Nested lists 5 (both elements empty)
6791 <ul><li><ul><li></li></ul></li>
6797 Nested lists 6 (both elements empty)
6803 <ul><li></li></ul></li></ul>
6808 Nested lists 7 (skip initial nesting levels)
6812 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
6817 Nested lists 8 (multiple nesting transitions)
6825 <ul><li><ul><li> bar</li></ul></li>
6826 <li> baz</li></ul></li>
6832 1. Lists with start-of-line-transparent tokens before bullets: Comments
6845 2. Lists with start-of-line-transparent tokens before bullets: Template close
6850 <ul><li>foo bar</li>
6856 List items are not parsed correctly following a <pre> block (bug 785)
6862 <ul><li> <pre>foo</pre></li>
6863 <li> <pre>bar</pre></li>
6869 List items from template
6880 * notSOL{{inner list}}
6883 <ul><li> item 1</li>
6884 <li> item 2</li></ul>
6885 <ul><li> item 0</li>
6887 <li> item 2</li></ul>
6888 <ul><li> item 0</li>
6891 <li> item 2</li></ul>
6896 List interrupted by empty line or heading
6904 <ul><li> foo</li></ul>
6905 <ul><li><ul><li> bar</li></ul></li></ul>
6906 <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>
6907 <ul><li> Another list item</li></ul>
6912 Multiple list tags generated by templates
6927 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
6930 <!--This line will NOT split the list-->
6932 <!--This line will NOT split the list either-->
6934 <!--foo--> <!----> <!--This line NOT split the list either-->
6945 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
6948 <!--This line will NOT split the list-->
6950 <!--This line will NOT split the list either-->
6952 <!--foo--> <!----> <!--This line NOT split the list
6965 (Cannot test this with PHP parser since it relies on Tidy for the hack)
6967 parsoid=wt2html,wt2wt
6971 * {{echo|<li>templated li-hack}}
6972 * <!--foo--> <li> unsupported li-hack with preceding comments
6975 <li><li>not a li-hack
6982 <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>
6983 <li> <!--foo--> </li>
6984 <li> li-hack with preceding comments</li>
6995 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7022 Parsoid: Test of whitespace serialization with Templated bullets
7029 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7033 # ------------------------------------------------------------------------
7034 # The next set of tests are about Parsoid's ability to handle badly nested
7035 # tags (parse, minimize scope of fixup, and roundtrip back)
7036 # ------------------------------------------------------------------------
7039 Unbalanced closing block tags break a list
7040 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7058 Unbalanced closing non-block tags don't break a list
7059 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7076 Unclosed formatting tags that straddle lists are closed and reopened
7077 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
7091 List embedded in a non-block tag
7092 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
7098 <p><small></small></p>
7104 <p><small></small></p>
7108 Table with missing opening <tr> tag
7110 parsoid=wt2html,wt2wt
7128 # Note that the current date is hard-coded as
7129 # 1970-01-01T00:02:03Z (a Thursday)
7130 # when running parser tests. The timezone is also fixed to GMT, so
7131 # local date will be identical to current date.
7134 Magic Word: {{CURRENTDAY}}
7143 Magic Word: {{CURRENTDAY2}}
7152 Magic Word: {{CURRENTDAYNAME}}
7161 Magic Word: {{CURRENTDOW}}
7170 Magic Word: {{CURRENTMONTH}}
7179 Magic Word: {{CURRENTMONTH1}}
7188 Magic Word: {{CURRENTMONTHABBREV}}
7190 {{CURRENTMONTHABBREV}}
7197 Magic Word: {{CURRENTMONTHNAME}}
7199 {{CURRENTMONTHNAME}}
7206 Magic Word: {{CURRENTMONTHNAMEGEN}}
7208 {{CURRENTMONTHNAMEGEN}}
7215 Magic Word: {{CURRENTTIME}}
7224 Magic Word: {{CURRENTHOUR}}
7233 Magic Word: {{CURRENTWEEK}} (@bug 4594)
7242 Magic Word: {{CURRENTYEAR}}
7251 Magic Word: {{CURRENTTIMESTAMP}}
7253 {{CURRENTTIMESTAMP}}
7260 Magic Words LOCAL (UTC)
7264 * {{LOCALMONTHNAME}}
7265 * {{LOCALMONTHNAMEGEN}}
7266 * {{LOCALMONTHABBREV}}
7275 * {{LOCALTIMESTAMP}}
7290 <li> 19700101000203</li></ul>
7295 Magic Word: {{FULLPAGENAME}}
7297 title=[[User:Ævar Arnfjörð Bjarmason]]
7301 <p>User:Ævar Arnfjörð Bjarmason
7306 Magic Word: {{FULLPAGENAMEE}}
7308 title=[[User:Ævar Arnfjörð Bjarmason]]
7312 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7317 Magic Word: {{TALKSPACE}}
7319 title=[[User:Ævar Arnfjörð Bjarmason]]
7328 Magic Word: {{TALKSPACE}}, same namespace
7330 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7339 Magic Word: {{TALKSPACE}}, main namespace
7341 title=[[Parser Test]]
7350 Magic Word: {{TALKSPACEE}}
7352 title=[[User:Ævar Arnfjörð Bjarmason]]
7361 Magic Word: {{SUBJECTSPACE}}
7363 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7372 Magic Word: {{SUBJECTSPACE}}, same namespace
7374 title=[[User:Ævar Arnfjörð Bjarmason]]
7383 Magic Word: {{SUBJECTSPACE}}, main namespace
7385 title=[[Parser Test]]
7393 Magic Word: {{SUBJECTSPACEE}}
7395 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7404 Magic Word: {{NAMESPACE}}
7406 title=[[User:Ævar Arnfjörð Bjarmason]]
7415 Magic Word: {{NAMESPACEE}}
7417 title=[[User:Ævar Arnfjörð Bjarmason]]
7426 Magic Word: {{NAMESPACENUMBER}}
7428 title=[[User:Ævar Arnfjörð Bjarmason]]
7437 Magic Word: {{SUBPAGENAME}}
7439 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7448 Magic Word: {{SUBPAGENAMEE}}
7450 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
7459 Magic Word: {{ROOTPAGENAME}}
7461 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7465 <p>Ævar Arnfjörð Bjarmason
7470 Magic Word: {{ROOTPAGENAMEE}}
7472 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
7476 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7481 Magic Word: {{BASEPAGENAME}}
7483 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7487 <p>Ævar Arnfjörð Bjarmason
7492 Magic Word: {{BASEPAGENAMEE}}
7494 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
7498 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7503 Magic Word: {{TALKPAGENAME}}
7505 title=[[User:Ævar Arnfjörð Bjarmason]]
7509 <p>User talk:Ævar Arnfjörð Bjarmason
7514 Magic Word: {{TALKPAGENAMEE}}
7516 title=[[User:Ævar Arnfjörð Bjarmason]]
7520 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7525 Magic Word: {{SUBJECTPAGENAME}}
7527 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7531 <p>User:Ævar Arnfjörð Bjarmason
7536 Magic Word: {{SUBJECTPAGENAMEE}}
7538 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7540 {{SUBJECTPAGENAMEE}}
7542 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7547 Magic Word: {{NUMBEROFFILES}}
7556 Magic Word: {{PAGENAME}}
7558 title=[[User:Ævar Arnfjörð Bjarmason]]
7562 <p>Ævar Arnfjörð Bjarmason
7567 Magic Word: {{PAGENAME}} with metacharacters
7569 title=[['foo & bar = baz']]
7573 <p><i>'foo & bar = baz'</i>
7578 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
7580 title=[[*RFC 1234 http://example.com/]]
7584 <p>*RFC 1234 http://example.com/
7589 Magic Word: {{PAGENAMEE}}
7591 title=[[User:Ævar Arnfjörð Bjarmason]]
7595 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7600 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
7602 title=[[*RFC 1234 http://example.com/]]
7606 <p>*RFC_1234_http://example.com/
7611 Magic Word: {{REVISIONID}}
7620 Magic Word: {{SCRIPTPATH}}
7629 Magic Word: {{STYLEPATH}}
7638 Magic Word: {{SERVER}}
7642 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7647 Magic Word: {{SERVERNAME}}
7656 Magic Word: {{SITENAME}}
7665 Case-sensitive magic words, when cased differently, should just be template transclusions
7672 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
7673 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
7674 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
7675 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
7680 Case-insensitive magic words should still work with weird casing.
7690 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
7695 Namespace 1 {{ns:1}}
7704 Namespace 1 {{ns:01}}
7713 Namespace 0 {{ns:0}} (bug 4783)
7721 Namespace 0 {{ns:00}} (bug 4783)
7729 Namespace -1 {{ns:-1}}
7738 Namespace User {{ns:User}}
7747 Namespace User talk {{ns:User_talk}}
7756 Namespace User talk {{ns:uSeR tAlK}}
7765 Namespace File {{ns:File}}
7774 Namespace File {{ns:Image}}
7783 Namespace (lang=de) Benutzer {{ns:User}}
7794 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
7800 <p>Benutzer Diskussion
7808 {{urlencode:hi world?!}}
7809 {{urlencode:hi world?!|WIKI}}
7810 {{urlencode:hi world?!|PATH}}
7811 {{urlencode:hi world?!|QUERY}}
7821 Magic Word: prioritize type info over data-parsoid
7827 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
7831 Magic Word: serialize on separate line (parsoid)
7833 parsoid=wt2wt,html2wt
7839 foo<meta property="mw:PageProp/notoc"/>bar
7843 Magic Word: rt non-english wikis
7850 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
7857 Magic links: internal link to RFC (bug 479)
7861 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
7866 Magic links: RFC (bug 479)
7870 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
7875 Magic links: ISBN (bug 1937)
7879 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
7884 Magic links: PMID incorrectly converts space to underscore
7888 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
7897 Nonexistent template
7899 {{thistemplatedoesnotexist}}
7901 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
7906 Template with invalid target containing tags
7908 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
7910 <p>{{a<b>b</b>|foo|a=b|a = b}}
7915 Template with invalid target containing unclosed tag
7917 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
7919 <p>{{a<b>|foo|a=b|a = b}}</b>
7924 Template with invalid target containing wikilink
7928 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
7931 <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>
7937 This is a test template
7945 <p>This is a test template
7950 Template with explicit namespace
7954 <p>This is a test template
7962 This is a test template with parameter {{{param}}}
7968 {{paramtest|param=foo}}
7970 <p>This is a test template with parameter foo
7975 Template:paramtestnum
7981 Template unnamed parameter
7983 {{paramtestnum|Main Page|the main page}}
7985 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
7990 Template:templatesimple
7996 Template:templateredirect
7998 #redirect [[Template:templatesimple]]
8002 Template:templateasargtestnum
8008 Template:templateasargtest
8010 {{template{{{templ}}}}}
8014 Template:templateasargtest2
8020 Template with template name as unnamed argument
8022 {{templateasargtestnum|templatesimple}}
8029 Template with template name as argument
8031 {{templateasargtest|templ=simple}}
8038 Template with template name as argument (2)
8040 {{templateasargtest2|templ=templatesimple}}
8047 Template:templateasargtestdefault
8049 {{{{{templ|templatesimple}}}}}
8059 Template with default value
8061 {{templateasargtestdefault}}
8068 Template with default value (value set)
8070 {{templateasargtestdefault|templ=templa}}
8079 {{templateredirect}}
8086 Template with argument in separate line
8088 {{ templateasargtest |
8096 Template with complex template as argument
8099 param ={{ templateasargtest |
8102 <p>This is a test template with parameter (test)
8107 Template with thumb image (with link in description)
8110 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
8112 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>
8117 Template:complextemplate
8119 {{{1}}} {{paramtest|
8120 param ={{{param}}}}}
8124 Template with complex arguments
8127 param ={{ templateasargtest |
8128 templ = simple }}|[[Template:complextemplate|link]]}}
8130 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
8135 BUG 553: link with two variables in a piped link
8138 |[[{{{1}}}|{{{2}}}]]
8143 <td>[[{{{1}}}|{{{2}}}]]
8149 Magic variable as template parameter
8151 {{paramtest|param={{SITENAME}}}}
8153 <p>This is a test template with parameter MediaWiki
8160 [[{{{param}}}|link]]
8164 Template parameter as link source
8166 {{linktest|param=Main Page}}
8168 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
8173 Template-generated attribute string (k='v')
8175 <span {{attr_str|id|v1}}>bar</span>
8177 <p><span id="v1">bar</span>
8184 including another template, {{paramtest|param={{{arg}}}}}
8188 Template passing argument to another template
8190 {{paramtest2|arg='hmm'}}
8192 <p>including another template, This is a test template with parameter 'hmm'
8203 Template as link source
8207 [[{{linktest2}}|Main Page]]
8209 [[{{linktest2}}]]Page
8211 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8212 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8213 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
8231 Template infinite loop
8235 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
8240 Template from main namespace
8259 BUG 529: Template with table, not included at beginning of line
8278 BUG 523: Template shouldn't eat newline (or add an extra one before table)
8298 BUG 41: Template parameters shown as broken links
8307 Template with targets containing wikilinks
8311 {{[[{{echo|foo}}]]}}
8313 {{{{echo|[[foo}}]]}}
8315 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8316 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
8324 ''None'' of '''this''' should be
8326 but rather passed unmodified
8330 # hmm, fix this or just deprecate msgnw and document its behavior?
8336 {{msgnw:MSGNW test}}
8338 <p>''None'' of '''this''' should be
8340 but rather passed unmodified
8348 {{int:youhavenewmessages|lots of money|not!}}
8350 <p>You have lots of money (not!).
8357 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8361 <includeonly> and <noinclude> being included
8372 <onlyinclude>Foo</onlyinclude>bar
8376 <onlyinclude> being included
8388 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
8392 <onlyinclude> and <includeonly> being included
8401 <includeonly> and <noinclude> on a page
8403 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8410 Un-closed <noinclude>
8417 <onlyinclude> on a page
8419 <onlyinclude>Foo</onlyinclude>bar
8426 Un-closed <onlyinclude>
8433 Self-closed noinclude, includeonly, onlyinclude tags
8444 Unbalanced includeonly and noinclude tags
8448 |b</noinclude></noinclude>
8449 |c</noinclude></includeonly>
8450 |d</includeonly></includeonly>
8459 <td>c</includeonly>
8461 <td>d</includeonly></includeonly>
8467 Template:Includeonly section
8470 ==Includeonly section==
8476 Bug 6563: Edit link generation for section shown by <includeonly>
8478 {{includeonly section}}
8480 <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>
8481 <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>
8485 # Uses same input as the contents of [[Template:Includeonly section]]
8487 Bug 6563: Section extraction for section shown by <includeonly>
8492 ==Includeonly section==
8500 Bug 6563: Edit link generation for section suppressed by <includeonly>
8503 ==Includeonly section==
8507 <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>
8512 Bug 6563: Section extraction for section suppressed by <includeonly>
8517 ==Includeonly section==
8525 Un-closed <includeonly>
8531 # TODO: test with DOM fragment reuse!
8533 Parsoid: DOM fragment reuse
8535 parsoid=wt2wt,wt2html
8537 a{{echo|b<table></table>c}}d
8549 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
8550 <table></table>c"}},"i":0}}]}'>b</span>
8551 <table about="#mwt1"></table><span about="#mwt1">c</span>d
8554 <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">
8556 <table about="#mwt2"></table><span about="#mwt2">
8558 <p about="#mwt2">cd</p>
8561 <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">
8564 <table about="#mwt3"></table><span about="#mwt3">
8567 <p about="#mwt3">b</p>
8571 Parsoid: Merge double tds (bug 50603)
8580 <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>
8585 Parsoid: Merge double tds in nested transclusion content (bug 50603)
8595 <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}}]}'>
8597 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
8603 ### <includeonly> and <noinclude> in attributes
8606 0. includeonly around the entire attribute
8608 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
8610 <p><span id="v2">bar</span>
8615 1. includeonly in html attr key
8617 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
8619 <p><span id="foo">bar</span>
8624 2. includeonly in html attr value
8626 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
8627 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
8629 <p><span id="v1">bar</span>
8630 <span id="v1">bar</span>
8635 3. includeonly in part of an attr value
8637 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
8639 <p><span style="color:red;">bar</span>
8644 4. includeonly in table attributes
8668 ### Token Stream Patcher tests
8670 ### These tests won't always pass wt2wt and other modes because
8671 ### on serialization, the table will be output on a new line.
8672 ### For now, we are blacklisting them, and using this to test selser.
8676 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
8678 parsoid=wt2html,wt2wt
8680 {{echo|}}{| width = '100%'
8684 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
8685 <table width="100%">
8688 <td>foo</td></tr></tbody></table>
8692 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
8694 parsoid=wt2html,wt2wt
8696 <includeonly>a</includeonly>{| {{{b}}}
8700 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":"</includeonly>"}'/><span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>{{{b}}}</span><table about="#mwt1" typeof="mw:Param" data-parsoid='{"a":{" ":null},"sa":{" ":""},"src":"{| {{{b}}}\n|c\n|}"}'>
8701 <tbody><tr><td>c</td></tr>
8706 ### Testing parsing of templates where a template arg
8707 ### has the same name as the template itself.
8717 Templates: Template Name/Arg clash: 1. Use of positional param
8726 Templates: Template Name/Arg clash: 2. Use of named param
8735 Templates: Template Name/Arg clash: 3. Use of named param with empty input
8744 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
8748 Templates: 1. Simple use
8757 Templates: 2. Inside a block tag
8759 <div>{{echo|Foo}}</div>
8760 <blockquote>{{echo|Foo}}</blockquote>
8763 <blockquote>Foo</blockquote>
8768 Templates: P-wrapping: 1a. Templates on consecutive lines
8779 Templates: P-wrapping: 1b. Templates on consecutive lines
8793 Templates: P-wrapping: 1c. Templates on consecutive lines
8796 {{echo|bar}} <div>baz</div>
8805 Templates: P-wrapping: 1d. Template preceded by comment-only line
8814 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
8818 Templates: Inline Text: 1. Multiple template uses
8820 {{echo|Foo}}bar{{echo|baz}}
8827 Templates: Inline Text: 2. Back-to-back template uses
8829 {{echo|Foo}}{{echo|bar}}
8836 Templates: Block Tags: 1. Multiple template uses
8838 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
8840 <div>Foo</div><div>bar</div><div>baz</div>
8845 Templates: Block Tags: 2. Back-to-back template uses
8847 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
8849 <div>Foo</div><div>bar</div>
8854 Templates: Links: 1. Simple example
8856 {{echo|[[Foo|bar]]}}
8858 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8863 Templates: Links: 2. Generation of link href
8865 [[{{echo|Foo}}|bar]]
8867 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8872 Templates: Links: 3. Generation of part of a link href
8874 [[Fo{{echo|o}}|bar]]
8878 [[Foo{{echo|bar}}baz]]
8880 [[Foo{{echo|bar}}|bar]]
8882 [[:Foo{{echo|bar}}]]
8884 [[:Foo{{echo|bar}}|bar]]
8886 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8887 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
8888 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
8889 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
8890 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
8891 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
8896 Templates: Links: 4. Multiple templates generating link href
8898 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
8900 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
8905 Templates: Links: 5. Generation of link text
8907 [[Foo|{{echo|bar}}]]
8909 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8914 Templates: Links: 5. Nested templates (only outermost template should be marked)
8916 {{echo|[[{{echo|Foo}}|bar]]}}
8918 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8923 Templates: HTML Tag: 1. Generation of HTML attr. key
8925 <div {{echo|style}}="color:red;">foo</div>
8927 <div style="color:red;">foo</div>
8932 Templates: HTML Tag: 2. Generation of HTML attr. value
8934 <div style={{echo|'color:red;'}}>foo</div>
8936 <div style="color:red;">foo</div>
8941 Templates: HTML Tag: 3. Generation of HTML attr key and value
8943 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
8945 <div style="color:red;">foo</div>
8950 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
8952 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
8954 <div title="This is a long title with just one piece templated">foo</div>
8959 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
8961 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
8963 <div title="This is a long title with just one piece templated">foo</div>
8968 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
8970 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
8972 <div title="This is a long title with just one piece templated">foo</div>
8977 Templates: HTML Tag: 7. Generation of partial attribute key string
8979 <div st{{echo|yle}}="color:red;">foo</div>
8981 <div style="color:red;">foo</div>
8986 Templates: HTML Tables: 1. Generating start of a HTML table
8988 {{echo|<table><tr><td>foo</td>}}</tr></table>
8990 <table><tr><td>foo</td></tr></table>
8995 Templates: HTML Tables: 2a. Generating middle of a HTML table
8997 <table><tr>{{echo|<td>foo</td>}}</tr></table>
8999 <table><tr><td>foo</td></tr></table>
9004 Templates: HTML Tables: 2b. Generating middle of a HTML table
9006 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9008 <table><tr><td>foo</td></tr></table>
9013 Templates: HTML Tables: 3. Generating end of a HTML table
9015 <table><tr>{{echo|<td>foo</td></tr></table>}}
9017 <table><tr><td>foo</td></tr></table>
9022 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9024 {{echo|<table>}}<tr><td>foo</td></tr></table>
9026 <table><tr><td>foo</td></tr></table>
9031 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9033 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9035 <table><tr><td>foo</td></tr></table>
9040 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9042 <table><tr>{{echo|<td>}}foo</td></tr></table>
9044 <table><tr><td>foo</td></tr></table>
9049 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9051 <table><tr><td>foo{{echo|</td>}}</tr></table>
9053 <table><tr><td>foo</td></tr></table>
9058 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9060 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9062 <table><tr><td>foo</td></tr></table>
9067 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
9069 <table><tr><td>foo</td></tr>{{echo|</table>}}
9071 <table><tr><td>foo</td></tr></table>
9076 Templates: HTML Tables: 5. Proper fostering of categories from inside
9078 parsoid=wt2html,wt2wt
9080 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
9081 <!--Two categories (Bug 50330)-->
9082 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
9084 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
9085 <!--Two categories (Bug 50330)-->
9086 <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>
9090 Templates: Wiki Tables: 1a. Fostering of entire template content
9098 <tr><td></td></tr></table>
9103 Templates: Wiki Tables: 1b. Fostering of entire template content
9116 <tr><td></td></tr></table>
9121 Templates: Wiki Tables: 2. Fostering of partial template content
9131 <tr><td></td></tr></table>
9136 Templates: Wiki Tables: 3. td-content via multiple templates
9139 {{echo|{{pipe}}a}}{{echo|b}}
9150 Templates: Wiki Tables: 4. Templated tags, no content
9156 <tr><td></td></tr></table>
9161 Templates: Wiki Tables: 5. Templated tags, regular td-tags
9175 Templates: Wiki Tables: 6. Templated tags, templated td-tags
9189 Templates: Lists: Multi-line list-items via templates
9191 *{{echo|a {{nonexistent|
9193 *{{echo|b {{nonexistent|
9196 <ul><li>a <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li>
9197 <li>b <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li></ul>
9202 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
9204 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
9206 <p><i>ab</i>c<i>d</i>e
9211 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
9212 (PHP parser generates misnested html)
9214 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
9216 <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>
9220 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
9221 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
9223 parsoid=wt2html,wt2wt
9225 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
9227 <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>
9228 <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>
9229 <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>
9233 Templates: Ugly nesting: 4. Divs opened/closed across templates
9235 a<div>b{{echo|c</div>d}}e
9242 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
9248 |{{echo|foo</table>}}
9252 <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|}"]}'>
9256 <td>foo</td></tr></tbody></table><span about="#mwt1">
9257 </span><span about="#mwt1">|bar</span><span about="#mwt1">
9262 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
9272 <td>1. {{echo|foo </table>}}</td>
9274 <td>2. {{echo|baz </table>}}</td>
9287 <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>"]}'>
9292 <td>1. foo </td></tr></tbody></table></td>
9294 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
9295 </span><span about="#mwt2">
9296 </span><span about="#mwt2">
9297 </span><span about="#mwt2">abc</span><span about="#mwt2">
9298 </span><span about="#mwt2">
9299 </span><span about="#mwt2">
9300 </span><span about="#mwt2">
9301 </span><span about="#mwt2">
9302 </span><span about="#mwt2">
9303 </span><span about="#mwt2">xyz</span><span about="#mwt2">
9304 </span><span about="#mwt2">
9309 Templates: Ugly templates: 3. newline-only template parameter
9318 # This looks like a bug: a single newline triggers p/br for some reason.
9320 Templates: Ugly templates: 4. newline-only template parameter inconsistency
9329 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
9330 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
9332 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
9338 <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
9339 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9343 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
9344 # that are "identical" and generate nesting cycles in the algorithm
9346 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
9348 {{echo|<table><tr><td><table>}}
9352 <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"}'>
9353 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9354 </table></td></tr></tbody></table>
9358 Parser Functions: 1. Simple example
9367 Parser Functions: 2. Nested use (only outermost should be marked up)
9376 ### Pre-save transform tests
9379 pre-save transform: subst:
9385 This is a test template
9389 pre-save transform: normal template
9399 pre-save transform: nonexistent template
9403 {{thistemplatedoesnotexist}}
9405 {{thistemplatedoesnotexist}}
9410 pre-save transform: subst magic variables
9419 # This is bug 89, which I fixed. -- wtm
9421 pre-save transform: subst: templates with parameters
9425 {{subst:paramtest|param="something else"}}
9427 This is a test template with parameter "something else"
9433 <nowiki>'''not wiki'''</nowiki>
9437 pre-save transform: nowiki in subst (bug 1188)
9441 {{subst:nowikitest}}
9443 <nowiki>'''not wiki'''</nowiki>
9448 Template:commenttest
9450 This template has <!-- a comment --> in it.
9454 pre-save transform: comment in subst (bug 1936)
9458 {{subst:commenttest}}
9460 This template has <!-- a comment --> in it.
9464 pre-save transform: unclosed tag
9468 <nowiki>'''not wiki'''
9470 <nowiki>'''not wiki'''
9474 pre-save transform: mixed tag case
9478 <NOwiki>'''not wiki'''</noWIKI>
9480 <NOwiki>'''not wiki'''</noWIKI>
9484 pre-save transform: unclosed comment in <nowiki>
9488 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9490 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9493 # Leading @ in this template definition works around a limitation
9494 # in parsoid's parserTests which otherwise strips the <span> from the
9495 # result (confusing it for a template wrapper)
9499 @<span onmouseover="alert('crap')">Oh no</span>
9503 (confirming safety of fix for subst bug 1936)
9505 {{Template:dangerous}}
9507 <p>@<span>Oh no</span>
9512 pre-save transform: comment containing gallery (bug 5024)
9516 <!-- <gallery>data</gallery> -->
9518 <!-- <gallery>data</gallery> -->
9522 pre-save transform: comment containing extension
9526 <!-- <tag>data</tag> -->
9528 <!-- <tag>data</tag> -->
9532 pre-save transform: comment containing nowiki
9536 <!-- <nowiki>data</nowiki> -->
9538 <!-- <nowiki>data</nowiki> -->
9542 pre-save transform: <noinclude> in subst (bug 3298)
9552 pre-save transform: <onlyinclude> in subst (bug 3298)
9564 {{<includeonly>subst:</includeonly>Includes}}
9568 Template:SafeSubstTest
9570 {{<includeonly>safesubst:</includeonly>Includes}}
9574 bug 22297: safesubst: works during PST
9578 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
9584 bug 22297: safesubst: works during normal parse
9593 subst: does not work during normal parse
9597 <p>{{subst:Includes}}
9602 pre-save transform: context links ("pipe trick")
9606 [[Article (context)|]]
9609 [[Bar:Article (context)|]]
9610 [[:Bar:Article (context)|]]
9612 [[|Article (context)]]
9616 [[Article (context)|Article]]
9617 [[Bar:Article|Article]]
9618 [[:Bar:Article|Article]]
9619 [[Bar:Article (context)|Article]]
9620 [[:Bar:Article (context)|Article]]
9622 [[Article (context)]]
9623 [[Bar:X (Y) Z|X (Y) Z]]
9624 [[:Bar:X (Y) Z|X (Y) Z]]
9628 pre-save transform: context links ("pipe trick") with interwiki prefix
9632 [[interwiki:Article|]]
9633 [[:interwiki:Article|]]
9634 [[interwiki:Bar:Article|]]
9635 [[:interwiki:Bar:Article|]]
9637 [[interwiki:Article|Article]]
9638 [[:interwiki:Article|Article]]
9639 [[interwiki:Bar:Article|Bar:Article]]
9640 [[:interwiki:Bar:Article|Bar:Article]]
9644 pre-save transform: context links ("pipe trick") with parens in title
9646 pst title=[[Somearticle (context)]]
9650 [[Article (context)|Article]]
9654 pre-save transform: context links ("pipe trick") with comma in title
9656 pst title=[[Someplace, Somewhere]]
9659 [[Otherplace, Elsewhere|]]
9660 [[Otherplace, Elsewhere, Anywhere|]]
9662 [[Otherplace, Somewhere|Otherplace]]
9663 [[Otherplace, Elsewhere|Otherplace]]
9664 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
9668 pre-save transform: context links ("pipe trick") with parens and comma
9670 pst title=[[Someplace (IGNORED), Somewhere]]
9673 [[Otherplace (place), Elsewhere|]]
9675 [[Otherplace, Somewhere|Otherplace]]
9676 [[Otherplace (place), Elsewhere|Otherplace]]
9680 pre-save transform: context links ("pipe trick") with comma and parens
9682 pst title=[[Who, me? (context)]]
9685 [[Me, Myself, and I (1937 song)|]]
9687 [[Yes, you. (context)|Yes, you.]]
9688 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
9692 pre-save transform: context links ("pipe trick") with namespace
9694 pst title=[[Ns:Somearticle]]
9698 [[Ns:Article|Article]]
9702 pre-save transform: context links ("pipe trick") with namespace and parens
9704 pst title=[[Ns:Somearticle (context)]]
9708 [[Ns:Article (context)|Article]]
9712 pre-save transform: context links ("pipe trick") with namespace and comma
9714 pst title=[[Ns:Somearticle, Context, Whatever]]
9718 [[Ns:Article, Context, Whatever|Article]]
9722 pre-save transform: context links ("pipe trick") with namespace, comma and parens
9724 pst title=[[Ns:Somearticle, Context (context)]]
9728 [[Ns:Article (context)|Article]]
9732 pre-save transform: context links ("pipe trick") with namespace, parens and comma
9734 pst title=[[Ns:Somearticle (IGNORED), Context]]
9738 [[Ns:Article, Context|Article]]
9742 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
9746 [[Article(context)|]]
9747 [[Bar:Article(context)|]]
9748 [[:Bar:Article(context)|]]
9749 [[|Article(context)]]
9753 [[Article(context)|Article]]
9754 [[Bar:Article(context)|Article]]
9755 [[:Bar:Article(context)|Article]]
9756 [[Article(context)]]
9758 [[:Bar:X(Y)Z|X(Y)Z]]
9762 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
9766 [[Article (context)|]]
9767 [[Bar:Article (context)|]]
9768 [[:Bar:Article (context)|]]
9769 [[|Article (context)]]
9773 [[Article (context)|Article]]
9774 [[Bar:Article (context)|Article]]
9775 [[:Bar:Article (context)|Article]]
9776 [[Article (context)]]
9777 [[Bar:X (Y) Z|X (Y) Z]]
9778 [[:Bar:X (Y) Z|X (Y) Z]]
9782 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
9786 [[Article(context)|]]
9787 [[Bar:Article(context)|]]
9788 [[:Bar:Article(context)|]]
9789 [[|Article(context)]]
9793 [[Article(context)|Article]]
9794 [[Bar:Article(context)|Article]]
9795 [[:Bar:Article(context)|Article]]
9796 [[Article(context)]]
9798 [[:Bar:X(Y)Z|X(Y)Z]]
9802 pre-save transform: context links ("pipe trick") with commas (bug 21660)
9806 [[Article (context), context|]]
9807 [[Article (context),context|]]
9808 [[Bar:Article (context), context|]]
9809 [[Bar:Article (context),context|]]
9810 [[:Bar:Article (context), context|]]
9811 [[:Bar:Article (context),context|]]
9813 [[Article (context), context|Article]]
9814 [[Article (context),context|Article]]
9815 [[Bar:Article (context), context|Article]]
9816 [[Bar:Article (context),context|Article]]
9817 [[:Bar:Article (context), context|Article]]
9818 [[:Bar:Article (context),context|Article]]
9822 pre-save transform: trim trailing empty lines
9826 Empty lines are trimmed
9832 Empty lines are trimmed
9836 pre-save transform: Signature expansion
9841 * <noinclude>~~~</noinclude>
9842 * <includeonly>~~~</includeonly>
9843 * <onlyinclude>~~~</onlyinclude>
9845 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
9846 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
9847 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
9848 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
9853 pre-save transform: Signature expansion in nowiki tags (bug 93)
9859 <nowiki>~~~~</nowiki>
9861 <includeonly><nowiki>~~~~</nowiki></includeonly>
9863 <noinclude><nowiki>~~~~</nowiki></noinclude>
9865 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
9867 {{subst:Foo}} shall be converted to FOO
9869 As well as inside noinclude/onlyinclude
9870 <noinclude>{{subst:Foo}}</noinclude>
9871 <onlyinclude>{{subst:Foo}}</onlyinclude>
9873 But not inside includeonly
9874 <includeonly>{{subst:Foo}}</includeonly>
9878 <nowiki>~~~~</nowiki>
9880 <includeonly><nowiki>~~~~</nowiki></includeonly>
9882 <noinclude><nowiki>~~~~</nowiki></noinclude>
9884 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
9886 FOO shall be converted to FOO
9888 As well as inside noinclude/onlyinclude
9889 <noinclude>FOO</noinclude>
9890 <onlyinclude>FOO</onlyinclude>
9892 But not inside includeonly
9893 <includeonly>{{subst:Foo}}</includeonly>
9897 Parsoid: Recognize nowiki with trailing space in tags
9901 <nowiki ><div>[[foo]]</nowiki >
9909 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
9916 Parsoid: Recognize nowiki with odd capitalization
9920 <noWikI ><div>[[foo]]</Nowiki >
9922 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
9927 Parsoid: Escape nowiki with trailing space in tags
9931 <nowiki > foo </nowiki >
9937 <p><nowiki > foo </nowiki ></p>
9938 <p>a<nowiki />b</p>
9939 <p>c<nowiki/ >d</p>
9943 Parsoid: Escape weird noWikI capitalizations
9947 <noWikI > foo </NoWikI >
9949 <p><noWikI > foo </NoWikI ></p>
9953 ### Message transform tests
9956 message transform: magic variables
9966 message transform: should not transform wiki markup
9976 message transform: <noinclude> in transcluded template (bug 4926)
9986 message transform: <onlyinclude> in transcluded template (bug 4926)
9996 {{#special:}} page name, known
10000 {{#special:Recentchanges}}
10002 Special:RecentChanges
10006 {{#special:}} page name with subpage, known
10010 {{#special:Recentchanges/param}}
10012 Special:RecentChanges/param
10016 {{#special:}} page name, unknown
10020 {{#special:foobar nonexistent}}
10022 Special:Foobar nonexistent
10026 {{#speciale:}} page name, known
10030 {{#speciale:Recentchanges}}
10032 Special:RecentChanges
10036 {{#speciale:}} page name with subpage, known
10040 {{#speciale:Recentchanges/param}}
10042 Special:RecentChanges/param
10046 {{#speciale:}} page name, unknown
10050 {{#speciale:foobar nonexistent}}
10052 Special:Foobar_nonexistent
10058 ### For Parsoid-specific tests, see
10059 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
10064 parsoid=wt2html,wt2wt,html2html
10066 [[Image:foobar.jpg]]
10068 <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>
10071 <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>
10076 Simple image (using File: namespace, now canonical)
10078 [[File:Foobar.jpg]]
10080 <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>
10083 <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>
10088 Right-aligned image
10090 [[File:Foobar.jpg|right]]
10092 <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>
10095 <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>
10101 [[File:Foobar.jpg|right|Caption text]]
10103 <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>
10106 <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>
10110 Image with caption, bug 53312 #1
10112 [[File:Foobar.jpg|right|Caption page stuff]]
10114 <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>
10117 <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>
10121 Image with caption, bug 53312 #2
10123 [[File:Foobar.jpg|right|Caption page=]]
10125 <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>
10128 <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>
10132 Image with caption, bug 53312 #3
10134 [[File:Foobar.jpg|right|Caption page=stuff]]
10136 <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>
10139 <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>
10143 Allow empty links in image captions (Bug 60753)
10147 [[File:Foobar.jpg|thumb|Caption [[Link1]]
10152 <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>
10155 <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>
10157 <a rel="mw:WikiLink" href="./Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"},"dsr":[47,56,2,2]}'>Link2</a>
10158 </figcaption></figure>
10162 Link with empty target
10171 Image with empty attribute
10173 parsoid=wt2html,wt2wt,html2html
10175 [[File:Foobar.jpg|right||Caption text]]
10177 <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>
10180 <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>
10184 1. Block image with individual attributes from templates
10186 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
10188 <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>
10191 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[24,38,null,null]}\">137px</span>"}]]}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
10195 2. Block Image with individual attributes from templates
10197 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
10199 <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>
10202 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;thumb&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,32,null,null]}\">thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[33,47,null,null]}\">137px</span>"}]]}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
10206 3. Inline image with individual attributes from templates
10208 [[File:Foobar.jpg|{{echo|50px}}]]
10210 <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>
10213 <p><span typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;50px&quot;}},&quot;i&quot;:0}}]}\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,31,null,null]}\">50px</span>"}]]}' data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
10216 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
10217 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
10219 Image with multiple attributes from the same template
10221 [[File:Foobar.jpg|{{image_attribs}}]]
10223 <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>
10226 <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>
10230 Image with link tails
10234 123[[File:Foobar.jpg]]456
10235 123[[File:Foobar.jpg|right]]456
10236 123[[File:Foobar.jpg|thumb]]456
10238 <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
10240 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
10241 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
10244 <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>
10245 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
10246 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
10250 Image with multiple captions -- only last one is accepted
10252 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
10254 <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>
10257 <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>
10261 Image with multiple widths -- use last
10263 [[File:Foobar.jpg|200px|300px|caption]]
10265 <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>
10268 <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>
10272 Image with multiple alignments -- use first (bug 48664)
10276 [[File:Foobar.jpg|thumb|left|right|center|caption]]
10278 [[File:Foobar.jpg|middle|text-top|caption]]
10280 <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>
10281 <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>
10284 <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>
10285 <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>
10289 Image with width attribute at different positions
10291 [[File:Foobar.jpg|200px|right|Caption]]
10292 [[File:Foobar.jpg|right|200px|Caption]]
10293 [[File:Foobar.jpg|right|Caption|200px]]
10295 <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>
10296 <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>
10297 <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>
10300 <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>
10301 <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>
10302 <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>
10305 # a sad bit of backward-compatibility
10307 Image with size specified with pxpx (bug 13500, 51628)
10309 parsoid=wt2html,wt2wt,html2html
10311 [[File:Foobar.jpg|20pxpx]]
10312 [[File:Foobar.jpg|200x20pxpx]]
10314 <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>
10315 <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>
10318 <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>
10322 Image with link parameter, wiki target
10324 [[File:Foobar.jpg|link=Main Page]]
10326 <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>
10329 <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>
10332 # parsoid bug 49293 (part 1)
10334 Image with link parameter, URL target
10336 [[File:Foobar.jpg|link=http://example.com/]]
10338 <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>
10341 <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>
10344 # parsoid bug 49293 (part 2)
10346 Image with link parameter, protocol-less URL target
10348 [[File:Foobar.jpg|link=//example.com/]]
10350 <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>
10353 <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>
10357 Image with link parameter, wgExternalLinkTarget
10359 [[Image:foobar.jpg|link=http://example.com/]]
10361 wgExternalLinkTarget='foobar'
10363 <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>
10368 Image with link parameter, wgNoFollowLinks set to false
10370 [[Image:foobar.jpg|link=http://example.com/]]
10372 wgNoFollowLinks=false
10374 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10379 Image with link parameter, wgNoFollowDomainExceptions
10381 [[Image:foobar.jpg|link=http://example.com/]]
10383 wgNoFollowDomainExceptions='example.com'
10385 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10390 Image with link parameter, wgExternalLinkTarget, unnamed parameter
10392 [[Image:foobar.jpg|link=http://example.com/|Title]]
10394 wgExternalLinkTarget='foobar'
10396 <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>
10401 Image with empty link parameter
10403 [[File:Foobar.jpg|link=]]
10405 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
10408 <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>
10412 Image with link parameter (wiki target) and unnamed parameter
10414 [[File:Foobar.jpg|link=Main_Page|Title]]
10416 <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>
10419 <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>
10423 Image with link parameter (URL target) and unnamed parameter
10425 [[File:Foobar.jpg|link=http://example.com/|Title]]
10427 <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>
10430 <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>
10434 Thumbnail image with link parameter
10437 parsoid=wt2html,wt2wt,html2html
10439 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
10441 <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>
10444 <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>
10448 Manually-specified thumbnail image
10452 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
10454 <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>
10457 <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>
10461 Manually-specified thumbnail image with explicit link to wiki page
10464 parsoid=wt2html,wt2wt,html2html
10466 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
10468 <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>
10471 <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>
10475 Manually-specified thumbnail image with explicit link to url
10478 parsoid=wt2html,wt2wt,html2html
10480 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
10482 <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>
10485 <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>
10489 Manually-specified thumbnail image with explicit no link
10492 parsoid=wt2html,wt2wt,html2html
10494 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
10496 <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>
10499 <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>
10503 Manually-specified thumbnail image with explicit link and alt text
10506 parsoid=wt2html,wt2wt,html2html
10508 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
10510 <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>
10513 <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>
10517 Image with frame and link
10519 parsoid=wt2html,wt2wt,html2html
10521 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
10523 <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>
10526 <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>
10530 Image with frame and link and explicit alt
10532 parsoid=wt2html,wt2wt,html2html
10534 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
10536 <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>
10539 <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>
10543 Image with wiki markup in implicit alt
10545 parsoid=wt2html,wt2wt,html2html
10547 [[Image:Foobar.jpg|testing '''bold''' in alt]]
10549 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
10551 <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>
10552 </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>
10555 <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>
10556 <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>
10559 ###################
10560 # Conflicting image format options.
10561 # First option specified should 'win'.
10562 # All three cases in each test should be identical.
10565 Image with 'frameless' first.
10567 parsoid=wt2html,wt2wt,html2html
10569 [[File:Foobar.jpg|frameless|caption]]
10571 [[File:Foobar.jpg|frameless|frame|caption]]
10573 [[File:Foobar.jpg|frameless|thumb|caption]]
10575 <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>
10576 </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>
10577 </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>
10580 <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>
10581 <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>
10582 <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>
10586 Image with 'frame' first.
10588 parsoid=wt2html,wt2wt,html2html
10590 [[File:Foobar.jpg|frame|caption]]
10591 [[File:Foobar.jpg|frame|frameless|caption]]
10592 [[File:Foobar.jpg|frame|thumb|caption]]
10594 <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>
10595 <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>
10596 <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>
10599 <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>
10603 Image with 'thumb' first.
10605 parsoid=wt2html,wt2wt,html2html
10607 [[File:Foobar.jpg|thumb|caption]]
10608 [[File:Foobar.jpg|thumb|frameless|caption]]
10609 [[File:Foobar.jpg|thumb|frame|caption]]
10611 <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>
10612 <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>
10613 <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>
10616 <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>
10619 ###################
10621 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
10622 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
10623 # Foobar has actual size of 1941x220
10624 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
10625 # a scalable format.
10626 # 2. Framed images always ignore size options; always render at default size.
10627 # 3. "Unspecified format" and border are the only types which can be
10631 Image: "unspecified format" and border enlarge
10633 parsoid=wt2html,wt2wt,html2html
10635 [[File:Foobar.jpg|2000px]]
10637 [[File:Foobar.jpg|border|2000px]]
10639 <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>
10640 </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>
10643 <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>
10644 <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>
10648 Image: "unspecified format" and border reduce
10650 parsoid=wt2html,wt2wt,html2html
10652 [[File:Foobar.jpg|1000px]]
10654 [[File:Foobar.jpg|border|1000px]]
10656 <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>
10657 </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>
10660 <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>
10661 <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>
10665 Image: thumbs reduce
10667 parsoid=wt2html,wt2wt,html2html
10669 [[File:Foobar.jpg|thumb|50px]]
10671 <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>
10674 <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>
10678 Image: bitmap thumbs can't be enlarged past original size, but vector can.
10680 parsoid=wt2html,wt2wt,html2html
10682 [[File:Foobar.jpg|thumb|2000px]]
10684 [[File:Foobar.svg|thumb|2000px]]
10686 <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>
10687 <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>
10690 <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>
10691 <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>
10695 Image: frameless can reduce in size
10697 parsoid=wt2html,wt2wt,html2html
10699 [[File:Foobar.jpg|frameless|50px]]
10701 <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>
10704 <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>
10708 Image: bitmap frameless can't be enlarged past original size, but vector can
10710 parsoid=wt2html,wt2wt,html2html
10712 [[File:Foobar.jpg|frameless|2000px]]
10714 [[File:Foobar.svg|frameless|2000px]]
10716 <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>
10717 </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>
10720 <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>
10721 <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>
10725 Image: framed images are always unscaled.
10727 parsoid=wt2html,wt2wt,html2html
10729 [[File:Foobar.jpg|frame]]
10731 [[File:Foobar.jpg|frame|50px]]
10733 [[File:Foobar.jpg|frame|50x50px]]
10735 [[File:Foobar.jpg|frame|2000px]]
10737 <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>
10738 <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>
10739 <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>
10740 <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>
10743 <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>
10746 ###################
10749 Link to image page- image page normally doesn't exists, hence edit link
10750 Add test with existing image page
10751 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
10755 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
10760 bug 18784 Link to non-existent image page with caption should use caption as link text
10762 [[:Image:test|caption]]
10764 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
10769 Frameless image caption with a free URL
10771 [[File:Foobar.jpg|http://example.com]]
10773 <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>
10776 <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>
10780 Thumbnail image caption with a free URL
10784 [[File:Foobar.jpg|thumb|http://example.com]]
10786 <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>
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><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
10793 Thumbnail image caption with a free URL and explicit alt
10796 parsoid=wt2html,wt2wt,html2html
10798 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
10800 <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>
10803 <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>
10807 SVG thumbnails with no language set
10810 [[File:Foobar.svg|thumb|caption]]
10812 <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>
10815 <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>
10819 SVG thumbnails with language de
10821 parsoid=wt2html,wt2wt,html2html
10823 [[File:Foobar.svg|thumb|caption|lang=de]]
10825 <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>
10828 <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>
10832 SVG thumbnails with invalid language code
10834 parsoid=wt2html,wt2wt,html2html
10836 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
10838 <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>
10841 <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>
10845 BUG 1887: A ISBN with a thumbnail
10847 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
10849 <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>
10852 <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>
10856 BUG 1887: A RFC with a thumbnail
10858 [[File:Foobar.jpg|thumb|This is RFC 12354]]
10860 <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>
10863 <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>
10867 BUG 1887: A mailto link with a thumbnail
10869 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
10871 <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>
10874 <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>
10877 # Pending resolution to bug 368
10879 BUG 648: Frameless image caption with a link
10881 [[File:Foobar.jpg|text with a [[link]] in it]]
10883 <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>
10886 <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>
10890 BUG 648: Frameless image caption with a link (suffix)
10892 [[File:Foobar.jpg|text with a [[link]]foo in it]]
10894 <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>
10897 <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>
10901 BUG 648: Frameless image caption with an interwiki link
10903 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
10905 <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>
10908 <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>
10912 BUG 648: Frameless image caption with a piped interwiki link
10914 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
10916 <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>
10919 <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>
10923 Escape HTML special chars in image alt text
10925 [[File:Foobar.jpg|& < > "]]
10927 <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>
10930 <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>
10934 BUG 499: Alt text should have Ӓ, not &1234;
10936 [[File:Foobar.jpg|♀]]
10938 <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>
10941 <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>
10945 Broken image caption with link
10947 parsoid=wt2html,wt2wt,html2html
10949 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
10951 <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.
10954 <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>
10958 Image caption containing another image
10960 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
10962 <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>
10965 <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>
10969 Image: caption containing a newline
10971 [[File:Foobar.jpg|This
10974 <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>
10977 <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>
10981 Image: caption containing leading space
10982 (The leading space should not trigger nowiki escaping in wt2wt mode)
10984 [[File:Foobar.jpg|thumb| bar]]
10986 <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>
10989 <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>
10993 Image: caption containing a table
10995 parsoid=wt2html,wt2wt,html2html
10997 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11003 and some more text.]]
11005 <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>
11008 <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
11011 <tr><th>Foo </th><th>Bar</th></tr>
11014 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11018 Bug 3090: External links other than http: in image captions
11020 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11022 <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>
11025 <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>
11031 parsoid=wt2html,wt2wt,html2html
11033 [[Image:foobar.jpg|a|class=b]]
11035 <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>
11038 <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>
11042 Localized image handling (1).
11044 parsoid=wt2html,wt2wt,html2html
11047 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
11049 <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>
11052 <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>
11056 Localized image handling (2).
11059 parsoid=wt2html,wt2wt,html2html
11062 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
11064 <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>
11067 <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>
11071 "border", "frameless" and "class" attributes on an image.
11074 parsoid=wt2html,wt2wt,html2html
11076 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
11078 <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>
11081 <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>
11084 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
11086 Invalid image attributes (bug 62500)
11089 parsoid=wt2html,wt2wt,html2html
11091 [[File:Foobar.jpg|thumb|float|left|caption]]
11093 [[File:Foobar.jpg|thumb|righ|caption]]
11095 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
11097 <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>
11098 <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>
11099 <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>
11102 <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>
11108 #REDIRECT [[File:Barfoo.jpg]]
11114 [[Image:Barfoo.jpg]]
11116 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
11121 Missing image with uploads disabled
11125 [[Image:Foobaz.jpg]]
11127 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
11131 # Parsoid-specific testing for images
11132 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11133 # Currently imperfect due to a flaw in the Parsoid testrunner
11135 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
11139 Parsoid-specific image handling - simple image with size and middle alignment
11141 [[File:Foobar.jpg|middle|50px]]
11143 <p><span class="mw-valign-middle" typeof="mw:Image">
11144 <a href="File:Foobar.jpg">
11145 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11152 Parsoid-specific image handling - simple image with size, middle alignment,
11153 non-standard namespace alias
11155 parsoid=wt2wt,wt2html,html2html
11157 [[Image:Foobar.jpg|middle|50px]]
11159 <p><span class="mw-valign-middle" typeof="mw:Image">
11160 <a href="File:Foobar.jpg">
11161 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11168 Parsoid-specific image handling - simple image with size and middle alignment
11171 [[File:Foobar.jpg|50px|middle]]
11173 <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>
11177 Parsoid-specific image handling - simple image with size and middle alignment
11178 and non-standard namespace name
11180 parsoid=wt2html,wt2wt,html2html
11182 [[Image:Foobar.jpg|50px|middle]]
11184 <p><span class="mw-valign-middle" typeof="mw:Image">
11185 <a href="File:Foobar.jpg">
11186 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11193 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
11195 [[File:Foobar.jpg|500x10px|baseline|caption]]
11197 <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>
11201 Parsoid-specific image handling - simple image with border and size spec
11203 [[File:Foobar.jpg|50px|border|caption]]
11205 <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>
11209 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11211 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
11213 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
11214 <a href="File:Foobar.jpg">
11215 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
11217 <figcaption>caption content</figcaption>
11222 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11225 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
11227 <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>
11231 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
11233 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
11235 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
11236 <a href="File:Foobar.jpg">
11237 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
11239 <figcaption>caption</figcaption>
11244 Parsoid-specific image handling - thumbnail with specific size, halign,
11245 valign, and caption (existing content)
11247 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
11249 <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>
11253 Parsoid-specific image handling - framed image with specific size and caption
11256 parsoid=wt2html,wt2wt,html2html
11258 [[File:Foobar.jpg|frame|500x50px|caption]]
11260 <figure typeof="mw:Image/Frame">
11261 <a href="File:Foobar.jpg">
11262 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11264 <figcaption>caption</figcaption>
11269 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
11272 parsoid=wt2html,wt2wt,html2html
11274 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
11276 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
11277 <a href="File:Foobar.jpg">
11278 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11280 <figcaption>caption</figcaption>
11285 Parsoid-specific image handling - frameless image with specific size, border, and caption
11287 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
11289 <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>
11293 Parsoid-specific image handling - simple image with a formatted caption
11295 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
11297 <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>"}'>
11298 <a href="File:Foobar.jpg">
11299 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
11304 Parsoid-specific image handling - caption with a template in it
11306 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
11308 <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>
11312 Parsoid-specific image handling - caption with unbalanced tags in it
11314 parsoid=wt2html,wt2wt,html2html
11317 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
11321 <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>
11326 Parsoid-specific image handling - empty caption (1)
11328 parsoid=wt2html,wt2wt
11330 [[File:Foobar.jpg|thumb|]]
11332 <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>
11335 # empty captions don't get serialized unless we're in the "round trip" case
11337 Parsoid-specific image handling - empty caption (2)
11341 <figure class="mw-default-size" typeof="mw:Image/Thumb">
11342 <a href="File:Foobar.jpg">
11343 <img resource="./File:Foobar.jpg"
11344 src="//example.com/images/3/3a/Foobar.jpg"
11345 height="25" width="220"/>
11347 <figcaption></figcaption>
11350 [[File:Foobar.jpg|thumb]]
11354 Parsoid-specific image handling - whitespace caption
11356 [[File:Foobar.jpg|thumb| ]]
11358 <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>
11362 Parsoid-specific image handling - lang option
11365 [[File:Foobar.svg|lang=de|caption]]
11369 <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>
11378 Subpage test/subpage
11386 subpage title=[[Subpage test]]
11390 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
11395 Subpage noslash link
11397 subpage title=[[Subpage test]]
11401 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
11405 # TODO: make this PHP-parser compatible!
11407 Relative subpage noslash link
11409 parsoid=wt2wt,wt2html,html2html
11410 subpage title=[[Subpage test/1/2/3/4]]
11416 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
11417 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
11421 Parsoid: dot-slash prefixed wikilinks
11431 </p><p>[[././baz/]]
11436 </p><p>[[././baz/]]
11441 Render invalid page names as plain text (bug 51090)
11454 [[{{echo|./../foo}}|bar]]
11455 [[{{echo|foo/.}}|bar]]
11456 [[{{echo|foo/..}}|bar]]
11457 [[{{echo|foo~~~~bar}}]]
11458 [[{{echo|foo>bar}}]]
11459 [[{{echo|foo././bar}}]]
11460 [[{{echo|foo{bar}}]]
11461 [[{{echo|foo}bar}}]]
11462 [[{{echo|foo[bar}}]]
11463 [[{{echo|foo]bar}}]]
11464 [[{{echo|foo<bar}}]]
11466 <p>[[./../foo|bar]]
11476 </p><p>[[./../foo|bar]]
11489 <p>[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]</p>
11490 <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>
11498 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
11503 BUG 561: {{/Subpage}}
11505 subpage title=[[Page]]
11509 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
11517 Category:MediaWiki User's Guide
11525 [[:Category:MediaWiki User's Guide]]
11527 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
11536 [[Category:MediaWiki User's Guide]]
11538 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11542 PAGESINCATEGORY invalid title fatal (r33546 fix)
11544 {{PAGESINCATEGORY:<bogus>}}
11551 Category with different sort key
11555 [[Category:MediaWiki User's Guide|Foo]]
11557 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11561 Category with identical sort key
11565 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11567 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11571 Category with empty sort key
11576 [[Category:MediaWiki User's Guide|]]
11578 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11582 Category with empty sort key and parentheses
11587 [[Category:Foo (bar)|]]
11589 [[Category:Foo (bar)|Foo]]
11593 Category with link tail
11598 123[[Category:Foo]]456
11600 123[[Category:Foo]]456
11604 Category with template
11609 [[Category:{{echo|Foo}}]]
11611 [[Category:{{echo|Foo}}]]
11615 Category with template in sort key
11620 [[Category:Foo|{{echo|Bar}}]]
11622 [[Category:Foo|{{echo|Bar}}]]
11626 Category with template in sort key and title
11631 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11633 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11637 Category / paragraph interactions
11639 Foo [[Category:Baz]] Bar
11641 Foo [[Category:Baz]]
11649 [[Category:Baz]] Bar
11662 {{echo|[[Category:Baz]]}}
11677 Parsoid: Serialize link to category page with colon escape
11683 [[:Category:Foo|Bar]]
11686 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
11687 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
11692 Parsoid: Link prefix/suffixes aren't applied to category links
11694 parsoid=wt2html,wt2wt,html2html
11699 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
11703 Parsoid: Serialize link to file page with colon escape
11709 [[:File:Foo.png|Bar]]
11712 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
11713 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
11718 Parsoid: Serialize a genuine category link without colon escape
11723 [[Category:Foo|Bar]]
11725 <link rel="mw:PageProp/Category" href="Category:Foo">
11726 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
11730 Parsoid: Defaultsort
11734 {{DEFAULTSORT:Foo}}
11736 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
11740 ### Inter-language links
11743 Inter-language links
11749 [[zh:食品]]
11751 es:Alimento fr:Nourriture zh:食品
11755 Duplicate interlanguage links (bug 24502)
11771 Basic section headings
11778 ===Smaller headline===
11781 <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>
11784 <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>
11787 <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>
11793 Section headings with TOC
11796 === Subheadline 1 ===
11797 ===== Skipping a level =====
11798 ====== Skipping a level ======
11802 ===Another headline===
11804 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11806 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
11808 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
11810 <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>
11812 <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>
11819 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
11821 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
11827 <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>
11828 <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>
11829 <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>
11830 <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>
11831 <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>
11834 <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>
11838 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
11840 Handling of sections up to level 6 and beyond
11843 == Level 2 Heading==
11844 === Level 3 Heading===
11845 ==== Level 4 Heading====
11846 ===== Level 5 Heading=====
11847 ====== Level 6 Heading======
11848 ======= Level 7 Heading=======
11849 ======== Level 8 Heading========
11850 ========= Level 9 Heading=========
11851 ========== Level 10 Heading==========
11853 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11855 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
11857 <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>
11859 <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>
11861 <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>
11863 <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>
11865 <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>
11866 <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>
11867 <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>
11868 <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>
11869 <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>
11883 <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>
11884 <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>
11885 <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>
11886 <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>
11887 <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>
11888 <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>
11889 <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>
11890 <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>
11891 <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>
11892 <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>
11897 TOC regression (bug 9764)
11901 ==== title 1.1.1 ====
11906 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11908 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
11910 <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>
11912 <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>
11915 <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>
11918 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
11920 <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>
11926 <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>
11927 <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>
11928 <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>
11929 <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>
11930 <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>
11931 <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>
11936 TOC with wgMaxTocLevel=3 (bug 6204)
11942 ==== title 1.1.1 ====
11947 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11949 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
11951 <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>
11952 <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>
11955 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
11957 <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>
11963 <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>
11964 <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>
11965 <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>
11966 <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>
11967 <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>
11968 <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>
11973 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
11979 ====Section 1.1.1====
11980 ====Section 1.1.1.1====
11983 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11985 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
11987 <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>
11990 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
11994 <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>
11995 <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>
11996 <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>
11997 <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>
11998 <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>
12004 Resolving duplicate section names
12009 <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>
12010 <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>
12015 Resolving duplicate section names with differing case (bug 10721)
12020 <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>
12021 <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>
12033 Template with sections, __NOTOC__
12040 <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>
12041 <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>
12042 <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>
12043 <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>
12048 __NOEDITSECTION__ keyword
12054 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
12055 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
12060 Link inside a section heading
12062 ==Section with a [[Main Page|link]] in it==
12064 <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>
12069 TOC regression (bug 12077)
12076 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12078 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12080 <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>
12083 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
12087 <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>
12088 <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>
12089 <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>
12094 BUG 1219 URL next to image (good)
12096 http://example.com [[Image:foobar.jpg]]
12098 <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>
12103 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
12106 The line above must have a trailing space!
12109 But just in case it doesn't...
12111 <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>
12112 <p>The line above must have a trailing space!
12114 <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>
12115 <p>But just in case it doesn't...
12120 Header with special characters (bug 25462)
12122 The tooltips shall not show entities to the user (ie. be double escaped)
12139 <p>The tooltips shall not show entities to the user (ie. be double escaped)
12141 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12143 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
12144 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
12145 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
12146 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
12147 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
12151 <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>
12154 <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>
12157 <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>
12160 <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>
12163 <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>
12169 Headers with excess '=' characters
12170 (Are similar tests necessary beyond the 1st level?)
12174 =''italic'' heading==
12175 ==''italic'' heading=
12177 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12179 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
12180 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
12181 <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>
12182 <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>
12186 <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>
12187 <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>
12188 <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>
12189 <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>
12194 HTML headers vs TOC (bug 23393)
12195 (__NOEDITSECTION__ for clearer output, doesn't matter here)
12207 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12209 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
12211 <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>
12212 <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>
12215 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
12217 <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>
12218 <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>
12224 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
12225 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
12226 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
12227 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
12228 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
12229 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
12234 Single-line or multiline-comments can follow headings
12236 parsoid=wt2html,wt2wt
12244 <h2><span class="mw-headline" id="foo">foo</span></h2>
12245 <h2><span class="mw-headline" id="bar">bar</span></h2>
12246 <h2><span class="mw-headline" id="baz">baz</span></h2>
12251 BUG 1219 URL next to image (broken)
12253 http://example.com[[Image:foobar.jpg]]
12255 <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>
12260 Bug 1186 news: in the middle of text
12262 http://en.wikinews.org/wiki/Wikinews:Workplace
12264 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
12270 Namespaced link must have a title
12279 Namespaced link must have a title (bad fragment version)
12281 [[Project:#fragment]]
12283 <p>[[Project:#fragment]]
12289 ### HTML tags and HTML attributes
12293 div with no attributes
12295 <div>HTML rocks</div>
12297 <div>HTML rocks</div>
12302 div with double-quoted attribute
12304 <div id="rock">HTML rocks</div>
12306 <div id="rock">HTML rocks</div>
12311 div with single-quoted attribute
12313 <div id='rock'>HTML rocks</div>
12315 <div id="rock">HTML rocks</div>
12320 div with unquoted attribute
12322 <div id=rock>HTML rocks</div>
12324 <div id="rock">HTML rocks</div>
12329 div with illegal double attributes
12331 <div id="a" id="b">HTML rocks</div>
12333 <div id="b">HTML rocks</div>
12337 # FIXME: produce empty string instead of "class" in the PHP parser, following
12340 div with empty attribute value, space before equals
12344 <div class =>HTML rocks</div>
12346 <div class="">HTML rocks</div>
12350 # The PHP parser escapes the opening brace to { for some reason, so
12351 # disabled this test for it.
12353 div with braces in attribute value
12357 <div title="{}">Foo</div>
12359 <div title="{}">Foo</div>
12362 # This it very inconsistent in the PHP parser: it returns
12363 # class="class" if there is a space between the name and the equal sign (see
12364 # 'div with empty attribute value, space before equals'), but strips the
12365 # attribute completely if the space is missing. We hope that not much content
12366 # depends on this, so are implementing the behavior below in Parsoid for
12367 # consistencies' sake. Disabled for the PHP parser.
12368 # FIXME: fix this behavior in the PHP parser?
12370 div with empty attribute value, no space before equals
12374 <div class=>HTML rocks</div>
12376 <div class="">HTML rocks</div>
12381 HTML multiple attributes correction
12383 <p class="error" class="awesome">Awesome!</p>
12385 <p class="awesome">Awesome!</p>
12390 Table multiple attributes correction
12393 !+ class="error" class="awesome"| status
12398 <th class="awesome"> status
12406 <DIV ID="x">HTML ROCKS</DIV>
12408 <div id="x">HTML ROCKS</div>
12413 Non-ASCII pseudo-tags are rendered as text
12422 Pseudo-tag with URL 'name' renders as url link
12424 <http://example.com/>
12426 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
12431 text with amp in the middle of nowhere
12435 <p>Remember AT&T?
12440 text with character entity: eacute
12442 I always thought é was a cute letter.
12444 <p>I always thought é was a cute letter.
12449 text with entity-escaped character entity-like string: eacute
12451 I always thought &eacute; was a cute letter.
12453 <p>I always thought &eacute; was a cute letter.
12458 text with undefined character entity: xacute
12460 I always thought &xacute; was a cute letter.
12462 <p>I always thought &xacute; was a cute letter.
12466 # TODO: generalize to PHP parser?
12472 <data value="5">five</data>
12473 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12474 <mark>This highlighted text</mark>
12476 <p><data value="5">five</data>
12477 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12478 <mark>This highlighted text</mark></p>
12482 HTML tag with leading space is parsed as text
12486 <p>< div>foo< /div>
12491 ### Nesting tests (see bug 41545, 50604, 51081)
12494 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
12495 # Note that html2wt is considerably more difficult if we use <b> in
12496 # the test case, instead of <big>
12498 Ensure that HTML adoption agency algorithm is properly implemented.
12500 <big>X<big>Y</big>Z</big>
12502 <p><big>X<big>Y</big>Z</big>
12506 # This was bug 41545 in the PHP parser.
12510 <kbd>X<kbd>Y</kbd>Z</kbd>
12512 <p><kbd>X<kbd>Y</kbd>Z</kbd>
12516 # The following cases were bug 51081 in the PHP parser.
12517 # Note that there are some other nestable tags (b, i, etc) which are
12518 # not covered; see bug 51081 for discussion.
12522 <em>X<em>Y</em>Z</em>
12524 <p><em>X<em>Y</em>Z</em>
12529 Nesting of <strong>
12531 <strong>X<strong>Y</strong>Z</strong>
12533 <p><strong>X<strong>Y</strong>Z</strong>
12542 <p><q>X<q>Y</q>Z</q>
12549 <ruby>X<ruby>Y</ruby>Z</ruby>
12551 <p><ruby>X<ruby>Y</ruby>Z</ruby>
12558 <bdo>X<bdo>Y</bdo>Z</bdo>
12560 <p><bdo>X<bdo>Y</bdo>Z</bdo>
12572 [[Media:Foobar.jpg]]
12574 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
12579 Media link with text
12581 [[Media:Foobar.jpg|A neat file to look at]]
12583 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
12587 # FIXME: this is still bad HTML tag nesting
12589 Media link with nasty text
12590 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
12592 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
12594 <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>
12599 Media link to nonexistent file (bug 1702)
12601 [[Media:No such.jpg]]
12603 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
12608 Image link to nonexistent file (bug 1850 - good)
12610 [[Image:No such.jpg]]
12612 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
12617 :Image link to nonexistent file (bug 1850 - bad)
12619 [[:Image:No such.jpg]]
12621 <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>
12628 Character reference normalization in link text (bug 1938)
12630 [[Main Page|this&that]]
12632 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
12639 Test for unicode normalization
12641 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
12645 (bug 19451) Links should refer to the normalized form.
12653 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12654 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12655 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12656 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12657 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12662 Empty attribute crash test (bug 2067)
12664 <font color="">foo</font>
12666 <p><font color="">foo</font>
12671 Empty attribute crash test single-quotes (bug 2067)
12673 <font color=''>foo</font>
12675 <p><font color="">foo</font>
12680 Attribute test: equals, then nothing
12682 <font color=>foo</font>
12684 <p><font>foo</font>
12689 Attribute test: unquoted value
12691 <font color=x>foo</font>
12693 <p><font color="x">foo</font>
12698 Attribute test: unquoted but illegal value (hash)
12700 <font color=#x>foo</font>
12702 <p><font color="#x">foo</font>
12707 Attribute test: no value
12709 <font color>foo</font>
12711 <p><font color="color">foo</font>
12716 Bug 2095: link with three closing brackets
12720 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
12723 <p><a rel="mw:WikiLink" href="./Main_Page">Main Page</a>]</p>
12727 Bug 2095: link with pipe and three closing brackets
12729 [[Main Page|link]]]
12731 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
12734 <p><a rel="mw:WikiLink" href="./Main_Page">link</a>]</p>
12738 Bug 2095: link with pipe and three closing brackets, version 2
12740 [[Main Page|[http://example.com/]]]
12742 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
12745 <p><a rel="mw:WikiLink" href="./Main_Page">[http://example.com/]</a></p>
12754 Template:Dangerous attribute
12756 " onmouseover="alert(document.cookie)
12760 Template:Dangerous style attribute
12762 border-size: expression(alert(document.cookie))
12768 <div style="float: right; {{{1}}}">Magic div</div>
12772 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
12774 <div title="{{test}}"></div>
12776 <div title="This is a test template"></div>
12781 Bug 2304: HTML attribute safety (dangerous template; 2309)
12783 <div title="{{dangerous attribute}}"></div>
12785 <div title=""></div>
12790 Bug 2304: HTML attribute safety (dangerous style template; 2309)
12792 <div style="{{dangerous style attribute}}"></div>
12794 <div style="/* insecure input */"></div>
12799 Bug 2304: HTML attribute safety (safe parameter; 2309)
12801 {{div style|width: 200px}}
12803 <div style="float: right; width: 200px">Magic div</div>
12808 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
12810 {{div style|width: expression(alert(document.cookie))}}
12812 <div style="/* insecure input */">Magic div</div>
12817 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
12819 {{div style|"><script>alert(document.cookie)</script>}}
12821 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12826 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
12828 {{div style|" ><script>alert(document.cookie)</script>}}
12830 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12835 Bug 2304: HTML attribute safety (link)
12837 <div title="[[Main Page]]"></div>
12839 <div title="[[Main Page]]"></div>
12844 Bug 2304: HTML attribute safety (italics)
12846 <div title="''foobar''"></div>
12848 <div title="''foobar''"></div>
12853 Bug 2304: HTML attribute safety (bold)
12855 <div title="'''foobar'''"></div>
12857 <div title="'''foobar'''"></div>
12863 Bug 2304: HTML attribute safety (ISBN)
12865 <div title="ISBN 1234567890"></div>
12867 <div title="ISBN 1234567890"></div>
12872 Bug 2304: HTML attribute safety (RFC)
12874 <div title="RFC 1234"></div>
12876 <div title="RFC 1234"></div>
12881 Bug 2304: HTML attribute safety (PMID)
12883 <div title="PMID 1234567890"></div>
12885 <div title="PMID 1234567890"></div>
12890 Bug 2304: HTML attribute safety (web link)
12892 <div title="http://example.com/"></div>
12894 <div title="http://example.com/"></div>
12899 Bug 2304: HTML attribute safety (named web link)
12901 <div title="[http://example.com/ link]"></div>
12903 <div title="[http://example.com/ link]"></div>
12908 Bug 3244: HTML attribute safety (extension; safe)
12910 <div style="<nowiki>background:blue</nowiki>"></div>
12912 <div style="background:blue"></div>
12917 Bug 3244: HTML attribute safety (extension; unsafe)
12919 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
12921 <div style="/* insecure input */"></div>
12925 # More MSIE fun discovered by Tom Gilder
12928 MSIE CSS safety test: spurious slash
12930 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
12932 <div style="/* insecure input */">evil</div>
12937 MSIE CSS safety test: hex code
12939 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
12941 <div style="/* insecure input */">evil</div>
12946 MSIE CSS safety test: comment in url
12948 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
12950 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
12955 MSIE CSS safety test: comment in expression
12957 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
12959 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
12964 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
12966 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
12968 <p style="/* invalid control char */">A</p>
12973 MSIE 6 CSS safety test: Fullwidth (bug 55332)
12975 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
12976 <div style="top:EXPRESSION(alert())">B</div>
12978 <p style="/* insecure input */">A</p>
12979 <div style="/* insecure input */">B</div>
12984 MSIE 6 CSS safety test: IPA extensions (bug 55332)
12986 <div style="background-image:uʀʟ(javascript:alert())">A</div>
12987 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
12989 <div style="/* insecure input */">A</div>
12990 <p style="/* insecure input */">B</p>
12995 MSIE 6 CSS safety test: sup/sub script (bug 55332)
12997 <div style="background-image:url⁽javascript:alert())">A</div>
12998 <div style="background-image:url₍javascript:alert())">B</div>
12999 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
13001 <div style="/* insecure input */">A</div>
13002 <div style="/* insecure input */">B</div>
13003 <p style="/* insecure input */">C</p>
13011 title="data:text/html,<img src=1 onerror=alert(1)>"
13012 style="-o-link:attr(title);-o-link-source:current">X</div>
13014 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
13019 MSIE 6 CSS safety test: Repetition markers (bug 55332)
13021 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
13022 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
13023 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
13024 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
13025 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
13026 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
13027 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
13029 <p style="/* insecure input */">A</p>
13030 <p style="/* insecure input */">B</p>
13031 <p style="/* insecure input */">C</p>
13032 <p style="/* insecure input */">D</p>
13033 <p style="/* insecure input */">E</p>
13034 <p style="/* insecure input */">F</p>
13035 <p style="/* insecure input */">G</p>
13040 Table attribute legitimate extension
13043 !+ style="<nowiki>color:blue</nowiki>"| status
13048 <th style="color:blue"> status
13054 Table attribute safety
13057 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
13062 <th style="/* insecure input */"> status
13068 CSS line continuation 1
13070 <div style="background-image: u\ rl(test.jpg);"></div>
13072 <div style="/* insecure input */"></div>
13077 CSS line continuation 2
13079 <div style="background-image: u\ rl(test.jpg); "></div>
13081 <div style="/* insecure input */"></div>
13092 Expansion of multi-line templates in attribute values (bug 6255)
13094 <div style="background: {{identity|#00FF00}}">-</div>
13096 <div style="background: #00FF00">-</div>
13102 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
13104 <div style="background:
13107 <div style="background: #00FF00">-</div>
13112 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
13114 <div style="background: #00FF00">-</div>
13116 <div style="background: #00FF00">-</div>
13121 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
13124 Parser hook: empty input
13137 Parser hook: empty input using terminated empty elements
13150 Parser hook: empty input using terminated empty elements (space before)
13163 Parser hook: basic input
13177 Parser hook: case insensitive
13191 Parser hook: case insensitive, redux
13204 Parser hook: nested tags
13208 <tag><tag></tag></tag>
13219 Parser hook: basic arguments
13221 <tag width=200 height = "100" depth = '50' square></tag>
13229 'square' => 'square',
13236 Parser hook: argument containing a forward slash (bug 5344)
13238 <tag filename='/tmp/bla'></tag>
13243 'filename' => '/tmp/bla',
13250 Parser hook: empty input using terminated empty elements (bug 2374)
13263 # </tag> should be output literally since there is no matching tag that begins it
13265 Parser hook: basic arguments using terminated empty elements (bug 2374)
13267 <tag width=200 height = "100" depth = '50' square/>
13277 'square' => 'square',
13286 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
13290 Parser hook: static parser hook not inside a comment
13292 <statictag>hello, world</statictag>
13293 <statictag action=flush/>
13301 Parser hook: static parser hook inside a comment
13303 <!-- <statictag>hello, world</statictag> -->
13304 <statictag action=flush/>
13310 # Nested template calls; this case was broken by Parser.php rev 1.506,
13314 Template:One-parameter
13316 (My parameter is: {{{1}}})
13320 Template:Map-one-parameter
13322 {{{{{1}}}|{{{2}}}}}
13326 Nested template calls
13328 {{Map-one-parameter|One-parameter|param}}
13330 <p>(My parameter is: param)
13339 Sanitizer: Closing of open tags
13341 <s></s><table></table>
13343 <s></s><table></table>
13348 Sanitizer: Closing of open but not closed tags
13357 Sanitizer: Closing of closed but not open tags
13366 Sanitizer: Closing of closed but not open table tags
13368 Table not started</td></tr></table>
13370 <p>Table not started</td></tr></table>
13375 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
13377 <span id="æ: v">byte</span>[[#æ: v|backlink]]
13379 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
13384 Sanitizer: Validating the contents of the id attribute (bug 4515)
13390 Something, but definitely not <br id="9" />...
13394 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
13398 <br id="foo" /><br id="foo" />
13400 Something need to be done. foo-2 ?
13404 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
13407 <meta itemprop="hello" content="world">
13408 <meta http-equiv="refresh" content="5">
13409 <meta itemprop="hello" http-equiv="refresh" content="5">
13410 <link itemprop="hello" href="{{SERVER}}">
13411 <link rel="stylesheet" href="{{SERVER}}">
13412 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
13415 <div itemscope="itemscope">
13416 <p> <meta itemprop="hello" content="world" />
13417 <meta http-equiv="refresh" content="5">
13418 <meta itemprop="hello" content="5" />
13420 <link itemprop="hello" href="http://example.org" />
13421 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
13422 <link itemprop="hello" href="http://example.org" />
13428 Language converter: output gets cut off unexpectedly (bug 5757)
13432 this bit is safe: }-
13434 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
13436 then we get cut off here: }-
13438 all additional text is vanished
13440 <p>this bit is safe: }-
13441 </p><p>but if we add a conversion instance: xxx
13442 </p><p>then we get cut off here: }-
13443 </p><p>all additional text is vanished
13448 Self closed html pairs (bug 5487)
13451 <center><font id="bug" />Centered text</center>
13452 <div><font id="bug2" />In div text</div>
13454 <center><font id="bug" />Centered text</center>
13455 <div><font id="bug2" />In div text</div>
13464 Punctuation: nbsp before exclamation
13468 <p>C'est grave !
13473 Punctuation: CSS !important (bug 11874)
13475 <div style="width:50% !important">important</div>
13477 <div style="width:50% !important">important</div>
13482 Punctuation: CSS ! important (bug 11874; with space after)
13484 <div style="width:50% ! important">important</div>
13486 <div style="width:50% ! important">important</div>
13492 HTML bullet list, closed tags (bug 5497)
13507 HTML bullet list, unclosed tags (bug 5497)
13526 HTML ordered list, closed tags (bug 5497)
13541 HTML ordered list, unclosed tags (bug 5497)
13560 HTML nested bullet list, closed tags (bug 5497)
13585 HTML nested bullet list, open tags (bug 5497)
13614 HTML nested ordered list, closed tags (bug 5497)
13639 HTML nested ordered list, open tags (bug 5497)
13668 HTML ordered list item with parameters oddity
13670 <ol><li id="fragment">One</li>
13673 <ol><li id="fragment">One</li>
13678 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
13680 bug 5918: autonumbering
13682 [http://first/] [http://second] [ftp://ftp]
13686 [mailto:enclosed@mail.tld With target]
13688 [mailto:enclosed@mail.tld]
13690 mailto:inline@mail.tld
13692 <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>
13693 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
13694 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
13695 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
13696 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
13699 <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>
13700 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
13701 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
13702 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
13703 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
13708 # Security and HTML correctness
13709 # From Nick Jenkins' fuzz testing
13713 Fuzz testing: Parser13
13728 Fuzz testing: Parser14
13733 <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>
13734 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13736 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
13744 Fuzz testing: Parser14-table
13749 <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>
13750 <table style="__TOC__">
13756 # Known to produce bogus xml (extra </td>)
13758 Fuzz testing: Parser16
13778 Fuzz testing: Parser21
13781 ! irc://{{ftp://a" onmouseover="alert('hello world');"
13786 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
13796 Fuzz testing: Parser22
13798 http://===r:::https://b
13802 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
13810 # Known to produce bad XML for now
13812 Fuzz testing: Parser24
13819 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
13820 <br style="onmouseover='alert(document.cookie);' " />
13822 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13827 <u class="|">}}}} >
13828 <br style="onmouseover='alert(document.cookie);'" />
13830 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13839 # Note: the current result listed for this is not what the original one was,
13840 # but the original bug was JavaScript injection, which is fixed in any case.
13841 # It's not clear that the original result listed was any more correct than the
13842 # current one. Original result:
13845 # <li class="||">
13846 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
13848 Fuzz testing: Parser25 (bug 6055)
13854 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
13856 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
13861 Fuzz testing: URL adjacent extension (with space, clean)
13864 http://example.com <nowiki>junk</nowiki>
13866 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
13871 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
13874 http://example.com<nowiki>junk</nowiki>
13876 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
13881 Fuzz testing: URL adjacent extension (no space, dirty; pre)
13884 http://example.com<pre>junk</pre>
13886 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
13891 Fuzz testing: image with bogus manual thumbnail
13893 [[Image:foobar.jpg|thumbnail= ]]
13895 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
13898 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,null,null]}'/>
13902 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
13904 <pre dir=" "></pre>
13906 <pre dir=" "></pre>
13911 Parsing optional HTML elements (Bug 6171)
13916 <td> Some tabular data</td>
13917 <td> More tabular data ...
13918 <td> And yet som tabular data</td>
13924 <td> Some tabular data</td>
13925 <td> More tabular data ...
13926 </td><td> And yet som tabular data</td>
13933 Correct handling of <td>, <tr> (Bug 6171)
13938 <td> Some tabular data</td>
13939 <td> More tabular data ...</td>
13940 <td> And yet som tabular data</td>
13946 <td> Some tabular data</td>
13947 <td> More tabular data ...</td>
13948 <td> And yet som tabular data</td>
13956 Parsing crashing regression (fr:JavaScript)
13960 <p></body></x>
13965 Inline wiki vs wiki block nesting
13971 <p><b>Bold paragraph</b>
13972 </p><p>New wiki paragraph
13977 Inline HTML vs wiki block nesting
13985 <p><b>Bold paragraph</b>
13986 </p><p>New wiki paragraph
13990 # Original result was this:
13991 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
13993 # While that might be marginally more intuitive, maybe, the six-apostrophe
13994 # construct is clearly pathological and the result stated here (which is what
13995 # the parser actually does) is about as reasonable as anything.
13997 Mixing markup for italics and bold
14000 '''bold''''''bold''bolditalics'''''
14002 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
14010 Article for special page transclusion test
14014 Special page transclusion
14017 {{Special:Prefixindex/Xyzzyx}}
14019 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14024 Special page transclusion twice (bug 5021)
14027 {{Special:Prefixindex/Xyzzyx}}
14028 {{Special:Prefixindex/Xyzzyx}}
14030 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14031 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14036 Transclusion of default MediaWiki message
14038 {{MediaWiki:Mainpage}}
14045 Transclusion of nonexistent MediaWiki message
14047 {{MediaWiki:Mainpagexxx}}
14049 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
14054 Transclusion of MediaWiki message with underscore
14056 {{MediaWiki:history_short}}
14063 Transclusion of MediaWiki message with space
14065 {{MediaWiki:history short}}
14072 Invalid header with following text
14082 Section extraction test (section 0)
14102 Section extraction test (section 1)
14124 Section extraction test (section 2)
14145 Section extraction test (section 3)
14165 Section extraction test (section 4)
14189 Section extraction test (section 5)
14209 Section extraction test (section 6)
14230 Section extraction test (section 7)
14250 Section extraction test (section 8)
14270 Section extraction test (section 9)
14291 Section extraction test (section 10)
14311 Section extraction test (nonexistent section 11)
14330 Section extraction test with bogus heading (section 1)
14335 ==bogus== not a legal section
14339 ==bogus== not a legal section
14343 Section extraction test with bogus heading (section 2)
14348 ==bogus== not a legal section
14355 Section extraction test with comment after heading (section 1)
14367 Section extraction test with comment after heading (section 2)
14379 Section extraction test with bogus <nowiki> heading (section 1)
14384 ==bogus== <nowiki>not a legal section</nowiki>
14388 ==bogus== <nowiki>not a legal section</nowiki>
14392 Section extraction test with bogus <nowiki> heading (section 2)
14397 ==bogus== <nowiki>not a legal section</nowiki>
14404 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
14405 # instead of respecting commented sections
14407 Section extraction prefixed by comment (section 1)
14418 Section extraction prefixed by comment (section 2)
14429 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
14430 # instead of respecting HTML-style headings
14432 Section extraction, mixed wiki and html (section 1)
14448 Section extraction, mixed wiki and html (section 2)
14464 # Formerly testing for bug 3342
14466 Section extraction, heading surrounded by <noinclude>
14470 <noinclude>==unmarked==</noinclude>
14476 # Test behavior of bug 19910
14478 Sectiion with all-equals
14483 The line above must have a trailing space
14486 But just in case it doesn't...
14490 But just in case it doesn't...
14494 Section replacement test (section 0)
14525 Section replacement test (section 1)
14554 Section replacement test (section 2)
14584 Section replacement test (section 3)
14615 Section replacement test (section 4)
14642 Section replacement test (section 5)
14673 Section replacement test (section 6)
14703 Section replacement test (section 7)
14734 Section replacement test (section 8)
14765 Section replacement test (section 9)
14794 Section replacement test (section 10)
14824 Section replacement test with initial whitespace (bug 13728)
14828 Preformatted initial line
14832 Preformatted initial line
14839 Section extraction, heading followed by pre with 20 spaces (bug 6398)
14851 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
14864 Section extraction, <pre> around bogus header (bug 10309)
14881 Section replacement, <pre> around bogus header (bug 10309)
14883 noxml replace=2,"xxx"
14904 Handling of 
 in URLs
14908 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
14911 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
14913 a</a></li></ul></li></ul>
14917 Handling of %0A in URLs
14921 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
14924 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
14928 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
14930 5 quotes, code coverage +1 line
14937 <p><b><i></i></b></p>
14940 # same html as previous, but wikitext adjusted to match parsoid html2wt
14941 # note that wt2html and html2html will put the <i> before the <b>
14943 5 quotes, code coverage +1 line w/ nowiki (1)
14945 parsoid=wt2wt,html2wt
14947 '''''<nowiki/>'''''
14952 <p><b><i></i></b></p>
14955 # same as previous, just swapping the <i> and <b>
14957 5 quotes, code coverage +1 line w/ nowiki (2)
14959 '''''<nowiki/>'''''
14964 <p><i><b></b></i></p>
14968 Special:Search page linking.
14972 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
14979 title=[[Parser test]]
14984 * {{FULLPAGENAMEE}}
14986 * {{BASEPAGENAMEE}}
14990 * {{ROOTPAGENAMEE}}
14992 * {{TALKPAGENAMEE}}
14993 * {{SUBJECTPAGENAME}}
14994 * {{SUBJECTPAGENAMEE}}
14997 * {{NAMESPACENUMBER}}
15001 * {{SUBJECTSPACEE}}
15002 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
15004 <ul><li> Parser test</li>
15005 <li> Parser_test</li>
15006 <li> Parser test</li>
15007 <li> Parser_test</li>
15008 <li> Parser test</li>
15009 <li> Parser_test</li>
15010 <li> Parser test</li>
15011 <li> Parser_test</li>
15012 <li> Parser test</li>
15013 <li> Parser_test</li>
15014 <li> Talk:Parser test</li>
15015 <li> Talk:Parser_test</li>
15016 <li> Parser test</li>
15017 <li> Parser_test</li>
15025 <li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a></li></ul>
15028 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
15038 image4 |300px| centre
15039 image5.svg| http://///////
15044 <ul class="gallery mw-gallery-traditional">
15045 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15046 <div class="thumb" style="height: 150px;">Image1.png</div>
15047 <div class="gallerytext">
15050 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15051 <div class="thumb" style="height: 150px;">Image2.gif</div>
15052 <div class="gallerytext">
15057 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15058 <div class="thumb" style="height: 150px;">Image3</div>
15059 <div class="gallerytext">
15062 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15063 <div class="thumb" style="height: 150px;">Image4</div>
15064 <div class="gallerytext">
15069 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15070 <div class="thumb" style="height: 150px;">Image5.svg</div>
15071 <div class="gallerytext">
15072 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
15076 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15077 <div class="thumb" style="height: 150px;">* image6</div>
15078 <div class="gallerytext">
15086 Gallery (with options)
15088 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
15089 File:Nonexistant.jpg|caption
15090 File:Nonexistant.jpg
15091 image:foobar.jpg|some '''caption''' [[Main Page]]
15093 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
15096 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
15097 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
15098 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15099 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15100 <div class="gallerytext">
15105 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15106 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15107 <div class="gallerytext">
15110 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15111 <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>
15112 <div class="gallerytext">
15113 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15117 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15118 <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>
15119 <div class="gallerytext">
15122 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15123 <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>
15124 <div class="gallerytext">
15134 Gallery with wikitext inside caption
15137 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
15138 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
15141 <ul class="gallery mw-gallery-traditional">
15142 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15143 <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>
15144 <div class="gallerytext">
15145 <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>
15149 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15150 <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>
15151 <div class="gallerytext">
15152 <p>This is a test template
15161 gallery (with showfilename option)
15163 <gallery showfilename>
15164 File:Nonexistant.jpg|caption
15165 File:Nonexistant.jpg
15166 image:foobar.jpg|some '''caption''' [[Main Page]]
15170 <ul class="gallery mw-gallery-traditional">
15171 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15172 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15173 <div class="gallerytext">
15174 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15179 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15180 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15181 <div class="gallerytext">
15182 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15186 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15187 <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>
15188 <div class="gallerytext">
15189 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15190 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15194 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15195 <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>
15196 <div class="gallerytext">
15197 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15206 Gallery (with namespace-less filenames)
15209 File:Nonexistant.jpg
15215 <ul class="gallery mw-gallery-traditional">
15216 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15217 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15218 <div class="gallerytext">
15221 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15222 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15223 <div class="gallerytext">
15226 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15227 <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>
15228 <div class="gallerytext">
15231 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15232 <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>
15233 <div class="gallerytext">
15241 HTML Hex character encoding (spells the word "JavaScript")
15243 parsoid=wt2html,wt2wt,html2html
15245 JavaScript
15247 <p>JavaScript
15250 <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>
15254 HTML Hex character encoding bogus encoding (bug 26437 regression check)
15258 <p>&#xsee;&#XSEE;
15261 <p>&#xsee;&#XSEE;</p>
15265 HTML Hex character encoding mixed case
15267 parsoid=wt2html,wt2wt,html2html
15274 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
15278 __FORCETOC__ override
15290 ISBN 978-0-1234-56 789
15292 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
15297 ISBN followed by 5 spaces
15308 ISBN ISBN 1234567890
15310 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15319 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
15324 ISBN with empty prefix (parsoid test)
15328 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
15332 Bug 22905: <abbr> followed by ISBN followed by </a>
15334 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
15336 <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>
15345 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
15350 Double RFC with a wiki link
15354 <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>
15363 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
15368 Centre-aligned image
15370 [[Image:foobar.jpg|centre]]
15372 <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>
15379 [[Image:foobar.jpg|none]]
15381 <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>
15386 Width + Height sized image (using px) (height is ignored)
15388 [[Image:foobar.jpg|640x480px]]
15390 <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>
15395 Width-sized image (using px, no following whitespace)
15397 [[Image:foobar.jpg|640px]]
15399 <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>
15404 Width-sized image (using px, with following whitespace - test regression from r39467)
15406 [[Image:foobar.jpg|640px ]]
15408 <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>
15413 Width-sized image (using px, with preceding whitespace - test regression from r39467)
15415 [[Image:foobar.jpg| 640px]]
15417 <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>
15422 Image with page parameter
15426 [[File:LoremIpsum.djvu|page=2]]
15428 <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>
15433 Another italics / bold test
15441 # Note the results may be incorrect, as parserTest output included this:
15442 # XML error: Mismatched tag at byte 6120:
15443 # ...<dd> </dt></dl> </dd...
15474 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
15476 Images with the "|" character in the comment
15478 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
15480 <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>
15483 <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>
15487 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
15489 <html><script>alert(1);</script></html>
15491 <p><html><script>alert(1);</script></html>
15496 HTML with raw HTML ($wgRawHtml==true)
15500 <html><script>alert(1);</script></html>
15502 <p><script>alert(1);</script>
15507 Parents of subpages, one level up
15509 subpage title=[[Subpage test/L1/L2/L3]]
15513 <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>
15519 Parents of subpages, one level up, not named
15521 subpage title=[[Subpage test/L1/L2/L3]]
15525 <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>
15532 Parents of subpages, two levels up
15534 subpage title=[[Subpage test/L1/L2/L3]]
15540 <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
15541 </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>
15546 Parents of subpages, two levels up, without trailing slash or name.
15548 subpage title=[[Subpage test/L1/L2/L3]]
15557 Parents of subpages, two levels up, with lots of extra trailing slashes.
15559 subpage title=[[Subpage test/L1/L2/L3]]
15563 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
15568 Subpage test/L1/L2/L3Sibling
15574 Transclusion of a sibling page (one level up)
15576 subpage title=[[Subpage test/L1/L2/L3]]
15585 Transclusion of a child page
15587 subpage title=[[Subpage test/L1/L2]]
15596 Non-transclusion because of too many up levels
15598 subpage title=[[Subpage test/L1/L2/L3]]
15600 {{../../../../More than parent}}
15602 <p>{{../../../../More than parent}}
15607 Definition list code coverage
15613 <dl><dt> title  </dt>
15615 <dt> title </dt>
15623 Don't fall for the self-closing div
15625 <div>hello world</div/>
15627 <div>hello world</div>
15636 <p>[[:Template:Msg]]
15645 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
15649 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
15651 Always escape literal '>' in output, not just after '<'
15665 <p>This is a test template
15666 This is a test template
15678 Inclusion of !userCanEdit() content
15682 <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>
15688 Out-of-order TOC heading levels
15697 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15699 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
15701 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
15702 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
15705 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
15707 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
15708 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
15714 <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>
15715 <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>
15716 <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>
15717 <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>
15718 <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>
15719 <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>
15725 ISBN with a dummy number
15735 ISBN with space-delimited number
15739 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
15745 ISBN with multiple spaces, no number
15764 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15765 </p><p>ISBN 12345678901
15771 ISBN with trailing year (bug 8110)
15773 ISBN 1-234-56789-0 - 2006
15775 ISBN 1 234 56789 0 - 2006
15777 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
15778 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
15786 {{anchorencode:foo bar©#%n}}
15788 <p>foo_bar.C2.A9.23.25n
15793 anchorencode trims spaces
15795 {{anchorencode: __pretty__please__}}
15802 anchorencode deals with links
15804 {{anchorencode: [[hello|world]] [[hi]]}}
15811 anchorencode deals with templates
15813 {{anchorencode: {{Foo}} }}
15820 anchorencode encodes like the TOC generator: (bug 18431)
15822 === _ +:.3A%3A&&]] ===
15823 {{anchorencode: _ +:.3A%3A&&]] }}
15826 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
15827 <p>.2B:.3A.253A.26.26.5D.5D
15832 Bug 6200: blockquotes and paragraph formatting
15853 Bug 8293: Use of center tag ruins paragraph formatting
15874 Parsing of overlapping (improperly nested) inline html tags
15876 <span><s>x</span></s>
15878 <p><span><s>x</span></s></span>
15881 <p><span><s>x</s></span>
15886 ### Language variants related tests
15889 Self-link in language variants
15891 title=[[Dunav]] language=sr
15893 Both [[Dunav]] and [[Дунав]] are names for this river.
15895 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
15906 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
15908 title=[[Duna]] language=sr
15910 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
15912 <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.
15917 Link to a section of a variant of this title shouldn't be parsed as self-link
15919 title=[[Duna]] language=sr
15921 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
15923 <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.
15928 Link to pages in language variants
15932 Main Page can be written as [[Маин Паге]]
15934 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
15940 Multiple links to pages in language variants
15944 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
15946 <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>.
15952 Simple template in language variants
15958 <p>This is a test template
15964 Template with explicit namespace in language variants
15970 <p>This is a test template
15976 Basic test for template parameter in language variants
15980 {{парамтест|param=foo}}
15982 <p>This is a test template with parameter foo
15988 Simple category in language variants
15992 [[Category:МедиаWики Усер'с Гуиде]]
15994 <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>
16011 Don't convert blue categorylinks to another variant (bug 33210)
16015 [[A]][[Category:分类]]
16017 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
16022 Stripping -{}- tags (language variants)
16026 Latin proverb: -{Ne nuntium necare}-
16028 <p>Latin proverb: Ne nuntium necare
16034 Prevent conversion with -{}- tags (language variants)
16036 language=sr variant=sr-ec
16038 Latinski: -{Ne nuntium necare}-
16040 <p>Латински: Ne nuntium necare
16046 Prevent conversion of text with -{}- tags (language variants)
16048 language=sr variant=sr-ec
16050 Latinski: -{Ne nuntium necare}-
16052 <p>Латински: Ne nuntium necare
16058 Prevent conversion of links with -{}- tags (language variants)
16060 language=sr variant=sr-ec
16064 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16070 -{}- tags within headlines (within html for parserConvert())
16072 language=sr variant=sr-ec
16076 <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>
16082 Explicit definition of language variant alternatives
16084 language=zh variant=zh-tw
16086 -{zh:China;zh-tw:Taiwan}-, not China
16088 <p>Taiwan, not China
16094 Conversion around HTML tags
16096 language=sr variant=sr-ec
16098 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
16099 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
16102 <span title="ЛаCтин">ски</span>
16108 Explicit session-wise language variant mapping (A flag and - flag)
16110 language=zh variant=zh-tw
16112 Taiwan is not China.
16113 But -{A|zh:China;zh-tw:Taiwan}- is China,
16114 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
16115 and -{China}- is China.
16117 <p>Taiwan is not China.
16118 But Taiwan is Taiwan,
16119 (This should be stripped!)
16120 and China is China.
16125 Explicit session-wise language variant mapping (H flag for hide)
16127 language=zh variant=zh-tw
16129 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
16132 <p>(This should be stripped!)
16138 Adding explicit conversion rule for title (T flag)
16140 language=zh variant=zh-tw showtitle
16142 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16145 <p>Should be stripped!
16150 Testing that changing the language variant here in the tests actually works
16152 language=zh variant=zh showtitle
16154 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16157 <p>Should be stripped!
16162 Recursive conversion of alt and title attrs shouldn't clear converter state
16164 language=zh variant=zh-cn showtitle
16166 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
16167 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
16171 Should be stripped<span title="Exclamation">!</span>
16176 Bug 24072: more test on conversion rule for title
16178 language=zh variant=zh-tw showtitle
16180 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16181 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
16184 <p>This should be stripped!
16185 This won't take interferes with the title rule.
16190 Partly disable title conversion if variant == main language code
16192 language=zh variant=zh title=[[ZH]] showtitle
16194 -{T|zh-cn:CN;zh-tw:TW}-
16202 Partly disable title conversion if variant == main language code, more
16204 language=zh variant=zh title=[[ZH]] showtitle
16214 Raw output of variant escape tags (R flag)
16216 language=zh variant=zh-tw
16218 Raw: -{R|zh:China;zh-tw:Taiwan}-
16220 <p>Raw: zh:China;zh-tw:Taiwan
16225 Nested using of manual convert syntax
16227 language=zh variant=zh-hk
16229 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
16231 <p>Nested: Hello Hong Kong!
16236 Proper conversion of text in external links
16238 language=sr variant=sr-ec
16240 http://www.google.com
16241 gopher://www.google.com
16242 [http://www.google.com http://www.google.com]
16243 [gopher://www.google.com gopher://www.google.com]
16244 [https://www.google.com irc://www.google.com]
16245 [ftp://www.google.com www.google.com/ftp://dir]
16246 [//www.google.com www.google.com]
16248 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16249 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16250 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16251 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16252 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
16253 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
16254 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
16259 Do not convert roman numbers to language variants
16261 language=sr variant=sr-ec
16265 <p>Фридрих IV је цар.
16270 Unclosed language converter markup "-{"
16281 Don't convert raw rule "-{R|=>}-" to "=>"
16292 Don't break link parsing if language converter markup is in the caption.
16294 language=sr variant=sr-ec
16296 [[Main Page|-{R|main page}-]]
16298 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
16302 # This test is currently broken in the PHP parser (bug 52661)
16304 Don't break image parsing if language converter markup is in the caption.
16309 [[File:Foobar.jpg|-{R|caption}-]]
16311 <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>
16315 # This test is currently broken in the PHP parser (bug 52661)
16317 Don't break list handling if language converter markup is in the item.
16319 language=zh variant=zh-cn
16322 ;-{zh-cn:AAA;zh-tw:BBB}-
16329 # This test is currently broken in the PHP parser (bug 52661)
16331 Don't break table handling if language converter markup is in the cell.
16333 language=sr variant=sr-ec
16350 Bug 529: Uncovered bullet
16359 # Plain MediaWiki does not remove empty lists, but tidy actually does.
16360 # Templates in Wikipedia rely on this behavior, as tidy has always been
16361 # enabled there. These tests are normally run *without* tidy, so specify the
16362 # full output here.
16363 # To test realistic parsing behavior, apply a tidy-like transformation to both
16364 # the expected output and your parser's output.
16366 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
16368 ******* Foo {{bullet}}
16370 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo </li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li>
16376 Bug 529: Uncovered table already at line-start
16399 Bug 529: Uncovered bullet in parser function result
16401 * Foo {{lc:{{bullet}} }}
16409 Bug 5678: Double-parsed template argument
16411 {{lc:{{{1}}}|hello}}
16418 Bug 5678: Double-parsed template invocation
16420 {{lc:{{paramtest {{!}} param = hello }} }}
16422 <p>{{paramtest | param = hello }}
16427 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
16430 title=[[Main Page]]
16432 {{PRVNÍVELKÉ:ěščř}}
16433 {{prvnívelké:ěščř}}
16453 Morwen/13: Unclosed link followed by heading
16460 <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>
16465 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
16472 <h1><span class="mw-headline" id="heading">heading</span></h1>
16477 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
16484 <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>
16499 Paragraphs inside divs (no extra line breaks)
16511 Paragraphs inside divs (extra line break on open)
16526 Paragraphs inside divs (extra line break on close)
16541 Paragraphs inside divs (extra line break on open and close)
16558 Nesting tags, paragraphs on lines which begin with <div>
16562 <div></div><strong>A
16571 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
16573 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
16575 <blockquote>Line one
16577 Line two</blockquote>
16579 <blockquote>Line one
16580 Line two</blockquote>
16585 Bug 6200: paragraphs inside blockquotes (extra line break on open)
16590 Line two</blockquote>
16595 Line two</blockquote>
16600 Bug 6200: paragraphs inside blockquotes (extra line break on close)
16602 <blockquote>Line one
16607 <blockquote>Line one
16615 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
16632 Paragraphs inside blockquotes/divs (no extra line breaks)
16634 <blockquote><div>Line one
16636 Line two</div></blockquote>
16638 <blockquote><div>Line one
16639 Line two</div></blockquote>
16644 Paragraphs inside blockquotes/divs (extra line break on open)
16649 Line two</div></blockquote>
16654 Line two</div></blockquote>
16659 Paragraphs inside blockquotes/divs (extra line break on close)
16661 <blockquote><div>Line one
16664 </div></blockquote>
16666 <blockquote><div>Line one
16669 </div></blockquote>
16674 Paragraphs inside blockquotes/divs (extra line break on open and close)
16680 </div></blockquote>
16686 </div></blockquote>
16691 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
16693 wgLinkHolderBatchSize=0
16699 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
16700 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
16701 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
16706 Free external link invading image caption
16708 [[Image:Foobar.jpg|thumb|http://x|hello]]
16710 <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>
16715 Bug 15196: localised external link numbers
16719 [http://en.wikipedia.org/]
16721 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
16724 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
16728 Multibyte character in padleft
16730 {{padleft:-Hello|7|Æ}}
16737 Multibyte character in padright
16739 {{padright:Hello-|7|Æ}}
16746 formatdate parser function
16748 {{#formatdate:2009-03-24}}
16750 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
16755 formatdate parser function, with default format
16757 {{#formatdate:2009-03-24|mdy}}
16759 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
16764 Spacing of numbers in formatted dates
16766 {{#formatdate:January 15}}
16768 <p><span class="mw-formatted-date" title="01-15">January 15</span>
16773 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
16775 language=nl title=[[MediaWiki:Common.css]]
16777 {{#formatdate:2009-03-24|dmy}}
16779 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
16792 Edit comment with link
16796 I like the [[Main Page]] a lot
16798 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
16802 Edit comment with link and link text
16806 I like the [[Main Page|best pages]] a lot
16808 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16812 Edit comment with link and link text with suffix
16816 I like the [[Main Page|best page]]s a lot
16818 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16822 Edit comment with section link (non-local, eg in history list)
16824 comment title=[[Main Page]]
16826 /* External links */ removed bogus entries
16828 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
16832 Edit comment with section link and text before it (non-local, eg in history list)
16834 comment title=[[Main Page]]
16836 pre-comment text /* External links */ removed bogus entries
16838 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>
16842 Edit comment with section link (local, eg in diff view)
16844 comment local title=[[Main Page]]
16846 /* External links */ removed bogus entries
16848 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
16852 Edit comment with subpage link (bug 14080)
16856 title=[[Subpage test]]
16858 Poked at a [[/subpage]] here...
16860 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
16864 Edit comment with subpage link and link text (bug 14080)
16868 title=[[Subpage test]]
16870 Poked at a [[/subpage|neat little page]] here...
16872 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
16876 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
16879 title=[[Subpage test]]
16881 Poked at a [[/subpage]] here...
16883 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
16887 Edit comment with bare anchor link (local, as on diff)
16891 title=[[Main Page]]
16895 <a href="#section">#section</a>
16899 Edit comment with bare anchor link (non-local, as on history)
16902 title=[[Main Page]]
16906 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
16910 Anchor starting with underscore
16914 <p><a href="#_ref">One</a>
16919 Id starting with underscore
16921 <div id="_ref"></div>
16923 <div id="_ref"></div>
16928 Space normalisation on autocomment (bug 22784)
16931 title=[[Main Page]]
16933 /* __hello__world__ */
16935 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
16939 percent-encoding and + signs in comments (Bug 26410)
16943 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
16945 <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>
16949 Bad images - basic functionality
16958 Bad images - bug 16039: text after bad image disappears
16972 Verify that displaytitle works (bug #22501) no displaytitle
16976 wgAllowDisplayTitle=true
16977 wgRestrictDisplayTitle=false
16979 this is not the the title
16982 <p>this is not the the title
16987 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
16992 wgAllowDisplayTitle=true
16993 wgRestrictDisplayTitle=false
16995 this is not the the title
16996 {{DISPLAYTITLE:whatever}}
16999 <p>this is not the the title
17004 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
17009 wgAllowDisplayTitle=true
17010 wgRestrictDisplayTitle=true
17012 this is not the the title
17013 {{DISPLAYTITLE:whatever}}
17016 <p>this is not the the title
17021 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
17026 wgAllowDisplayTitle=true
17027 wgRestrictDisplayTitle=true
17029 this is not the the title
17030 {{DISPLAYTITLE:screen}}
17033 <p>this is not the the title
17038 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
17043 wgAllowDisplayTitle=false
17045 this is not the the title
17046 {{DISPLAYTITLE:screen}}
17049 <p>this is not the the title
17050 <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>
17055 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
17060 wgAllowDisplayTitle=false
17062 this is not the the title
17065 <p>this is not the the title
17070 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
17075 wgAllowDisplayTitle=true
17076 wgRestrictDisplayTitle=true
17078 this is not the the title
17079 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
17081 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
17082 <p>this is not the the title
17087 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
17092 wgAllowDisplayTitle=true
17093 wgRestrictDisplayTitle=true
17095 this is not the the title
17096 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
17098 <span style="color: red;">s</span>creen
17099 <p>this is not the the title
17104 preload: check <noinclude> and <includeonly>
17108 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
17114 preload: check <onlyinclude>
17118 Goodbye <onlyinclude>Hello world</onlyinclude>
17124 preload: can pass tags through if we want to
17128 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
17130 <includeonly>Hello world</includeonly>
17134 preload: check that it doesn't try to do tricks
17138 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17140 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17144 Play a bit with r67090 and bug 3158
17148 <div style="width:50% !important"> </div>
17149 <div style="width:50% !important"> </div>
17150 <div style="width:50% !important"> </div>
17151 <div style="border : solid;"> </div>
17153 <div style="width:50% !important"> </div>
17154 <div style="width:50% !important"> </div>
17155 <div style="width:50% !important"> </div>
17156 <div style="border : solid;"> </div>
17161 HTML5 data attributes
17163 <span data-foo="bar">Baz</span>
17164 <p data-abc-def_hij="">Quuz</p>
17166 <p><span data-foo="bar">Baz</span>
17168 <p data-abc-def_hij="">Quuz</p>
17173 percent-encoding and + signs in internal links (Bug 26410)
17175 [[User:+%]] [[Page+title%]]
17176 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
17177 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
17178 [[%33%45]] [[%33%45+]]
17180 <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>
17181 <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>
17182 <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>
17183 <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>
17188 Special characters in embedded file links (bug 27679)
17190 [[File:Contains & ampersand.jpg]]
17191 [[File:Does not exist.jpg|Title with & ampersand]]
17193 <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>
17194 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
17200 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
17202 Text's been normalized?
17204 <p>Text's been normalized?
17209 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
17211 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
17213 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
17218 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
17220 [http://www.example.org/ ideograms]
17222 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
17227 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
17229 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
17231 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
17255 Bug 31098 Template which includes system messages which includes the template
17259 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17260 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17265 Bug31490 Turkish: ucfirst 'blah'
17276 Bug31490 Turkish: ucfirst 'ix'
17287 Bug31490 Turkish: lcfirst 'BLAH'
17298 Bug31490 Turkish: ucfırst (with a dotless i)
17304 <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>
17309 Bug31490 ucfırst (with a dotless i) with English language
17315 <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>
17320 Bug 26375: TOC with italics
17322 title=[[Main Page]]
17325 == ''Lost'' episodes ==
17327 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17329 <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>
17333 <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>
17338 Bug 26375: TOC with bold
17340 title=[[Main Page]]
17343 == '''should be bold''' then normal text ==
17345 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17347 <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>
17351 <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>
17356 Bug 33845: Headings become cursive in TOC when they contain an image
17358 title=[[Main Page]]
17361 == Image [[Image:foobar.jpg]] ==
17363 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17365 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
17369 <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>
17374 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
17376 title=[[Main Page]]
17379 == <blockquote>Quote</blockquote> ==
17381 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17383 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
17387 <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>
17392 Unclosed tags in TOC
17394 title=[[Main Page]]
17398 <small>Hanc marginis exiguitas non caperet.</small>
17401 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17403 <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>
17407 <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>
17408 <p><small>Hanc marginis exiguitas non caperet.</small>
17414 Multiple tags in TOC
17417 == <i>Foo</i> <b>Bar</b> ==
17419 == <i>Foo</i> <blockquote>Bar</blockquote> ==
17421 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17423 <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>
17424 <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>
17428 <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>
17429 <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>
17434 Tags with parameters in TOC
17437 == <sup class="in-h2">Hello</sup> ==
17439 == <sup class="a > b">Evilbye</sup> ==
17441 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17443 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
17444 <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>
17448 <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>
17449 <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>
17454 span tags with directionality in TOC
17457 == <span dir="ltr">C++</span> ==
17459 == <span dir="rtl">זבנג!</span> ==
17461 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
17463 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
17465 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
17467 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17469 <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>
17470 <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>
17471 <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>
17472 <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>
17473 <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>
17477 <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>
17478 <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>
17479 <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>
17480 <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>
17481 <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>
17488 == {{int:headline_sample}} ==
17492 Bug 32057: Title needed when expanding <h> nodes.
17494 title=[[Main Page]]
17498 <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>
17503 Strip marker in urlencode
17505 {{urlencode:x<nowiki/>y}}
17506 {{urlencode:x<nowiki/>y|wiki}}
17507 {{urlencode:x<nowiki/>y|path}}
17534 Strip marker in formatNum
17536 {{formatnum:1<nowiki/>2}}
17537 {{formatnum:1<nowiki/>2|R}}
17545 Check noCommafy in formatNum
17549 {{formatnum:123456.78}}
17550 {{formatnum:123456.78|NOSEP}}
17558 Wrong option for formatNum (bug 56199)
17560 {{formatnum:1,234.56|Random}}
17561 {{formatnum:1,234.56|EVERYTHING}}
17562 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
17571 Strip marker in grammar
17575 {{grammar:elative|foo<nowiki/>bar}}
17582 Strip marker in padleft
17584 {{padleft:|2|x<nowiki/>y}}
17591 Strip marker in padright
17593 {{padright:|2|x<nowiki/>y}}
17600 Strip marker in anchorencode
17602 {{anchorencode:x<nowiki/>y}}
17609 nowiki inside link inside heading (bug 18295)
17611 ==[[foo|x<nowiki>y</nowiki>z]]==
17613 <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>
17618 new support for bdi element (bug 31817)
17620 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17622 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17627 Ignore pipe between table row attributes
17631 |- id=foo | style='color: red'
17639 <tr id="foo" style="color: red">
17646 Gallery override link with WikiLink (bug 34852)
17649 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
17652 <ul class="gallery mw-gallery-traditional">
17653 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17654 <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>
17655 <div class="gallerytext">
17665 Gallery override link with absolute external link (bug 34852)
17668 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
17671 <ul class="gallery mw-gallery-traditional">
17672 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17673 <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>
17674 <div class="gallerytext">
17684 Gallery override link with malicious javascript (bug 34852)
17687 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
17690 <ul class="gallery mw-gallery-traditional">
17691 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17692 <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>
17693 <div class="gallerytext">
17703 Gallery with invalid title as link (bug 43964)
17706 File:foobar.jpg|link=<
17709 <ul class="gallery mw-gallery-traditional">
17710 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17711 <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>
17712 <div class="gallerytext">
17720 Language parser function
17729 Padleft and padright as substr
17731 {{padleft:|3|abcde}}
17732 {{padright:|3|abcde}}
17740 Special parser function
17742 {{#special:RandomPage}}
17743 {{#special:BaDtItLe}}
17744 {{#special:Foobar}}
17753 Bug 34939 - Case insensitive link parsing ([HttP://])
17755 [HttP://MediaWiki.Org/]
17757 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
17760 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
17764 Bug 34939 - Case insensitive link parsing ([HttP:// title])
17766 [HttP://MediaWiki.Org/ MediaWiki]
17768 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
17773 Bug 34939 - Case insensitive link parsing (HttP://)
17775 HttP://MediaWiki.Org/
17777 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
17780 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
17798 <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>
17799 <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>
17800 <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>
17801 <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>
17802 <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>
17808 ### Parsoid-specific tests
17809 ### Parsoid-PHP parser incompatibilities
17812 1. SOL-sensitive wikitext tokens as template-args
17814 parsoid=wt2html,wt2wt
17820 <span about="#mwt1" typeof="mw:Transclusion">
17821 </span><ul about="#mwt1"><li>a</li>
17823 <span about="#mwt2" typeof="mw:Transclusion">
17824 </span><ol about="#mwt2"><li>a</li>
17826 <span about="#mwt3" typeof="mw:Transclusion">
17827 </span><dl about="#mwt3"><dd>a</dd>
17831 #### -----------------------------------------------------------------
17832 #### Parsoid-specific functionality tests
17833 #### -----------------------------------------------------------------
17835 # Bug 63642: Formatting elt fixup is cleaned up.
17836 # We know wt2wt will fail, but we expect selser to pass.
17837 # Due to the nature of our testing, wt2wt and selser tests will enter the
17838 # blacklist and we'll catch selser regressions based on changes to the
17839 # blacklist entries for selser tests.
17841 Bad treebuilder fixup of formatting elt is cleaned up
17843 parsoid=wt2html,wt2wt
17848 [[Image:Foobar.jpg|right|Test]]
17854 <p><small></small></p>
17855 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption><small>Test</small></figcaption></figure>
17860 #### ----------------------------------------------------------------
17861 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
17862 #### tags. Parsoid's output for these tags differs from that of the
17864 #### ----------------------------------------------------------------
17867 Ref: 1. ref-location should be replaced with an index span
17872 B <ref name="x">foo</ref>
17875 <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>
17876 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>
17877 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>
17881 Ref: 2. ref-tags with identical names should all get the same index
17885 A <ref name="x">foo</ref>
17888 <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>
17889 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>
17893 Ref: 3. spaces in ref-names should be ignored
17897 A <ref name="x">foo</ref>
17898 B <ref name=" x " />
17901 <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>
17902 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>
17903 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>
17907 Ref: 4. 'constructor' should be accepted as a valid ref-name
17908 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
17912 A <ref name="constructor">foo</ref>
17914 <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>
17918 Ref: 5. body should accept generic wikitext
17923 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
17928 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"This is a <b data-parsoid='{\"dsr\":[19,40,3,3]}'><a rel=\"mw:WikiLink\" href=\"./Bolded_link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bolded_link\"},\"sa\":{\"href\":\"bolded link\"},\"dsr\":[22,37,2,2]}'>bolded link</a></b> and this is a <span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"transclusion\"}},\"i\":0}}]}' data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[55,76,null,null]}'>transclusion</span>\n"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
17930 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
17931 <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>
17937 Ref: 6. indent-pres should not be output in ref-body
17949 <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>
17951 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
17952 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
17960 Ref: 7. No p-wrapping in ref-body
17979 <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>
17981 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
17982 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
17997 Ref: 8. transclusion wikitext has lower precedence
18001 A <ref> foo {{echo|</ref> B C}}
18005 <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>
18006 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
18007 <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>
18012 Ref: 9. unclosed comments should not leak out of ref-body
18016 A <ref> foo <!--</ref> B C
18019 <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>
18020 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18021 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
18026 Ref: 10. Unclosed HTML tags should not leak out of ref-body
18030 A <ref> <b> foo </ref> B C
18034 <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>
18037 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18038 <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>
18043 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
18050 <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
18051 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>
18055 Ref: 12. ref-tags act as trailing newline migration barrier
18059 <!--the newline at the end of this line moves out of the p-tag-->a
18061 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
18066 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
18069 <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>
18070 <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>
18077 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
18085 <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
18086 <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>
18090 Ref: 14. A nested ref-tag should be emitted as plain text
18094 <ref>foo <ref>bar</ref> baz</ref>
18098 <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>
18100 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18101 <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>
18106 Ref: 15. ref-tags with identical names should get identical indexes
18110 A1 <ref name="a">foo</ref> A2 <ref name="a" />
18111 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
18115 <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>
18116 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>
18118 <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>
18122 ## We don't bother wt2wt-ing non-standard whitespace
18124 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
18132 <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>
18134 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18135 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
18139 References: 1. references tag without any refs should be handled properly
18145 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
18149 References: 2. references tag with group only outputs references from that group
18153 A <ref group="a">foo</ref>
18154 B <ref group="b">bar</ref>
18156 <references group="a" />
18158 <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>
18159 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>
18161 <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>
18166 References: 3. ref list should be cleared after processing references
18178 <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>
18180 <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>
18183 <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>
18185 <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>
18190 References: 4. only referenced group should be cleared after processing references
18194 A <ref group="a">afoo</ref>
18197 <references group="a" />
18203 <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>
18204 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>
18206 <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>
18209 <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>
18211 <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>
18216 References: 5. ref tags in references should be processed while ignoring all other content
18221 B <ref name="b">bar</ref>
18224 <ref name="a">foo</ref>
18225 This should just get lost.
18228 <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>
18229 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>
18232 <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":{}}'>
18233 <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>
18234 <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>
18239 References: 6. <references /> from a transclusion
18243 <ref>Foo</ref> {{echo|<references />}}
18245 <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>
18249 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
18253 A <ref>foo bar for a</ref>
18254 B <ref group="X" name="b" />
18258 <references group="X">
18259 <ref name="b">foo</ref>
18262 <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>
18263 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>
18265 <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>
18267 <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>
18271 Entities in ref name
18275 <ref name="test & me">hi</ref>
18277 <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>
18280 # This test is wt2html only because we're permitting the serializer to produce
18281 # dirty diffs, normalizing the unclosed references to the self-closed version.
18283 Generate references for unclosed references tag
18291 <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>
18294 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
18295 <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>
18299 New reference serializes on its own line
18301 parsoid=wt2wt,html2wt
18306 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
18309 #### ----------------------------------------------------------------
18310 #### The following section of tests are primarily to test
18311 #### wikitext escaping capabilities of Parsoid. Given that
18312 #### escaping can be done any number of ways, the wikitext (input)
18313 #### is always adjusted to reflect how Parsoid adds nowiki
18316 #### We are marking several tests as parsoid-only since the
18317 #### HTML in the result section is different from what the
18318 #### PHP parser generates for it.
18319 #### ----------------------------------------------------------------
18322 #### --------------- Headings ---------------
18324 #### 1. Nested inside html <h1>=foo=</h1>
18325 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
18326 #### 3. Nested inside html with wikitext split by html tags
18327 #### 4. No escape needed
18328 #### 5. Empty headings <h1></h1>
18329 #### 6. Heading chars in SOL context
18330 #### ----------------------------------------
18332 Headings: 0. Unnested
18336 <nowiki>=foo=</nowiki>
18338 <nowiki> =foo= </nowiki>
18340 <nowiki>=foo=</nowiki>
18342 =foo''a''<nowiki>=</nowiki>
18344 <p><span typeof="mw:Nowiki">=foo=</span></p>
18346 <p><span typeof="mw:Nowiki"> =foo= </span>
18348 <span typeof="mw:Nowiki">=foo=</span></p>
18350 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
18354 Headings: 1. Nested inside html
18355 (New headings and existing headings are handled differently)
18365 =<nowiki>=foo=</nowiki>=
18366 ==<nowiki>=foo=</nowiki>==
18367 ===<nowiki>=foo=</nowiki>===
18368 ====<nowiki>=foo=</nowiki>====
18369 =====<nowiki>=foo=</nowiki>=====
18370 ======<nowiki>=foo=</nowiki>======
18377 <h1 data-parsoid='{}'>=foo=</h1>
18378 <h2 data-parsoid='{}'>=foo=</h2>
18379 <h3 data-parsoid='{}'>=foo=</h3>
18380 <h4 data-parsoid='{}'>=foo=</h4>
18381 <h5 data-parsoid='{}'>=foo=</h5>
18382 <h6 data-parsoid='{}'>=foo=</h6>
18386 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
18391 <nowiki>*</nowiki>bar
18397 <nowiki>=bar=</nowiki>
18405 Headings: 3. Nested inside html with wikitext split by html tags
18409 = ='''bold'''<nowiki>foo=</nowiki> =
18411 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
18415 Headings: 4a. No escaping needed (testing just h1 and h2)
18433 = <nowiki>=</nowiki> =
18441 <h1><i>=</i>foo=</h1>
18442 <h1><span typeof="mw:Nowiki">=</span></h1>
18446 Headings: 4b. No escaping needed (inside p-tags)
18461 Headings: 5. Empty headings
18473 =====<nowiki/>=====
18475 ======<nowiki/>======
18486 Headings: 6a. Heading chars in SOL context (with trailing spaces)
18490 <nowiki>=a=</nowiki>
18492 <nowiki>=a=</nowiki>
18494 <nowiki>=a=</nowiki>
18496 <nowiki>=a=</nowiki>
18505 Headings: 6b. Heading chars in SOL context (with trailing newlines)
18533 Headings: 6c. Heading chars in SOL context (leading newline break)
18538 <nowiki>=b=</nowiki>
18545 Headings: 6d. Heading chars in SOL context (with interspersed comments)
18549 <!--c0--><nowiki>=a=</nowiki>
18551 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
18553 <p><!--c0-->=a=</p>
18554 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
18558 Headings: 6d. Heading chars in SOL context (No escaping needed)
18567 #### --------------- Lists ---------------
18568 #### 0. Outside nests (*foo, etc.)
18569 #### 1. Nested inside html <ul><li>*foo</li></ul>
18570 #### 2. Inside definition lists
18571 #### 3. Only bullets at start should be escaped
18572 #### 4. No escapes needed
18573 #### 5. No unnecessary escapes
18574 #### 6. Escape bullets in SOL position
18575 #### 7. Escape bullets in a multi-line context
18576 #### ----------------------------------------
18579 Lists: 0. Outside nests
18581 <nowiki>*</nowiki>foo
18583 <nowiki>#</nowiki>foo
18585 <nowiki>;Foo:</nowiki>bar
18594 Lists: 1. Nested inside html
18596 *<nowiki>*foo</nowiki>
18598 *<nowiki>#foo</nowiki>
18600 *<nowiki>:foo</nowiki>
18602 *<nowiki>;foo</nowiki>
18604 #<nowiki>*foo</nowiki>
18606 #<nowiki>#foo</nowiki>
18608 #<nowiki>:foo</nowiki>
18610 #<nowiki>;foo</nowiki>
18612 <ul><li>*foo</li></ul>
18613 <ul><li>#foo</li></ul>
18614 <ul><li>:foo</li></ul>
18615 <ul><li>;foo</li></ul>
18616 <ol><li>*foo</li></ol>
18617 <ol><li>#foo</li></ol>
18618 <ol><li>:foo</li></ol>
18619 <ol><li>;foo</li></ol>
18624 Lists: 2. Inside definition lists
18626 ;<nowiki>;foo</nowiki>
18628 ;<nowiki>:foo</nowiki>
18630 ;<nowiki>:foo</nowiki>
18633 :<nowiki>:foo</nowiki>
18635 <dl><dt>;foo</dt></dl>
18636 <dl><dt>:foo</dt></dl>
18639 <dl><dd>:foo</dd></dl>
18644 Lists: 3. Only bullets at start of text should be escaped
18646 *<nowiki>*foo*bar</nowiki>
18648 *<nowiki>*foo</nowiki>''it''*bar
18650 <ul><li>*foo*bar</li></ul>
18651 <ul><li>*foo<i>it</i>*bar</li></ul>
18656 Lists: 4. No escapes needed
18677 <li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
18681 <li><a rel="mw:WikiLink" href="Foo">Foo</a>*bar
18687 Lists: 5. No unnecessary escapes
18689 * bar <span><nowiki>[[foo]]</nowiki></span>
18691 *=bar <span><nowiki>[[foo]]</nowiki></span>
18693 *[[bar <span><nowiki>[[foo]]</nowiki></span>
18695 *]]bar <span><nowiki>[[foo]]</nowiki></span>
18697 *=bar <span>foo]]</span>=
18701 <ul><li> bar <span>[[foo]]</span></li></ul>
18702 <ul><li>=bar <span>[[foo]]</span></li></ul>
18703 <ul><li>[[bar <span>[[foo]]</span></li></ul>
18704 <ul><li>]]bar <span>[[foo]]</span></li></ul>
18705 <ul><li>=bar <span>foo]]</span>=</li></ul>
18706 <ul><li> <s></s>: a</li></ul>
18711 Lists: 6. Escape bullets in SOL position
18715 <!--cmt--><nowiki>*foo</nowiki>
18717 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
18721 Lists: 7. Escape bullets in a multi-line context
18724 <nowiki>*</nowiki>b
18731 #### --------------- HRs ---------------
18732 #### 1. Single line
18733 #### -----------------------------------
18736 HRs: 1. Single line
18740 ----<nowiki>----</nowiki>
18744 <hr><span typeof="mw:Nowiki">----</span>
18749 #### --------------- Tables ---------------
18750 #### 1a. Simple example
18751 #### 1b. No escaping needed (!foo)
18752 #### 1c. No escaping needed (|foo)
18753 #### 1d. No escaping needed (|}foo)
18755 #### 2a. Nested in td (<td>foo|bar</td>)
18756 #### 2b. Nested in td (<td>foo||bar</td>)
18757 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
18759 #### 3a. Nested in th (<th>foo!bar</th>)
18760 #### 3b. Nested in th (<th>foo!!bar</th>)
18761 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
18765 #### 4c. No escaping needed
18766 #### --------------------------------------
18769 Tables: 1a. Simple example
18780 Tables: 1b. No escaping needed
18789 Tables: 1c. No escaping needed
18798 Tables: 1d. No escaping needed
18807 Tables: 2a. Nested in td
18812 |<nowiki>foo|bar</nowiki>
18814 |x<div><nowiki>a|b</nowiki></div>
18818 <td>foo|bar</td></tr>
18819 <tr><td>x<div>a|b</div></td>
18824 Tables: 2b. Nested in td
18829 |<nowiki>foo||bar</nowiki>
18830 |''it''<nowiki>foo||bar</nowiki>
18834 <td><span typeof="mw:Nowiki">foo||bar</span></td>
18835 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
18839 Tables: 2c. Nested in td -- no escaping needed
18847 <table><tbody><tr><td>foo!!bar
18848 </td></tr></tbody></table>
18853 Tables: 3a. Nested in th
18861 <table><tbody><tr><th>foo!bar
18862 </th></tr></tbody></table>
18867 Tables: 3b. Nested in th
18872 !<nowiki>foo!!bar</nowiki>
18876 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
18881 Tables: 3c. Nested in th -- no escaping needed
18886 !<nowiki>foo||bar</nowiki>
18890 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
18894 Tables: 4a. Escape -
18901 |<nowiki>-bar</nowiki>
18905 <tr><th>-bar</th></tr>
18907 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
18911 Tables: 4b. Escape +
18918 |<nowiki>+bar</nowiki>
18922 <tr><th>+bar</th></tr>
18924 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
18928 Tables: 4c. No escaping needed
18949 <tr><td>foo-bar</td><td>foo+bar</td></tr>
18950 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
18956 <div>a|b</div></td>
18961 Tables: 4d. No escaping needed
18972 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo">Foo</a>-bar</td>
18973 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
18974 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
18979 Tables: Digest broken attributes on table and tr tag
18995 #### --------------- Links ----------------
18996 #### 1. Quote marks in link text
18997 #### 2. Wikilinks: Escapes needed
18998 #### 3. Wikilinks: No escapes needed
18999 #### 4. Extlinks: Escapes needed
19000 #### 5. Extlinks: No escapes needed
19001 #### --------------------------------------
19003 Links 1. Quote marks in link text
19007 [[Foo|Foo<nowiki>''boo''</nowiki>]]
19009 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
19013 Links 2. WikiLinks: Escapes needed
19018 [[Foo|<nowiki>Foobar]</nowiki>]]
19019 [[Foo|x [Foobar] x]]
19020 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
19021 [[Foo|<nowiki>[[Bar]]</nowiki>]]
19022 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
19023 [[Foo|<nowiki>|Bar</nowiki>]]
19024 [[Foo|<nowiki>]]bar</nowiki>]]
19025 [[Foo|<nowiki>[[bar</nowiki>]]
19026 [[Foo|<nowiki>x [[ y</nowiki>]]
19027 [[Foo|<nowiki>x ]] y</nowiki>]]
19028 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
19030 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
19031 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
19032 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
19033 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
19034 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
19035 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
19036 <a href="Foo" rel="mw:WikiLink">|Bar</a>
19037 <a href="Foo" rel="mw:WikiLink">]]bar</a>
19038 <a href="Foo" rel="mw:WikiLink">[[bar</a>
19039 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
19040 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
19041 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
19045 Links 3. WikiLinks: No escapes needed
19052 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
19053 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
19057 Links 4. ExtLinks: Escapes needed
19061 [http://google.com <nowiki>[google]</nowiki>]
19062 [http://google.com <nowiki>google]</nowiki>]
19064 <nowiki>[http://google.com]</nowiki>
19066 <nowiki>[http://google.com google]</nowiki>
19069 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
19070 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
19071 <p>[http://google.com]</p>
19072 <p>[http://google.com google]</p>
19076 Links 5. ExtLinks: No escapes needed
19080 [http://google.com [google]
19082 <a href="http://google.com" rel="mw:ExtLink">[google</a>
19086 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
19088 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
19089 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
19090 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
19091 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
19092 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
19093 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
19094 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
19095 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
19096 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
19097 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
19098 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
19099 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
19100 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
19103 x<nowiki/>http://example.com<nowiki/>y
19104 http://example.com<nowiki/>?x
19105 http://example.com<nowiki/>&x
19106 http://example.com<nowiki/>'x
19107 http://example.com<nowiki/>,x
19108 http://example.com<nowiki/>.x
19109 http://example.com<nowiki/>;x
19110 http://example.com<nowiki/>:x
19111 http://example.com<nowiki/>;x
19112 http://example.com<nowiki/>!x
19113 http://example.com<nowiki/>=x
19114 http://example.com<nowiki/>(x)
19115 http://example.com(x<nowiki/>)
19119 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19122 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
19124 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
19125 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
19126 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
19127 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
19128 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
19134 "http://example.com"
19135 (http://example.com)
19136 (http://example.com) foo
19137 http://example.com,
19138 http://example.com, foo
19141 ## Parsoid currently fails wt2html on this one!
19143 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19145 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
19147 http://example.com.,;:!?
19151 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
19153 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
19159 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
19161 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19162 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19163 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
19164 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
19174 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
19176 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
19182 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
19184 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19185 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19186 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
19187 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
19197 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
19199 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
19200 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
19201 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
19204 ISBN 1234567890<nowiki/>1
19205 ISBN 1234567890<nowiki/>x
19206 ISBN 1234567890<nowiki/>b
19210 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
19212 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
19217 #### --------------- Quotes ---------------
19218 #### 1. Quotes inside <b> and <i>
19219 #### 2. Link fragments separated by <i> and <b> tags
19220 #### 3. Link fragments inside <i> and <b>
19221 #### 4. No escaping needed
19222 #### --------------------------------------
19224 1. Quotes inside <b> and <i>
19226 parsoid=html2wt,wt2wt
19228 ''<nowiki>'foo'</nowiki>''
19229 ''<nowiki>''foo''</nowiki>''
19230 ''<nowiki>'''foo'''</nowiki>''
19232 '''<nowiki>'foo'</nowiki>'''
19233 '''<nowiki>''foo''</nowiki>'''
19234 '''<nowiki>'''foo'''</nowiki>'''
19235 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
19236 '''foo'''<nowiki/>'s
19239 '<nowiki/>''foo''<nowiki/>'
19241 '''foo'''<nowiki/>'
19242 '<nowiki/>'''foo'''<nowiki/>'
19243 ''fools'<span> errand</span>''
19244 ''<span>fool</span>'s errand''
19253 <b>foo'<i>bar'</i>baz</b>
19261 <i>fools'<span> errand</span></i>
19262 <i><span>fool</span>'s errand</i>
19266 2. Link fragments separated by <i> and <b> tags
19268 [[''foo''<nowiki>hello]]</nowiki>
19270 [['''foo'''<nowiki>hello]]</nowiki>
19272 <p>[[<i>foo</i>hello]]
19273 </p><p>[[<b>foo</b>hello]]
19278 3. Link fragments inside <i> and <b>
19279 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
19280 this is one of the shortcomings of this format)
19282 ''[[foo''<nowiki>]]</nowiki>
19284 '''[[foo'''<nowiki>]]</nowiki>
19287 </p><p><b>[[foo</b>]]
19292 4. No escaping needed
19294 '<span>''bar''</span>'
19295 '<span>'''bar'''</span>'
19297 <p>'<span><i>bar</i></span>'
19298 '<span><b>bar</b></span>'
19302 #### ----------- Paragraphs ---------------
19303 #### 1. No unnecessary escapes
19304 #### --------------------------------------
19307 1. No unnecessary escapes
19309 bar <span><nowiki>[[foo]]</nowiki></span>
19311 =bar <span><nowiki>[[foo]]</nowiki></span>
19313 [[bar <span><nowiki>[[foo]]</nowiki></span>
19315 ]]bar <span><nowiki>[[foo]]</nowiki></span>
19317 =bar <span>foo]]</span><nowiki>=</nowiki>
19319 <p>bar <span>[[foo]]</span>
19320 </p><p>=bar <span>[[foo]]</span>
19321 </p><p>[[bar <span>[[foo]]</span>
19322 </p><p>]]bar <span>[[foo]]</span>
19323 </p><p>=bar <span>foo]]</span>=
19327 #### ----------------------- PRE --------------------------
19328 #### 1. Leading whitespace in SOL context should be escaped
19329 #### ------------------------------------------------------
19331 1. Leading whitespace in SOL context should be escaped
19335 <nowiki> </nowiki>a
19337 <nowiki> </nowiki> a
19339 <nowiki> </nowiki>a(tab)
19341 <nowiki> </nowiki> a
19343 <nowiki> </nowiki> a
19346 <nowiki> </nowiki>b
19349 <nowiki> </nowiki>b
19352 <nowiki> </nowiki> b
19358 <p><!--cmt--> a</p>
19367 #### --------------- Behavior Switches --------------------
19369 1. Valid behavior switches should be escaped
19373 <nowiki>__TOC__</nowiki>
19379 2. Invalid behavior switches should not be escaped
19390 #### --------------- HTML tags ---------------
19393 #### 3. multi-line html tag
19394 #### 4. extension tags
19395 #### -----------------------------------------
19401 <a href="http://google.com">google</a>
19403 <a href="http://google.com">google</a>
19409 <nowiki><div>foo</div>
19410 <div style="color:red">foo</div></nowiki>
19412 <p><div>foo</div>
19413 <div style="color:red">foo</div>
19418 3. multi-line html tag
19433 <nowiki><ref>foo</ref></nowiki>
19435 <nowiki><ref>bar</nowiki>
19437 baz<nowiki></ref></nowiki>
19439 <p><ref>foo</ref>
19440 </p><p><ref>bar
19441 </p><p>baz</ref>
19445 #### --------------- Others ---------------
19449 <nowiki>foo</nowiki>
19451 <p><nowiki>foo</nowiki>
19455 ## The quote-char in the input is necessary for triggering the bug
19457 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
19459 parsoid=wt2wt,html2wt
19468 Tag-like HTML structures are passed through as text
19490 </p><p>1<d e>f
19495 # This was a bug in the PHP parser (see bug 17663 and its dups,
19496 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
19498 Tag names followed by punctuation should not be recognized as tags
19502 <p><s.ome> text
19507 HTML tag with necessary entities in attributes
19509 <span title="&amp;">foo</span>
19511 <p><span title="&amp;">foo</span>
19516 HTML tag with 'unnecessary' entity encoding in attributes
19518 <span title="&">foo</span>
19520 <p><span title="&">foo</span>
19525 HTML tag with broken attribute value quoting
19527 <span title="Hello world>Foo</span>
19529 <p><span>Foo</span>
19534 Parsoid-only: HTML tag with broken attribute value quoting
19538 <span title="Hello world>Foo</span>
19540 <p><span title="Hello world">Foo</span>
19545 Table with broken attribute value quoting
19548 | title="Hello world|Foo
19559 Table with broken attribute value quoting on consecutive lines
19562 | title="Hello world|Foo
19563 | style="color:red|Bar
19576 Parsoid-only: Table with broken attribute value quoting on consecutive lines
19581 | title="Hello world|Foo
19582 | style="color:red|Bar
19587 <td title="Hello world">Foo
19588 </td><td style="color: red">Bar
19589 </td></tr></tbody></table>
19594 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19604 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19614 Accept empty td cell attribute
19617 | align="center" | foo || |
19622 <td align="center"> foo </td>
19629 Non-empty attributes in th-cells
19632 ! Foo !! style="color: red" | Bar
19638 <th style="color: red"> Bar
19644 Accept empty attributes in th-cells
19659 Empty table rows go away
19680 ### Parsoid-centric tests for testing RTing of inter-element separators
19681 ### Edge cases not tested by existing parser tests and specific to
19682 ### Parsoid-specific serialization strategies.
19686 RT-ed inter-element separators should be valid separators
19699 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
19700 (Parsoid-only since PHP parser relies on Tidy for correct output)
19716 Empty TD followed by TD with tpl-generated attribute
19721 |{{echo|style='color:red'}}|foo
19735 Indented table with an empty td
19754 Indented block & table
19761 <div data-parsoid='{"stx":"html"}'>foo</div>
19763 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
19768 Empty TR followed by a template-generated TR
19769 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
19775 {{echo|<tr><td>foo</td></tr>}}
19781 <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}}]}'>
19786 ## PHP and parsoid output differ for this, and since this is primarily
19787 ## for testing Parsoid's serializer, marking this Parsoid only
19789 Empty TR followed by mixed-ws-comment line should RT correctly
19805 <!--c--> </tr><!--d-->
19811 Multi-line image caption generated by templates with/without trailing newlines
19815 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
19816 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
19818 <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>
19819 <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>
19824 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
19828 <includeonly>foo</includeonly>
19835 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
19837 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
19840 ## PHP emits broken html for this, and since this is primarily
19841 ## a Parsoid serializer test, marking this Parsoid only
19843 Improperly nested inline or quotes tags with whitespace in between
19847 <span> <s>x</span> </s>
19850 <p><span> <s>x</s></span><s> </s>
19851 <b> <i>x</i></b><i> </i>
19856 Encapsulate protected attributes from wt
19860 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
19862 <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>
19866 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
19867 ## Having nested or stray pre tags results in the attempt to add duplicates,
19868 ## causing an assertion fail. This test tries to prevent that situation.
19870 Ensure ParagraphWrapper can deal with stray closing pre tags
19880 1. Ensure fostered text content is wrapped in spans
19884 <table>hi</table><table>ho</table>
19893 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
19895 parsoid=wt2html,wt2wt
19902 <span> || ||</span>
19911 Encapsulation properly handles null DSR information from foster box
19913 parsoid=wt2html,wt2wt
19915 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
19917 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
19920 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
19924 <td>bar</td></tr></tbody></table>
19928 1. Encapsulate foster-parented transclusion content
19930 parsoid=wt2wt,wt2html
19932 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
19934 <span typeof="mw:Transclusion" data-mw="{"parts":["
19935 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
19937 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
19941 <td>bar</td></tr></tbody></table>
19945 2. Encapsulate foster-parented transclusion content
19947 parsoid=wt2wt,wt2html
19949 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
19951 <div typeof="mw:Transclusion" data-mw="{"parts":["
19953 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
19955 <td>bar</td></tr></table>"]}">foo</div>
19959 <td>bar</td></tr></tbody></table>
19963 3. Encapsulate foster-parented transclusion content
19965 parsoid=wt2wt,wt2html
19967 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
19969 <div typeof="mw:Transclusion" data-mw="{"parts":["
19972 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
19974 <td>"}},"i":0}},"bar</td></tr></table>"]}">
19979 <td>bar</td></tr></tbody></table>
19983 4. Encapsulate foster-parented transclusion content
19985 parsoid=wt2wt,wt2html
19987 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
19989 <div typeof="mw:Transclusion" data-mw="{"parts":["
19992 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
19994 <td>"}},"i":0}},"bar</td></tr></table>"]}">
19999 <td>bar</td></tr></tbody></table>
20003 5. Encapsulate foster-parented transclusion content
20005 parsoid=wt2wt,wt2html
20007 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
20009 <span typeof="mw:Transclusion" data-mw="{"parts":["
20014 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
20020 <p>foo</p></div></td></tr></tbody></table>
20024 6. Encapsulate foster-parented transclusion content
20026 parsoid=wt2wt,wt2html
20028 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
20030 <span typeof="mw:Transclusion" data-mw="{"parts":["
20035 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
20041 <p>foo</p></div></td></tr></tbody></table>
20046 7. Encapsulate foster-parented transclusion content
20048 parsoid=wt2wt,wt2html
20050 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
20052 <p typeof="mw:Transclusion" data-mw="{"parts":["
20053 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20054 <p>foo</p>"}},"i":0}},"
20055 <td>bar</td></table>"]}">foo</p>
20059 <td>bar</td></tr></tbody></table>
20063 8. Encapsulate foster-parented transclusion content
20065 parsoid=wt2wt,wt2html
20068 }}{|{{echo|style='color:red'}}
20073 <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>
20077 <td>b</td></tr></tbody></table>
20081 9. Encapsulate foster-parented transclusion content
20083 parsoid=wt2wt,wt2html
20085 <table>{{echo|hi</table>hello}}
20087 <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>
20088 <table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2" data-parsoid="{}">hello</span>
20092 Table in fosterable position
20094 parsoid=wt2html,wt2wt
20103 <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="{}">
20105 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
20111 # Parsoid only for bug 64747
20113 Properly encapsulate empty-content transclusions in fosterable positions
20121 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n",{"template":{"target":{"wt":"#if:","function":"#if"},"params":{"1":{"wt":"\n<td>foo</td>\n"}},"i":0}},"\n</table>"]}' data-parsoid='{"stx":"html","pi":[[{"k":"1","spc":["","","",""]}]],"src":"<table>\n{{#if:|\n<td>foo</td>\n}}\n</table>"}'>
20127 Support <object> element with .data attribute
20131 <object data="test.swf"></object>
20133 <object data="test.swf"></object>
20136 # -----------------------------------------------------------------
20137 # The following section of tests are primarily to spec requirements
20138 # around serialization of new/edited content.
20140 # All these tests are marked Parsoid html2wt and html2html only
20141 # ----------------------------------------------------------------
20144 Image: Modifying size of an image (1)
20147 "modes": ["wt2wt"],
20149 ["img[height]", "attr", "height", "22"],
20150 ["img[width]", "attr", "width", "200"]
20154 [[Image:Foobar.jpg|230x230px]]
20156 [[Image:Foobar.jpg|200x200px]]
20160 Image: Modifying size of an image (2)
20163 "modes": ["wt2wt"],
20165 ["img[height]", "attr", "height", "100"],
20166 ["img[width]", "attr", "width", "500"]
20170 [[Image:Foobar.jpg|230x230px]]
20172 [[Image:Foobar.jpg|500x500px]]
20175 # Change in size is ignored so long as class='mw-default-size'
20177 Image: Modifying size of an image (3)
20180 "modes": ["wt2wt"],
20182 ["figure[class]", "removeClass", "mw-default-size"],
20183 ["figure img", "attr", "height", "19"],
20184 ["figure img", "attr", "width", "170"]
20188 [[Image:Foobar.jpg|thumb]]
20190 [[Image:Foobar.jpg|thumb|170x170px]]
20194 Image: Modifying alignment of an image (bug 48665)
20197 "modes": ["wt2wt"],
20199 ["figure[class]", "removeClass", "mw-halign-right"],
20200 ["figure[class]", "addClass", "mw-halign-left"]
20204 [[Image:Foobar.jpg|thumb|caption|right]]
20206 [[Image:Foobar.jpg|thumb|caption|left]]
20210 Image: Modifying mw-default-size of an frameless image (bug 62805)
20213 "modes": ["wt2wt"],
20215 ["figure.mw-default-size", "removeClass", "mw-default-size"]
20219 [[Image:Foobar.jpg|frameless|right]]
20221 [[Image:Foobar.jpg|frameless|right|220x220px]]
20225 Image: Modifying valign of an image (bug 49221)
20228 "modes": ["wt2wt"],
20230 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
20231 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
20235 [[File:Foobar.jpg|20px|middle]]
20237 [[File:Foobar.jpg|20px|text-top]]
20241 Image: Modifying alt attribute of an image (bug 56400)
20244 "modes": ["wt2wt"],
20246 ["img[alt]", "attr", "alt", "some alternate edited text"]
20250 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
20252 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
20256 Image: Modifying caption of an image
20259 "modes": ["wt2wt"],
20261 ["figcaption", "text", "new caption"]
20265 [[Image:Foobar.jpg|thumb|original caption]]
20267 [[Image:Foobar.jpg|thumb|new caption]]
20271 Image: empty alt attribute (bug 48924)
20275 [[File:Foobar.jpg|thumb|alt=|bar]]
20277 <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>
20281 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
20286 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
20288 #<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>
20292 Image: Block level image should have \n before and after
20297 [[File:Foobar.jpg|right|thumb|150x150px]]
20300 <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>
20304 Image: New block level image should have \n before and after (existing
20310 [[File:Foobar.jpg|right|thumb|150x150px]]
20313 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
20314 <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>
20315 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
20319 Image: upright option (parsoid)
20323 [[File:Foobar.jpg|thumb|upright|caption]]
20324 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
20325 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
20327 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="19" width="170"/></a><figcaption>caption</figcaption></figure><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="12" width="110"/></a><figcaption>caption</figcaption></figure><figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="57" width="500"/></a><figcaption>caption</figcaption></figure>
20331 Image: upright option is ignored on inline and frame images (parsoid)
20335 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
20337 <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>
20341 Image: from basic HTML (1)
20345 <span typeof="mw:Image">
20346 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20349 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20353 Image: from basic HTML (2)
20357 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20359 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20363 Image: from basic HTML (3)
20367 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
20369 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
20373 Image: from basic HTML (4)
20377 <img src="File:Foobar.jpg">
20379 [[File:Foobar.jpg|link=]]
20383 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
20390 <li><p>foo</p></li>
20395 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
20401 <ul> <li>foo</li></ul>
20405 Don't strip leading whitespace when handling indent-pre suppressing tags
20413 '''This is very bold of you!'''
20417 indented cell (no pre-wrapping!)
20424 <tr><td> indented row</td></tr>
20427 <b>This is very bold of you!</b>
20430 indented cell (no pre-wrapping!)
20438 Strip leading whitespace when handling indent-pre inducing tags
20470 Lists: Add space after bullets
20476 * <span> baz</span>
20481 <li><span> baz</span></li>
20486 Lists: Dont insert newlines in a serialized list item.
20493 <ul><li>a<br>b</li><li>c</li></ul>
20497 Headings: Add space before/after == (Bug 51744)
20507 == <span> baz</span> ==
20512 <h2><span> baz</span></h2>
20516 Parsoid: Serialize positional parameters with = in them as named parameter
20522 {{echo|1 = f=oo|2 = bar}}
20524 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20525 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20526 {{echo|<nowiki>f=oo</nowiki>|bar}}
20528 <p about="#mwt1" typeof="mw:Transclusion"
20529 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
20531 <p about="#mwt1" typeof="mw:Transclusion"
20532 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
20534 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20535 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20536 <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>
20540 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
20556 <div>a<p>b</p></div>
20565 Substrings resembling wikitext in hrefs should not get nowiki escapes
20571 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
20574 #-----------------------------
20575 # I/B quote minimization tests
20576 #-----------------------------
20579 1. I/B quote minimization: wikitext-only tags should be combined
20599 <p><i>A</i><i>B</i></p>
20600 <p><b>A</b><b>B</b></p>
20601 <p><i>A</i><b><i>B</i></b></p>
20602 <p><b>A</b><i><b>B</b></i></p>
20603 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
20604 <p><i><b>A</b></i><i><b>B</b></i></p>
20605 <p><i><b>A</b></i><b><i>B</i></b></p>
20606 <p><b><i>A</i></b><i><b>B</b></i></p>
20610 2. I/B quote minimization: wikitext and html tags should not be combined
20616 ''A'''''<i>B</i>'''
20618 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
20619 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
20623 3. I/B quote minimization: templated content stops minimization
20627 ''A''{{echo|''B''}}
20629 ''A''{{echo|'''''B'''''}}
20631 <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>
20632 <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>
20636 4. I/B quote minimization: new content should be mimimized with adjacent old content
20646 <p><i>A</i><i data-parsoid='{}'>B</i></p>
20647 <p><b data-parsoid='{}'>A</b><b>B</b></p>
20648 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
20651 #------------------------------------
20652 # End of I/B quote minimization tests
20653 #------------------------------------
20656 Bug 54262: New entities
20662 <span typeof="mw:Entity"> </span>
20665 ## Note that there is no wikitext output for 'unknownproperty' ##
20666 ## Unknown magic words are silently dropped ##
20681 __NOCONTENTCONVERT__
20683 <meta property='mw:PageProp/toc' />
20684 <meta property='mw:PageProp/notoc' />
20685 <meta property='mw:PageProp/forcetoc' />
20686 <meta property='mw:PageProp/index' />
20687 <meta property='mw:PageProp/noindex' />
20688 <meta property='mw:PageProp/nogallery' />
20689 <meta property='mw:PageProp/noeditsection' />
20690 <meta property='mw:PageProp/notitleconvert' />
20691 <meta property='mw:PageProp/nocontentconvert' />
20692 <meta property='mw:PageProp/unknownproperty' />
20696 Consecutive <pre>s should not get merged
20698 parsoid=html2wt,html2html
20714 <pre>a</pre><pre>b</pre>
20728 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
20732 [[Special:BookSources/1234567890|ISBN 1234567895]]
20734 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
20738 Edited RFC links not serializable as RFC links should serialize as extlinks
20742 [//tools.ietf.org/html/rfc123 New RFC]
20744 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
20748 Edited PMID links not serializable as PMID links should serialize as extlinks
20752 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
20754 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
20758 Edited Redirect link should emit a non-piped wikitext link
20764 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
20767 # -----------------------------------------------------------------
20768 # End of section for Parsoid-only html2wt tests for serialization
20770 # -----------------------------------------------------------------
20777 Try for 100% code coverage