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
8333 # hmm, fix this or just deprecate msgnw and document its behavior?
8337 {{msgnw:MSGNW test}}
8339 <p>''None'' of '''this''' should be
8341  but rather passed unmodified
8342 {{test}}
8352 {{int:youhavenewmessages|lots of money|not!}}
8354 <p>You have lots of money (not!).
8361 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8365 <includeonly> and <noinclude> being included
8376 <onlyinclude>Foo</onlyinclude>bar
8380 <onlyinclude> being included
8392 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
8396 <onlyinclude> and <includeonly> being included
8405 <includeonly> and <noinclude> on a page
8407 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
8414 Un-closed <noinclude>
8421 <onlyinclude> on a page
8423 <onlyinclude>Foo</onlyinclude>bar
8430 Un-closed <onlyinclude>
8437 Self-closed noinclude, includeonly, onlyinclude tags
8448 Unbalanced includeonly and noinclude tags
8452 |b</noinclude></noinclude>
8453 |c</noinclude></includeonly>
8454 |d</includeonly></includeonly>
8463 <td>c</includeonly>
8465 <td>d</includeonly></includeonly>
8471 Template:Includeonly section
8474 ==Includeonly section==
8480 Bug 6563: Edit link generation for section shown by <includeonly>
8482 {{includeonly section}}
8484 <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>
8485 <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>
8489 # Uses same input as the contents of [[Template:Includeonly section]]
8491 Bug 6563: Section extraction for section shown by <includeonly>
8496 ==Includeonly section==
8504 Bug 6563: Edit link generation for section suppressed by <includeonly>
8507 ==Includeonly section==
8511 <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>
8516 Bug 6563: Section extraction for section suppressed by <includeonly>
8521 ==Includeonly section==
8529 Un-closed <includeonly>
8535 # TODO: test with DOM fragment reuse!
8537 Parsoid: DOM fragment reuse
8539 parsoid=wt2wt,wt2html
8541 a{{echo|b<table></table>c}}d
8553 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
8554 <table></table>c"}},"i":0}}]}'>b</span>
8555 <table about="#mwt1"></table><span about="#mwt1">c</span>d
8558 <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">
8560 <table about="#mwt2"></table><span about="#mwt2">
8562 <p about="#mwt2">cd</p>
8565 <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">
8568 <table about="#mwt3"></table><span about="#mwt3">
8571 <p about="#mwt3">b</p>
8575 Parsoid: Merge double tds (bug 50603)
8584 <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>
8589 Parsoid: Merge double tds in nested transclusion content (bug 50603)
8599 <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}}]}'>
8601 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
8607 ### <includeonly> and <noinclude> in attributes
8610 0. includeonly around the entire attribute
8612 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
8614 <p><span id="v2">bar</span>
8619 1. includeonly in html attr key
8621 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
8623 <p><span id="foo">bar</span>
8628 2. includeonly in html attr value
8630 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
8631 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
8633 <p><span id="v1">bar</span>
8634 <span id="v1">bar</span>
8639 3. includeonly in part of an attr value
8641 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
8643 <p><span style="color:red;">bar</span>
8648 4. includeonly in table attributes
8672 ### Token Stream Patcher tests
8674 ### These tests won't always pass wt2wt and other modes because
8675 ### on serialization, the table will be output on a new line.
8676 ### For now, we are blacklisting them, and using this to test selser.
8680 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
8682 parsoid=wt2html,wt2wt
8684 {{echo|}}{| width = '100%'
8688 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
8689 <table width="100%">
8692 <td>foo</td></tr></tbody></table>
8696 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
8698 parsoid=wt2html,wt2wt
8700 <includeonly>a</includeonly>{| {{{b}}}
8704 <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|}"}'>
8705 <tbody><tr><td>c</td></tr>
8710 ### Testing parsing of templates where a template arg
8711 ### has the same name as the template itself.
8721 Templates: Template Name/Arg clash: 1. Use of positional param
8730 Templates: Template Name/Arg clash: 2. Use of named param
8739 Templates: Template Name/Arg clash: 3. Use of named param with empty input
8748 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
8752 Templates: 1. Simple use
8761 Templates: 2. Inside a block tag
8763 <div>{{echo|Foo}}</div>
8764 <blockquote>{{echo|Foo}}</blockquote>
8767 <blockquote>Foo</blockquote>
8772 Templates: P-wrapping: 1a. Templates on consecutive lines
8783 Templates: P-wrapping: 1b. Templates on consecutive lines
8797 Templates: P-wrapping: 1c. Templates on consecutive lines
8800 {{echo|bar}} <div>baz</div>
8809 Templates: P-wrapping: 1d. Template preceded by comment-only line
8818 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
8822 Templates: Inline Text: 1. Multiple template uses
8824 {{echo|Foo}}bar{{echo|baz}}
8831 Templates: Inline Text: 2. Back-to-back template uses
8833 {{echo|Foo}}{{echo|bar}}
8840 Templates: Block Tags: 1. Multiple template uses
8842 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
8844 <div>Foo</div><div>bar</div><div>baz</div>
8849 Templates: Block Tags: 2. Back-to-back template uses
8851 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
8853 <div>Foo</div><div>bar</div>
8858 Templates: Links: 1. Simple example
8860 {{echo|[[Foo|bar]]}}
8862 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8867 Templates: Links: 2. Generation of link href
8869 [[{{echo|Foo}}|bar]]
8871 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8876 Templates: Links: 3. Generation of part of a link href
8878 [[Fo{{echo|o}}|bar]]
8882 [[Foo{{echo|bar}}baz]]
8884 [[Foo{{echo|bar}}|bar]]
8886 [[:Foo{{echo|bar}}]]
8888 [[:Foo{{echo|bar}}|bar]]
8890 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8891 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
8892 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
8893 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
8894 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
8895 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
8900 Templates: Links: 4. Multiple templates generating link href
8902 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
8904 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
8909 Templates: Links: 5. Generation of link text
8911 [[Foo|{{echo|bar}}]]
8913 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8918 Templates: Links: 5. Nested templates (only outermost template should be marked)
8920 {{echo|[[{{echo|Foo}}|bar]]}}
8922 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
8927 Templates: HTML Tag: 1. Generation of HTML attr. key
8929 <div {{echo|style}}="color:red;">foo</div>
8931 <div style="color:red;">foo</div>
8936 Templates: HTML Tag: 2. Generation of HTML attr. value
8938 <div style={{echo|'color:red;'}}>foo</div>
8940 <div style="color:red;">foo</div>
8945 Templates: HTML Tag: 3. Generation of HTML attr key and value
8947 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
8949 <div style="color:red;">foo</div>
8954 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
8956 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
8958 <div title="This is a long title with just one piece templated">foo</div>
8963 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
8965 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
8967 <div title="This is a long title with just one piece templated">foo</div>
8972 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
8974 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
8976 <div title="This is a long title with just one piece templated">foo</div>
8981 Templates: HTML Tag: 7. Generation of partial attribute key string
8983 <div st{{echo|yle}}="color:red;">foo</div>
8985 <div style="color:red;">foo</div>
8990 Templates: HTML Tables: 1. Generating start of a HTML table
8992 {{echo|<table><tr><td>foo</td>}}</tr></table>
8994 <table><tr><td>foo</td></tr></table>
8999 Templates: HTML Tables: 2a. Generating middle of a HTML table
9001 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9003 <table><tr><td>foo</td></tr></table>
9008 Templates: HTML Tables: 2b. Generating middle of a HTML table
9010 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9012 <table><tr><td>foo</td></tr></table>
9017 Templates: HTML Tables: 3. Generating end of a HTML table
9019 <table><tr>{{echo|<td>foo</td></tr></table>}}
9021 <table><tr><td>foo</td></tr></table>
9026 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9028 {{echo|<table>}}<tr><td>foo</td></tr></table>
9030 <table><tr><td>foo</td></tr></table>
9035 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9037 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9039 <table><tr><td>foo</td></tr></table>
9044 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9046 <table><tr>{{echo|<td>}}foo</td></tr></table>
9048 <table><tr><td>foo</td></tr></table>
9053 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9055 <table><tr><td>foo{{echo|</td>}}</tr></table>
9057 <table><tr><td>foo</td></tr></table>
9062 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9064 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9066 <table><tr><td>foo</td></tr></table>
9071 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
9073 <table><tr><td>foo</td></tr>{{echo|</table>}}
9075 <table><tr><td>foo</td></tr></table>
9080 Templates: HTML Tables: 5. Proper fostering of categories from inside
9082 parsoid=wt2html,wt2wt
9084 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
9085 <!--Two categories (Bug 50330)-->
9086 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
9088 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
9089 <!--Two categories (Bug 50330)-->
9090 <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>
9094 Templates: Wiki Tables: 1a. Fostering of entire template content
9102 <tr><td></td></tr></table>
9107 Templates: Wiki Tables: 1b. Fostering of entire template content
9120 <tr><td></td></tr></table>
9125 Templates: Wiki Tables: 2. Fostering of partial template content
9135 <tr><td></td></tr></table>
9140 Templates: Wiki Tables: 3. td-content via multiple templates
9143 {{echo|{{pipe}}a}}{{echo|b}}
9154 Templates: Wiki Tables: 4. Templated tags, no content
9160 <tr><td></td></tr></table>
9165 Templates: Wiki Tables: 5. Templated tags, regular td-tags
9179 Templates: Wiki Tables: 6. Templated tags, templated td-tags
9193 Templates: Lists: Multi-line list-items via templates
9195 *{{echo|a {{nonexistent|
9197 *{{echo|b {{nonexistent|
9200 <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>
9201 <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>
9206 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
9208 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
9210 <p><i>ab</i>c<i>d</i>e
9215 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
9216 (PHP parser generates misnested html)
9218 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
9220 <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>
9224 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
9225 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
9227 parsoid=wt2html,wt2wt
9229 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
9231 <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>
9232 <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>
9233 <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>
9237 Templates: Ugly nesting: 4. Divs opened/closed across templates
9239 a<div>b{{echo|c</div>d}}e
9246 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
9252 |{{echo|foo</table>}}
9256 <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|}"]}'>
9260 <td>foo</td></tr></tbody></table><span about="#mwt1">
9261 </span><span about="#mwt1">|bar</span><span about="#mwt1">
9266 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
9276 <td>1. {{echo|foo </table>}}</td>
9278 <td>2. {{echo|baz </table>}}</td>
9291 <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>"]}'>
9296 <td>1. foo </td></tr></tbody></table></td>
9298 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
9299 </span><span about="#mwt2">
9300 </span><span about="#mwt2">
9301 </span><span about="#mwt2">abc</span><span about="#mwt2">
9302 </span><span about="#mwt2">
9303 </span><span about="#mwt2">
9304 </span><span about="#mwt2">
9305 </span><span about="#mwt2">
9306 </span><span about="#mwt2">
9307 </span><span about="#mwt2">xyz</span><span about="#mwt2">
9308 </span><span about="#mwt2">
9313 Templates: Ugly templates: 3. newline-only template parameter
9322 # This looks like a bug: a single newline triggers p/br for some reason.
9324 Templates: Ugly templates: 4. newline-only template parameter inconsistency
9333 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
9334 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
9336 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
9342 <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
9343 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9347 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
9348 # that are "identical" and generate nesting cycles in the algorithm
9350 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
9352 {{echo|<table><tr><td><table>}}
9356 <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"}'>
9357 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
9358 </table></td></tr></tbody></table>
9362 Parser Functions: 1. Simple example
9371 Parser Functions: 2. Nested use (only outermost should be marked up)
9380 ### Pre-save transform tests
9383 pre-save transform: subst:
9389 This is a test template
9393 pre-save transform: normal template
9403 pre-save transform: nonexistent template
9407 {{thistemplatedoesnotexist}}
9409 {{thistemplatedoesnotexist}}
9414 pre-save transform: subst magic variables
9423 # This is bug 89, which I fixed. -- wtm
9425 pre-save transform: subst: templates with parameters
9429 {{subst:paramtest|param="something else"}}
9431 This is a test template with parameter "something else"
9437 <nowiki>'''not wiki'''</nowiki>
9441 pre-save transform: nowiki in subst (bug 1188)
9445 {{subst:nowikitest}}
9447 <nowiki>'''not wiki'''</nowiki>
9452 Template:commenttest
9454 This template has <!-- a comment --> in it.
9458 pre-save transform: comment in subst (bug 1936)
9462 {{subst:commenttest}}
9464 This template has <!-- a comment --> in it.
9468 pre-save transform: unclosed tag
9472 <nowiki>'''not wiki'''
9474 <nowiki>'''not wiki'''
9478 pre-save transform: mixed tag case
9482 <NOwiki>'''not wiki'''</noWIKI>
9484 <NOwiki>'''not wiki'''</noWIKI>
9488 pre-save transform: unclosed comment in <nowiki>
9492 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9494 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
9497 # Leading @ in this template definition works around a limitation
9498 # in parsoid's parserTests which otherwise strips the <span> from the
9499 # result (confusing it for a template wrapper)
9503 @<span onmouseover="alert('crap')">Oh no</span>
9507 (confirming safety of fix for subst bug 1936)
9509 {{Template:dangerous}}
9511 <p>@<span>Oh no</span>
9516 pre-save transform: comment containing gallery (bug 5024)
9520 <!-- <gallery>data</gallery> -->
9522 <!-- <gallery>data</gallery> -->
9526 pre-save transform: comment containing extension
9530 <!-- <tag>data</tag> -->
9532 <!-- <tag>data</tag> -->
9536 pre-save transform: comment containing nowiki
9540 <!-- <nowiki>data</nowiki> -->
9542 <!-- <nowiki>data</nowiki> -->
9546 pre-save transform: <noinclude> in subst (bug 3298)
9556 pre-save transform: <onlyinclude> in subst (bug 3298)
9568 {{<includeonly>subst:</includeonly>Includes}}
9572 Template:SafeSubstTest
9574 {{<includeonly>safesubst:</includeonly>Includes}}
9578 bug 22297: safesubst: works during PST
9582 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
9588 bug 22297: safesubst: works during normal parse
9597 subst: does not work during normal parse
9601 <p>{{subst:Includes}}
9606 pre-save transform: context links ("pipe trick")
9610 [[Article (context)|]]
9613 [[Bar:Article (context)|]]
9614 [[:Bar:Article (context)|]]
9616 [[|Article (context)]]
9620 [[Article (context)|Article]]
9621 [[Bar:Article|Article]]
9622 [[:Bar:Article|Article]]
9623 [[Bar:Article (context)|Article]]
9624 [[:Bar:Article (context)|Article]]
9626 [[Article (context)]]
9627 [[Bar:X (Y) Z|X (Y) Z]]
9628 [[:Bar:X (Y) Z|X (Y) Z]]
9632 pre-save transform: context links ("pipe trick") with interwiki prefix
9636 [[interwiki:Article|]]
9637 [[:interwiki:Article|]]
9638 [[interwiki:Bar:Article|]]
9639 [[:interwiki:Bar:Article|]]
9641 [[interwiki:Article|Article]]
9642 [[:interwiki:Article|Article]]
9643 [[interwiki:Bar:Article|Bar:Article]]
9644 [[:interwiki:Bar:Article|Bar:Article]]
9648 pre-save transform: context links ("pipe trick") with parens in title
9650 pst title=[[Somearticle (context)]]
9654 [[Article (context)|Article]]
9658 pre-save transform: context links ("pipe trick") with comma in title
9660 pst title=[[Someplace, Somewhere]]
9663 [[Otherplace, Elsewhere|]]
9664 [[Otherplace, Elsewhere, Anywhere|]]
9666 [[Otherplace, Somewhere|Otherplace]]
9667 [[Otherplace, Elsewhere|Otherplace]]
9668 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
9672 pre-save transform: context links ("pipe trick") with parens and comma
9674 pst title=[[Someplace (IGNORED), Somewhere]]
9677 [[Otherplace (place), Elsewhere|]]
9679 [[Otherplace, Somewhere|Otherplace]]
9680 [[Otherplace (place), Elsewhere|Otherplace]]
9684 pre-save transform: context links ("pipe trick") with comma and parens
9686 pst title=[[Who, me? (context)]]
9689 [[Me, Myself, and I (1937 song)|]]
9691 [[Yes, you. (context)|Yes, you.]]
9692 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
9696 pre-save transform: context links ("pipe trick") with namespace
9698 pst title=[[Ns:Somearticle]]
9702 [[Ns:Article|Article]]
9706 pre-save transform: context links ("pipe trick") with namespace and parens
9708 pst title=[[Ns:Somearticle (context)]]
9712 [[Ns:Article (context)|Article]]
9716 pre-save transform: context links ("pipe trick") with namespace and comma
9718 pst title=[[Ns:Somearticle, Context, Whatever]]
9722 [[Ns:Article, Context, Whatever|Article]]
9726 pre-save transform: context links ("pipe trick") with namespace, comma and parens
9728 pst title=[[Ns:Somearticle, Context (context)]]
9732 [[Ns:Article (context)|Article]]
9736 pre-save transform: context links ("pipe trick") with namespace, parens and comma
9738 pst title=[[Ns:Somearticle (IGNORED), Context]]
9742 [[Ns:Article, Context|Article]]
9746 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
9750 [[Article(context)|]]
9751 [[Bar:Article(context)|]]
9752 [[:Bar:Article(context)|]]
9753 [[|Article(context)]]
9757 [[Article(context)|Article]]
9758 [[Bar:Article(context)|Article]]
9759 [[:Bar:Article(context)|Article]]
9760 [[Article(context)]]
9762 [[:Bar:X(Y)Z|X(Y)Z]]
9766 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
9770 [[Article (context)|]]
9771 [[Bar:Article (context)|]]
9772 [[:Bar:Article (context)|]]
9773 [[|Article (context)]]
9777 [[Article (context)|Article]]
9778 [[Bar:Article (context)|Article]]
9779 [[:Bar:Article (context)|Article]]
9780 [[Article (context)]]
9781 [[Bar:X (Y) Z|X (Y) Z]]
9782 [[:Bar:X (Y) Z|X (Y) Z]]
9786 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
9790 [[Article(context)|]]
9791 [[Bar:Article(context)|]]
9792 [[:Bar:Article(context)|]]
9793 [[|Article(context)]]
9797 [[Article(context)|Article]]
9798 [[Bar:Article(context)|Article]]
9799 [[:Bar:Article(context)|Article]]
9800 [[Article(context)]]
9802 [[:Bar:X(Y)Z|X(Y)Z]]
9806 pre-save transform: context links ("pipe trick") with commas (bug 21660)
9810 [[Article (context), context|]]
9811 [[Article (context),context|]]
9812 [[Bar:Article (context), context|]]
9813 [[Bar:Article (context),context|]]
9814 [[:Bar:Article (context), context|]]
9815 [[:Bar:Article (context),context|]]
9817 [[Article (context), context|Article]]
9818 [[Article (context),context|Article]]
9819 [[Bar:Article (context), context|Article]]
9820 [[Bar:Article (context),context|Article]]
9821 [[:Bar:Article (context), context|Article]]
9822 [[:Bar:Article (context),context|Article]]
9826 pre-save transform: trim trailing empty lines
9830 Empty lines are trimmed
9836 Empty lines are trimmed
9840 pre-save transform: Signature expansion
9845 * <noinclude>~~~</noinclude>
9846 * <includeonly>~~~</includeonly>
9847 * <onlyinclude>~~~</onlyinclude>
9849 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
9850 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
9851 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
9852 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
9857 pre-save transform: Signature expansion in nowiki tags (bug 93)
9863 <nowiki>~~~~</nowiki>
9865 <includeonly><nowiki>~~~~</nowiki></includeonly>
9867 <noinclude><nowiki>~~~~</nowiki></noinclude>
9869 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
9871 {{subst:Foo}} shall be converted to FOO
9873 As well as inside noinclude/onlyinclude
9874 <noinclude>{{subst:Foo}}</noinclude>
9875 <onlyinclude>{{subst:Foo}}</onlyinclude>
9877 But not inside includeonly
9878 <includeonly>{{subst:Foo}}</includeonly>
9882 <nowiki>~~~~</nowiki>
9884 <includeonly><nowiki>~~~~</nowiki></includeonly>
9886 <noinclude><nowiki>~~~~</nowiki></noinclude>
9888 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
9890 FOO shall be converted to FOO
9892 As well as inside noinclude/onlyinclude
9893 <noinclude>FOO</noinclude>
9894 <onlyinclude>FOO</onlyinclude>
9896 But not inside includeonly
9897 <includeonly>{{subst:Foo}}</includeonly>
9901 Parsoid: Recognize nowiki with trailing space in tags
9905 <nowiki ><div>[[foo]]</nowiki >
9913 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
9920 Parsoid: Recognize nowiki with odd capitalization
9924 <noWikI ><div>[[foo]]</Nowiki >
9926 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
9931 Parsoid: Escape nowiki with trailing space in tags
9935 <nowiki > foo </nowiki >
9941 <p><nowiki > foo </nowiki ></p>
9942 <p>a<nowiki />b</p>
9943 <p>c<nowiki/ >d</p>
9947 Parsoid: Escape weird noWikI capitalizations
9951 <noWikI > foo </NoWikI >
9953 <p><noWikI > foo </NoWikI ></p>
9957 ### Message transform tests
9960 message transform: magic variables
9970 message transform: should not transform wiki markup
9980 message transform: <noinclude> in transcluded template (bug 4926)
9990 message transform: <onlyinclude> in transcluded template (bug 4926)
10000 {{#special:}} page name, known
10004 {{#special:Recentchanges}}
10006 Special:RecentChanges
10010 {{#special:}} page name with subpage, known
10014 {{#special:Recentchanges/param}}
10016 Special:RecentChanges/param
10020 {{#special:}} page name, unknown
10024 {{#special:foobar nonexistent}}
10026 Special:Foobar nonexistent
10030 {{#speciale:}} page name, known
10034 {{#speciale:Recentchanges}}
10036 Special:RecentChanges
10040 {{#speciale:}} page name with subpage, known
10044 {{#speciale:Recentchanges/param}}
10046 Special:RecentChanges/param
10050 {{#speciale:}} page name, unknown
10054 {{#speciale:foobar nonexistent}}
10056 Special:Foobar_nonexistent
10062 ### For Parsoid-specific tests, see
10063 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
10068 parsoid=wt2html,wt2wt,html2html
10070 [[Image:foobar.jpg]]
10072 <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>
10075 <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>
10080 Simple image (using File: namespace, now canonical)
10082 [[File:Foobar.jpg]]
10084 <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>
10087 <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>
10092 Right-aligned image
10094 [[File:Foobar.jpg|right]]
10096 <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>
10099 <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>
10105 [[File:Foobar.jpg|right|Caption text]]
10107 <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>
10110 <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>
10114 Image with caption, bug 53312 #1
10116 [[File:Foobar.jpg|right|Caption page stuff]]
10118 <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>
10121 <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>
10125 Image with caption, bug 53312 #2
10127 [[File:Foobar.jpg|right|Caption page=]]
10129 <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>
10132 <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>
10136 Image with caption, bug 53312 #3
10138 [[File:Foobar.jpg|right|Caption page=stuff]]
10140 <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>
10143 <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>
10147 Allow empty links in image captions (Bug 60753)
10151 [[File:Foobar.jpg|thumb|Caption [[Link1]]
10156 <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>
10159 <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>
10161 <a rel="mw:WikiLink" href="./Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"},"dsr":[47,56,2,2]}'>Link2</a>
10162 </figcaption></figure>
10166 Link with empty target
10175 Image with empty attribute
10177 parsoid=wt2html,wt2wt,html2html
10179 [[File:Foobar.jpg|right||Caption text]]
10181 <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>
10184 <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>
10188 1. Block image with individual attributes from templates
10190 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
10192 <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>
10195 <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>
10199 2. Block Image with individual attributes from templates
10201 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
10203 <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>
10206 <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>
10210 3. Inline image with individual attributes from templates
10212 [[File:Foobar.jpg|{{echo|50px}}]]
10214 <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>
10217 <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>
10220 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
10221 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
10223 Image with multiple attributes from the same template
10225 [[File:Foobar.jpg|{{image_attribs}}]]
10227 <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>
10230 <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>
10234 Image with link tails
10238 123[[File:Foobar.jpg]]456
10239 123[[File:Foobar.jpg|right]]456
10240 123[[File:Foobar.jpg|thumb]]456
10242 <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
10244 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
10245 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
10248 <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>
10249 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
10250 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
10254 Image with multiple captions -- only last one is accepted
10256 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
10258 <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>
10261 <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>
10265 Image with multiple widths -- use last
10267 [[File:Foobar.jpg|200px|300px|caption]]
10269 <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>
10272 <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>
10276 Image with multiple alignments -- use first (bug 48664)
10280 [[File:Foobar.jpg|thumb|left|right|center|caption]]
10282 [[File:Foobar.jpg|middle|text-top|caption]]
10284 <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>
10285 <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>
10288 <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>
10289 <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>
10293 Image with width attribute at different positions
10295 [[File:Foobar.jpg|200px|right|Caption]]
10296 [[File:Foobar.jpg|right|200px|Caption]]
10297 [[File:Foobar.jpg|right|Caption|200px]]
10299 <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 <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>
10301 <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>
10304 <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 <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>
10306 <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>
10309 # a sad bit of backward-compatibility
10311 Image with size specified with pxpx (bug 13500, 51628)
10313 parsoid=wt2html,wt2wt,html2html
10315 [[File:Foobar.jpg|20pxpx]]
10316 [[File:Foobar.jpg|200x20pxpx]]
10318 <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>
10319 <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>
10322 <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>
10326 Image with link parameter, wiki target
10328 [[File:Foobar.jpg|link=Main Page]]
10330 <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>
10333 <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>
10336 # parsoid bug 49293 (part 1)
10338 Image with link parameter, URL target
10340 [[File:Foobar.jpg|link=http://example.com/]]
10342 <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>
10345 <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>
10348 # parsoid bug 49293 (part 2)
10350 Image with link parameter, protocol-less URL target
10352 [[File:Foobar.jpg|link=//example.com/]]
10354 <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>
10357 <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>
10361 Image with link parameter, wgExternalLinkTarget
10363 [[Image:foobar.jpg|link=http://example.com/]]
10365 wgExternalLinkTarget='foobar'
10367 <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>
10372 Image with link parameter, wgNoFollowLinks set to false
10374 [[Image:foobar.jpg|link=http://example.com/]]
10376 wgNoFollowLinks=false
10378 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10383 Image with link parameter, wgNoFollowDomainExceptions
10385 [[Image:foobar.jpg|link=http://example.com/]]
10387 wgNoFollowDomainExceptions='example.com'
10389 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
10394 Image with link parameter, wgExternalLinkTarget, unnamed parameter
10396 [[Image:foobar.jpg|link=http://example.com/|Title]]
10398 wgExternalLinkTarget='foobar'
10400 <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>
10405 Image with empty link parameter
10407 [[File:Foobar.jpg|link=]]
10409 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
10412 <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>
10416 Image with link parameter (wiki target) and unnamed parameter
10418 [[File:Foobar.jpg|link=Main_Page|Title]]
10420 <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>
10423 <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>
10427 Image with link parameter (URL target) and unnamed parameter
10429 [[File:Foobar.jpg|link=http://example.com/|Title]]
10431 <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>
10434 <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>
10438 Thumbnail image with link parameter
10441 parsoid=wt2html,wt2wt,html2html
10443 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
10445 <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>
10448 <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>
10452 Manually-specified thumbnail image
10456 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
10458 <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>
10461 <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>
10465 Manually-specified thumbnail image with explicit link to wiki page
10468 parsoid=wt2html,wt2wt,html2html
10470 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
10472 <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>
10475 <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>
10479 Manually-specified thumbnail image with explicit link to url
10482 parsoid=wt2html,wt2wt,html2html
10484 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
10486 <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>
10489 <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>
10493 Manually-specified thumbnail image with explicit no link
10496 parsoid=wt2html,wt2wt,html2html
10498 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
10500 <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>
10503 <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>
10507 Manually-specified thumbnail image with explicit link and alt text
10510 parsoid=wt2html,wt2wt,html2html
10512 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
10514 <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>
10517 <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>
10521 Image with frame and link
10523 parsoid=wt2html,wt2wt,html2html
10525 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
10527 <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>
10530 <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>
10534 Image with frame and link and explicit alt
10536 parsoid=wt2html,wt2wt,html2html
10538 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
10540 <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>
10543 <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>
10547 Image with wiki markup in implicit alt
10549 parsoid=wt2html,wt2wt,html2html
10551 [[Image:Foobar.jpg|testing '''bold''' in alt]]
10553 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
10555 <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>
10556 </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>
10559 <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>
10560 <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>
10563 ###################
10564 # Conflicting image format options.
10565 # First option specified should 'win'.
10566 # All three cases in each test should be identical.
10569 Image with 'frameless' first.
10571 parsoid=wt2html,wt2wt,html2html
10573 [[File:Foobar.jpg|frameless|caption]]
10575 [[File:Foobar.jpg|frameless|frame|caption]]
10577 [[File:Foobar.jpg|frameless|thumb|caption]]
10579 <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><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>
10581 </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>
10584 <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>
10585 <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 <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>
10590 Image with 'frame' first.
10592 parsoid=wt2html,wt2wt,html2html
10594 [[File:Foobar.jpg|frame|caption]]
10595 [[File:Foobar.jpg|frame|frameless|caption]]
10596 [[File:Foobar.jpg|frame|thumb|caption]]
10598 <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 <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>
10600 <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>
10603 <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>
10607 Image with 'thumb' first.
10609 parsoid=wt2html,wt2wt,html2html
10611 [[File:Foobar.jpg|thumb|caption]]
10612 [[File:Foobar.jpg|thumb|frameless|caption]]
10613 [[File:Foobar.jpg|thumb|frame|caption]]
10615 <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 <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>
10617 <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>
10620 <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>
10623 ###################
10625 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
10626 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
10627 # Foobar has actual size of 1941x220
10628 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
10629 # a scalable format.
10630 # 2. Framed images always ignore size options; always render at default size.
10631 # 3. "Unspecified format" and border are the only types which can be
10635 Image: "unspecified format" and border enlarge
10637 parsoid=wt2html,wt2wt,html2html
10639 [[File:Foobar.jpg|2000px]]
10641 [[File:Foobar.jpg|border|2000px]]
10643 <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>
10644 </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>
10647 <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>
10648 <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>
10652 Image: "unspecified format" and border reduce
10654 parsoid=wt2html,wt2wt,html2html
10656 [[File:Foobar.jpg|1000px]]
10658 [[File:Foobar.jpg|border|1000px]]
10660 <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>
10661 </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>
10664 <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>
10665 <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>
10669 Image: thumbs reduce
10671 parsoid=wt2html,wt2wt,html2html
10673 [[File:Foobar.jpg|thumb|50px]]
10675 <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>
10678 <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>
10682 Image: bitmap thumbs can't be enlarged past original size, but vector can.
10684 parsoid=wt2html,wt2wt,html2html
10686 [[File:Foobar.jpg|thumb|2000px]]
10688 [[File:Foobar.svg|thumb|2000px]]
10690 <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>
10691 <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>
10694 <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>
10695 <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>
10699 Image: frameless can reduce in size
10701 parsoid=wt2html,wt2wt,html2html
10703 [[File:Foobar.jpg|frameless|50px]]
10705 <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>
10708 <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>
10712 Image: bitmap frameless can't be enlarged past original size, but vector can
10714 parsoid=wt2html,wt2wt,html2html
10716 [[File:Foobar.jpg|frameless|2000px]]
10718 [[File:Foobar.svg|frameless|2000px]]
10720 <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>
10721 </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>
10724 <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>
10725 <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>
10729 Image: framed images are always unscaled.
10731 parsoid=wt2html,wt2wt,html2html
10733 [[File:Foobar.jpg|frame]]
10735 [[File:Foobar.jpg|frame|50px]]
10737 [[File:Foobar.jpg|frame|50x50px]]
10739 [[File:Foobar.jpg|frame|2000px]]
10741 <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>
10742 <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 <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>
10744 <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>
10747 <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>
10750 ###################
10753 Link to image page- image page normally doesn't exists, hence edit link
10754 Add test with existing image page
10755 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
10759 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
10764 bug 18784 Link to non-existent image page with caption should use caption as link text
10766 [[:Image:test|caption]]
10768 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
10773 Frameless image caption with a free URL
10775 [[File:Foobar.jpg|http://example.com]]
10777 <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>
10780 <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>
10784 Thumbnail image caption with a free URL
10788 [[File:Foobar.jpg|thumb|http://example.com]]
10790 <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>
10793 <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>
10797 Thumbnail image caption with a free URL and explicit alt
10800 parsoid=wt2html,wt2wt,html2html
10802 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
10804 <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>
10807 <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>
10811 SVG thumbnails with no language set
10814 [[File:Foobar.svg|thumb|caption]]
10816 <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>
10819 <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>
10823 SVG thumbnails with language de
10825 parsoid=wt2html,wt2wt,html2html
10827 [[File:Foobar.svg|thumb|caption|lang=de]]
10829 <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>
10832 <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>
10836 SVG thumbnails with invalid language code
10838 parsoid=wt2html,wt2wt,html2html
10840 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
10842 <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>
10845 <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>
10849 BUG 1887: A ISBN with a thumbnail
10851 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
10853 <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>
10856 <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>
10860 BUG 1887: A RFC with a thumbnail
10862 [[File:Foobar.jpg|thumb|This is RFC 12354]]
10864 <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>
10867 <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>
10871 BUG 1887: A mailto link with a thumbnail
10873 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
10875 <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>
10878 <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>
10881 # Pending resolution to bug 368
10883 BUG 648: Frameless image caption with a link
10885 [[File:Foobar.jpg|text with a [[link]] in it]]
10887 <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>
10890 <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>
10894 BUG 648: Frameless image caption with a link (suffix)
10896 [[File:Foobar.jpg|text with a [[link]]foo in it]]
10898 <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>
10901 <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>
10905 BUG 648: Frameless image caption with an interwiki link
10907 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
10909 <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>
10912 <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>
10916 BUG 648: Frameless image caption with a piped interwiki link
10918 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
10920 <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>
10923 <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>
10927 Escape HTML special chars in image alt text
10929 [[File:Foobar.jpg|& < > "]]
10931 <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>
10934 <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>
10938 BUG 499: Alt text should have Ӓ, not &1234;
10940 [[File:Foobar.jpg|♀]]
10942 <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>
10945 <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>
10949 Broken image caption with link
10951 parsoid=wt2html,wt2wt,html2html
10953 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
10955 <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.
10958 <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>
10962 Image caption containing another image
10964 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
10966 <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>
10969 <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>
10973 Image: caption containing a newline
10975 [[File:Foobar.jpg|This
10978 <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>
10981 <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>
10985 Image: caption containing leading space
10986 (The leading space should not trigger nowiki escaping in wt2wt mode)
10988 [[File:Foobar.jpg|thumb| bar]]
10990 <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>
10993 <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>
10997 Image: caption containing a table
10999 parsoid=wt2html,wt2wt,html2html
11001 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11007 and some more text.]]
11009 <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>
11012 <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
11015 <tr><th>Foo </th><th>Bar</th></tr>
11018 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11022 Bug 3090: External links other than http: in image captions
11024 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11026 <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>
11029 <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>
11035 parsoid=wt2html,wt2wt,html2html
11037 [[Image:foobar.jpg|a|class=b]]
11039 <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>
11042 <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>
11046 Localized image handling (1).
11048 parsoid=wt2html,wt2wt,html2html
11051 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
11053 <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>
11056 <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>
11060 Localized image handling (2).
11063 parsoid=wt2html,wt2wt,html2html
11066 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
11068 <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>
11071 <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>
11075 "border", "frameless" and "class" attributes on an image.
11078 parsoid=wt2html,wt2wt,html2html
11080 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
11082 <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>
11085 <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>
11088 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
11090 Invalid image attributes (bug 62500)
11093 parsoid=wt2html,wt2wt,html2html
11095 [[File:Foobar.jpg|thumb|float|left|caption]]
11097 [[File:Foobar.jpg|thumb|righ|caption]]
11099 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
11101 <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 <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>
11103 <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>
11106 <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>
11112 #REDIRECT [[File:Barfoo.jpg]]
11118 [[Image:Barfoo.jpg]]
11120 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
11125 Missing image with uploads disabled
11129 [[Image:Foobaz.jpg]]
11131 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
11135 # Parsoid-specific testing for images
11136 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11137 # Currently imperfect due to a flaw in the Parsoid testrunner
11139 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
11143 Parsoid-specific image handling - simple image with size and middle alignment
11145 [[File:Foobar.jpg|middle|50px]]
11147 <p><span class="mw-valign-middle" typeof="mw:Image">
11148 <a href="File:Foobar.jpg">
11149 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11156 Parsoid-specific image handling - simple image with size, middle alignment,
11157 non-standard namespace alias
11159 parsoid=wt2wt,wt2html,html2html
11161 [[Image:Foobar.jpg|middle|50px]]
11163 <p><span class="mw-valign-middle" typeof="mw:Image">
11164 <a href="File:Foobar.jpg">
11165 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11172 Parsoid-specific image handling - simple image with size and middle alignment
11175 [[File:Foobar.jpg|50px|middle]]
11177 <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>
11181 Parsoid-specific image handling - simple image with size and middle alignment
11182 and non-standard namespace name
11184 parsoid=wt2html,wt2wt,html2html
11186 [[Image:Foobar.jpg|50px|middle]]
11188 <p><span class="mw-valign-middle" typeof="mw:Image">
11189 <a href="File:Foobar.jpg">
11190 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11197 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
11199 [[File:Foobar.jpg|500x10px|baseline|caption]]
11201 <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>
11205 Parsoid-specific image handling - simple image with border and size spec
11207 [[File:Foobar.jpg|50px|border|caption]]
11209 <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>
11213 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11215 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
11217 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
11218 <a href="File:Foobar.jpg">
11219 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
11221 <figcaption>caption content</figcaption>
11226 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11229 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
11231 <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>
11235 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
11237 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
11239 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
11240 <a href="File:Foobar.jpg">
11241 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
11243 <figcaption>caption</figcaption>
11248 Parsoid-specific image handling - thumbnail with specific size, halign,
11249 valign, and caption (existing content)
11251 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
11253 <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>
11257 Parsoid-specific image handling - framed image with specific size and caption
11260 parsoid=wt2html,wt2wt,html2html
11262 [[File:Foobar.jpg|frame|500x50px|caption]]
11264 <figure typeof="mw:Image/Frame">
11265 <a href="File:Foobar.jpg">
11266 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11268 <figcaption>caption</figcaption>
11273 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
11276 parsoid=wt2html,wt2wt,html2html
11278 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
11280 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
11281 <a href="File:Foobar.jpg">
11282 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
11284 <figcaption>caption</figcaption>
11289 Parsoid-specific image handling - frameless image with specific size, border, and caption
11291 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
11293 <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>
11297 Parsoid-specific image handling - simple image with a formatted caption
11299 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
11301 <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>"}'>
11302 <a href="File:Foobar.jpg">
11303 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
11308 Parsoid-specific image handling - caption with a template in it
11310 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
11312 <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>
11316 Parsoid-specific image handling - caption with unbalanced tags in it
11318 parsoid=wt2html,wt2wt,html2html
11321 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
11325 <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>
11330 Parsoid-specific image handling - empty caption (1)
11332 parsoid=wt2html,wt2wt
11334 [[File:Foobar.jpg|thumb|]]
11336 <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>
11339 # empty captions don't get serialized unless we're in the "round trip" case
11341 Parsoid-specific image handling - empty caption (2)
11345 <figure class="mw-default-size" typeof="mw:Image/Thumb">
11346 <a href="File:Foobar.jpg">
11347 <img resource="./File:Foobar.jpg"
11348 src="//example.com/images/3/3a/Foobar.jpg"
11349 height="25" width="220"/>
11351 <figcaption></figcaption>
11354 [[File:Foobar.jpg|thumb]]
11358 Parsoid-specific image handling - whitespace caption
11360 [[File:Foobar.jpg|thumb| ]]
11362 <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>
11366 Parsoid-specific image handling - lang option
11369 [[File:Foobar.svg|lang=de|caption]]
11373 <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>
11382 Subpage test/subpage
11390 subpage title=[[Subpage test]]
11394 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
11399 Subpage noslash link
11401 subpage title=[[Subpage test]]
11405 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
11409 # TODO: make this PHP-parser compatible!
11411 Relative subpage noslash link
11413 parsoid=wt2wt,wt2html,html2html
11414 subpage title=[[Subpage test/1/2/3/4]]
11420 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/">subpage</a></p>
11421 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
11425 Parsoid: dot-slash prefixed wikilinks
11435 </p><p>[[././baz/]]
11440 </p><p>[[././baz/]]
11445 Render invalid page names as plain text (bug 51090)
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}}]]
11465 [[{{echo|foo}bar}}]]
11466 [[{{echo|foo[bar}}]]
11467 [[{{echo|foo]bar}}]]
11468 [[{{echo|foo<bar}}]]
11470 <p>[[./../foo|bar]]
11480 </p><p>[[./../foo|bar]]
11493 <p>[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]</p>
11494 <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>
11502 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
11507 BUG 561: {{/Subpage}}
11509 subpage title=[[Page]]
11513 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
11521 Category:MediaWiki User's Guide
11529 [[:Category:MediaWiki User's Guide]]
11531 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
11540 [[Category:MediaWiki User's Guide]]
11542 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11546 PAGESINCATEGORY invalid title fatal (r33546 fix)
11548 {{PAGESINCATEGORY:<bogus>}}
11555 Category with different sort key
11559 [[Category:MediaWiki User's Guide|Foo]]
11561 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11565 Category with identical sort key
11569 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11571 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
11575 Category with empty sort key
11580 [[Category:MediaWiki User's Guide|]]
11582 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
11586 Category with empty sort key and parentheses
11591 [[Category:Foo (bar)|]]
11593 [[Category:Foo (bar)|Foo]]
11597 Category with link tail
11602 123[[Category:Foo]]456
11604 123[[Category:Foo]]456
11608 Category with template
11613 [[Category:{{echo|Foo}}]]
11615 [[Category:{{echo|Foo}}]]
11619 Category with template in sort key
11624 [[Category:Foo|{{echo|Bar}}]]
11626 [[Category:Foo|{{echo|Bar}}]]
11630 Category with template in sort key and title
11635 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11637 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
11641 Category / paragraph interactions
11643 Foo [[Category:Baz]] Bar
11645 Foo [[Category:Baz]]
11653 [[Category:Baz]] Bar
11666 {{echo|[[Category:Baz]]}}
11681 Parsoid: Serialize link to category page with colon escape
11687 [[:Category:Foo|Bar]]
11690 <a rel="mw:WikiLink" href="Category:Foo">Category:Foo</a>
11691 <a rel="mw:WikiLink" href="Category:Foo">Bar</a>
11696 Parsoid: Link prefix/suffixes aren't applied to category links
11698 parsoid=wt2html,wt2wt,html2html
11703 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
11707 Parsoid: Serialize link to file page with colon escape
11713 [[:File:Foo.png|Bar]]
11716 <a rel="mw:WikiLink" href="File:Foo.png">File:Foo.png</a>
11717 <a rel="mw:WikiLink" href="File:Foo.png">Bar</a>
11722 Parsoid: Serialize a genuine category link without colon escape
11727 [[Category:Foo|Bar]]
11729 <link rel="mw:PageProp/Category" href="Category:Foo">
11730 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
11734 Parsoid: Defaultsort
11738 {{DEFAULTSORT:Foo}}
11740 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
11744 ### Inter-language links
11747 Inter-language links
11753 [[zh:食品]]
11755 es:Alimento fr:Nourriture zh:食品
11759 Duplicate interlanguage links (bug 24502)
11775 Basic section headings
11782 ===Smaller headline===
11785 <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>
11788 <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>
11791 <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>
11797 Section headings with TOC
11800 === Subheadline 1 ===
11801 ===== Skipping a level =====
11802 ====== Skipping a level ======
11806 ===Another headline===
11808 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11810 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
11812 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
11814 <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>
11816 <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>
11823 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
11825 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
11831 <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>
11832 <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>
11833 <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>
11834 <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>
11835 <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>
11838 <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>
11842 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
11844 Handling of sections up to level 6 and beyond
11847 == Level 2 Heading==
11848 === Level 3 Heading===
11849 ==== Level 4 Heading====
11850 ===== Level 5 Heading=====
11851 ====== Level 6 Heading======
11852 ======= Level 7 Heading=======
11853 ======== Level 8 Heading========
11854 ========= Level 9 Heading=========
11855 ========== Level 10 Heading==========
11857 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11859 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
11861 <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>
11863 <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>
11865 <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>
11867 <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>
11869 <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>
11870 <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>
11871 <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>
11872 <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>
11873 <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>
11887 <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>
11888 <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>
11889 <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>
11890 <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>
11891 <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>
11892 <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>
11893 <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>
11894 <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>
11895 <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>
11896 <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>
11901 TOC regression (bug 9764)
11905 ==== title 1.1.1 ====
11910 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11912 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
11914 <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>
11916 <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>
11919 <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>
11922 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
11924 <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>
11930 <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>
11931 <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>
11932 <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>
11933 <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>
11934 <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>
11935 <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>
11940 TOC with wgMaxTocLevel=3 (bug 6204)
11946 ==== title 1.1.1 ====
11951 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11953 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
11955 <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>
11956 <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>
11959 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
11961 <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>
11967 <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>
11968 <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>
11969 <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>
11970 <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>
11971 <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>
11972 <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>
11977 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
11983 ====Section 1.1.1====
11984 ====Section 1.1.1.1====
11987 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
11989 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
11991 <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>
11994 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
11998 <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>
11999 <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>
12000 <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>
12001 <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>
12002 <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>
12008 Resolving duplicate section names
12013 <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>
12014 <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>
12019 Resolving duplicate section names with differing case (bug 10721)
12024 <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>
12025 <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>
12037 Template with sections, __NOTOC__
12044 <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>
12045 <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>
12046 <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>
12047 <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>
12052 __NOEDITSECTION__ keyword
12058 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
12059 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
12064 Link inside a section heading
12066 ==Section with a [[Main Page|link]] in it==
12068 <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>
12073 TOC regression (bug 12077)
12080 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12082 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12084 <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>
12087 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
12091 <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>
12092 <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>
12093 <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>
12098 BUG 1219 URL next to image (good)
12100 http://example.com [[Image:foobar.jpg]]
12102 <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>
12107 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
12110 The line above must have a trailing space!
12113 But just in case it doesn't...
12115 <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>
12116 <p>The line above must have a trailing space!
12118 <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>
12119 <p>But just in case it doesn't...
12124 Header with special characters (bug 25462)
12126 The tooltips shall not show entities to the user (ie. be double escaped)
12143 <p>The tooltips shall not show entities to the user (ie. be double escaped)
12145 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12147 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
12148 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
12149 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
12150 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
12151 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
12155 <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>
12158 <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>
12161 <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>
12164 <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>
12167 <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>
12173 Headers with excess '=' characters
12174 (Are similar tests necessary beyond the 1st level?)
12178 =''italic'' heading==
12179 ==''italic'' heading=
12181 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12183 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
12184 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
12185 <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>
12186 <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>
12190 <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>
12191 <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>
12192 <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>
12193 <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>
12198 HTML headers vs TOC (bug 23393)
12199 (__NOEDITSECTION__ for clearer output, doesn't matter here)
12211 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12213 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
12215 <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>
12216 <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>
12219 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
12221 <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>
12222 <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>
12228 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
12229 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
12230 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
12231 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
12232 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
12233 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
12238 Single-line or multiline-comments can follow headings
12240 parsoid=wt2html,wt2wt
12248 <h2><span class="mw-headline" id="foo">foo</span></h2>
12249 <h2><span class="mw-headline" id="bar">bar</span></h2>
12250 <h2><span class="mw-headline" id="baz">baz</span></h2>
12255 BUG 1219 URL next to image (broken)
12257 http://example.com[[Image:foobar.jpg]]
12259 <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>
12264 Bug 1186 news: in the middle of text
12266 http://en.wikinews.org/wiki/Wikinews:Workplace
12268 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
12274 Namespaced link must have a title
12283 Namespaced link must have a title (bad fragment version)
12285 [[Project:#fragment]]
12287 <p>[[Project:#fragment]]
12293 ### HTML tags and HTML attributes
12297 div with no attributes
12299 <div>HTML rocks</div>
12301 <div>HTML rocks</div>
12306 div with double-quoted attribute
12308 <div id="rock">HTML rocks</div>
12310 <div id="rock">HTML rocks</div>
12315 div with single-quoted attribute
12317 <div id='rock'>HTML rocks</div>
12319 <div id="rock">HTML rocks</div>
12324 div with unquoted attribute
12326 <div id=rock>HTML rocks</div>
12328 <div id="rock">HTML rocks</div>
12333 div with illegal double attributes
12335 <div id="a" id="b">HTML rocks</div>
12337 <div id="b">HTML rocks</div>
12341 # FIXME: produce empty string instead of "class" in the PHP parser, following
12344 div with empty attribute value, space before equals
12348 <div class =>HTML rocks</div>
12350 <div class="">HTML rocks</div>
12354 # The PHP parser escapes the opening brace to { for some reason, so
12355 # disabled this test for it.
12357 div with braces in attribute value
12361 <div title="{}">Foo</div>
12363 <div title="{}">Foo</div>
12366 # This it very inconsistent in the PHP parser: it returns
12367 # class="class" if there is a space between the name and the equal sign (see
12368 # 'div with empty attribute value, space before equals'), but strips the
12369 # attribute completely if the space is missing. We hope that not much content
12370 # depends on this, so are implementing the behavior below in Parsoid for
12371 # consistencies' sake. Disabled for the PHP parser.
12372 # FIXME: fix this behavior in the PHP parser?
12374 div with empty attribute value, no space before equals
12378 <div class=>HTML rocks</div>
12380 <div class="">HTML rocks</div>
12385 HTML multiple attributes correction
12387 <p class="error" class="awesome">Awesome!</p>
12389 <p class="awesome">Awesome!</p>
12394 Table multiple attributes correction
12397 !+ class="error" class="awesome"| status
12402 <th class="awesome"> status
12410 <DIV ID="x">HTML ROCKS</DIV>
12412 <div id="x">HTML ROCKS</div>
12417 Non-ASCII pseudo-tags are rendered as text
12426 Pseudo-tag with URL 'name' renders as url link
12428 <http://example.com/>
12430 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
12435 text with amp in the middle of nowhere
12439 <p>Remember AT&T?
12444 text with character entity: eacute
12446 I always thought é was a cute letter.
12448 <p>I always thought é was a cute letter.
12453 text with entity-escaped character entity-like string: eacute
12455 I always thought &eacute; was a cute letter.
12457 <p>I always thought &eacute; was a cute letter.
12462 text with undefined character entity: xacute
12464 I always thought &xacute; was a cute letter.
12466 <p>I always thought &xacute; was a cute letter.
12470 # TODO: generalize to PHP parser?
12476 <data value="5">five</data>
12477 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12478 <mark>This highlighted text</mark>
12480 <p><data value="5">five</data>
12481 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
12482 <mark>This highlighted text</mark></p>
12486 HTML tag with leading space is parsed as text
12490 <p>< div>foo< /div>
12495 ### Nesting tests (see bug 41545, 50604, 51081)
12498 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
12499 # Note that html2wt is considerably more difficult if we use <b> in
12500 # the test case, instead of <big>
12502 Ensure that HTML adoption agency algorithm is properly implemented.
12504 <big>X<big>Y</big>Z</big>
12506 <p><big>X<big>Y</big>Z</big>
12510 # This was bug 41545 in the PHP parser.
12514 <kbd>X<kbd>Y</kbd>Z</kbd>
12516 <p><kbd>X<kbd>Y</kbd>Z</kbd>
12520 # The following cases were bug 51081 in the PHP parser.
12521 # Note that there are some other nestable tags (b, i, etc) which are
12522 # not covered; see bug 51081 for discussion.
12526 <em>X<em>Y</em>Z</em>
12528 <p><em>X<em>Y</em>Z</em>
12533 Nesting of <strong>
12535 <strong>X<strong>Y</strong>Z</strong>
12537 <p><strong>X<strong>Y</strong>Z</strong>
12546 <p><q>X<q>Y</q>Z</q>
12553 <ruby>X<ruby>Y</ruby>Z</ruby>
12555 <p><ruby>X<ruby>Y</ruby>Z</ruby>
12562 <bdo>X<bdo>Y</bdo>Z</bdo>
12564 <p><bdo>X<bdo>Y</bdo>Z</bdo>
12576 [[Media:Foobar.jpg]]
12578 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
12583 Media link with text
12585 [[Media:Foobar.jpg|A neat file to look at]]
12587 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
12591 # FIXME: this is still bad HTML tag nesting
12593 Media link with nasty text
12594 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
12596 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
12598 <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>
12603 Media link to nonexistent file (bug 1702)
12605 [[Media:No such.jpg]]
12607 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
12612 Image link to nonexistent file (bug 1850 - good)
12614 [[Image:No such.jpg]]
12616 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
12621 :Image link to nonexistent file (bug 1850 - bad)
12623 [[:Image:No such.jpg]]
12625 <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>
12632 Character reference normalization in link text (bug 1938)
12634 [[Main Page|this&that]]
12636 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
12643 Test for unicode normalization
12645 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
12649 (bug 19451) Links should refer to the normalized form.
12657 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12658 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12659 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12660 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12661 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
12666 Empty attribute crash test (bug 2067)
12668 <font color="">foo</font>
12670 <p><font color="">foo</font>
12675 Empty attribute crash test single-quotes (bug 2067)
12677 <font color=''>foo</font>
12679 <p><font color="">foo</font>
12684 Attribute test: equals, then nothing
12686 <font color=>foo</font>
12688 <p><font>foo</font>
12693 Attribute test: unquoted value
12695 <font color=x>foo</font>
12697 <p><font color="x">foo</font>
12702 Attribute test: unquoted but illegal value (hash)
12704 <font color=#x>foo</font>
12706 <p><font color="#x">foo</font>
12711 Attribute test: no value
12713 <font color>foo</font>
12715 <p><font color="color">foo</font>
12720 Bug 2095: link with three closing brackets
12724 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
12727 <p><a rel="mw:WikiLink" href="./Main_Page">Main Page</a>]</p>
12731 Bug 2095: link with pipe and three closing brackets
12733 [[Main Page|link]]]
12735 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
12738 <p><a rel="mw:WikiLink" href="./Main_Page">link</a>]</p>
12742 Bug 2095: link with pipe and three closing brackets, version 2
12744 [[Main Page|[http://example.com/]]]
12746 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
12749 <p><a rel="mw:WikiLink" href="./Main_Page">[http://example.com/]</a></p>
12758 Template:Dangerous attribute
12760 " onmouseover="alert(document.cookie)
12764 Template:Dangerous style attribute
12766 border-size: expression(alert(document.cookie))
12772 <div style="float: right; {{{1}}}">Magic div</div>
12776 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
12778 <div title="{{test}}"></div>
12780 <div title="This is a test template"></div>
12785 Bug 2304: HTML attribute safety (dangerous template; 2309)
12787 <div title="{{dangerous attribute}}"></div>
12789 <div title=""></div>
12794 Bug 2304: HTML attribute safety (dangerous style template; 2309)
12796 <div style="{{dangerous style attribute}}"></div>
12798 <div style="/* insecure input */"></div>
12803 Bug 2304: HTML attribute safety (safe parameter; 2309)
12805 {{div style|width: 200px}}
12807 <div style="float: right; width: 200px">Magic div</div>
12812 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
12814 {{div style|width: expression(alert(document.cookie))}}
12816 <div style="/* insecure input */">Magic div</div>
12821 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
12823 {{div style|"><script>alert(document.cookie)</script>}}
12825 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12830 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
12832 {{div style|" ><script>alert(document.cookie)</script>}}
12834 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
12839 Bug 2304: HTML attribute safety (link)
12841 <div title="[[Main Page]]"></div>
12843 <div title="[[Main Page]]"></div>
12848 Bug 2304: HTML attribute safety (italics)
12850 <div title="''foobar''"></div>
12852 <div title="''foobar''"></div>
12857 Bug 2304: HTML attribute safety (bold)
12859 <div title="'''foobar'''"></div>
12861 <div title="'''foobar'''"></div>
12867 Bug 2304: HTML attribute safety (ISBN)
12869 <div title="ISBN 1234567890"></div>
12871 <div title="ISBN 1234567890"></div>
12876 Bug 2304: HTML attribute safety (RFC)
12878 <div title="RFC 1234"></div>
12880 <div title="RFC 1234"></div>
12885 Bug 2304: HTML attribute safety (PMID)
12887 <div title="PMID 1234567890"></div>
12889 <div title="PMID 1234567890"></div>
12894 Bug 2304: HTML attribute safety (web link)
12896 <div title="http://example.com/"></div>
12898 <div title="http://example.com/"></div>
12903 Bug 2304: HTML attribute safety (named web link)
12905 <div title="[http://example.com/ link]"></div>
12907 <div title="[http://example.com/ link]"></div>
12912 Bug 3244: HTML attribute safety (extension; safe)
12914 <div style="<nowiki>background:blue</nowiki>"></div>
12916 <div style="background:blue"></div>
12921 Bug 3244: HTML attribute safety (extension; unsafe)
12923 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
12925 <div style="/* insecure input */"></div>
12929 # More MSIE fun discovered by Tom Gilder
12932 MSIE CSS safety test: spurious slash
12934 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
12936 <div style="/* insecure input */">evil</div>
12941 MSIE CSS safety test: hex code
12943 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
12945 <div style="/* insecure input */">evil</div>
12950 MSIE CSS safety test: comment in url
12952 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
12954 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
12959 MSIE CSS safety test: comment in expression
12961 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
12963 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
12968 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
12970 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
12972 <p style="/* invalid control char */">A</p>
12977 MSIE 6 CSS safety test: Fullwidth (bug 55332)
12979 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
12980 <div style="top:EXPRESSION(alert())">B</div>
12982 <p style="/* insecure input */">A</p>
12983 <div style="/* insecure input */">B</div>
12988 MSIE 6 CSS safety test: IPA extensions (bug 55332)
12990 <div style="background-image:uʀʟ(javascript:alert())">A</div>
12991 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
12993 <div style="/* insecure input */">A</div>
12994 <p style="/* insecure input */">B</p>
12999 MSIE 6 CSS safety test: sup/sub script (bug 55332)
13001 <div style="background-image:url⁽javascript:alert())">A</div>
13002 <div style="background-image:url₍javascript:alert())">B</div>
13003 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
13005 <div style="/* insecure input */">A</div>
13006 <div style="/* insecure input */">B</div>
13007 <p style="/* insecure input */">C</p>
13015 title="data:text/html,<img src=1 onerror=alert(1)>"
13016 style="-o-link:attr(title);-o-link-source:current">X</div>
13018 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
13023 MSIE 6 CSS safety test: Repetition markers (bug 55332)
13025 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
13026 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
13027 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
13028 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
13029 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
13030 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
13031 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
13033 <p style="/* insecure input */">A</p>
13034 <p style="/* insecure input */">B</p>
13035 <p style="/* insecure input */">C</p>
13036 <p style="/* insecure input */">D</p>
13037 <p style="/* insecure input */">E</p>
13038 <p style="/* insecure input */">F</p>
13039 <p style="/* insecure input */">G</p>
13044 Table attribute legitimate extension
13047 !+ style="<nowiki>color:blue</nowiki>"| status
13052 <th style="color:blue"> status
13058 Table attribute safety
13061 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
13066 <th style="/* insecure input */"> status
13072 CSS line continuation 1
13074 <div style="background-image: u\ rl(test.jpg);"></div>
13076 <div style="/* insecure input */"></div>
13081 CSS line continuation 2
13083 <div style="background-image: u\ rl(test.jpg); "></div>
13085 <div style="/* insecure input */"></div>
13096 Expansion of multi-line templates in attribute values (bug 6255)
13098 <div style="background: {{identity|#00FF00}}">-</div>
13100 <div style="background: #00FF00">-</div>
13106 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
13108 <div style="background:
13111 <div style="background: #00FF00">-</div>
13116 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
13118 <div style="background: #00FF00">-</div>
13120 <div style="background: #00FF00">-</div>
13125 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
13128 Parser hook: empty input
13141 Parser hook: empty input using terminated empty elements
13154 Parser hook: empty input using terminated empty elements (space before)
13167 Parser hook: basic input
13181 Parser hook: case insensitive
13195 Parser hook: case insensitive, redux
13208 Parser hook: nested tags
13212 <tag><tag></tag></tag>
13223 Parser hook: basic arguments
13225 <tag width=200 height = "100" depth = '50' square></tag>
13233 'square' => 'square',
13240 Parser hook: argument containing a forward slash (bug 5344)
13242 <tag filename='/tmp/bla'></tag>
13247 'filename' => '/tmp/bla',
13254 Parser hook: empty input using terminated empty elements (bug 2374)
13267 # </tag> should be output literally since there is no matching tag that begins it
13269 Parser hook: basic arguments using terminated empty elements (bug 2374)
13271 <tag width=200 height = "100" depth = '50' square/>
13281 'square' => 'square',
13290 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
13294 Parser hook: static parser hook not inside a comment
13296 <statictag>hello, world</statictag>
13297 <statictag action=flush/>
13305 Parser hook: static parser hook inside a comment
13307 <!-- <statictag>hello, world</statictag> -->
13308 <statictag action=flush/>
13314 # Nested template calls; this case was broken by Parser.php rev 1.506,
13318 Template:One-parameter
13320 (My parameter is: {{{1}}})
13324 Template:Map-one-parameter
13326 {{{{{1}}}|{{{2}}}}}
13330 Nested template calls
13332 {{Map-one-parameter|One-parameter|param}}
13334 <p>(My parameter is: param)
13343 Sanitizer: Closing of open tags
13345 <s></s><table></table>
13347 <s></s><table></table>
13352 Sanitizer: Closing of open but not closed tags
13361 Sanitizer: Closing of closed but not open tags
13370 Sanitizer: Closing of closed but not open table tags
13372 Table not started</td></tr></table>
13374 <p>Table not started</td></tr></table>
13379 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
13381 <span id="æ: v">byte</span>[[#æ: v|backlink]]
13383 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
13388 Sanitizer: Validating the contents of the id attribute (bug 4515)
13394 Something, but definitely not <br id="9" />...
13398 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
13402 <br id="foo" /><br id="foo" />
13404 Something need to be done. foo-2 ?
13408 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
13411 <meta itemprop="hello" content="world">
13412 <meta http-equiv="refresh" content="5">
13413 <meta itemprop="hello" http-equiv="refresh" content="5">
13414 <link itemprop="hello" href="{{SERVER}}">
13415 <link rel="stylesheet" href="{{SERVER}}">
13416 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
13419 <div itemscope="itemscope">
13420 <p> <meta itemprop="hello" content="world" />
13421 <meta http-equiv="refresh" content="5">
13422 <meta itemprop="hello" content="5" />
13424 <link itemprop="hello" href="http://example.org" />
13425 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
13426 <link itemprop="hello" href="http://example.org" />
13432 Language converter: output gets cut off unexpectedly (bug 5757)
13436 this bit is safe: }-
13438 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
13440 then we get cut off here: }-
13442 all additional text is vanished
13444 <p>this bit is safe: }-
13445 </p><p>but if we add a conversion instance: xxx
13446 </p><p>then we get cut off here: }-
13447 </p><p>all additional text is vanished
13452 Self closed html pairs (bug 5487)
13455 <center><font id="bug" />Centered text</center>
13456 <div><font id="bug2" />In div text</div>
13458 <center><font id="bug" />Centered text</center>
13459 <div><font id="bug2" />In div text</div>
13468 Punctuation: nbsp before exclamation
13472 <p>C'est grave !
13477 Punctuation: CSS !important (bug 11874)
13479 <div style="width:50% !important">important</div>
13481 <div style="width:50% !important">important</div>
13486 Punctuation: CSS ! important (bug 11874; with space after)
13488 <div style="width:50% ! important">important</div>
13490 <div style="width:50% ! important">important</div>
13496 HTML bullet list, closed tags (bug 5497)
13511 HTML bullet list, unclosed tags (bug 5497)
13530 HTML ordered list, closed tags (bug 5497)
13545 HTML ordered list, unclosed tags (bug 5497)
13564 HTML nested bullet list, closed tags (bug 5497)
13589 HTML nested bullet list, open tags (bug 5497)
13618 HTML nested ordered list, closed tags (bug 5497)
13643 HTML nested ordered list, open tags (bug 5497)
13672 HTML ordered list item with parameters oddity
13674 <ol><li id="fragment">One</li>
13677 <ol><li id="fragment">One</li>
13682 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
13684 bug 5918: autonumbering
13686 [http://first/] [http://second] [ftp://ftp]
13690 [mailto:enclosed@mail.tld With target]
13692 [mailto:enclosed@mail.tld]
13694 mailto:inline@mail.tld
13696 <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>
13697 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
13698 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
13699 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
13700 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
13703 <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>
13704 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
13705 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
13706 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
13707 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
13712 # Security and HTML correctness
13713 # From Nick Jenkins' fuzz testing
13717 Fuzz testing: Parser13
13732 Fuzz testing: Parser14
13737 <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>
13738 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13740 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
13748 Fuzz testing: Parser14-table
13753 <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>
13754 <table style="__TOC__">
13760 # Known to produce bogus xml (extra </td>)
13762 Fuzz testing: Parser16
13782 Fuzz testing: Parser21
13785 ! irc://{{ftp://a" onmouseover="alert('hello world');"
13790 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
13800 Fuzz testing: Parser22
13802 http://===r:::https://b
13806 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
13814 # Known to produce bad XML for now
13816 Fuzz testing: Parser24
13823 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
13824 <br style="onmouseover='alert(document.cookie);' " />
13826 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13831 <u class="|">}}}} >
13832 <br style="onmouseover='alert(document.cookie);'" />
13834 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
13843 # Note: the current result listed for this is not what the original one was,
13844 # but the original bug was JavaScript injection, which is fixed in any case.
13845 # It's not clear that the original result listed was any more correct than the
13846 # current one. Original result:
13849 # <li class="||">
13850 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
13852 Fuzz testing: Parser25 (bug 6055)
13858 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
13860 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
13865 Fuzz testing: URL adjacent extension (with space, clean)
13868 http://example.com <nowiki>junk</nowiki>
13870 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
13875 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
13878 http://example.com<nowiki>junk</nowiki>
13880 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
13885 Fuzz testing: URL adjacent extension (no space, dirty; pre)
13888 http://example.com<pre>junk</pre>
13890 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
13895 Fuzz testing: image with bogus manual thumbnail
13897 [[Image:foobar.jpg|thumbnail= ]]
13899 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
13902 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,null,null]}'/>
13906 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
13908 <pre dir=" "></pre>
13910 <pre dir=" "></pre>
13915 Parsing optional HTML elements (Bug 6171)
13920 <td> Some tabular data</td>
13921 <td> More tabular data ...
13922 <td> And yet som tabular data</td>
13928 <td> Some tabular data</td>
13929 <td> More tabular data ...
13930 </td><td> And yet som tabular data</td>
13937 Correct handling of <td>, <tr> (Bug 6171)
13942 <td> Some tabular data</td>
13943 <td> More tabular data ...</td>
13944 <td> And yet som tabular data</td>
13950 <td> Some tabular data</td>
13951 <td> More tabular data ...</td>
13952 <td> And yet som tabular data</td>
13960 Parsing crashing regression (fr:JavaScript)
13964 <p></body></x>
13969 Inline wiki vs wiki block nesting
13975 <p><b>Bold paragraph</b>
13976 </p><p>New wiki paragraph
13981 Inline HTML vs wiki block nesting
13989 <p><b>Bold paragraph</b>
13990 </p><p>New wiki paragraph
13994 # Original result was this:
13995 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
13997 # While that might be marginally more intuitive, maybe, the six-apostrophe
13998 # construct is clearly pathological and the result stated here (which is what
13999 # the parser actually does) is about as reasonable as anything.
14001 Mixing markup for italics and bold
14004 '''bold''''''bold''bolditalics'''''
14006 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
14014 Article for special page transclusion test
14018 Special page transclusion
14021 {{Special:Prefixindex/Xyzzyx}}
14023 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14028 Special page transclusion twice (bug 5021)
14031 {{Special:Prefixindex/Xyzzyx}}
14032 {{Special:Prefixindex/Xyzzyx}}
14034 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14035 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14040 Transclusion of default MediaWiki message
14042 {{MediaWiki:Mainpage}}
14049 Transclusion of nonexistent MediaWiki message
14051 {{MediaWiki:Mainpagexxx}}
14053 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
14058 Transclusion of MediaWiki message with underscore
14060 {{MediaWiki:history_short}}
14067 Transclusion of MediaWiki message with space
14069 {{MediaWiki:history short}}
14076 Invalid header with following text
14086 Section extraction test (section 0)
14106 Section extraction test (section 1)
14128 Section extraction test (section 2)
14149 Section extraction test (section 3)
14169 Section extraction test (section 4)
14193 Section extraction test (section 5)
14213 Section extraction test (section 6)
14234 Section extraction test (section 7)
14254 Section extraction test (section 8)
14274 Section extraction test (section 9)
14295 Section extraction test (section 10)
14315 Section extraction test (nonexistent section 11)
14334 Section extraction test with bogus heading (section 1)
14339 ==bogus== not a legal section
14343 ==bogus== not a legal section
14347 Section extraction test with bogus heading (section 2)
14352 ==bogus== not a legal section
14359 Section extraction test with comment after heading (section 1)
14371 Section extraction test with comment after heading (section 2)
14383 Section extraction test with bogus <nowiki> heading (section 1)
14388 ==bogus== <nowiki>not a legal section</nowiki>
14392 ==bogus== <nowiki>not a legal section</nowiki>
14396 Section extraction test with bogus <nowiki> heading (section 2)
14401 ==bogus== <nowiki>not a legal section</nowiki>
14408 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
14409 # instead of respecting commented sections
14411 Section extraction prefixed by comment (section 1)
14422 Section extraction prefixed by comment (section 2)
14433 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
14434 # instead of respecting HTML-style headings
14436 Section extraction, mixed wiki and html (section 1)
14452 Section extraction, mixed wiki and html (section 2)
14468 # Formerly testing for bug 3342
14470 Section extraction, heading surrounded by <noinclude>
14474 <noinclude>==unmarked==</noinclude>
14480 # Test behavior of bug 19910
14482 Sectiion with all-equals
14487 The line above must have a trailing space
14490 But just in case it doesn't...
14494 But just in case it doesn't...
14498 Section replacement test (section 0)
14529 Section replacement test (section 1)
14558 Section replacement test (section 2)
14588 Section replacement test (section 3)
14619 Section replacement test (section 4)
14646 Section replacement test (section 5)
14677 Section replacement test (section 6)
14707 Section replacement test (section 7)
14738 Section replacement test (section 8)
14769 Section replacement test (section 9)
14798 Section replacement test (section 10)
14828 Section replacement test with initial whitespace (bug 13728)
14832 Preformatted initial line
14836 Preformatted initial line
14843 Section extraction, heading followed by pre with 20 spaces (bug 6398)
14855 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
14868 Section extraction, <pre> around bogus header (bug 10309)
14885 Section replacement, <pre> around bogus header (bug 10309)
14887 noxml replace=2,"xxx"
14908 Handling of 
 in URLs
14912 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
14915 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
14917 a</a></li></ul></li></ul>
14921 Handling of %0A in URLs
14925 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
14928 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
14932 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
14934 5 quotes, code coverage +1 line
14941 <p><b><i></i></b></p>
14944 # same html as previous, but wikitext adjusted to match parsoid html2wt
14945 # note that wt2html and html2html will put the <i> before the <b>
14947 5 quotes, code coverage +1 line w/ nowiki (1)
14949 parsoid=wt2wt,html2wt
14951 '''''<nowiki/>'''''
14956 <p><b><i></i></b></p>
14959 # same as previous, just swapping the <i> and <b>
14961 5 quotes, code coverage +1 line w/ nowiki (2)
14963 '''''<nowiki/>'''''
14968 <p><i><b></b></i></p>
14972 Special:Search page linking.
14976 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
14983 title=[[Parser test]]
14988 * {{FULLPAGENAMEE}}
14990 * {{BASEPAGENAMEE}}
14994 * {{ROOTPAGENAMEE}}
14996 * {{TALKPAGENAMEE}}
14997 * {{SUBJECTPAGENAME}}
14998 * {{SUBJECTPAGENAMEE}}
15001 * {{NAMESPACENUMBER}}
15005 * {{SUBJECTSPACEE}}
15006 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
15008 <ul><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> Parser test</li>
15015 <li> Parser_test</li>
15016 <li> Parser test</li>
15017 <li> Parser_test</li>
15018 <li> Talk:Parser test</li>
15019 <li> Talk:Parser_test</li>
15020 <li> Parser test</li>
15021 <li> Parser_test</li>
15029 <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>
15032 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
15042 image4 |300px| centre
15043 image5.svg| http://///////
15048 <ul class="gallery mw-gallery-traditional">
15049 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15050 <div class="thumb" style="height: 150px;">Image1.png</div>
15051 <div class="gallerytext">
15054 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15055 <div class="thumb" style="height: 150px;">Image2.gif</div>
15056 <div class="gallerytext">
15061 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15062 <div class="thumb" style="height: 150px;">Image3</div>
15063 <div class="gallerytext">
15066 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15067 <div class="thumb" style="height: 150px;">Image4</div>
15068 <div class="gallerytext">
15073 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15074 <div class="thumb" style="height: 150px;">Image5.svg</div>
15075 <div class="gallerytext">
15076 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
15080 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15081 <div class="thumb" style="height: 150px;">* image6</div>
15082 <div class="gallerytext">
15090 Gallery (with options)
15092 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
15093 File:Nonexistant.jpg|caption
15094 File:Nonexistant.jpg
15095 image:foobar.jpg|some '''caption''' [[Main Page]]
15097 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
15100 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
15101 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
15102 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15103 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15104 <div class="gallerytext">
15109 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15110 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
15111 <div class="gallerytext">
15114 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15115 <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>
15116 <div class="gallerytext">
15117 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15121 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15122 <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>
15123 <div class="gallerytext">
15126 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
15127 <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>
15128 <div class="gallerytext">
15138 Gallery with wikitext inside caption
15141 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
15142 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
15145 <ul class="gallery mw-gallery-traditional">
15146 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15147 <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>
15148 <div class="gallerytext">
15149 <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>
15153 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15154 <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>
15155 <div class="gallerytext">
15156 <p>This is a test template
15165 gallery (with showfilename option)
15167 <gallery showfilename>
15168 File:Nonexistant.jpg|caption
15169 File:Nonexistant.jpg
15170 image:foobar.jpg|some '''caption''' [[Main Page]]
15174 <ul class="gallery mw-gallery-traditional">
15175 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15176 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15177 <div class="gallerytext">
15178 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15183 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15184 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15185 <div class="gallerytext">
15186 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
15190 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15191 <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>
15192 <div class="gallerytext">
15193 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15194 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
15198 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15199 <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>
15200 <div class="gallerytext">
15201 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
15210 Gallery (with namespace-less filenames)
15213 File:Nonexistant.jpg
15219 <ul class="gallery mw-gallery-traditional">
15220 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15221 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15222 <div class="gallerytext">
15225 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15226 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
15227 <div class="gallerytext">
15230 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15231 <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>
15232 <div class="gallerytext">
15235 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15236 <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>
15237 <div class="gallerytext">
15245 HTML Hex character encoding (spells the word "JavaScript")
15247 parsoid=wt2html,wt2wt,html2html
15249 JavaScript
15251 <p>JavaScript
15254 <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>
15258 HTML Hex character encoding bogus encoding (bug 26437 regression check)
15262 <p>&#xsee;&#XSEE;
15265 <p>&#xsee;&#XSEE;</p>
15269 HTML Hex character encoding mixed case
15271 parsoid=wt2html,wt2wt,html2html
15278 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
15282 __FORCETOC__ override
15294 ISBN 978-0-1234-56 789
15296 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
15301 ISBN followed by 5 spaces
15312 ISBN ISBN 1234567890
15314 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15323 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
15328 ISBN with empty prefix (parsoid test)
15332 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
15336 Bug 22905: <abbr> followed by ISBN followed by </a>
15338 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
15340 <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>
15349 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
15354 Double RFC with a wiki link
15358 <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>
15367 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
15372 Centre-aligned image
15374 [[Image:foobar.jpg|centre]]
15376 <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>
15383 [[Image:foobar.jpg|none]]
15385 <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>
15390 Width + Height sized image (using px) (height is ignored)
15392 [[Image:foobar.jpg|640x480px]]
15394 <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>
15399 Width-sized image (using px, no following whitespace)
15401 [[Image:foobar.jpg|640px]]
15403 <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>
15408 Width-sized image (using px, with following whitespace - test regression from r39467)
15410 [[Image:foobar.jpg|640px ]]
15412 <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>
15417 Width-sized image (using px, with preceding whitespace - test regression from r39467)
15419 [[Image:foobar.jpg| 640px]]
15421 <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>
15426 Image with page parameter
15430 [[File:LoremIpsum.djvu|page=2]]
15432 <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>
15437 Another italics / bold test
15445 # Note the results may be incorrect, as parserTest output included this:
15446 # XML error: Mismatched tag at byte 6120:
15447 # ...<dd> </dt></dl> </dd...
15478 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
15480 Images with the "|" character in the comment
15482 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
15484 <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>
15487 <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>
15491 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
15493 <html><script>alert(1);</script></html>
15495 <p><html><script>alert(1);</script></html>
15500 HTML with raw HTML ($wgRawHtml==true)
15504 <html><script>alert(1);</script></html>
15506 <p><script>alert(1);</script>
15511 Parents of subpages, one level up
15513 subpage title=[[Subpage test/L1/L2/L3]]
15517 <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>
15523 Parents of subpages, one level up, not named
15525 subpage title=[[Subpage test/L1/L2/L3]]
15529 <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>
15536 Parents of subpages, two levels up
15538 subpage title=[[Subpage test/L1/L2/L3]]
15544 <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
15545 </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>
15550 Parents of subpages, two levels up, without trailing slash or name.
15552 subpage title=[[Subpage test/L1/L2/L3]]
15561 Parents of subpages, two levels up, with lots of extra trailing slashes.
15563 subpage title=[[Subpage test/L1/L2/L3]]
15567 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
15572 Subpage test/L1/L2/L3Sibling
15578 Transclusion of a sibling page (one level up)
15580 subpage title=[[Subpage test/L1/L2/L3]]
15589 Transclusion of a child page
15591 subpage title=[[Subpage test/L1/L2]]
15600 Non-transclusion because of too many up levels
15602 subpage title=[[Subpage test/L1/L2/L3]]
15604 {{../../../../More than parent}}
15606 <p>{{../../../../More than parent}}
15611 Definition list code coverage
15617 <dl><dt> title  </dt>
15619 <dt> title </dt>
15627 Don't fall for the self-closing div
15629 <div>hello world</div/>
15631 <div>hello world</div>
15640 <p>[[:Template:Msg]]
15649 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
15653 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
15655 Always escape literal '>' in output, not just after '<'
15669 <p>This is a test template
15670 This is a test template
15682 Inclusion of !userCanEdit() content
15686 <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>
15692 Out-of-order TOC heading levels
15701 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15703 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
15705 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
15706 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
15709 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
15711 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
15712 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
15718 <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>
15719 <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>
15720 <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>
15721 <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>
15722 <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>
15723 <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>
15729 ISBN with a dummy number
15739 ISBN with space-delimited number
15743 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
15749 ISBN with multiple spaces, no number
15768 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
15769 </p><p>ISBN 12345678901
15775 ISBN with trailing year (bug 8110)
15777 ISBN 1-234-56789-0 - 2006
15779 ISBN 1 234 56789 0 - 2006
15781 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
15782 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
15790 {{anchorencode:foo bar©#%n}}
15792 <p>foo_bar.C2.A9.23.25n
15797 anchorencode trims spaces
15799 {{anchorencode: __pretty__please__}}
15806 anchorencode deals with links
15808 {{anchorencode: [[hello|world]] [[hi]]}}
15815 anchorencode deals with templates
15817 {{anchorencode: {{Foo}} }}
15824 anchorencode encodes like the TOC generator: (bug 18431)
15826 === _ +:.3A%3A&&]] ===
15827 {{anchorencode: _ +:.3A%3A&&]] }}
15830 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
15831 <p>.2B:.3A.253A.26.26.5D.5D
15836 Bug 6200: blockquotes and paragraph formatting
15857 Bug 8293: Use of center tag ruins paragraph formatting
15878 Parsing of overlapping (improperly nested) inline html tags
15880 <span><s>x</span></s>
15882 <p><span><s>x</span></s></span>
15885 <p><span><s>x</s></span>
15890 ### Language variants related tests
15893 Self-link in language variants
15895 title=[[Dunav]] language=sr
15897 Both [[Dunav]] and [[Дунав]] are names for this river.
15899 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
15910 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
15912 title=[[Duna]] language=sr
15914 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
15916 <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.
15921 Link to a section of a variant of this title shouldn't be parsed as self-link
15923 title=[[Duna]] language=sr
15925 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
15927 <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.
15932 Link to pages in language variants
15936 Main Page can be written as [[Маин Паге]]
15938 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
15944 Multiple links to pages in language variants
15948 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
15950 <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>.
15956 Simple template in language variants
15962 <p>This is a test template
15968 Template with explicit namespace in language variants
15974 <p>This is a test template
15980 Basic test for template parameter in language variants
15984 {{парамтест|param=foo}}
15986 <p>This is a test template with parameter foo
15992 Simple category in language variants
15996 [[Category:МедиаWики Усер'с Гуиде]]
15998 <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>
16015 Don't convert blue categorylinks to another variant (bug 33210)
16019 [[A]][[Category:分类]]
16021 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
16026 Stripping -{}- tags (language variants)
16030 Latin proverb: -{Ne nuntium necare}-
16032 <p>Latin proverb: Ne nuntium necare
16038 Prevent conversion with -{}- tags (language variants)
16040 language=sr variant=sr-ec
16042 Latinski: -{Ne nuntium necare}-
16044 <p>Латински: Ne nuntium necare
16050 Prevent conversion of text with -{}- tags (language variants)
16052 language=sr variant=sr-ec
16054 Latinski: -{Ne nuntium necare}-
16056 <p>Латински: Ne nuntium necare
16062 Prevent conversion of links with -{}- tags (language variants)
16064 language=sr variant=sr-ec
16068 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16074 -{}- tags within headlines (within html for parserConvert())
16076 language=sr variant=sr-ec
16080 <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>
16086 Explicit definition of language variant alternatives
16088 language=zh variant=zh-tw
16090 -{zh:China;zh-tw:Taiwan}-, not China
16092 <p>Taiwan, not China
16098 Conversion around HTML tags
16100 language=sr variant=sr-ec
16102 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
16103 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
16106 <span title="ЛаCтин">ски</span>
16112 Explicit session-wise language variant mapping (A flag and - flag)
16114 language=zh variant=zh-tw
16116 Taiwan is not China.
16117 But -{A|zh:China;zh-tw:Taiwan}- is China,
16118 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
16119 and -{China}- is China.
16121 <p>Taiwan is not China.
16122 But Taiwan is Taiwan,
16123 (This should be stripped!)
16124 and China is China.
16129 Explicit session-wise language variant mapping (H flag for hide)
16131 language=zh variant=zh-tw
16133 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
16136 <p>(This should be stripped!)
16142 Adding explicit conversion rule for title (T flag)
16144 language=zh variant=zh-tw showtitle
16146 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16149 <p>Should be stripped!
16154 Testing that changing the language variant here in the tests actually works
16156 language=zh variant=zh showtitle
16158 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16161 <p>Should be stripped!
16166 Recursive conversion of alt and title attrs shouldn't clear converter state
16168 language=zh variant=zh-cn showtitle
16170 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
16171 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
16175 Should be stripped<span title="Exclamation">!</span>
16180 Bug 24072: more test on conversion rule for title
16182 language=zh variant=zh-tw showtitle
16184 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
16185 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
16188 <p>This should be stripped!
16189 This won't take interferes with the title rule.
16194 Partly disable title conversion if variant == main language code
16196 language=zh variant=zh title=[[ZH]] showtitle
16198 -{T|zh-cn:CN;zh-tw:TW}-
16206 Partly disable title conversion if variant == main language code, more
16208 language=zh variant=zh title=[[ZH]] showtitle
16218 Raw output of variant escape tags (R flag)
16220 language=zh variant=zh-tw
16222 Raw: -{R|zh:China;zh-tw:Taiwan}-
16224 <p>Raw: zh:China;zh-tw:Taiwan
16229 Nested using of manual convert syntax
16231 language=zh variant=zh-hk
16233 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
16235 <p>Nested: Hello Hong Kong!
16240 Proper conversion of text in external links
16242 language=sr variant=sr-ec
16244 http://www.google.com
16245 gopher://www.google.com
16246 [http://www.google.com http://www.google.com]
16247 [gopher://www.google.com gopher://www.google.com]
16248 [https://www.google.com irc://www.google.com]
16249 [ftp://www.google.com www.google.com/ftp://dir]
16250 [//www.google.com www.google.com]
16252 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16253 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16254 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
16255 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
16256 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
16257 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
16258 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
16263 Do not convert roman numbers to language variants
16265 language=sr variant=sr-ec
16269 <p>Фридрих IV је цар.
16274 Unclosed language converter markup "-{"
16285 Don't convert raw rule "-{R|=>}-" to "=>"
16296 Don't break link parsing if language converter markup is in the caption.
16298 language=sr variant=sr-ec
16300 [[Main Page|-{R|main page}-]]
16302 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
16306 # This test is currently broken in the PHP parser (bug 52661)
16308 Don't break image parsing if language converter markup is in the caption.
16313 [[File:Foobar.jpg|-{R|caption}-]]
16315 <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>
16319 # This test is currently broken in the PHP parser (bug 52661)
16321 Don't break list handling if language converter markup is in the item.
16323 language=zh variant=zh-cn
16326 ;-{zh-cn:AAA;zh-tw:BBB}-
16333 # This test is currently broken in the PHP parser (bug 52661)
16335 Don't break table handling if language converter markup is in the cell.
16337 language=sr variant=sr-ec
16354 Bug 529: Uncovered bullet
16363 # Plain MediaWiki does not remove empty lists, but tidy actually does.
16364 # Templates in Wikipedia rely on this behavior, as tidy has always been
16365 # enabled there. These tests are normally run *without* tidy, so specify the
16366 # full output here.
16367 # To test realistic parsing behavior, apply a tidy-like transformation to both
16368 # the expected output and your parser's output.
16370 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
16372 ******* Foo {{bullet}}
16374 <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>
16380 Bug 529: Uncovered table already at line-start
16403 Bug 529: Uncovered bullet in parser function result
16405 * Foo {{lc:{{bullet}} }}
16413 Bug 5678: Double-parsed template argument
16415 {{lc:{{{1}}}|hello}}
16422 Bug 5678: Double-parsed template invocation
16424 {{lc:{{paramtest {{!}} param = hello }} }}
16426 <p>{{paramtest | param = hello }}
16431 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
16434 title=[[Main Page]]
16436 {{PRVNÍVELKÉ:ěščř}}
16437 {{prvnívelké:ěščř}}
16457 Morwen/13: Unclosed link followed by heading
16464 <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>
16469 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
16476 <h1><span class="mw-headline" id="heading">heading</span></h1>
16481 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
16488 <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>
16503 Paragraphs inside divs (no extra line breaks)
16515 Paragraphs inside divs (extra line break on open)
16530 Paragraphs inside divs (extra line break on close)
16545 Paragraphs inside divs (extra line break on open and close)
16562 Nesting tags, paragraphs on lines which begin with <div>
16566 <div></div><strong>A
16575 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
16577 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
16579 <blockquote>Line one
16581 Line two</blockquote>
16583 <blockquote>Line one
16584 Line two</blockquote>
16589 Bug 6200: paragraphs inside blockquotes (extra line break on open)
16594 Line two</blockquote>
16599 Line two</blockquote>
16604 Bug 6200: paragraphs inside blockquotes (extra line break on close)
16606 <blockquote>Line one
16611 <blockquote>Line one
16619 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
16636 Paragraphs inside blockquotes/divs (no extra line breaks)
16638 <blockquote><div>Line one
16640 Line two</div></blockquote>
16642 <blockquote><div>Line one
16643 Line two</div></blockquote>
16648 Paragraphs inside blockquotes/divs (extra line break on open)
16653 Line two</div></blockquote>
16658 Line two</div></blockquote>
16663 Paragraphs inside blockquotes/divs (extra line break on close)
16665 <blockquote><div>Line one
16668 </div></blockquote>
16670 <blockquote><div>Line one
16673 </div></blockquote>
16678 Paragraphs inside blockquotes/divs (extra line break on open and close)
16684 </div></blockquote>
16690 </div></blockquote>
16695 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
16697 wgLinkHolderBatchSize=0
16703 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
16704 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
16705 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
16710 Free external link invading image caption
16712 [[Image:Foobar.jpg|thumb|http://x|hello]]
16714 <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>
16719 Bug 15196: localised external link numbers
16723 [http://en.wikipedia.org/]
16725 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
16728 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
16732 Multibyte character in padleft
16734 {{padleft:-Hello|7|Æ}}
16741 Multibyte character in padright
16743 {{padright:Hello-|7|Æ}}
16750 formatdate parser function
16752 {{#formatdate:2009-03-24}}
16754 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
16759 formatdate parser function, with default format
16761 {{#formatdate:2009-03-24|mdy}}
16763 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
16768 Spacing of numbers in formatted dates
16770 {{#formatdate:January 15}}
16772 <p><span class="mw-formatted-date" title="01-15">January 15</span>
16777 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
16779 language=nl title=[[MediaWiki:Common.css]]
16781 {{#formatdate:2009-03-24|dmy}}
16783 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
16796 Edit comment with link
16800 I like the [[Main Page]] a lot
16802 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
16806 Edit comment with link and link text
16810 I like the [[Main Page|best pages]] a lot
16812 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16816 Edit comment with link and link text with suffix
16820 I like the [[Main Page|best page]]s a lot
16822 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
16826 Edit comment with section link (non-local, eg in history list)
16828 comment title=[[Main Page]]
16830 /* External links */ removed bogus entries
16832 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
16836 Edit comment with section link and text before it (non-local, eg in history list)
16838 comment title=[[Main Page]]
16840 pre-comment text /* External links */ removed bogus entries
16842 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>
16846 Edit comment with section link (local, eg in diff view)
16848 comment local title=[[Main Page]]
16850 /* External links */ removed bogus entries
16852 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
16856 Edit comment with subpage link (bug 14080)
16860 title=[[Subpage test]]
16862 Poked at a [[/subpage]] here...
16864 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
16868 Edit comment with subpage link and link text (bug 14080)
16872 title=[[Subpage test]]
16874 Poked at a [[/subpage|neat little page]] here...
16876 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
16880 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
16883 title=[[Subpage test]]
16885 Poked at a [[/subpage]] here...
16887 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
16891 Edit comment with bare anchor link (local, as on diff)
16895 title=[[Main Page]]
16899 <a href="#section">#section</a>
16903 Edit comment with bare anchor link (non-local, as on history)
16906 title=[[Main Page]]
16910 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
16914 Anchor starting with underscore
16918 <p><a href="#_ref">One</a>
16923 Id starting with underscore
16925 <div id="_ref"></div>
16927 <div id="_ref"></div>
16932 Space normalisation on autocomment (bug 22784)
16935 title=[[Main Page]]
16937 /* __hello__world__ */
16939 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
16943 percent-encoding and + signs in comments (Bug 26410)
16947 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
16949 <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>
16953 Bad images - basic functionality
16962 Bad images - bug 16039: text after bad image disappears
16976 Verify that displaytitle works (bug #22501) no displaytitle
16980 wgAllowDisplayTitle=true
16981 wgRestrictDisplayTitle=false
16983 this is not the the title
16986 <p>this is not the the title
16991 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
16996 wgAllowDisplayTitle=true
16997 wgRestrictDisplayTitle=false
16999 this is not the the title
17000 {{DISPLAYTITLE:whatever}}
17003 <p>this is not the the title
17008 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
17013 wgAllowDisplayTitle=true
17014 wgRestrictDisplayTitle=true
17016 this is not the the title
17017 {{DISPLAYTITLE:whatever}}
17020 <p>this is not the the title
17025 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
17030 wgAllowDisplayTitle=true
17031 wgRestrictDisplayTitle=true
17033 this is not the the title
17034 {{DISPLAYTITLE:screen}}
17037 <p>this is not the the title
17042 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
17047 wgAllowDisplayTitle=false
17049 this is not the the title
17050 {{DISPLAYTITLE:screen}}
17053 <p>this is not the the title
17054 <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>
17059 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
17064 wgAllowDisplayTitle=false
17066 this is not the the title
17069 <p>this is not the the title
17074 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
17079 wgAllowDisplayTitle=true
17080 wgRestrictDisplayTitle=true
17082 this is not the the title
17083 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
17085 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
17086 <p>this is not the the title
17091 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
17096 wgAllowDisplayTitle=true
17097 wgRestrictDisplayTitle=true
17099 this is not the the title
17100 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
17102 <span style="color: red;">s</span>creen
17103 <p>this is not the the title
17108 preload: check <noinclude> and <includeonly>
17112 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
17118 preload: check <onlyinclude>
17122 Goodbye <onlyinclude>Hello world</onlyinclude>
17128 preload: can pass tags through if we want to
17132 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
17134 <includeonly>Hello world</includeonly>
17138 preload: check that it doesn't try to do tricks
17142 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17144 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
17148 Play a bit with r67090 and bug 3158
17152 <div style="width:50% !important"> </div>
17153 <div style="width:50% !important"> </div>
17154 <div style="width:50% !important"> </div>
17155 <div style="border : solid;"> </div>
17157 <div style="width:50% !important"> </div>
17158 <div style="width:50% !important"> </div>
17159 <div style="width:50% !important"> </div>
17160 <div style="border : solid;"> </div>
17165 HTML5 data attributes
17167 <span data-foo="bar">Baz</span>
17168 <p data-abc-def_hij="">Quuz</p>
17170 <p><span data-foo="bar">Baz</span>
17172 <p data-abc-def_hij="">Quuz</p>
17177 percent-encoding and + signs in internal links (Bug 26410)
17179 [[User:+%]] [[Page+title%]]
17180 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
17181 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
17182 [[%33%45]] [[%33%45+]]
17184 <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>
17185 <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>
17186 <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>
17187 <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>
17192 Special characters in embedded file links (bug 27679)
17194 [[File:Contains & ampersand.jpg]]
17195 [[File:Does not exist.jpg|Title with & ampersand]]
17197 <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>
17198 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
17204 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
17206 Text's been normalized?
17208 <p>Text's been normalized?
17213 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
17215 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
17217 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
17222 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
17224 [http://www.example.org/ ideograms]
17226 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
17231 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
17233 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
17235 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
17259 Bug 31098 Template which includes system messages which includes the template
17263 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17264 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
17269 Bug31490 Turkish: ucfirst 'blah'
17280 Bug31490 Turkish: ucfirst 'ix'
17291 Bug31490 Turkish: lcfirst 'BLAH'
17302 Bug31490 Turkish: ucfırst (with a dotless i)
17308 <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>
17313 Bug31490 ucfırst (with a dotless i) with English language
17319 <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>
17324 Bug 26375: TOC with italics
17326 title=[[Main Page]]
17329 == ''Lost'' episodes ==
17331 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17333 <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>
17337 <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>
17342 Bug 26375: TOC with bold
17344 title=[[Main Page]]
17347 == '''should be bold''' then normal text ==
17349 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17351 <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>
17355 <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>
17360 Bug 33845: Headings become cursive in TOC when they contain an image
17362 title=[[Main Page]]
17365 == Image [[Image:foobar.jpg]] ==
17367 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17369 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
17373 <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>
17378 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
17380 title=[[Main Page]]
17383 == <blockquote>Quote</blockquote> ==
17385 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17387 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
17391 <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>
17396 Unclosed tags in TOC
17398 title=[[Main Page]]
17402 <small>Hanc marginis exiguitas non caperet.</small>
17405 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17407 <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>
17411 <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>
17412 <p><small>Hanc marginis exiguitas non caperet.</small>
17418 Multiple tags in TOC
17421 == <i>Foo</i> <b>Bar</b> ==
17423 == <i>Foo</i> <blockquote>Bar</blockquote> ==
17425 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17427 <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>
17428 <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>
17432 <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>
17433 <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>
17438 Tags with parameters in TOC
17441 == <sup class="in-h2">Hello</sup> ==
17443 == <sup class="a > b">Evilbye</sup> ==
17445 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17447 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
17448 <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>
17452 <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>
17453 <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>
17458 span tags with directionality in TOC
17461 == <span dir="ltr">C++</span> ==
17463 == <span dir="rtl">זבנג!</span> ==
17465 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
17467 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
17469 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
17471 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17473 <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>
17474 <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>
17475 <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>
17476 <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>
17477 <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>
17481 <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>
17482 <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>
17483 <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>
17484 <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>
17485 <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>
17492 == {{int:headline_sample}} ==
17496 Bug 32057: Title needed when expanding <h> nodes.
17498 title=[[Main Page]]
17502 <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>
17507 Strip marker in urlencode
17509 {{urlencode:x<nowiki/>y}}
17510 {{urlencode:x<nowiki/>y|wiki}}
17511 {{urlencode:x<nowiki/>y|path}}
17538 Strip marker in formatNum
17540 {{formatnum:1<nowiki/>2}}
17541 {{formatnum:1<nowiki/>2|R}}
17549 Check noCommafy in formatNum
17553 {{formatnum:123456.78}}
17554 {{formatnum:123456.78|NOSEP}}
17562 Wrong option for formatNum (bug 56199)
17564 {{formatnum:1,234.56|Random}}
17565 {{formatnum:1,234.56|EVERYTHING}}
17566 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
17575 Strip marker in grammar
17579 {{grammar:elative|foo<nowiki/>bar}}
17586 Strip marker in padleft
17588 {{padleft:|2|x<nowiki/>y}}
17595 Strip marker in padright
17597 {{padright:|2|x<nowiki/>y}}
17604 Strip marker in anchorencode
17606 {{anchorencode:x<nowiki/>y}}
17613 nowiki inside link inside heading (bug 18295)
17615 ==[[foo|x<nowiki>y</nowiki>z]]==
17617 <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>
17622 new support for bdi element (bug 31817)
17624 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17626 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
17631 Ignore pipe between table row attributes
17635 |- id=foo | style='color: red'
17643 <tr id="foo" style="color: red">
17650 Gallery override link with WikiLink (bug 34852)
17653 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
17656 <ul class="gallery mw-gallery-traditional">
17657 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17658 <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>
17659 <div class="gallerytext">
17669 Gallery override link with absolute external link (bug 34852)
17672 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
17675 <ul class="gallery mw-gallery-traditional">
17676 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17677 <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>
17678 <div class="gallerytext">
17688 Gallery override link with malicious javascript (bug 34852)
17691 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
17694 <ul class="gallery mw-gallery-traditional">
17695 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17696 <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>
17697 <div class="gallerytext">
17707 Gallery with invalid title as link (bug 43964)
17710 File:foobar.jpg|link=<
17713 <ul class="gallery mw-gallery-traditional">
17714 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17715 <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>
17716 <div class="gallerytext">
17724 Language parser function
17733 Padleft and padright as substr
17735 {{padleft:|3|abcde}}
17736 {{padright:|3|abcde}}
17744 Special parser function
17746 {{#special:RandomPage}}
17747 {{#special:BaDtItLe}}
17748 {{#special:Foobar}}
17757 Bug 34939 - Case insensitive link parsing ([HttP://])
17759 [HttP://MediaWiki.Org/]
17761 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
17764 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
17768 Bug 34939 - Case insensitive link parsing ([HttP:// title])
17770 [HttP://MediaWiki.Org/ MediaWiki]
17772 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
17777 Bug 34939 - Case insensitive link parsing (HttP://)
17779 HttP://MediaWiki.Org/
17781 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
17784 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
17802 <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>
17803 <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>
17804 <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>
17805 <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>
17806 <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>
17812 ### Parsoid-specific tests
17813 ### Parsoid-PHP parser incompatibilities
17816 1. SOL-sensitive wikitext tokens as template-args
17818 parsoid=wt2html,wt2wt
17824 <span about="#mwt1" typeof="mw:Transclusion">
17825 </span><ul about="#mwt1"><li>a</li>
17827 <span about="#mwt2" typeof="mw:Transclusion">
17828 </span><ol about="#mwt2"><li>a</li>
17830 <span about="#mwt3" typeof="mw:Transclusion">
17831 </span><dl about="#mwt3"><dd>a</dd>
17835 #### -----------------------------------------------------------------
17836 #### Parsoid-specific functionality tests
17837 #### -----------------------------------------------------------------
17839 # Bug 63642: Formatting elt fixup is cleaned up.
17840 # We know wt2wt will fail, but we expect selser to pass.
17841 # Due to the nature of our testing, wt2wt and selser tests will enter the
17842 # blacklist and we'll catch selser regressions based on changes to the
17843 # blacklist entries for selser tests.
17845 Bad treebuilder fixup of formatting elt is cleaned up
17847 parsoid=wt2html,wt2wt
17852 [[Image:Foobar.jpg|right|Test]]
17858 <p><small></small></p>
17859 <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>
17864 #### ----------------------------------------------------------------
17865 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
17866 #### tags. Parsoid's output for these tags differs from that of the
17868 #### ----------------------------------------------------------------
17871 Ref: 1. ref-location should be replaced with an index span
17876 B <ref name="x">foo</ref>
17879 <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>
17880 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>
17881 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>
17885 Ref: 2. ref-tags with identical names should all get the same index
17889 A <ref name="x">foo</ref>
17892 <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>
17893 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>
17897 Ref: 3. spaces in ref-names should be ignored
17901 A <ref name="x">foo</ref>
17902 B <ref name=" x " />
17905 <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>
17906 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>
17907 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>
17911 Ref: 4. 'constructor' should be accepted as a valid ref-name
17912 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
17916 A <ref name="constructor">foo</ref>
17918 <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>
17922 Ref: 5. body should accept generic wikitext
17927 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
17932 <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>
17934 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
17935 <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>
17941 Ref: 6. indent-pres should not be output in ref-body
17953 <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>
17955 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
17956 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
17964 Ref: 7. No p-wrapping in ref-body
17983 <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>
17985 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
17986 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18001 Ref: 8. transclusion wikitext has lower precedence
18005 A <ref> foo {{echo|</ref> B C}}
18009 <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>
18010 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
18011 <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>
18016 Ref: 9. unclosed comments should not leak out of ref-body
18020 A <ref> foo <!--</ref> B C
18023 <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>
18024 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18025 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
18030 Ref: 10. Unclosed HTML tags should not leak out of ref-body
18034 A <ref> <b> foo </ref> B C
18038 <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>
18041 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18042 <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>
18047 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
18054 <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
18055 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>
18059 Ref: 12. ref-tags act as trailing newline migration barrier
18063 <!--the newline at the end of this line moves out of the p-tag-->a
18065 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
18070 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
18073 <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>
18074 <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>
18081 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
18089 <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
18090 <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>
18094 Ref: 14. A nested ref-tag should be emitted as plain text
18098 <ref>foo <ref>bar</ref> baz</ref>
18102 <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>
18104 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
18105 <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>
18110 Ref: 15. ref-tags with identical names should get identical indexes
18114 A1 <ref name="a">foo</ref> A2 <ref name="a" />
18115 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
18119 <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>
18120 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>
18122 <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>
18126 ## We don't bother wt2wt-ing non-standard whitespace
18128 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
18136 <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>
18138 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18139 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
18143 References: 1. references tag without any refs should be handled properly
18149 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
18153 References: 2. references tag with group only outputs references from that group
18157 A <ref group="a">foo</ref>
18158 B <ref group="b">bar</ref>
18160 <references group="a" />
18162 <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>
18163 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>
18165 <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>
18170 References: 3. ref list should be cleared after processing references
18182 <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>
18184 <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>
18187 <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>
18189 <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>
18194 References: 4. only referenced group should be cleared after processing references
18198 A <ref group="a">afoo</ref>
18201 <references group="a" />
18207 <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>
18208 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>
18210 <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>
18213 <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>
18215 <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>
18220 References: 5. ref tags in references should be processed while ignoring all other content
18225 B <ref name="b">bar</ref>
18228 <ref name="a">foo</ref>
18229 This should just get lost.
18232 <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>
18233 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>
18236 <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":{}}'>
18237 <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>
18238 <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>
18243 References: 6. <references /> from a transclusion
18247 <ref>Foo</ref> {{echo|<references />}}
18249 <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>
18253 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
18257 A <ref>foo bar for a</ref>
18258 B <ref group="X" name="b" />
18262 <references group="X">
18263 <ref name="b">foo</ref>
18266 <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>
18267 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>
18269 <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>
18271 <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>
18275 Entities in ref name
18279 <ref name="test & me">hi</ref>
18281 <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>
18284 # This test is wt2html only because we're permitting the serializer to produce
18285 # dirty diffs, normalizing the unclosed references to the self-closed version.
18287 Generate references for unclosed references tag
18295 <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>
18298 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
18299 <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>
18303 New reference serializes on its own line
18305 parsoid=wt2wt,html2wt
18310 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
18313 #### ----------------------------------------------------------------
18314 #### The following section of tests are primarily to test
18315 #### wikitext escaping capabilities of Parsoid. Given that
18316 #### escaping can be done any number of ways, the wikitext (input)
18317 #### is always adjusted to reflect how Parsoid adds nowiki
18320 #### We are marking several tests as parsoid-only since the
18321 #### HTML in the result section is different from what the
18322 #### PHP parser generates for it.
18323 #### ----------------------------------------------------------------
18326 #### --------------- Headings ---------------
18328 #### 1. Nested inside html <h1>=foo=</h1>
18329 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
18330 #### 3. Nested inside html with wikitext split by html tags
18331 #### 4. No escape needed
18332 #### 5. Empty headings <h1></h1>
18333 #### 6. Heading chars in SOL context
18334 #### ----------------------------------------
18336 Headings: 0. Unnested
18340 <nowiki>=foo=</nowiki>
18342 <nowiki> =foo= </nowiki>
18344 <nowiki>=foo=</nowiki>
18346 =foo''a''<nowiki>=</nowiki>
18348 <p><span typeof="mw:Nowiki">=foo=</span></p>
18350 <p><span typeof="mw:Nowiki"> =foo= </span>
18352 <span typeof="mw:Nowiki">=foo=</span></p>
18354 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
18358 Headings: 1. Nested inside html
18359 (New headings and existing headings are handled differently)
18369 =<nowiki>=foo=</nowiki>=
18370 ==<nowiki>=foo=</nowiki>==
18371 ===<nowiki>=foo=</nowiki>===
18372 ====<nowiki>=foo=</nowiki>====
18373 =====<nowiki>=foo=</nowiki>=====
18374 ======<nowiki>=foo=</nowiki>======
18381 <h1 data-parsoid='{}'>=foo=</h1>
18382 <h2 data-parsoid='{}'>=foo=</h2>
18383 <h3 data-parsoid='{}'>=foo=</h3>
18384 <h4 data-parsoid='{}'>=foo=</h4>
18385 <h5 data-parsoid='{}'>=foo=</h5>
18386 <h6 data-parsoid='{}'>=foo=</h6>
18390 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
18395 <nowiki>*</nowiki>bar
18401 <nowiki>=bar=</nowiki>
18409 Headings: 3. Nested inside html with wikitext split by html tags
18413 = ='''bold'''<nowiki>foo=</nowiki> =
18415 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
18419 Headings: 4a. No escaping needed (testing just h1 and h2)
18437 = <nowiki>=</nowiki> =
18445 <h1><i>=</i>foo=</h1>
18446 <h1><span typeof="mw:Nowiki">=</span></h1>
18450 Headings: 4b. No escaping needed (inside p-tags)
18465 Headings: 5. Empty headings
18477 =====<nowiki/>=====
18479 ======<nowiki/>======
18490 Headings: 6a. Heading chars in SOL context (with trailing spaces)
18494 <nowiki>=a=</nowiki>
18496 <nowiki>=a=</nowiki>
18498 <nowiki>=a=</nowiki>
18500 <nowiki>=a=</nowiki>
18509 Headings: 6b. Heading chars in SOL context (with trailing newlines)
18537 Headings: 6c. Heading chars in SOL context (leading newline break)
18542 <nowiki>=b=</nowiki>
18549 Headings: 6d. Heading chars in SOL context (with interspersed comments)
18553 <!--c0--><nowiki>=a=</nowiki>
18555 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
18557 <p><!--c0-->=a=</p>
18558 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
18562 Headings: 6d. Heading chars in SOL context (No escaping needed)
18571 #### --------------- Lists ---------------
18572 #### 0. Outside nests (*foo, etc.)
18573 #### 1. Nested inside html <ul><li>*foo</li></ul>
18574 #### 2. Inside definition lists
18575 #### 3. Only bullets at start should be escaped
18576 #### 4. No escapes needed
18577 #### 5. No unnecessary escapes
18578 #### 6. Escape bullets in SOL position
18579 #### 7. Escape bullets in a multi-line context
18580 #### ----------------------------------------
18583 Lists: 0. Outside nests
18585 <nowiki>*</nowiki>foo
18587 <nowiki>#</nowiki>foo
18589 <nowiki>;Foo:</nowiki>bar
18598 Lists: 1. Nested inside html
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 #<nowiki>:foo</nowiki>
18614 #<nowiki>;foo</nowiki>
18616 <ul><li>*foo</li></ul>
18617 <ul><li>#foo</li></ul>
18618 <ul><li>:foo</li></ul>
18619 <ul><li>;foo</li></ul>
18620 <ol><li>*foo</li></ol>
18621 <ol><li>#foo</li></ol>
18622 <ol><li>:foo</li></ol>
18623 <ol><li>;foo</li></ol>
18628 Lists: 2. Inside definition lists
18630 ;<nowiki>;foo</nowiki>
18632 ;<nowiki>:foo</nowiki>
18634 ;<nowiki>:foo</nowiki>
18637 :<nowiki>:foo</nowiki>
18639 <dl><dt>;foo</dt></dl>
18640 <dl><dt>:foo</dt></dl>
18643 <dl><dd>:foo</dd></dl>
18648 Lists: 3. Only bullets at start of text should be escaped
18650 *<nowiki>*foo*bar</nowiki>
18652 *<nowiki>*foo</nowiki>''it''*bar
18654 <ul><li>*foo*bar</li></ul>
18655 <ul><li>*foo<i>it</i>*bar</li></ul>
18660 Lists: 4. No escapes needed
18681 <li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
18685 <li><a rel="mw:WikiLink" href="Foo">Foo</a>*bar
18691 Lists: 5. No unnecessary escapes
18693 * bar <span><nowiki>[[foo]]</nowiki></span>
18695 *=bar <span><nowiki>[[foo]]</nowiki></span>
18697 *[[bar <span><nowiki>[[foo]]</nowiki></span>
18699 *]]bar <span><nowiki>[[foo]]</nowiki></span>
18701 *=bar <span>foo]]</span>=
18705 <ul><li> bar <span>[[foo]]</span></li></ul>
18706 <ul><li>=bar <span>[[foo]]</span></li></ul>
18707 <ul><li>[[bar <span>[[foo]]</span></li></ul>
18708 <ul><li>]]bar <span>[[foo]]</span></li></ul>
18709 <ul><li>=bar <span>foo]]</span>=</li></ul>
18710 <ul><li> <s></s>: a</li></ul>
18715 Lists: 6. Escape bullets in SOL position
18719 <!--cmt--><nowiki>*foo</nowiki>
18721 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
18725 Lists: 7. Escape bullets in a multi-line context
18728 <nowiki>*</nowiki>b
18735 #### --------------- HRs ---------------
18736 #### 1. Single line
18737 #### -----------------------------------
18740 HRs: 1. Single line
18744 ----<nowiki>----</nowiki>
18748 <hr><span typeof="mw:Nowiki">----</span>
18753 #### --------------- Tables ---------------
18754 #### 1a. Simple example
18755 #### 1b. No escaping needed (!foo)
18756 #### 1c. No escaping needed (|foo)
18757 #### 1d. No escaping needed (|}foo)
18759 #### 2a. Nested in td (<td>foo|bar</td>)
18760 #### 2b. Nested in td (<td>foo||bar</td>)
18761 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
18763 #### 3a. Nested in th (<th>foo!bar</th>)
18764 #### 3b. Nested in th (<th>foo!!bar</th>)
18765 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
18769 #### 4c. No escaping needed
18770 #### --------------------------------------
18773 Tables: 1a. Simple example
18784 Tables: 1b. No escaping needed
18793 Tables: 1c. No escaping needed
18802 Tables: 1d. No escaping needed
18811 Tables: 2a. Nested in td
18816 |<nowiki>foo|bar</nowiki>
18818 |x<div><nowiki>a|b</nowiki></div>
18822 <td>foo|bar</td></tr>
18823 <tr><td>x<div>a|b</div></td>
18828 Tables: 2b. Nested in td
18833 |<nowiki>foo||bar</nowiki>
18834 |''it''<nowiki>foo||bar</nowiki>
18838 <td><span typeof="mw:Nowiki">foo||bar</span></td>
18839 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
18843 Tables: 2c. Nested in td -- no escaping needed
18851 <table><tbody><tr><td>foo!!bar
18852 </td></tr></tbody></table>
18857 Tables: 3a. Nested in th
18865 <table><tbody><tr><th>foo!bar
18866 </th></tr></tbody></table>
18871 Tables: 3b. Nested in th
18876 !<nowiki>foo!!bar</nowiki>
18880 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
18885 Tables: 3c. Nested in th -- no escaping needed
18890 !<nowiki>foo||bar</nowiki>
18894 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
18898 Tables: 4a. Escape -
18905 |<nowiki>-bar</nowiki>
18909 <tr><th>-bar</th></tr>
18911 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
18915 Tables: 4b. Escape +
18922 |<nowiki>+bar</nowiki>
18926 <tr><th>+bar</th></tr>
18928 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
18932 Tables: 4c. No escaping needed
18953 <tr><td>foo-bar</td><td>foo+bar</td></tr>
18954 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
18960 <div>a|b</div></td>
18965 Tables: 4d. No escaping needed
18976 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo">Foo</a>-bar</td>
18977 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
18978 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
18983 Tables: Digest broken attributes on table and tr tag
18999 #### --------------- Links ----------------
19000 #### 1. Quote marks in link text
19001 #### 2. Wikilinks: Escapes needed
19002 #### 3. Wikilinks: No escapes needed
19003 #### 4. Extlinks: Escapes needed
19004 #### 5. Extlinks: No escapes needed
19005 #### --------------------------------------
19007 Links 1. Quote marks in link text
19011 [[Foo|Foo<nowiki>''boo''</nowiki>]]
19013 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
19017 Links 2. WikiLinks: Escapes needed
19022 [[Foo|<nowiki>Foobar]</nowiki>]]
19023 [[Foo|x [Foobar] x]]
19024 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
19025 [[Foo|<nowiki>[[Bar]]</nowiki>]]
19026 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
19027 [[Foo|<nowiki>|Bar</nowiki>]]
19028 [[Foo|<nowiki>]]bar</nowiki>]]
19029 [[Foo|<nowiki>[[bar</nowiki>]]
19030 [[Foo|<nowiki>x [[ y</nowiki>]]
19031 [[Foo|<nowiki>x ]] y</nowiki>]]
19032 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
19034 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
19035 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
19036 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
19037 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
19038 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
19039 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
19040 <a href="Foo" rel="mw:WikiLink">|Bar</a>
19041 <a href="Foo" rel="mw:WikiLink">]]bar</a>
19042 <a href="Foo" rel="mw:WikiLink">[[bar</a>
19043 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
19044 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
19045 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
19049 Links 3. WikiLinks: No escapes needed
19056 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
19057 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
19061 Links 4. ExtLinks: Escapes needed
19065 [http://google.com <nowiki>[google]</nowiki>]
19066 [http://google.com <nowiki>google]</nowiki>]
19068 <nowiki>[http://google.com]</nowiki>
19070 <nowiki>[http://google.com google]</nowiki>
19073 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
19074 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
19075 <p>[http://google.com]</p>
19076 <p>[http://google.com google]</p>
19080 Links 5. ExtLinks: No escapes needed
19084 [http://google.com [google]
19086 <a href="http://google.com" rel="mw:ExtLink">[google</a>
19090 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
19092 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
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" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
19101 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
19102 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
19103 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
19104 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
19107 x<nowiki/>http://example.com<nowiki/>y
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<nowiki/>;x
19116 http://example.com<nowiki/>!x
19117 http://example.com<nowiki/>=x
19118 http://example.com<nowiki/>(x)
19119 http://example.com(x<nowiki/>)
19123 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19126 <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>"
19129 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
19130 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
19131 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
19132 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
19138 "http://example.com"
19139 (http://example.com)
19140 (http://example.com) foo
19141 http://example.com,
19142 http://example.com, foo
19145 ## Parsoid currently fails wt2html on this one!
19147 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
19149 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
19151 http://example.com.,;:!?
19155 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
19157 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
19163 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
19165 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19166 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
19167 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
19168 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
19178 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
19180 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
19186 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
19188 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19189 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
19190 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
19191 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
19201 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
19203 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
19204 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
19205 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
19208 ISBN 1234567890<nowiki/>1
19209 ISBN 1234567890<nowiki/>x
19210 ISBN 1234567890<nowiki/>b
19214 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
19216 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
19221 #### --------------- Quotes ---------------
19222 #### 1. Quotes inside <b> and <i>
19223 #### 2. Link fragments separated by <i> and <b> tags
19224 #### 3. Link fragments inside <i> and <b>
19225 #### 4. No escaping needed
19226 #### --------------------------------------
19228 1. Quotes inside <b> and <i>
19230 parsoid=html2wt,wt2wt
19232 ''<nowiki>'foo'</nowiki>''
19233 ''<nowiki>''foo''</nowiki>''
19234 ''<nowiki>'''foo'''</nowiki>''
19236 '''<nowiki>'foo'</nowiki>'''
19237 '''<nowiki>''foo''</nowiki>'''
19238 '''<nowiki>'''foo'''</nowiki>'''
19239 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
19240 '''foo'''<nowiki/>'s
19243 '<nowiki/>''foo''<nowiki/>'
19245 '''foo'''<nowiki/>'
19246 '<nowiki/>'''foo'''<nowiki/>'
19247 ''fools'<span> errand</span>''
19248 ''<span>fool</span>'s errand''
19257 <b>foo'<i>bar'</i>baz</b>
19265 <i>fools'<span> errand</span></i>
19266 <i><span>fool</span>'s errand</i>
19270 2. Link fragments separated by <i> and <b> tags
19272 [[''foo''<nowiki>hello]]</nowiki>
19274 [['''foo'''<nowiki>hello]]</nowiki>
19276 <p>[[<i>foo</i>hello]]
19277 </p><p>[[<b>foo</b>hello]]
19282 3. Link fragments inside <i> and <b>
19283 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
19284 this is one of the shortcomings of this format)
19286 ''[[foo''<nowiki>]]</nowiki>
19288 '''[[foo'''<nowiki>]]</nowiki>
19291 </p><p><b>[[foo</b>]]
19296 4. No escaping needed
19298 '<span>''bar''</span>'
19299 '<span>'''bar'''</span>'
19301 <p>'<span><i>bar</i></span>'
19302 '<span><b>bar</b></span>'
19306 #### ----------- Paragraphs ---------------
19307 #### 1. No unnecessary escapes
19308 #### --------------------------------------
19311 1. No unnecessary escapes
19313 bar <span><nowiki>[[foo]]</nowiki></span>
19315 =bar <span><nowiki>[[foo]]</nowiki></span>
19317 [[bar <span><nowiki>[[foo]]</nowiki></span>
19319 ]]bar <span><nowiki>[[foo]]</nowiki></span>
19321 =bar <span>foo]]</span><nowiki>=</nowiki>
19323 <p>bar <span>[[foo]]</span>
19324 </p><p>=bar <span>[[foo]]</span>
19325 </p><p>[[bar <span>[[foo]]</span>
19326 </p><p>]]bar <span>[[foo]]</span>
19327 </p><p>=bar <span>foo]]</span>=
19331 #### ----------------------- PRE --------------------------
19332 #### 1. Leading whitespace in SOL context should be escaped
19333 #### ------------------------------------------------------
19335 1. Leading whitespace in SOL context should be escaped
19339 <nowiki> </nowiki>a
19341 <nowiki> </nowiki> a
19343 <nowiki> </nowiki>a(tab)
19345 <nowiki> </nowiki> a
19347 <nowiki> </nowiki> a
19350 <nowiki> </nowiki>b
19353 <nowiki> </nowiki>b
19356 <nowiki> </nowiki> b
19362 <p><!--cmt--> a</p>
19371 #### --------------- Behavior Switches --------------------
19373 1. Valid behavior switches should be escaped
19377 <nowiki>__TOC__</nowiki>
19383 2. Invalid behavior switches should not be escaped
19394 #### --------------- HTML tags ---------------
19397 #### 3. multi-line html tag
19398 #### 4. extension tags
19399 #### -----------------------------------------
19405 <a href="http://google.com">google</a>
19407 <a href="http://google.com">google</a>
19413 <nowiki><div>foo</div>
19414 <div style="color:red">foo</div></nowiki>
19416 <p><div>foo</div>
19417 <div style="color:red">foo</div>
19422 3. multi-line html tag
19437 <nowiki><ref>foo</ref></nowiki>
19439 <nowiki><ref>bar</nowiki>
19441 baz<nowiki></ref></nowiki>
19443 <p><ref>foo</ref>
19444 </p><p><ref>bar
19445 </p><p>baz</ref>
19449 #### --------------- Others ---------------
19453 <nowiki>foo</nowiki>
19455 <p><nowiki>foo</nowiki>
19459 ## The quote-char in the input is necessary for triggering the bug
19461 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
19463 parsoid=wt2wt,html2wt
19472 Tag-like HTML structures are passed through as text
19494 </p><p>1<d e>f
19499 # This was a bug in the PHP parser (see bug 17663 and its dups,
19500 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
19502 Tag names followed by punctuation should not be recognized as tags
19506 <p><s.ome> text
19511 HTML tag with necessary entities in attributes
19513 <span title="&amp;">foo</span>
19515 <p><span title="&amp;">foo</span>
19520 HTML tag with 'unnecessary' entity encoding in attributes
19522 <span title="&">foo</span>
19524 <p><span title="&">foo</span>
19529 HTML tag with broken attribute value quoting
19531 <span title="Hello world>Foo</span>
19533 <p><span>Foo</span>
19538 Parsoid-only: HTML tag with broken attribute value quoting
19542 <span title="Hello world>Foo</span>
19544 <p><span title="Hello world">Foo</span>
19549 Table with broken attribute value quoting
19552 | title="Hello world|Foo
19563 Table with broken attribute value quoting on consecutive lines
19566 | title="Hello world|Foo
19567 | style="color:red|Bar
19580 Parsoid-only: Table with broken attribute value quoting on consecutive lines
19585 | title="Hello world|Foo
19586 | style="color:red|Bar
19591 <td title="Hello world">Foo
19592 </td><td style="color: red">Bar
19593 </td></tr></tbody></table>
19598 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19608 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
19618 Accept empty td cell attribute
19621 | align="center" | foo || |
19626 <td align="center"> foo </td>
19633 Non-empty attributes in th-cells
19636 ! Foo !! style="color: red" | Bar
19642 <th style="color: red"> Bar
19648 Accept empty attributes in th-cells
19663 Empty table rows go away
19684 ### Parsoid-centric tests for testing RTing of inter-element separators
19685 ### Edge cases not tested by existing parser tests and specific to
19686 ### Parsoid-specific serialization strategies.
19690 RT-ed inter-element separators should be valid separators
19703 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
19704 (Parsoid-only since PHP parser relies on Tidy for correct output)
19720 Empty TD followed by TD with tpl-generated attribute
19725 |{{echo|style='color:red'}}|foo
19739 Indented table with an empty td
19758 Indented block & table
19765 <div data-parsoid='{"stx":"html"}'>foo</div>
19767 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
19772 Empty TR followed by a template-generated TR
19773 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
19779 {{echo|<tr><td>foo</td></tr>}}
19785 <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}}]}'>
19790 ## PHP and parsoid output differ for this, and since this is primarily
19791 ## for testing Parsoid's serializer, marking this Parsoid only
19793 Empty TR followed by mixed-ws-comment line should RT correctly
19809 <!--c--> </tr><!--d-->
19815 Multi-line image caption generated by templates with/without trailing newlines
19819 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
19820 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
19822 <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>
19823 <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>
19828 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
19832 <includeonly>foo</includeonly>
19839 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
19841 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
19844 ## PHP emits broken html for this, and since this is primarily
19845 ## a Parsoid serializer test, marking this Parsoid only
19847 Improperly nested inline or quotes tags with whitespace in between
19851 <span> <s>x</span> </s>
19854 <p><span> <s>x</s></span><s> </s>
19855 <b> <i>x</i></b><i> </i>
19860 Encapsulate protected attributes from wt
19864 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
19866 <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>
19870 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
19871 ## Having nested or stray pre tags results in the attempt to add duplicates,
19872 ## causing an assertion fail. This test tries to prevent that situation.
19874 Ensure ParagraphWrapper can deal with stray closing pre tags
19884 1. Ensure fostered text content is wrapped in spans
19888 <table>hi</table><table>ho</table>
19897 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
19899 parsoid=wt2html,wt2wt
19906 <span> || ||</span>
19915 Encapsulation properly handles null DSR information from foster box
19917 parsoid=wt2html,wt2wt
19919 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
19921 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
19924 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
19928 <td>bar</td></tr></tbody></table>
19932 1. Encapsulate foster-parented transclusion content
19934 parsoid=wt2wt,wt2html
19936 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
19938 <span typeof="mw:Transclusion" data-mw="{"parts":["
19939 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
19941 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
19945 <td>bar</td></tr></tbody></table>
19949 2. Encapsulate foster-parented transclusion content
19951 parsoid=wt2wt,wt2html
19953 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
19955 <div typeof="mw:Transclusion" data-mw="{"parts":["
19957 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
19959 <td>bar</td></tr></table>"]}">foo</div>
19963 <td>bar</td></tr></tbody></table>
19967 3. Encapsulate foster-parented transclusion content
19969 parsoid=wt2wt,wt2html
19971 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
19973 <div typeof="mw:Transclusion" data-mw="{"parts":["
19976 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
19978 <td>"}},"i":0}},"bar</td></tr></table>"]}">
19983 <td>bar</td></tr></tbody></table>
19987 4. Encapsulate foster-parented transclusion content
19989 parsoid=wt2wt,wt2html
19991 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
19993 <div typeof="mw:Transclusion" data-mw="{"parts":["
19996 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
19998 <td>"}},"i":0}},"bar</td></tr></table>"]}">
20003 <td>bar</td></tr></tbody></table>
20007 5. Encapsulate foster-parented transclusion content
20009 parsoid=wt2wt,wt2html
20011 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
20013 <span typeof="mw:Transclusion" data-mw="{"parts":["
20018 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
20024 <p>foo</p></div></td></tr></tbody></table>
20028 6. Encapsulate foster-parented transclusion content
20030 parsoid=wt2wt,wt2html
20032 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
20034 <span typeof="mw:Transclusion" data-mw="{"parts":["
20039 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
20045 <p>foo</p></div></td></tr></tbody></table>
20050 7. Encapsulate foster-parented transclusion content
20052 parsoid=wt2wt,wt2html
20054 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
20056 <p typeof="mw:Transclusion" data-mw="{"parts":["
20057 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
20058 <p>foo</p>"}},"i":0}},"
20059 <td>bar</td></table>"]}">foo</p>
20063 <td>bar</td></tr></tbody></table>
20067 8. Encapsulate foster-parented transclusion content
20069 parsoid=wt2wt,wt2html
20072 }}{|{{echo|style='color:red'}}
20077 <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>
20081 <td>b</td></tr></tbody></table>
20085 9. Encapsulate foster-parented transclusion content
20087 parsoid=wt2wt,wt2html
20089 <table>{{echo|hi</table>hello}}
20091 <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>
20092 <table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2" data-parsoid="{}">hello</span>
20096 Table in fosterable position
20098 parsoid=wt2html,wt2wt
20107 <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="{}">
20109 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
20115 # Parsoid only for bug 64747
20117 Properly encapsulate empty-content transclusions in fosterable positions
20125 <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>"}'>
20131 Support <object> element with .data attribute
20135 <object data="test.swf"></object>
20137 <object data="test.swf"></object>
20140 # -----------------------------------------------------------------
20141 # The following section of tests are primarily to spec requirements
20142 # around serialization of new/edited content.
20144 # All these tests are marked Parsoid html2wt and html2html only
20145 # ----------------------------------------------------------------
20148 Image: Modifying size of an image (1)
20151 "modes": ["wt2wt"],
20153 ["img[height]", "attr", "height", "22"],
20154 ["img[width]", "attr", "width", "200"]
20158 [[Image:Foobar.jpg|230x230px]]
20160 [[Image:Foobar.jpg|200x200px]]
20164 Image: Modifying size of an image (2)
20167 "modes": ["wt2wt"],
20169 ["img[height]", "attr", "height", "100"],
20170 ["img[width]", "attr", "width", "500"]
20174 [[Image:Foobar.jpg|230x230px]]
20176 [[Image:Foobar.jpg|500x500px]]
20179 # Change in size is ignored so long as class='mw-default-size'
20181 Image: Modifying size of an image (3)
20184 "modes": ["wt2wt"],
20186 ["figure[class]", "removeClass", "mw-default-size"],
20187 ["figure img", "attr", "height", "19"],
20188 ["figure img", "attr", "width", "170"]
20192 [[Image:Foobar.jpg|thumb]]
20194 [[Image:Foobar.jpg|thumb|170x170px]]
20198 Image: Modifying alignment of an image (bug 48665)
20201 "modes": ["wt2wt"],
20203 ["figure[class]", "removeClass", "mw-halign-right"],
20204 ["figure[class]", "addClass", "mw-halign-left"]
20208 [[Image:Foobar.jpg|thumb|caption|right]]
20210 [[Image:Foobar.jpg|thumb|caption|left]]
20214 Image: Modifying mw-default-size of an frameless image (bug 62805)
20217 "modes": ["wt2wt"],
20219 ["figure.mw-default-size", "removeClass", "mw-default-size"]
20223 [[Image:Foobar.jpg|frameless|right]]
20225 [[Image:Foobar.jpg|frameless|right|220x220px]]
20229 Image: Modifying valign of an image (bug 49221)
20232 "modes": ["wt2wt"],
20234 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
20235 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
20239 [[File:Foobar.jpg|20px|middle]]
20241 [[File:Foobar.jpg|20px|text-top]]
20245 Image: Modifying alt attribute of an image (bug 56400)
20248 "modes": ["wt2wt"],
20250 ["img[alt]", "attr", "alt", "some alternate edited text"]
20254 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
20256 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
20260 Image: Modifying caption of an image
20263 "modes": ["wt2wt"],
20265 ["figcaption", "text", "new caption"]
20269 [[Image:Foobar.jpg|thumb|original caption]]
20271 [[Image:Foobar.jpg|thumb|new caption]]
20275 Image: empty alt attribute (bug 48924)
20279 [[File:Foobar.jpg|thumb|alt=|bar]]
20281 <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>
20285 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
20290 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
20292 #<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>
20296 Image: Block level image should have \n before and after
20301 [[File:Foobar.jpg|right|thumb|150x150px]]
20304 <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>
20308 Image: New block level image should have \n before and after (existing
20314 [[File:Foobar.jpg|right|thumb|150x150px]]
20317 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
20318 <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>
20319 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
20323 Image: upright option (parsoid)
20327 [[File:Foobar.jpg|thumb|upright|caption]]
20328 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
20329 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
20331 <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>
20335 Image: upright option is ignored on inline and frame images (parsoid)
20339 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
20341 <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>
20345 Image: from basic HTML (1)
20349 <span typeof="mw:Image">
20350 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20353 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20357 Image: from basic HTML (2)
20361 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
20363 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
20367 Image: from basic HTML (3)
20371 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
20373 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
20377 Image: from basic HTML (4)
20381 <img src="File:Foobar.jpg">
20383 [[File:Foobar.jpg|link=]]
20387 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
20394 <li><p>foo</p></li>
20399 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
20405 <ul> <li>foo</li></ul>
20409 Don't strip leading whitespace when handling indent-pre suppressing tags
20417 '''This is very bold of you!'''
20421 indented cell (no pre-wrapping!)
20428 <tr><td> indented row</td></tr>
20431 <b>This is very bold of you!</b>
20434 indented cell (no pre-wrapping!)
20442 Strip leading whitespace when handling indent-pre inducing tags
20474 Lists: Add space after bullets
20480 * <span> baz</span>
20485 <li><span> baz</span></li>
20490 Lists: Dont insert newlines in a serialized list item.
20497 <ul><li>a<br>b</li><li>c</li></ul>
20501 Headings: Add space before/after == (Bug 51744)
20511 == <span> baz</span> ==
20516 <h2><span> baz</span></h2>
20520 Parsoid: Serialize positional parameters with = in them as named parameter
20526 {{echo|1 = f=oo|2 = bar}}
20528 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20529 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20530 {{echo|<nowiki>f=oo</nowiki>|bar}}
20532 <p about="#mwt1" typeof="mw:Transclusion"
20533 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
20535 <p about="#mwt1" typeof="mw:Transclusion"
20536 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
20538 <!--Orig params with data-parsoid has heuristics for handling = chars-->
20539 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
20540 <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>
20544 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
20560 <div>a<p>b</p></div>
20569 Substrings resembling wikitext in hrefs should not get nowiki escapes
20575 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
20578 #-----------------------------
20579 # I/B quote minimization tests
20580 #-----------------------------
20583 1. I/B quote minimization: wikitext-only tags should be combined
20603 <p><i>A</i><i>B</i></p>
20604 <p><b>A</b><b>B</b></p>
20605 <p><i>A</i><b><i>B</i></b></p>
20606 <p><b>A</b><i><b>B</b></i></p>
20607 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
20608 <p><i><b>A</b></i><i><b>B</b></i></p>
20609 <p><i><b>A</b></i><b><i>B</i></b></p>
20610 <p><b><i>A</i></b><i><b>B</b></i></p>
20614 2. I/B quote minimization: wikitext and html tags should not be combined
20620 ''A'''''<i>B</i>'''
20622 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
20623 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
20627 3. I/B quote minimization: templated content stops minimization
20631 ''A''{{echo|''B''}}
20633 ''A''{{echo|'''''B'''''}}
20635 <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>
20636 <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>
20640 4. I/B quote minimization: new content should be mimimized with adjacent old content
20650 <p><i>A</i><i data-parsoid='{}'>B</i></p>
20651 <p><b data-parsoid='{}'>A</b><b>B</b></p>
20652 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
20655 #------------------------------------
20656 # End of I/B quote minimization tests
20657 #------------------------------------
20660 Bug 54262: New entities
20666 <span typeof="mw:Entity"> </span>
20669 ## Note that there is no wikitext output for 'unknownproperty' ##
20670 ## Unknown magic words are silently dropped ##
20685 __NOCONTENTCONVERT__
20687 <meta property='mw:PageProp/toc' />
20688 <meta property='mw:PageProp/notoc' />
20689 <meta property='mw:PageProp/forcetoc' />
20690 <meta property='mw:PageProp/index' />
20691 <meta property='mw:PageProp/noindex' />
20692 <meta property='mw:PageProp/nogallery' />
20693 <meta property='mw:PageProp/noeditsection' />
20694 <meta property='mw:PageProp/notitleconvert' />
20695 <meta property='mw:PageProp/nocontentconvert' />
20696 <meta property='mw:PageProp/unknownproperty' />
20700 Consecutive <pre>s should not get merged
20702 parsoid=html2wt,html2html
20718 <pre>a</pre><pre>b</pre>
20732 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
20736 [[Special:BookSources/1234567890|ISBN 1234567895]]
20738 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
20742 Edited RFC links not serializable as RFC links should serialize as extlinks
20746 [//tools.ietf.org/html/rfc123 New RFC]
20748 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
20752 Edited PMID links not serializable as PMID links should serialize as extlinks
20756 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
20758 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
20762 Edited Redirect link should emit a non-piped wikitext link
20768 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
20771 # -----------------------------------------------------------------
20772 # End of section for Parsoid-only html2wt tests for serialization
20774 # -----------------------------------------------------------------
20781 Try for 100% code coverage