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.
73 MediaWiki:bad image list
75 * [[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>
181 Template:EmptyTRWithHTMLAttrTest
184 <tr align="center"></tr>
185 <tr><td>foo</td></tr>
186 <tr align="center"></tr>
187 <tr><td>bar</td></tr>
204 This is a simple paragraph.
206 <p>This is a simple paragraph.
211 Paragraphs with extra newline spacing
234 Paragraphs with newline spacing with comment lines in between
242 <!--foo--><!--More than 1 comment, still stripped-->
246 <!--foo--> <!----> <!-- bar -->
307 Paragraphs with newline spacing with non-empty white-space lines in between
334 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
342 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
381 Extra newlines: More paragraphs with indented comment
396 Extra newlines followed by heading
411 <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>
412 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
415 <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>
420 Extra newlines between heading and content are swallowed
428 <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>
429 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
436 http://fr.wikipedia.org/wiki/🍺
437 <!-- EasterEgg we love beer, better be able be able to link to it -->
439 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
443 # Note that the html+tidy output removes the spaces after the <li>,
444 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
445 # This is an issue for all tests with lists. We intentionally do
446 # *not* add html+tidy clauses for these, as we don't want to
447 # document/test the broken behavior. (Parsoid matches the non-tidy
448 # output in these cases.)
457 <li> Item 2</li></ul>
465 * plain''italic''plain
466 * plain''italic''plain''italic''plain
467 * plain'''bold'''plain
468 * plain'''bold'''plain'''bold'''plain
469 * plain''italic''plain'''bold'''plain
470 * plain'''bold'''plain''italic''plain
471 * plain''italic'''bold-italic'''italic''plain
472 * plain'''bold''bold-italic''bold'''plain
473 * plain'''''bold-italic'''italic''plain
474 * plain'''''bold-italic''bold'''plain
475 * plain''italic'''bold-italic'''''plain
476 * plain'''bold''bold-italic'''''plain
477 * plain l'''italic''plain
478 * plain l''''bold''' plain
481 <li> plain<i>italic</i>plain</li>
482 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
483 <li> plain<b>bold</b>plain</li>
484 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
485 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
486 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
487 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
488 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
489 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
490 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
491 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
492 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
493 <li> plain l'<i>italic</i>plain</li>
494 <li> plain l'<b>bold</b> plain</li></ul>
498 # this example taken from the [[simple:Moon]] article (bug 47326)
500 Italics and possessives (1)
502 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
504 <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
508 # this example taken from [[en:Flaming Pie]] (bug 49926)
510 Italics and possessives (2)
512 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
514 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
518 # this example taken from [[en:Dictionary]] (bug 49926)
520 Italics and possessives (3)
522 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''.
524 <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>.
530 ### 2-quote opening sequence tests
533 Italics and bold: 2-quote opening sequence: (2,2)
543 Italics and bold: 2-quote opening sequence: (2,3)
554 # same html as previous, but wikitext adjusted to match parsoid html2wt
556 Italics and bold: 2-quote opening sequence: (2,3) w/ nowiki
558 ''<nowiki>foo'</nowiki>''
566 Italics and bold: 2-quote opening sequence: (2,4)
577 # same html as previous, but wikitext adjusted to match parsoid html2wt
579 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
581 ''<nowiki>foo''</nowiki>''
588 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
590 Italics and bold: 2-quote opening sequence: (2,5)
603 # same html as previous, but wikitext adjusted to match parsoid html2wt
605 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
607 ''foo'''''<nowiki/>'''
618 ### 3-quote opening sequence tests
622 Italics and bold: 3-quote opening sequence: (3,2)
632 Italics and bold: 3-quote opening sequence: (3,3)
642 Italics and bold: 3-quote opening sequence: (3,4)
653 # same html as previous, but wikitext adjusted to match parsoid html2wt
655 Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki
657 '''<nowiki>foo'</nowiki>'''
664 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
666 Italics and bold: 3-quote opening sequence: (3,5)
679 # same html as previous, but wikitext adjusted to match parsoid html2wt
681 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
683 '''foo'''''<nowiki/>''
694 ### 4-quote opening sequence tests
698 Italics and bold: 4-quote opening sequence: (4,2)
709 # same html as previous, but wikitext adjusted to match parsoid html2wt
711 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
713 <nowiki>''</nowiki>''foo''
721 Italics and bold: 4-quote opening sequence: (4,3)
731 Italics and bold: 4-quote opening sequence: (4,4)
742 # same html as previous, but wikitext adjusted to match parsoid html2wt
744 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
746 ''''<nowiki>foo'</nowiki>'''
753 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
755 Italics and bold: 4-quote opening sequence: (4,5)
764 <p>'<b>foo</b><i></i>
768 # same html as previous, but wikitext adjusted to match parsoid html2wt
770 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
772 ''''foo'''''<nowiki/>''
777 <p>'<b>foo</b><i></i>
783 ### 5-quote opening sequence tests
787 Italics and bold: 5-quote opening sequence: (5,2)
798 # same html as previous, but wikitext adjusted to match parsoid html2wt
799 # skipping wt2html and html2html because it wants to put <i> before <b>
801 Italics and bold: 5-quote opening sequence: (5,2+3)
803 parsoid=wt2wt,html2wt
812 Italics and bold: 5-quote opening sequence: (5,3)
823 # same html as previous, but wikitext adjusted to match parsoid html2wt
825 Italics and bold: 5-quote opening sequence: (5,3+2)
835 Italics and bold: 5-quote opening sequence: (5,4)
841 <p><i><b>foo'</b></i>
846 # same html as previous, but wikitext adjusted to match parsoid html2wt
848 Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki
850 '''''<nowiki>foo'</nowiki>'''''
852 <p><i><b>foo'</b></i>
858 Italics and bold: 5-quote opening sequence: (5,5)
867 ### multiple quote sequences in a line
870 Italics and bold: multiple quote sequences: (2,4,2)
876 <p><i>foo'<b>bar</b></i>
881 # same html as previous, but wikitext adjusted to match parsoid html2wt
883 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
885 ''<nowiki>foo'</nowiki>'''bar'''''
887 <p><i>foo'<b>bar</b></i>
893 Italics and bold: multiple quote sequences: (2,4,3)
899 <p><i>foo'<b>bar</b></i>
904 # same html as previous, but wikitext adjusted to match parsoid html2wt
906 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
908 ''<nowiki>foo'</nowiki>'''bar'''''
910 <p><i>foo'<b>bar</b></i>
916 Italics and bold: multiple quote sequences: (2,4,4)
922 <p><i>foo'<b>bar'</b></i>
927 # same html as previous, but wikitext adjusted to match parsoid html2wt
929 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
931 ''<nowiki>foo'</nowiki>'''<nowiki>bar'</nowiki>'''''
933 <p><i>foo'<b>bar'</b></i>
938 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
940 Italics and bold: multiple quote sequences: (3,4,2)
949 <p><b>foo'</b>bar<i></i>
953 # same html as previous, but wikitext adjusted to match parsoid html2wt
955 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
959 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
964 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
969 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
971 Italics and bold: multiple quote sequences: (3,4,3)
980 <p><b>foo'</b>bar<b></b>
984 # same html as previous, but wikitext adjusted to match parsoid html2wt
986 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
988 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
993 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
998 ### other quote tests
1001 Italics and bold: other quote tests: (2,3,5)
1003 ''this is about '''foo's family'''''
1005 <p><i>this is about <b>foo's family</b></i>
1011 Italics and bold: other quote tests: (2,(3,3),2)
1013 ''this is about '''foo's''' family''
1015 <p><i>this is about <b>foo's</b> family</i>
1021 Italics and bold: other quote tests: (3,2,3,2)
1025 '''this is about ''foo'''s family''
1027 <p><b>this is about <i>foo</i></b><i>s family</i>
1032 # same html as previous, but wikitext adjusted to match parsoid html2wt
1033 # add 'parsoid' option to use 'parsoid' normalization of the placeholder
1035 Italics and bold: other quote tests: (3,2,3+2+2,2)
1039 '''this is about ''foo'''''<nowiki/>''s family''
1041 <p><b>this is about <i>foo</i></b><i>s family</i>
1047 Italics and bold: other quote tests: (3,2,3,3)
1050 '''this is about ''foo'''s family'''
1052 <p>'<i>this is about </i>foo<b>s family</b>
1058 Italics and bold: other quote tests: (3,(2,2),3)
1060 '''this is about ''foo's'' family'''
1062 <p><b>this is about <i>foo's</i> family</b>
1068 Italicized possessive
1070 The ''[[Main Page]]'''s talk page.
1072 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1077 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1078 (Requires tidy for PHP parser output to be fixed up)
1080 parsoid=wt2html,wt2wt
1097 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1098 <td><i>a</i></td><td><i>b</i></td></tr>
1107 Non-html5 tags should be accepted
1109 <center>''foo''</center>
1111 <font>''foo''</font>
1112 <strike>''foo''</strike>
1115 <center><i>foo</i></center>
1116 <p><big><i>foo</i></big>
1117 <font><i>foo</i></font>
1118 <strike><i>foo</i></strike>
1124 <wbr> is valid wikitext (bug 52468)
1132 # <strike> is HTML4, <s> is HTML4/5.
1134 <s> or <strike> for strikethrough
1136 <strike>strike</strike>
1140 <p><strike>strike</strike>
1148 Text-level semantic html elements in wikitext
1151 <strong>text</strong>
1167 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1174 <strong>text</strong>
1190 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1198 # test cases taken from
1199 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1201 Ruby markup (W3C-style)
1203 ; Mono-ruby for individual base characters
1204 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1206 : <ruby>今日<rt>きょう</rt></ruby>
1208 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1210 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1212 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1214 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1215 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1216 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1219 <dl><dt> Mono-ruby for individual base characters</dt>
1220 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1221 <dt> Group ruby</dt>
1222 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1223 <dt> Jukugo ruby</dt>
1224 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1225 <dt> Inline ruby</dt>
1226 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1227 <dt> Double-sided ruby</dt>
1228 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1230 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1231 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1232 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1237 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1239 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1241 <b→> doesn't work! </b→>
1243 <bä> doesn't work! </bä>
1245 <boo> works fine </boo>
1247 <s.foo>s.foo</s.foo>
1251 <p><b→> doesn't work! </b→>
1252 </p><p><bä> doesn't work! </bä>
1253 </p><p><boo> works fine </boo>
1254 </p><p><s.foo>s.foo</s.foo>
1255 </p><p><sub-ID#1>
1260 Isolated close tags should be treated as literal text (bug 52760)
1267 </p><p><s.foo>s</s>
1272 ### Special characters
1276 Bare pipe character (bug 52363)
1285 Bare pipe character from a template (bug 52363)
1294 ### <nowiki> test cases
1298 <nowiki> unordered list
1300 <nowiki>* This is not an unordered list item.</nowiki>
1302 <p>* This is not an unordered list item.
1309 <nowiki>Lorem ipsum dolor
1317 <p>Lorem ipsum dolor
1330 :There is not nowiki.
1331 :There is <nowiki>nowiki</nowiki>.
1333 #There is not nowiki.
1334 #There is <nowiki>nowiki</nowiki>.
1336 *There is not nowiki.
1337 *There is <nowiki>nowiki</nowiki>.
1339 <dl><dd>There is not nowiki.</dd>
1340 <dd>There is nowiki.</dd></dl>
1341 <ol><li>There is not nowiki.</li>
1342 <li>There is nowiki.</li></ol>
1343 <ul><li>There is not nowiki.</li>
1344 <li>There is nowiki.</li></ul>
1349 Entities inside <nowiki>
1351 <nowiki><</nowiki>
1358 Entities inside template parameters
1364 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1368 Properly escape nowiki when combined with other wiki markup
1372 <nowiki>* </nowiki></nowiki> tag
1374 <p>* </nowiki> tag</p>
1381 Comments and Indent-Pre
1383 <!-- comment 1 --> asdf
1385 <!-- comment 1 --> asdf
1388 <!-- comment 1 --> asdf
1389 <!-- comment 2 -->xyz
1391 <!-- comment 1 --> asdf
1392 <!-- comment 2 --> xyz
1448 asdf<!-- comment 1 -->jkl
1458 <!-- foo --> b <!-- bar -->
1472 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1478 Comment semantics and delimiters
1480 <!-- --><!----><!-----><!------>
1486 Comment semantics and delimiters, redux
1488 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1489 -- foo -- funky huh? ... -->
1495 Comment semantics and delimiters: directors cut
1497 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1498 everything starting with < followed by !-- until the first -- and > we see,
1499 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1507 Comment semantics: nesting
1509 <!--<!-- no, we're not going to do anything fancy here -->-->
1516 Comment semantics: unclosed comment at end
1518 <!--This comment will run out to the end of the document
1523 # Bug 58184: document parsoid's behaviour
1525 Suppress comment closing tag in lenient browsers
1527 parsoid=wt2html,html2html
1529 <!-- Browsers--!> think this is closed -->
1533 <!-- Browsers--¡> think this is closed -->
1537 Comment in template title
1546 Comment on its own line post-expand
1558 Comment on its own line post-expand with non-significant whitespace
1570 Multiple comments should still parse as SOL-transparent
1572 parsoid=wt2html,wt2wt
1575 <!--c2--><!--c3--><!--c4-->*b
1586 ### paragraph wrapping tests
1601 Block tag on one line (<div>)
1617 Block tag on one line (<blockquote>)
1619 a <blockquote>foo</blockquote>
1623 a <blockquote>foo</blockquote>
1635 Block tag on both lines (<div>)
1652 Block tag on both lines (<blockquote>)
1654 a <blockquote>foo</blockquote>
1656 b <blockquote>foo</blockquote>
1658 a <blockquote>foo</blockquote>
1659 b <blockquote>foo</blockquote>
1673 Multiple lines without block tags
1697 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1698 # So, we have a separate section for Parsoid. We don't want
1699 # to mimic this stripping behavior in Parsoid. It affects
1700 # editing experience and also requires us to maintain additional
1703 Empty lines between lines with block tags
1741 <div data-parsoid='{"stx":"html"}'></div>
1744 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1747 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1749 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1752 <div data-parsoid='{"stx":"html"}'>e</div>
1755 ## PHP parser emits output which is broken
1756 ## XXX The parsoid output doesn't match the tidy output.
1758 Unclosed HTML p-tags should be handled properly
1766 <p>foo</div></p>
1770 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1775 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1776 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1779 P-wrapping should leave sol-transparent tags outside p-tags where possible
1783 a [[Category:A1]] [[Category:A2]]
1788 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1792 ### Preformatted text
1801 And a [[Main Page|link]]
1807 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1812 Tabs don't trigger preformatted text
1816 This is preformatted text.
1822 <pre>This is preformatted text.
1828 Ident preformatting with inline content
1839 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1856 Regression with preformatted in <center>
1870 Bug 52763: Preformatted in <blockquote>
1876 indented cell (no pre-wrapping!)
1886 <p> indented cell (no pre-wrapping!)
1894 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1911 Bug 15491: <ins>/<del> in blockquote
1914 Foo <del>bar</del> <ins>baz</ins> quux
1918 <p>Foo <del>bar</del> <ins>baz</ins> quux
1924 # Note that the p-wrapping is newline sensitive, which could be
1925 # considered a bug: tidy will wrap only the 'Foo' in the example
1926 # below in a <p> tag. (see comment 23-25 of bug #6200)
1928 Bug 15491: <ins>/<del> in blockquote (2)
1930 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1933 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1939 <del>bar</del> <ins>baz</ins> quux</blockquote>
1943 <pre> with attributes (bug 3202)
1945 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1947 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1952 <pre> with width attribute (bug 3202)
1954 <pre width="8">Narrow screen goodies</pre>
1956 <pre width="8">Narrow screen goodies</pre>
1961 <pre> with forbidden attribute (bug 3202)
1963 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1965 <pre width="8">Narrow screen goodies</pre>
1970 Entities inside <pre>
1979 <pre> with forbidden attribute values (bug 3202)
1981 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1983 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1988 <nowiki> inside <pre> (bug 13238)
1996 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2004 <pre><nowiki>Foo</nowiki></pre>
2009 <nowiki> and <pre> preference (first one wins)
2040 </pre> inside nowiki
2042 <nowiki></pre></nowiki>
2048 # Parsoid doesn't strip empty tags, like Tidy does.
2050 Empty pre; pre inside other HTML tags (bug 54946)
2052 parsoid=wt2html,wt2wt
2083 HTML pre followed by indent-pre
2098 <p><pre>foo</pre></p>
2100 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2104 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2112 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2122 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2134 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2155 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2159 {{echo| foo}}{{echo| bar}}
2164 {{echo|<!--cmt--> foo}}
2166 <!--cmt-->{{echo| foo}}
2168 {{echo|{{echo| }}bar}}
2186 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2223 Things that look like <pre> tags aren't treated as such
2225 Barack Obama <President> of the United States
2226 <President></President>
2228 <p>Barack Obama <President> of the United States
2229 <President></President>
2233 ## PHP parser discards the "<pre " string
2235 Handle broken pre-like tags (bug 64025)
2239 {{echo|<pre <pre>x</pre>}}
2241 <table><pre </table>
2244 <table><pre></pre></table>
2247 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'><pre </p><pre>x</pre>
2255 Parsoid: handle pre with space after attribute
2259 <pre style="width:50%;" >{{echo|foo}}</pre>
2261 <pre style="width:50%;">{{echo|foo}}</pre>
2264 # TODO / maybe: fix wt2wt for this
2266 Parsoid: Don't paragraph-wrap fosterable content
2292 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2320 #--------------------------------------------------------------------
2321 # Transclusion parameter whitespace stripping tests
2322 # Behavior is different for positional and named parameters
2323 #--------------------------------------------------------------------
2325 Templates: Strip leading and trailing whitespace from named-param values
2329 {{echo|1= {{echo|b}} }}
2342 <ul><li> d</li></ul>
2347 Templates: Don't strip whitespace from positional-param values
2351 {{echo|{{echo|b}} }}
2383 <ul><li> f</li></ul>
2391 Templates: Handle empty comment-and-ws-only lines correctly
2394 <!--should be ignored-->
2395 <!--should be ignored as well-->
2404 Templates: Handle comments in the target
2407 <!-- should be ignored -->
2410 {{echo<!-- should be ignored -->
2413 {{echo<!-- should be ignored -->|foo}}
2415 {{<!-- should be ignored -->echo|foo}}
2417 <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>
2419 <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>
2421 <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>
2423 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2426 #--------------------------------------------------------------------
2427 # Transclusion parameter escaping tests
2428 #--------------------------------------------------------------------
2430 Templates: Parsoid parameter escaping test 1
2434 {{echo|[foo]|{{echo|[bar]}}}}
2436 <p about="#mwt1" typeof="mw:Transclusion"
2437 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2441 Parsoid: Pipes in external links in template parameter
2445 {{echo|[{{echo|http://example.com}} link]}}
2447 <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>
2451 Parsoid: pipe in transclusion parameter
2455 {{echo|http://foo.com/a|b}}
2457 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2458 typeof="mw:Transclusion"
2459 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>
2463 Parsoid: Pipe in external link target and content in template parameter
2465 parsoid=html2wt,wt2wt
2467 {{echo|[http://foo.com/a|b a|b]}}
2469 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2470 typeof="mw:Transclusion"
2471 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2472 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2476 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2480 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2482 <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>
2486 Templates: Don't escape already nowiki-escaped text in template parameters
2488 parsoid=html2wt,wt2wt
2490 {{echo|foo<nowiki>|</nowiki>bar}}
2491 {{echo|<nowiki><div></nowiki>}}
2492 {{echo|<nowiki></nowiki>}}
2494 <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>
2495 <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>
2496 <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>
2502 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2504 parsoid=html2wt,wt2wt
2506 {{echo|{{echo|1=bar}}}}
2508 <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>
2513 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2519 <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>
2523 ### Parsoid-centric tests for testing RT edge cases for pre
2527 1a. Indent-Pre and Comments
2540 1b. Indent-Pre and Comments
2553 1c. Indent-Pre and Comments
2566 1d. Indent-Pre and Comments
2567 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2580 2a. Indent-Pre and tables
2601 2b. Indent-Pre and tables
2617 2c. Indent-Pre and tables (bug 42252)
2634 2d. Indent-Pre and tables
2651 <tbody><tr><td> b</td></tr>
2656 2e. Indent-Pre and table-line syntax
2669 2f. Indent-pre started by table-line syntax
2688 3a. Indent-Pre and block tags (single-line html)
2692 c <blockquote> foo </blockquote>
2697 c <blockquote> foo </blockquote>
2698 <pre><span> foo </span>
2701 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2702 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2703 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2704 <pre><span> foo </span>
2721 3b. Indent-Pre and block tags (multi-line html)
2726 <pre>a <span>foo</span>
2731 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2732 b <div data-parsoid='{"stx":"html"}'> foo </div>
2742 3c. Indent-Pre and block tags (pre-content on separate line)
2806 4. Indent-Pre and extension tags
2812 a <ul class="gallery mw-gallery-traditional">
2813 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2814 <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>
2815 <div class="gallerytext">
2822 <ul class="gallery mw-gallery-traditional">
2823 <li class="gallerybox" style="width: 155px">
2824 <div style="width: 155px">
2825 <div class="thumb" style="width: 150px;">
2826 <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>
2828 <div class="gallerytext"></div>
2835 Table wikitext syntax outside wiki-tables
2838 ! not a table heading
2841 | class="foo bar" | baz
2848 ! not a table heading
2851 | class="foo bar" | baz
2860 Render paragraphs when indent-pre is suppressed in blocklevels
2877 4. Multiple spaces at start-of-line
2895 ## NOTE: the leading white-space chars on empty line are significant
2897 5a. White-space in indent-pre
2909 ## NOTE: the leading white-space chars on empty line are significant
2911 5b. White-space in indent-pre
2930 5c. White-space in indent-pre
2943 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2966 7a. Indent-pre and category links
2968 parsoid=wt2html,wt2wt
2970 [[Category:foo]] <!-- No pre-wrapping -->
2971 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2973 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2974 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2978 7b. Indent-pre and category links
2980 parsoid=wt2html,wt2wt
2983 [[Category:foo]] {{echo|b}}
2986 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
2987 <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>
2991 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2995 HTML-pre: 1. embedded newlines
3029 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3031 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3035 <pre data-parsoid='{"stx":"html"}'>
3040 <pre data-parsoid='{"stx":"html"}'>
3048 HTML-pre: big spaces
3085 <pre data-parsoid='{"stx":"html"}'>
3104 HTML-pre: 2: indented text
3117 HTML-pre: 3: other wikitext
3138 ### Definition lists
3145 <dl><dt> name </dt>
3146 <dd> Definition</dd></dl>
3151 Definition list for indentation only
3155 <dl><dd> Indented text</dd></dl>
3160 Definition list with no space
3165 <dd>Definition</dd></dl>
3170 Definition list with URL link
3172 ; http://example.com/ : definition
3174 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3175 <dd> definition</dd></dl>
3180 Definition list with bracketed URL link
3182 ;[http://www.example.com/ Example]:Something about it
3184 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3185 <dd>Something about it</dd></dl>
3190 Definition list with wikilink containing colon
3192 ; [[Help:FAQ]]: The least-read page on Wikipedia
3194 <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>
3195 <dd> The least-read page on Wikipedia</dd></dl>
3199 # At Brion's and JeLuF's insistence... :)
3201 Definition list with news link containing colon
3203 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3205 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3206 <dd> This isn't even a real newsgroup!</dd></dl>
3211 Malformed definition list with colon
3213 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3215 <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>
3220 Definition lists: colon in external link text
3222 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3224 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3225 <dd> OK, I made that up</dd></dl>
3230 Definition lists: colon in HTML attribute
3232 ;<b style="display: inline">bold</b>
3234 <dl><dt><b style="display: inline">bold</b></dt></dl>
3239 Definition lists: self-closed tag
3241 ;one<br/>two : two-line fun
3243 <dl><dt>one<br />two </dt>
3244 <dd> two-line fun</dd></dl>
3249 Bug 11748: Literal closing tags
3253 <dd>test test test test test</dd>
3255 <dd>test test test test test</dd>
3260 <dd>test test test test test</dd>
3262 <dd>test test test test test</dd>
3268 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3271 ; term : description
3276 <dl><dt> term </dt>
3277 <dd> description</dd></dl>
3278 <ul><li> unordered</li></ul>
3285 Definition list with empty definition and following paragraph
3297 Nested definition lists using html syntax
3306 Definition Lists: No nesting: Multiple dd's
3319 Definition Lists: Indentation: Regular
3327 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3332 Definition Lists: Indentation: Missing 1st level
3338 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3343 Definition Lists: Indentation: Multi-level indent
3347 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3352 Definition Lists: Hacky use to indent tables
3359 should be left alone
3361 <dl><dd><dl><dd><table>
3366 </td></tr></table></dd></dl></dd></dl>
3368 should be left alone
3373 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3381 should be left alone
3384 <dl><dd><dl><dd><table><tr>
3387 </tr></table><!-- bar --></dd></dl></dd></dl>
3389 should be left alone</p>
3393 Definition Lists: Hacky use to indent tables, with comment before table
3399 <dl><dd><dl><dd><!-- foo --><table><tr>
3401 </tr></table></dd></dl></dd></dl>
3406 Definition Lists: Hacky use to indent tables (WS-insensitive)
3415 <dd> <table><tr><td>a</td></tr></table> </dd>
3418 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3419 ## as an empty dt item. It also ignores all but the last ";" when followed
3420 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3421 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3424 ## Ex: ";;t2 ::d2" is transformed into:
3436 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3437 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3448 ## All Parsoid only definition list tests have this difference.
3450 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3451 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3454 Table / list interaction: indented table with lists in table contents
3469 <ul><li> b</li></ul>
3473 <ul><li> d</li></ul>
3474 </td></tr></table></dd></dl>
3479 Table / list interaction: lists nested in tables nested in indented lists
3502 </td></tr></table></dd></dl>
3509 Definition Lists: Nesting: Multi-level (Parsoid only)
3539 Definition Lists: Nesting: Test 2 (Parsoid only)
3559 Definition Lists: Nesting: Test 3 (Parsoid only)
3587 Definition Lists: Nesting: Test 4
3592 <dl><dd><dl><dd><dl><dt>t3</dt>
3593 <dd>d3</dd></dl></dd></dl></dd></dl>
3598 ## The Parsoid team believes the following three test exposes a
3599 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3600 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3601 ## It also exposes a "misfeature" in tidy, which doesn't like
3602 ## <dl> tags with a single <dt> child; it converts the <dt> into
3603 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3605 Definition Lists: Mixed Lists: Test 1
3611 <dl><dd><dl><dt><ul><li> foo</li>
3612 <li> bar</li></ul></dt></dl>
3613 <dl><dt> baz</dt></dl></dd></dl>
3648 Definition Lists: Mixed Lists: Test 2
3653 <ul><li><dl><dd> d1</dd>
3654 <dd> d2</dd></dl></li></ul>
3660 Definition Lists: Mixed Lists: Test 3
3665 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3666 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3672 Definition Lists: Mixed Lists: Test 4
3677 <ul><li><dl><dt>d1 </dt>
3680 <dd>d4</dd></dl></li></ul>
3686 Definition Lists: Mixed Lists: Test 5
3692 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3698 Definition Lists: Mixed Lists: Test 6
3703 <ol><li><ul><li><dl><dd>d1
3704 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3710 Definition Lists: Mixed Lists: Test 7
3715 <dl><dd><ul><li> d1</li>
3716 <li> d2</li></ul></dd></dl>
3722 Definition Lists: Mixed Lists: Test 8
3727 <dl><dd><ul><li> d1</li></ul>
3728 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3734 Definition Lists: Mixed Lists: Test 9
3738 <ul><li><dl><dt>foo </dt>
3739 <dd>bar</dd></dl></li></ul>
3745 Definition Lists: Mixed Lists: Test 10
3749 <ul><li><ol><li><dl><dt>foo </dt>
3750 <dd>bar</dd></dl></li></ol></li></ul>
3754 # The Parsoid team disagrees with the PHP parser's seemingly-random
3755 # rules regarding dd/dt on the next two tests. Parsoid is more
3756 # consistent, and recognizes the shared nesting and keeps the
3757 # still-open tags around until the nesting is complete.
3758 # (And tidy again converts <dt> to <dd> before 'bar'.)
3761 Definition Lists: Mixed Lists: Test 11
3766 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3767 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3768 <dl><dt>boo </dt>
3769 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3824 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3825 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3829 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3830 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3839 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
3841 Definition Lists: Weird Ones: Test 1
3843 *#;*::;; foo : bar (who uses this?)
3845 <ul><li><ol><li><dl><dt> foo </dt>
3846 <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>
3865 <dt>bar (who uses this?)</dt>
3897 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3898 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3913 External links: non-bracketed
3915 Non-bracketed: http://example.com
3917 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3921 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3923 External links: numbered
3925 Numbered: [http://example.com]
3926 Numbered: [http://example.net]
3927 Numbered: [http://example.com]
3929 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
3930 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
3931 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
3934 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
3935 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
3936 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
3940 External links: specified text
3942 Specified text: [http://example.com link]
3944 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
3949 External links: trail
3951 Linktrails should not work for external links: [http://example.com link]s
3953 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3958 External links: dollar sign in URL
3960 http://example.com/1$2345
3962 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3966 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3968 External links: dollar sign in URL (autonumber)
3970 [http://example.com/1$2345]
3972 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3975 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
3979 External links: open square bracket forbidden in URL (bug 4377)
3981 parsoid=wt2html,wt2wt,html2html
3983 http://example.com/1[2345
3985 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3988 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
3992 External links: open square bracket forbidden in URL (named) (bug 4377)
3994 parsoid=wt2html,html2html
3996 [http://example.com/1[2345]
3998 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4001 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4004 # parsoid adds a space before the link name
4006 External links: open square bracket forbidden in URL (named) (bug 4377)
4009 [http://example.com/1 [2345]
4011 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4016 External links: nowiki in URL link text (bug 6230)
4018 [http://example.com/ <nowiki>''example site''</nowiki>]
4020 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4025 External links: newline forbidden in text (bug 6230 regression check)
4027 [http://example.com/ first
4030 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4036 External links: Pipe char between url and text
4038 [http://example.com | link]
4040 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4045 External links: protocol-relative URL in brackets
4047 [//example.com/ Test]
4049 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4053 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4055 External links: protocol-relative URL in brackets without text
4059 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4062 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4066 External links: protocol-relative URL in free text is left alone
4070 <p>//example.com/Foo
4075 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4077 foo//example.com/Foo
4079 <p>foo//example.com/Foo
4084 External links: with no contents
4086 [http://en.wikipedia.org/wiki/Foo]
4088 [[wikipedia:Foo|Bar]]
4090 [[wikipedia:Foo|<span>Bar</span>]]
4092 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4093 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4094 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4097 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4098 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4099 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4103 External links: Free with trailing punctuation
4113 http://example.com/url_with_(brackets)
4115 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4116 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4117 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4118 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4119 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4120 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4121 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4122 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4123 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4130 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4132 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4137 External image from https
4139 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4141 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4146 External image (when not allowed)
4148 wgAllowExternalImages=0
4150 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4152 <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>
4157 Link to non-http image, no img tag
4159 Link to non-http image, no img tag: ftp://example.com/test.jpg
4161 <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>
4166 External links: terminating separator
4168 Terminating separator: http://example.com/thing,
4170 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4175 External links: intervening separator
4177 Intervening separator: http://example.com/1,2,3
4179 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4184 External links: old bug with URL in query
4186 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4188 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4193 External links: old URL-in-URL bug, mixed protocols
4195 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4197 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4202 External links: URL in text
4204 URL in text: [http://example.com http://example.com]
4206 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4211 External links: Clickable images
4213 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4215 <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>
4220 External links: raw ampersand
4222 Old & use: http://x&y
4224 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4229 External links: encoded ampersand
4231 Old & use: http://x&y
4233 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4236 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4240 External links: encoded equals (bug 6102)
4242 http://example.com/?foo=bar
4244 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4247 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4251 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4252 ## does it number them. As discussed in bug 53505, we can identify
4253 ## autonumbered links via CSS.
4257 External links: [raw ampersand]
4259 Old & use: [http://x&y]
4261 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4264 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4267 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4268 # mode will return the [raw ampersand] wikitext
4270 External links: [encoded ampersand]
4272 parsoid=wt2html,wt2wt,html2html
4274 Old & use: [http://x&y]
4276 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4279 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4283 External links: [raw equals]
4285 [http://example.com/?foo=bar]
4287 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4290 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4293 # note that parsoid html is identical to [raw equals] case; so html2wt
4294 # mode will return the [raw equals] wikitext
4296 External links: [encoded equals] (bug 6102)
4298 parsoid=wt2html,wt2wt,html2html
4300 [http://example.com/?foo=bar]
4302 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4305 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4308 # xxx parsoid strips the IDN character, so the round-trip tests will
4309 # obviously fail and are disabled. --cscott
4311 External links: [IDN ignored character reference in hostname; strip it right off]
4313 parsoid=wt2html,wt2wt,html2html
4315 [http://e‌xample.com/]
4317 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4320 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4323 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4324 # Where an external link could easily circumvent the sanitization of the text of
4325 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4326 # test demands a higher standard. That's a bit strange.
4330 # http://example.com -> [http://example.com|http://example.com]
4331 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4333 # The first example is sanitized, but the second is not. Any security benefits
4334 # from this production are trivial to circumvent. Either remove this test and
4335 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4336 # the test accordingly.
4340 # xxx parsoid strips the IDN character, so the round-trip tests will
4341 # obviously fail and are disabled. --cscott
4343 External links: IDN ignored character reference in hostname; strip it right off
4345 parsoid=wt2html,html2html
4347 http://e‌xample.com/
4349 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4352 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4356 External links: www.jpeg.org (bug 554)
4360 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4364 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4366 External links: URL within URL (original bug 2)
4368 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4370 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4373 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4377 BUG 361: URL inside bracketed URL
4379 [http://www.example.com/foo http://www.example.com/bar]
4381 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4386 BUG 361: URL within URL, not bracketed
4388 http://www.example.com/foo?=http://www.example.com/bar
4390 <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>
4395 BUG 289: ">"-token in URL-tail
4397 http://www.example.com/<hello>
4399 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4404 BUG 289: literal ">"-token in URL-tail
4406 http://www.example.com/<b>html</b>
4408 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4413 BUG 289: ">"-token in bracketed URL
4415 [http://www.example.com/<hello> stuff]
4417 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4422 BUG 289: literal ">"-token in bracketed URL
4424 [http://www.example.com/<b>html</b> stuff]
4426 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4431 BUG 289: literal double quote at end of URL
4433 http://www.example.com/"hello"
4435 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4440 BUG 289: literal double quote in bracketed URL
4442 [http://www.example.com/"hello" stuff]
4444 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4449 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4451 [http://www.example.com test]
4453 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4458 External links: link text with spaces
4460 [http://www.example.com a b c]
4461 [http://www.example.com ''a'' ''b'']
4463 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4464 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4469 External links: wiki links within external link (Bug 3695)
4471 [http://example.com [[wikilink]] embedded in ext link]
4473 <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>
4476 <p><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
4480 BUG 787: Links with one slash after the url protocol are invalid
4484 [http:/example.com title]
4486 <p>http:/example.com
4487 </p><p>[http:/example.com title]
4492 Bracketed external links with template-generated invalid target
4494 [{{echo|http:/example.com}} title]
4496 <p>[http:/example.com title]
4501 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4503 ''[http://example.com text'']
4504 [http://example.com '''text]'''
4505 ''Something [http://example.com in italic'']
4506 ''Something [http://example.com mixed''''', even bold]'''
4507 '''''Now [http://example.com both''''']
4509 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4510 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4511 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4512 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4513 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4519 Bug 4781: %26 in URL
4521 http://www.example.com/?title=AT%26T
4523 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4526 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4529 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4530 # % is actually legal in HTML5. Any change in output would need testing though.
4532 Bug 4781, 5267: %25 in URL
4534 http://www.example.com/?title=100%25_Bran
4536 <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>
4539 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4543 Bug 4781, 5267: %28, %29 in URL
4545 http://www.example.com/?title=Ben-Hur_%281959_film%29
4547 <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>
4550 <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>
4555 Bug 4781: %26 in autonumber URL
4557 [http://www.example.com/?title=AT%26T]
4559 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4562 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4566 Bug 4781, 5267: %26 in autonumber URL
4568 [http://www.example.com/?title=100%25_Bran]
4570 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4573 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4577 Bug 4781, 5267: %28, %29 in autonumber URL
4579 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4581 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4584 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4589 Bug 4781: %26 in bracketed URL
4591 [http://www.example.com/?title=AT%26T link]
4593 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4596 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4600 Bug 4781, 5267: %25 in bracketed URL
4602 [http://www.example.com/?title=100%25_Bran link]
4604 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4609 Bug 4781, 5267: %28, %29 in bracketed URL
4611 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4613 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4616 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4620 External link containing a period in the anchor. (bug 63947)
4622 [//foo.org/bar#baz. bang]
4624 [//foo.org/bar. bang]
4626 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4627 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4630 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4631 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4635 External link containing a single quote. (bug 63947)
4639 [//foo.org/bar'baz bang]
4641 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4642 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4645 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4646 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4651 External link containing a period in the anchor. (bug 63947)
4653 [//foo.org/bar#baz. bang]
4655 [//foo.org/bar. bang]
4657 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4658 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4661 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4662 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4666 External link containing a single quote. (bug 63947)
4670 [//foo.org/bar'baz bang]
4672 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4673 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4676 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4677 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4682 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4684 Some [http://example.com/ pretty ''italics'' and stuff]!
4686 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4691 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4693 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4695 <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>
4700 External link containing double-single-quotes with no space separating the url from text in italics
4702 [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]].]
4704 <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>
4707 <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> <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>.</p>
4709 <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)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
4713 External link with comments in link text
4715 [http://www.google.com Google <!-- comment -->]
4717 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4722 URL-encoding in URL functions (single parameter)
4724 {{localurl:Some page|amp=&}}
4726 <p>/index.php?title=Some_page&amp=&
4731 URL-encoding in URL functions (multiple parameters)
4733 {{localurl:Some page|q=?&=&}}
4735 <p>/index.php?title=Some_page&q=?&amp=&
4742 http://example.com/index.php?foozoid%5B%5D=bar
4744 http://example.com/index.php?foozoid[]=bar
4746 <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>
4747 </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>
4750 <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>
4752 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4756 IPv6 urls (bug 21261)
4760 http://[2404:130:0:1000::187:2]/index.php
4762 <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>
4767 Non-extlinks in brackets
4776 [{{echo|foo}} ''bar'']
4777 [{{echo|foo}}l's] errand
4778 [{{echo|foo}}l's errand]
4780 [url=http://example.com]
4793 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4798 Percent encoding in external links
4800 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4802 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4805 <p><a rel="mw:ExtLink"
4806 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4810 Use url link syntax for links where the content is equal the link target
4814 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4817 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4821 Parenthesis in external links, especially URL links
4825 http://example.com/test)
4827 http://example.com/(test)
4829 http://example.com/((test)
4831 (http://example.com/(test))
4833 (http://example.com/(test)))))
4835 http://example.com/a)b
4837 [http://example.com) foo]
4839 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4840 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4841 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4842 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4843 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4844 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4845 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4846 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4849 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4850 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4851 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4852 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4853 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4854 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4855 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4856 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4860 Parenthesis in external links, w/ transclusion or comment
4862 (http://example.com/{{echo|hi}})
4864 (http://example.com<!-- hi -->)
4866 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4867 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4870 <p>(<a 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}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 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]}\" 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}}]}\">hi</span>"}]]}'>http://example.com/hi</a>)</p>
4872 <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>
4876 Replace invalid link targets when serializing
4880 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
4882 [[MediaWiki:Badtitletext|Manual]]
4892 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4894 Normal text. '''''Bold italic text.''''' Normal text.
4896 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4897 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4902 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4903 # parser strips. The wikitext contains just the first half of the bold
4906 Unclosed and unmatched quotes
4908 '''''Bold italic text '''with bold deactivated''' in between.'''''
4910 '''''Bold italic text ''with italic deactivated'' in between.'''''
4914 ..spanning two paragraphs (should not work).'''
4916 '''Bold tag left open
4918 ''Italic tag left open
4922 <!-- Unmatching number of opening, closing tags: -->
4923 '''This year''''s election ''should'' beat '''last year''''s.
4925 ''Tom'''s car is bigger than ''Susan'''s.
4927 Plain ''italic'''s plain
4929 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4930 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4931 </p><p><b>Bold text..</b>
4932 </p><p>..spanning two paragraphs (should not work).
4933 </p><p><b>Bold tag left open</b>
4934 </p><p><i>Italic tag left open</i>
4936 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4937 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4938 </p><p>Plain <i>italic'</i>s plain
4941 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4942 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4943 </p><p><b>Bold text..</b>
4944 </p><p>..spanning two paragraphs (should not work).<b></b>
4945 </p><p><b>Bold tag left open</b>
4946 </p><p><i>Italic tag left open</i>
4948 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4949 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4950 </p><p>Plain <i>italic'</i>s plain
4957 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
4960 # This should not produce <table></table> as <table><tr><td></td></tr></table>
4961 # is the bare minimum required by the spec, see:
4962 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
4963 # Parsoid team replies: empty table tags are legal in HTML5
4965 A table with no data.
4978 A table with stray table end tags on start tag line (wt2html)
4982 {|style="color: red;"|}
4984 {|style="color: red;" |}
4988 {|style="color: red;"|} id="foo"
4992 {|style="color: red;" |} id="foo"
4996 <table style="color: red;"></table>
4998 <table style="color: red;">
5004 <table style="color: red;" id="foo">
5010 <table style="color: red;" id="foo">
5019 A table with no data (take 2)
5027 # A table with nothing but a caption is invalid XHTML, we might want to render
5028 # this as <p>caption</p>
5029 # Parsoid team replies: table with only a caption is legal in HTML5
5031 A table with nothing but a caption
5039 </caption><tr><td></td></tr></table>
5042 <table><caption> caption</caption></table>
5046 A table with caption with default-spaced attributes and a table row
5049 |+ style="color: red;" | caption1
5055 <caption style="color: red;"> caption1
5064 A table with captions with non-default spaced attributes and a table row
5067 |+style="color: red;"|caption2
5068 |+ style="color: red;"| caption3
5074 <caption style="color: red;">caption2
5076 <caption style="color: red;"> caption3
5085 Table td-cell syntax variations
5089 | foo bar foo || baz
5090 | style='color:red;' | baz
5091 | style='color:red;' || baz
5098 <td> foo bar foo </td>
5101 <td style="color:red;"> baz
5103 <td> style='color:red;' </td>
5131 Simple table but with multiple dashes for row wikitext
5149 Multiplication table
5151 {| border="1" cellpadding="2"
5152 |+Multiplication table
5154 ! × !! 1 !! 2 !! 3
5172 <table border="1" cellpadding="2">
5173 <caption>Multiplication table
5220 Accept "||" in table headings
5235 Accept "!!" in table data
5249 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
5254 Accept "||" in indented table headings
5264 </th></tr></table></dd></dl>
5269 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5286 Accept "| !" at start of line in tables (ignore !-attribute)
5290 | !style="color:red" | bar
5302 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 +/-
5306 |style='color:red;'|+1
5307 |style='color:blue;'|-1
5319 <td style="color:red;">+1
5321 <td style="color:blue;">-1
5345 |rowspan=2| Cell 2, row 1 (and 2)
5356 <td rowspan="2"> Cell 2, row 1 (and 2)
5374 {| bgcolor=#ABCDEF border=2
5379 |the original table again
5387 <table bgcolor="#ABCDEF" border="2">
5395 <td>the original table again
5401 Invalid attributes in table cell (bug 1830)
5415 # The "|}" to close the table is missing from the input, so parsoid's
5416 # *2wt modes will fail.
5418 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5420 parsoid=wt2html,html2html
5423 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5427 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5428 <td>]" onmouseover="alert(document.cookie)">test
5436 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5441 Indented table markup mixed with indented pre content (proposed in bug 6200)
5446 Text that should be rendered preformatted
5454 <pre>Text that should be rendered preformatted
5463 Template-generated table cell attributes and cell content
5472 <td style="color: red"> Foo
5474 <td style="color: red"> Foo
5480 Template-generated table cell attributes and cell content (2)
5483 |align=center {{table_attribs}}
5488 <td align="center" style="color: red"> Foo
5494 Template-generated table cell attributes and cell content (3)
5497 |align=center {{table_cells}}
5502 <td align="center" style="color: red"> Foo </td>
5510 Table with row followed by newlines and table heading
5528 Table with empty line following the start tag
5545 # FIXME: Preserve the attribute properly (with an empty string as value) in
5546 # the PHP parser. Parsoid implements the behavior below.
5548 Table attributes with empty value
5558 </td></tr></tbody></table>
5563 Wikitext table with a lot of comments
5586 Wikitext table with double-line table cell
5603 Table cell with a single comment
5620 Table-cell after a comment-only-empty-line
5637 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5639 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5645 Build table with {{!}}
5647 {{{!}} class="wikitable"
5650 {{!}}- style="color:red;"
5651 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5654 <table class="wikitable">
5660 <tr style="color:red;">
5662 <td style="color:red;"> second data
5668 Build table with pipe as data
5670 {| class="wikitable"
5673 |- style="color:red;"
5674 | data || style="color:red;" | second data
5676 | style="color:red;" | data with | || style="color:red;" | second data with |
5678 || data with | ||| second data with |
5681 <table class="wikitable">
5687 <tr style="color:red;">
5689 <td style="color:red;"> second data
5692 <td style="color:red;"> data with | </td>
5693 <td style="color:red;"> second data with |
5696 <td> data with | </td>
5697 <td> second data with |
5703 Build table with wikilink
5705 {| class="wikitable"
5706 ! header || second header
5707 |- style="color:red;"
5708 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
5710 | data || second data [[Main Page|link|text with pipe]]
5713 <table class="wikitable">
5718 <tr style="color:red;">
5719 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
5720 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
5724 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
5729 # The expected HTML structure in this test is debatable. The PHP parser does
5730 # not parse this kind of table at all. The main focus for Parsoid is on
5731 # round-tripping, so this output is ok for now. TODO: revisit!
5733 Wikitext table with html-syntax row
5743 <td>foo</td></tr></tbody></table>
5746 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5747 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5748 ## PHP parser, which tidy then compounds by fostering the content
5749 ## entirely out of the table. Parsoid recognizes the table context
5750 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5751 ## depends on PHP's treatment of broken table markup!
5753 Implicit <td> after a |-
5755 parsoid=wt2html,html2html
5775 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5777 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5779 parsoid=wt2html,html2html
5812 <tr><td><pre>a</pre></td></tr>
5813 <tr><td> b</td></tr>
5818 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5819 # Parsoid generates the missing <td>, so wt2wt won't succeed.
5821 Lists should be recognized in an implicit <td> context
5823 parsoid=wt2html,html2html
5850 Parsoid: Round-trip tables directly followed by content (bug 51219)
5852 parsoid=wt2html,wt2wt
5877 Parsoid: Default to a newline after tables in new content (bug 51219)
5884 <nowiki> </nowiki>bar
5891 <tr><td>foo</td></tr></tbody></table> bar
5893 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5897 Parsoid: newline inducing block nodes don't suppress <nowiki>
5909 Parsoid: Row-syntax table headings followed by comment & table cells
5911 parsoid=wt2html,wt2wt
5915 <!-- foo --> || baz || quux
5929 <tbody><tr><th> foo </th><th> bar
5930 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
5935 # PHP throws away the (semi-broken) "foo" class here; Parsoid
5938 Parsoid: Recover better from broken table attributes
5958 <p>foo</p></td></tr>
5963 Strip unsupported table tags
6014 Plain link, capitalized
6018 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6023 Plain link, uncapitalized
6027 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6034 [[Main Page|The Main Page]]
6036 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6041 Piped link with comment in link text
6043 [[Main Page|The Main<!--front--> Page]]
6045 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6050 Piped link with multiple pipe characters in link text
6052 [[Main Page||The|Main|Page|]]
6054 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6057 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6065 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6070 Broken link with fragment
6072 [[Zigzagzogzagzig#zug]]
6074 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6079 Special page link with fragment
6081 [[Special:Version#anchor]]
6083 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6088 Nonexistent special page link with fragment
6090 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6092 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6099 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6101 <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>
6108 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6110 <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>!!!
6121 Bug 43661: Piped links with identical prefixes
6123 [[prefixed article|prefixed articles with spaces]]
6125 [[prefixed article|prefixed articlesaoeu]]
6127 [[Main Page|Main Page test]]
6129 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6130 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6131 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6137 Link with HTML entity in suffix / tail
6139 [[Main Page]]", [[Main Page]]a
6141 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6146 Link with 3 brackets
6155 Link with 4 brackets
6159 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6164 Piped link with 3 brackets
6166 [[[main page|the main page]]]
6168 <p>[[[main page|the main page]]]
6173 Piped link with extlink-like text
6176 [[Main Page|This is a [bar]]]
6178 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6179 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6184 Link with multiple pipes
6186 [[Main Page|The|Main|Page]]
6188 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6192 # Note that parsoid does not munge anchor text; all non-space
6193 # characters are valid in HTML5 ids.
6195 Anchor containing a #. (bug 63430)
6197 [[Main Page#And#Link]]
6199 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6202 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6208 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6210 <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>
6215 Link with space in namespace
6217 [[User talk:Foo bar]]
6219 <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>
6224 MemoryAlpha:AlphaTest
6226 This is an article in the MemoryAlpha namespace
6227 (which shadows the memoryalpha interwiki link).
6231 Namespace takes precedence over interwiki link (bug 51680)
6233 [[MemoryAlpha:AlphaTest]]
6235 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6239 # The previous test doesn't work correctly in html2*, due to not recognizing the
6240 # link as an internal one. This one checks for the correct behavior.
6242 Link to namespace preferred over interwiki with correct rel attribute
6244 parsoid=html2wt,html2html
6246 [[MemoryAlpha:AlphaTest]]
6248 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6253 Piped link to namespace
6255 [[Meta:Disclaimers|The disclaimers]]
6257 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6264 [[Usually caused by a typo (oops}]]
6266 <p>[[Usually caused by a typo (oops}]]
6273 Just a test of an article title containing a percent.
6277 Link containing % (not as a hex sequence)
6281 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6284 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6287 # note that the parsoid HTML is identical to the previous test output,
6288 # so the previous test ensures that the html2wt mode will generate the
6289 # "not as a hex sequence" wikitext.
6291 Link containing % as a single hex sequence interpreted to char
6293 parsoid=wt2wt,wt2html,html2html
6297 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6300 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6304 Link containing % as a double hex sequence interpreted to hex sequence
6308 <p>[[7%2525 Solution]]
6312 # note that parsoid does not munge anchor text; all non-space
6313 # characters are valid in HTML5 anchors.
6315 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6316 Example for such a section: == < ==
6318 [[%23%3c]][[%23%3e]]
6320 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6323 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E" title="Main Page">#></a></p>
6327 Link containing "<#" and ">#" as a hex sequences
6329 [[%3c%23]][[%3e%23]]
6331 <p>[[%3c%23]][[%3e%23]]
6336 Link containing an equals sign
6338 [[Special:BookSources/isbn=4-00-026157-6]]
6340 <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>
6343 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
6349 Just a test of an article title containing a tilde.
6352 # note that links containing signatures, like [[Foo~~~~]], are
6353 # massaged by the pre-save transform (PST) and so the tildes are never
6354 # seen by the parser.
6356 Link containing a tilde
6360 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6363 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6367 Link containing double-single-quotes '' (bug 4598)
6369 [[Lista d''e paise d''o munno]]
6371 <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>
6374 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a></p>
6378 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6380 Some [[Link|pretty ''italics'' and stuff]]!
6382 <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>!
6385 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6389 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6391 ''Some [[Link|pretty ''italics'' and stuff]]!''
6393 <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>
6398 Link with double quotes in title part (literal) and alternate part (interpreted)
6400 [[File:Denys Savchenko ''Pentecoste''.jpg]]
6404 [[''Pentecoste''|Pentecoste]]
6406 [[''Pentecoste''|''Pentecoste'']]
6408 <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>
6409 </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>
6410 </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>
6411 </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>
6414 <meta typeof="mw:Placeholder"/>
6415 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6416 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6417 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6421 Broken image links with HTML captions (bug 39700)
6423 [[File:Nonexistent|<script></script>]]
6424 [[File:Nonexistent|100px|<script></script>]]
6425 [[File:Nonexistent|<]]
6426 [[File:Nonexistent|a<i>b</i>c]]
6428 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6429 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6430 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6431 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6438 [[http://www.example.com]]
6440 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6443 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6447 Plain link to URL with link text
6449 [[http://www.example.com Link text]]
6451 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6456 Plain link to protocol-relative URL
6458 [[//www.example.com]]
6460 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6463 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6467 Plain link to protocol-relative URL with link text
6469 [[//www.example.com Link text]]
6471 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6476 Plain link to page with question mark in title
6482 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6483 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6488 # I'm fairly sure the expected result here is wrong.
6489 # We want these to be URL links, not pseudo-pages with URLs for titles....
6490 # However the current output is also pretty screwy.
6493 # I'm changing it to match the current output--it arguably makes more
6494 # sense in the light of the test above. Old expected result was:
6495 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6497 # But I think this test is bordering on "garbage in, garbage out" anyway.
6502 Piped link to URL: [[http://www.example.com|an example URL]]
6504 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6507 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6511 BUG 2: [[page|http://url/]] should link to page, not http://url/
6513 [[Main Page|http://url/]]
6515 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6518 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6521 # Parsoid does not mark self-links, by design.
6523 BUG 337: Escaped self-links should be bold
6527 [[Bug462]] [[Bug462]]
6529 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6532 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6534 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6538 Self-link to section should not be bold
6542 [[Main Page#section]]
6544 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6555 Self-link to numeric title
6561 <p><strong class="selflink">0</strong>
6566 Link to numeric-equivalent title
6572 <p><a href="/wiki/00" title="00">00</a>
6577 <nowiki> inside a link
6579 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6581 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6586 Non-breaking spaces in title
6588 [[ Main Page ]]
6590 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6595 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6601 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6606 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6612 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6617 Internal link with en linktrail: no apostrophes (bug 27473)
6623 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6628 Internal link with ca linktrail with apostrophes (bug 27473)
6634 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6639 Internal link with kaa linktrail with apostrophes (bug 27473)
6645 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6650 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6652 [[User:Foo/Test/63636:Bar|Test]]
6654 <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>
6657 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6661 Purely hash wikilink
6663 title=[[User:test/123]]
6667 <p><a href="#a">b</a>
6670 <p><a rel="mw:WikiLink" href="../User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"../User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
6674 1. Interaction of linktrail and template encapsulation
6680 <p><a rel="mw:WikiLink" href="Foo" title="Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}},"l"]}'>Fool</a></p>
6684 2. Interaction of linktrail and template encapsulation
6688 {{echo|Some [[Fool]]}}s
6690 <p><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" title="Fool" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a></p>
6694 3. Interaction of linktrail and template encapsulation
6698 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6700 <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" title="Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b>bold and foolish</b></p>
6710 Internal link with is link prefix
6714 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6716 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6727 Internal link with is link trail and link prefix
6731 [[mótmælendatrú|xxx]]ar
6733 mótmælenda[[söfnuður]]
6734 mótmælenda[[söfnuður|söfnuðir]]
6735 mótmælenda[[söfnuður|söfnuðir]]xxx
6737 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6738 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6739 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6740 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6741 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6746 Parsoid link trail escaping
6748 parsoid=html2wt,html2html
6752 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6756 Parsoid link prefix escaping
6759 parsoid=html2wt,html2html
6761 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6763 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6767 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6775 [http://wp.org ''foo'']
6777 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6778 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6779 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6780 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6785 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6789 [[Foo|{{echo|a}} b {{echo|c}}]]
6791 <p><a rel="mw:WikiLink" href="Foo" title="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>
6795 Link with angle bracket after anchor
6799 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6802 <p><a rel="mw:WikiLink" href="./Foo#%3Cbar%3E" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#%3Cbar%3E"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
6806 ### Interwiki links (see maintenance/interwiki.sql)
6810 Inline interwiki link
6812 parsoid=wt2html,wt2wt,html2html
6814 [[MeatBall:SoftSecurity]]
6816 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6819 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
6823 Inline interwiki link with empty title (bug 2372)
6825 parsoid=wt2html,wt2wt,html2html
6829 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6832 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
6836 Interwiki link encoding conversion (bug 1636)
6838 *[[Wikipedia:ro:Olteniţa]]
6839 *[[Wikipedia:ro:Olteniţa]]
6841 <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>
6842 <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>
6846 <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>
6847 <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>
6852 Interwiki link with fragment (bug 2130)
6854 [[MeatBall:SoftSecurity#foo]]
6856 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6860 # Ideally the wikipedia: prefix here should be proto-relative too
6861 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
6862 # define the 'en' prefix, and originally the test used 'wikipedia',
6863 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
6866 Different interwiki prefixes mapping to the same URL
6874 [[:wikipedia:Foo|Foo]]
6876 [[wikipedia:en:Foo]]
6878 [[:wikipedia:en:Foo]]
6882 <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}' title="en:Foo">en:Foo</a></p>
6884 <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}' title="en:Foo">Foo</a></p>
6886 <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}' title="wikipedia:Foo">wikipedia:Foo</a></p>
6888 <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}' title="wikipedia:Foo">Foo</a></p>
6890 <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}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
6892 <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}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
6894 <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}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
6898 Interwiki links that cannot be represented in wiki syntax
6901 [[meatball:ok#foo|ok with fragment]]
6902 [[meatball:ok_as_well?|ok ending with ? mark]]
6903 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6904 [http://de.wikipedia.org/wiki/#foo is just fragment]
6907 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
6908 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
6909 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" class="extiw" title="meatball:ok as well?">ok ending with ? mark</a>
6910 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6911 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
6914 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
6915 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
6916 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
6917 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6918 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6922 Interwiki links: trail
6924 [[wikipedia:Foo|Ba]]r
6926 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
6929 <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,"tail":"r"}' title="wikipedia:Foo">Bar</a></p>
6933 Local interwiki link
6935 parsoid=wt2html,wt2wt,html2html
6937 [[local:Template:Foo]]
6939 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
6942 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
6945 # Parsoid does not mark self-links, by design.
6947 Local interwiki link: self-link to current page
6950 parsoid=wt2html,wt2wt,html2html
6954 <p><strong class="selflink">local:Main Page</strong>
6957 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
6961 Local interwiki link: prefix only (bug 64167)
6963 parsoid=wt2html,wt2wt,html2html
6967 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
6970 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
6974 Local interwiki link: with additional interwiki prefix (bug 61357)
6976 parsoid=wt2html,wt2wt,html2html
6978 [[local:meatball:Hello]]
6980 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
6983 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
6987 Multiple local interwiki link prefixes
6989 [[local:local:local:local:mi:local:Foo]]
6991 parsoid=wt2html,wt2wt,html2html
6993 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
6996 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7000 ### Interlanguage links
7001 ### Language links (so that searching for '### language' matches..)
7013 <p>Blah blah blah</p>
7014 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7018 Interlanguage link with spacing
7020 parsoid=wt2html,wt2wt,html2html
7028 <p>Blah blah blah</p>
7029 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7033 Double interlanguage link
7042 <p>Blah blah blah</p>
7043 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7044 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7048 Interlanguage link variations
7057 <p>Blah blah blah</p>
7058 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" data-parsoid='{"stx":"simple","a":{"href":"http://es.wikipedia.org/wiki/Spanish"},"sa":{"href":" es :Spanish"}}'/>
7059 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" data-parsoid='{"stx":"simple","a":{"href":"http://zh.wikipedia.org/wiki/Chinese"},"sa":{"href":" ZH :Chinese"}}'/>
7063 Interlanguage link, with prefix links
7073 <p>Blah blah blah</p>
7074 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7078 Double interlanguage link, with prefix links (bug 8897)
7089 <p>Blah blah blah</p>
7090 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7091 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7095 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7103 <p>Blah blah blah</p>
7104 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7108 Parsoid-specific test: Wikilinks with should RT properly
7114 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7119 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7123 He&nbsp;llo [[Foo|He&nbsp;llo]]
7125 He&nbsp;llo [[He&nbsp;llo]]
7127 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7128 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7132 Parsoid: handle constructor well
7138 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7139 </p><p><a href="/index.php?title=Constructor:foo&action=edit&redlink=1" class="new" title="Constructor:foo (page does not exist)">constructor:foo</a>
7142 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7144 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7153 # Note that `ko` isn't a known interlanguage prefix
7155 Parsoid: recognize interlanguage links without a target page
7165 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7167 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7170 # Note that `ko` isn't a known interwiki prefix
7172 Parsoid: recognize interwiki links without a target page
7174 parsoid=wt2html,wt2wt,html2html
7180 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7181 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7184 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7185 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7189 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7193 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7196 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7200 Interlanguage link with preceding local interwiki link (bug 68085)
7202 parsoid=wt2html,wt2wt,html2html
7205 [[local:es:Spanish]]
7208 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7212 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7216 Looks like an interlanguage link, but is actually a local interwiki
7218 parsoid=wt2html,wt2wt,html2html
7224 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7228 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7232 ### Redirects, Parsoid-only
7235 1. Simple redirect to page
7239 #REDIRECT [[Main Page]]
7241 <link rel="mw:PageProp/redirect" href="./Main_Page">
7244 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7246 2. Other redirect variants
7248 parsoid=wt2html,wt2wt
7250 #REDIRECT [[Main_Page]]
7251 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7253 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7259 parsoid=wt2html,wt2wt
7264 <li>REDIRECT [[]]</li></ol>
7268 Optional colon in #REDIRECT
7270 # the colon is archaic syntax. we support it for wt2html, but we
7271 # don't care that it roundtrips back to the modern syntax.
7272 parsoid=wt2html,html2html
7274 #REDIRECT:[[Main Page]]
7276 <link rel="mw:PageProp/redirect" href="./Main_Page">
7280 Whitespace in #REDIRECT with optional colon
7282 # the colon and gratuitous whitespace is archaic syntax. we support
7283 # it for wt2html, but we don't care that it roundtrips back to the
7284 # modern syntax (without extra whitespace)
7285 parsoid=wt2html,html2html
7292 <link rel="mw:PageProp/redirect" href="./Main_Page">
7296 Piped link in #REDIRECT
7298 # content after piped link is ignored. we support this syntax,
7299 # but don't care that the piped link is lost when we roundtrip this.
7302 #REDIRECT [[Main Page|bar]]
7304 <link rel="mw:PageProp/redirect" href="./Main_Page">
7308 Redirect to category
7312 #REDIRECT [[Category:Foo]]
7314 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7318 Redirect to category with URL encoding
7322 #REDIRECT [[Category%3AFoo]]
7324 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7328 Redirect to category page
7330 parsoid=wt2html,html2html
7332 #REDIRECT [[:Category:Foo]]
7334 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7338 Redirect to image page (1)
7342 #REDIRECT [[File:Wiki.png]]
7344 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7348 Redirect to image page (2)
7352 #REDIRECT [[Image:Wiki.png]]
7354 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7358 Redirect to language
7362 #REDIRECT [[en:File:Wiki.png]]
7364 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7368 Redirect to interwiki
7372 #REDIRECT [[meatball:File:Wiki.png]]
7374 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7378 Non-English #REDIRECT
7383 #TILVÍSUN [[Main Page]]
7385 <link rel="mw:PageProp/redirect" href="./Main_Page">
7396 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7413 Broken br tag sanitization
7421 # TODO: Fix html2html mode (bug 51055)!
7422 # This </br> handling was added as part of bug 50831; but it
7423 # differs from how PHP+tidy handles this. We should investigate
7426 Parsoid: Broken br tag recognition
7442 Incorrecly removing closing slashes from correctly formed XHTML
7444 <br style="clear:both;" />
7446 <p><br style="clear:both;" />
7451 Failing to transform badly formed HTML into correct XHTML
7453 <br style="clear: left;">
7454 <br style="clear: right;">
7455 <br style="clear: both;">
7457 <p><br style="clear: left;" />
7458 <br style="clear: right;" />
7459 <br style="clear: both;" />
7464 Handling html with a div self-closing tag
7473 <p><div title />
7477 <p><div title=bar />
7478 <div title=bar/>
7480 <div title="bar/"></div>
7486 Handling html with a br self-closing tag
7495 <p><br title="title" />
7496 <br title="title" />
7513 Horizontal ruler (should it add that extra space?)
7528 Horizontal ruler -- 4+ dashes render hr
7537 Horizontal ruler -- eats additional dashes on the same line
7546 Horizontal ruler -- does not collapse dashes on consecutive lines
7557 Horizontal ruler -- <4 dashes render as plain text
7566 Horizontal ruler -- Supports content following dashes on same line
7578 ### Block-level elements
7587 <ul><li>Common list</li>
7589 <li>item 3</li></ul>
7600 <ol><li>Numbered list</li>
7602 <li> item 3</li></ol>
7616 ***#Number on level 4
7618 **#Number on level 3
7619 **#Number on level 3
7623 #** Level 3, but ordered
7626 <ol><li> with numbers</li></ol>
7627 <ul><li> and bullets</li></ul>
7628 <ol><li> and numbers</li></ol></li>
7630 <ul><li>bullet level 2
7631 <ul><li>bullet level 3
7632 <ol><li>Number on level 4</li></ol></li></ul></li>
7634 <ol><li>Number on level 3</li>
7635 <li>Number on level 3</li></ol></li></ul>
7636 <ol><li>number level 2</li></ol></li>
7638 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7639 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7650 <ul><li>bar</li></ul></li></ul>
7660 <ul><li><ul><li>foo</li></ul></li>
7666 Nested lists 3 (first element empty)
7672 <ul><li>bar</li></ul></li></ul>
7677 Nested lists 4 (first element empty)
7682 <ul><li><ul><li></li></ul></li>
7688 Nested lists 5 (both elements empty)
7693 <ul><li><ul><li></li></ul></li>
7699 Nested lists 6 (both elements empty)
7705 <ul><li></li></ul></li></ul>
7710 Nested lists 7 (skip initial nesting levels)
7714 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7719 Nested lists 8 (multiple nesting transitions)
7727 <ul><li><ul><li> bar</li></ul></li>
7728 <li> baz</li></ul></li>
7734 1. Lists with start-of-line-transparent tokens before bullets: Comments
7747 2. Lists with start-of-line-transparent tokens before bullets: Template close
7752 <ul><li>foo bar</li>
7758 List items are not parsed correctly following a <pre> block (bug 785)
7764 <ul><li> <pre>foo</pre></li>
7765 <li> <pre>bar</pre></li>
7771 List items from template
7782 * notSOL{{inner list}}
7785 <ul><li> item 1</li>
7786 <li> item 2</li></ul>
7787 <ul><li> item 0</li>
7789 <li> item 2</li></ul>
7790 <ul><li> item 0</li>
7793 <li> item 2</li></ul>
7798 List interrupted by empty line or heading
7806 <ul><li> foo</li></ul>
7807 <ul><li><ul><li> bar</li></ul></li></ul>
7808 <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>
7809 <ul><li> Another list item</li></ul>
7814 Multiple list tags generated by templates
7835 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7838 <!--This line will NOT split the list-->
7840 <!--This line will NOT split the list either-->
7842 <!--foo--> <!----> <!--This line NOT split the list either-->
7853 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7856 <!--This line will NOT split the list-->
7858 <!--This line will NOT split the list either-->
7860 <!--foo--> <!----> <!--This line NOT split the list
7873 (The PHP parser relies on Tidy for the hack)
7875 parsoid=wt2html,wt2wt
7879 * {{echo|<li>templated li-hack}}
7880 * <!--foo--> <li> unsupported li-hack with preceding comments
7883 <li><li>not a li-hack
7890 <li>templated li-hack</li>
7891 <li>unsupported li-hack with preceding comments</li>
7894 <li>not a li-hack</li>
7899 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7926 Parsoid: Test of whitespace serialization with Templated bullets
7933 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7937 # ------------------------------------------------------------------------
7938 # The next set of tests are about Parsoid's ability to handle badly nested
7939 # tags (parse, minimize scope of fixup, and roundtrip back)
7940 # ------------------------------------------------------------------------
7943 Unbalanced closing block tags break a list
7944 (php parser relies on Tidy to fix up)
7962 # Parsoid fails this test, but it might be tricky to support properly.
7965 Unbalanced closing non-block tags don't break a list
7966 (php parser relies on Tidy to fix up)
7973 <li><span>a</span></li>
7974 <li><span>b</span></li>
7988 Unclosed formatting tags that straddle lists are closed and reopened
7989 (php parser relies on Tidy to fix up)
7991 parsoid=wt2html,wt2wt,html2html
8001 <ol><li> <s> a</s></li>
8002 <li><s> b </s></li></ol>
8005 # Parsoid fails this test, but it might be tricky to support properly.
8008 List embedded in a non-block tag
8009 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
8016 <li><small>foo</small></li>
8026 # This is a bug in the PHP parser + tidy combination.
8027 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8028 # and then fostered out of the table by tidy.)
8029 # We believe the Parsoid output to be correct.
8031 Table with missing opening <tr> tag
8033 parsoid=wt2html,wt2wt
8058 # Note that the current date is hard-coded as
8059 # 1970-01-01T00:02:03Z (a Thursday)
8060 # when running parser tests. The timezone is also fixed to GMT, so
8061 # local date will be identical to current date.
8064 Magic Word: {{CURRENTDAY}}
8073 Magic Word: {{CURRENTDAY2}}
8082 Magic Word: {{CURRENTDAYNAME}}
8091 Magic Word: {{CURRENTDOW}}
8100 Magic Word: {{CURRENTMONTH}}
8109 Magic Word: {{CURRENTMONTH1}}
8118 Magic Word: {{CURRENTMONTHABBREV}}
8120 {{CURRENTMONTHABBREV}}
8127 Magic Word: {{CURRENTMONTHNAME}}
8129 {{CURRENTMONTHNAME}}
8136 Magic Word: {{CURRENTMONTHNAMEGEN}}
8138 {{CURRENTMONTHNAMEGEN}}
8145 Magic Word: {{CURRENTTIME}}
8154 Magic Word: {{CURRENTHOUR}}
8163 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8172 Magic Word: {{CURRENTYEAR}}
8181 Magic Word: {{CURRENTTIMESTAMP}}
8183 {{CURRENTTIMESTAMP}}
8190 Magic Words LOCAL (UTC)
8194 * {{LOCALMONTHNAME}}
8195 * {{LOCALMONTHNAMEGEN}}
8196 * {{LOCALMONTHABBREV}}
8205 * {{LOCALTIMESTAMP}}
8220 <li> 19700101000203</li></ul>
8225 Magic Word: {{FULLPAGENAME}}
8227 title=[[User:Ævar Arnfjörð Bjarmason]]
8231 <p>User:Ævar Arnfjörð Bjarmason
8236 Magic Word: {{FULLPAGENAMEE}}
8238 title=[[User:Ævar Arnfjörð Bjarmason]]
8242 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8247 Magic Word: {{TALKSPACE}}
8249 title=[[User:Ævar Arnfjörð Bjarmason]]
8258 Magic Word: {{TALKSPACE}}, same namespace
8260 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8269 Magic Word: {{TALKSPACE}}, main namespace
8271 title=[[Parser Test]]
8280 Magic Word: {{TALKSPACEE}}
8282 title=[[User:Ævar Arnfjörð Bjarmason]]
8291 Magic Word: {{SUBJECTSPACE}}
8293 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8302 Magic Word: {{SUBJECTSPACE}}, same namespace
8304 title=[[User:Ævar Arnfjörð Bjarmason]]
8313 Magic Word: {{SUBJECTSPACE}}, main namespace
8315 title=[[Parser Test]]
8323 Magic Word: {{SUBJECTSPACEE}}
8325 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8334 Magic Word: {{NAMESPACE}}
8336 title=[[User:Ævar Arnfjörð Bjarmason]]
8345 Magic Word: {{NAMESPACEE}}
8347 title=[[User:Ævar Arnfjörð Bjarmason]]
8356 Magic Word: {{NAMESPACENUMBER}}
8358 title=[[User:Ævar Arnfjörð Bjarmason]]
8367 Magic Word: {{SUBPAGENAME}}
8369 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8378 Magic Word: {{SUBPAGENAMEE}}
8380 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8389 Magic Word: {{ROOTPAGENAME}}
8391 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8395 <p>Ævar Arnfjörð Bjarmason
8400 Magic Word: {{ROOTPAGENAMEE}}
8402 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8406 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8411 Magic Word: {{BASEPAGENAME}}
8413 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8417 <p>Ævar Arnfjörð Bjarmason
8422 Magic Word: {{BASEPAGENAMEE}}
8424 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8428 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8433 Magic Word: {{TALKPAGENAME}}
8435 title=[[User:Ævar Arnfjörð Bjarmason]]
8439 <p>User talk:Ævar Arnfjörð Bjarmason
8444 Magic Word: {{TALKPAGENAMEE}}
8446 title=[[User:Ævar Arnfjörð Bjarmason]]
8450 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8455 Magic Word: {{SUBJECTPAGENAME}}
8457 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8461 <p>User:Ævar Arnfjörð Bjarmason
8466 Magic Word: {{SUBJECTPAGENAMEE}}
8468 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8470 {{SUBJECTPAGENAMEE}}
8472 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8477 Magic Word: {{NUMBEROFFILES}}
8486 Magic Word: {{PAGENAME}}
8488 title=[[User:Ævar Arnfjörð Bjarmason]]
8492 <p>Ævar Arnfjörð Bjarmason
8497 Magic Word: {{PAGENAME}} with metacharacters
8499 title=[['foo & bar = baz']]
8503 <p><i>'foo & bar = baz'</i>
8506 <p><i>'foo & bar = baz'</i></p>
8510 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8512 title=[[*RFC 1234 http://example.com/]]
8516 <p>*RFC 1234 http://example.com/
8519 <p>*RFC 1234 http://example.com/</p>
8523 Magic Word: {{PAGENAMEE}}
8525 title=[[User:Ævar Arnfjörð Bjarmason]]
8529 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8534 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8536 title=[[*RFC 1234 http://example.com/]]
8540 <p>*RFC_1234_http://example.com/
8543 <p>*RFC_1234_http://example.com/</p>
8547 Magic Word: {{REVISIONID}}
8556 Magic Word: {{SCRIPTPATH}}
8565 Magic Word: {{STYLEPATH}}
8574 Magic Word: {{SERVER}}
8578 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8583 Magic Word: {{SERVERNAME}}
8592 Magic Word: {{SITENAME}}
8601 Case-sensitive magic words, when cased differently, should just be template transclusions
8608 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8609 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8610 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8611 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8616 Case-insensitive magic words should still work with weird casing.
8626 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8631 Namespace 1 {{ns:1}}
8640 Namespace 1 {{ns:01}}
8649 Namespace 0 {{ns:0}} (bug 4783)
8657 Namespace 0 {{ns:00}} (bug 4783)
8665 Namespace -1 {{ns:-1}}
8674 Namespace User {{ns:User}}
8683 Namespace User talk {{ns:User_talk}}
8692 Namespace User talk {{ns:uSeR tAlK}}
8701 Namespace File {{ns:File}}
8710 Namespace File {{ns:Image}}
8719 Namespace (lang=de) Benutzer {{ns:User}}
8730 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8736 <p>Benutzer Diskussion
8744 {{urlencode:hi world?!}}
8745 {{urlencode:hi world?!|WIKI}}
8746 {{urlencode:hi world?!|PATH}}
8747 {{urlencode:hi world?!|QUERY}}
8757 Magic Word: prioritize type info over data-parsoid
8763 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8767 Magic Word: serialize on separate line (parsoid)
8769 parsoid=wt2wt,html2wt
8775 foo<meta property="mw:PageProp/notoc"/>bar
8779 Magic Word: rt non-english wikis
8786 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8793 Magic links: internal link to RFC (bug 479)
8797 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8802 Magic links: RFC (bug 479)
8806 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8811 Magic links: ISBN (bug 1937)
8815 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8820 Magic links: PMID incorrectly converts space to underscore
8824 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8833 Nonexistent template
8835 {{thistemplatedoesnotexist}}
8837 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8842 Template with invalid target containing tags
8844 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8846 <p>{{a<b>b</b>|foo|a=b|a = b}}
8851 Template with invalid target containing unclosed tag
8853 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8855 <p>{{a<b>|foo|a=b|a = b}}</b>
8860 Template with invalid target containing wikilink
8864 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8867 <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>
8871 Template with just whitespace in it, bug #68421
8875 <p><span typeof="mw:Transclusion mw:Nowiki" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</span></p>
8881 This is a test template
8889 <p>This is a test template
8894 Template with explicit namespace
8898 <p>This is a test template
8906 This is a test template with parameter {{{param}}}
8912 {{paramtest|param=foo}}
8914 <p>This is a test template with parameter foo
8919 Template:paramtestnum
8925 Template unnamed parameter
8927 {{paramtestnum|Main Page|the main page}}
8929 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8934 Template:templatesimple
8940 Template:templateredirect
8942 #redirect [[Template:templatesimple]]
8946 Template:templateasargtestnum
8952 Template:templateasargtest
8954 {{template{{{templ}}}}}
8958 Template:templateasargtest2
8964 Template with template name as unnamed argument
8966 {{templateasargtestnum|templatesimple}}
8973 Template with template name as argument
8975 {{templateasargtest|templ=simple}}
8982 Template with template name as argument (2)
8984 {{templateasargtest2|templ=templatesimple}}
8991 Template:templateasargtestdefault
8993 {{{{{templ|templatesimple}}}}}
9003 Template with default value
9005 {{templateasargtestdefault}}
9012 Template with default value (value set)
9014 {{templateasargtestdefault|templ=templa}}
9023 {{templateredirect}}
9030 Template with argument in separate line
9032 {{ templateasargtest |
9040 Template with complex template as argument
9043 param ={{ templateasargtest |
9046 <p>This is a test template with parameter (test)
9051 Template with thumb image (with link in description)
9054 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9056 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>
9059 <p>This is a test template with parameter</p>
9060 <div class="thumb tright">
9061 <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>
9062 <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>
9068 Template:complextemplate
9070 {{{1}}} {{paramtest|
9071 param ={{{param}}}}}
9075 Template with complex arguments
9078 param ={{ templateasargtest |
9079 templ = simple }}|[[Template:complextemplate|link]]}}
9081 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9086 BUG 553: link with two variables in a piped link
9089 |[[{{{1}}}|{{{2}}}]]
9094 <td>[[{{{1}}}|{{{2}}}]]
9100 Magic variable as template parameter
9102 {{paramtest|param={{SITENAME}}}}
9104 <p>This is a test template with parameter MediaWiki
9111 [[{{{param}}}|link]]
9115 Template parameter as link source
9117 {{linktest|param=Main Page}}
9119 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9124 Template-generated attribute string (k='v')
9126 <span {{attr_str|id|v1}}>bar</span>
9128 <p><span id="v1">bar</span>
9135 including another template, {{paramtest|param={{{arg}}}}}
9139 Template passing argument to another template
9141 {{paramtest2|arg='hmm'}}
9143 <p>including another template, This is a test template with parameter 'hmm'
9154 Template as link source
9158 [[{{linktest2}}|Main Page]]
9160 [[{{linktest2}}]]Page
9162 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9163 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9164 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9182 Template infinite loop
9186 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9191 Template from main namespace
9210 BUG 529: Template with table, not included at beginning of line
9229 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9249 BUG 41: Template parameters shown as broken links
9258 Template with targets containing wikilinks
9262 {{[[{{echo|foo}}]]}}
9264 {{{{echo|[[foo}}]]}}
9266 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9267 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9275 ''None'' of '''this''' should be
9277 but rather passed unmodified
9284 # hmm, fix this or just deprecate msgnw and document its behavior?
9288 {{msgnw:MSGNW test}}
9290 <p>''None'' of '''this''' should be
9292  but rather passed unmodified
9293 {{test}}
9303 {{int:youhavenewmessages|lots of money|not!}}
9305 <p>You have lots of money (not!).
9312 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9316 <includeonly> and <noinclude> being included
9327 <onlyinclude>Foo</onlyinclude>bar
9331 <onlyinclude> being included
9343 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9347 <onlyinclude> and <includeonly> being included
9356 <includeonly> and <noinclude> on a page
9358 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9365 Un-closed <noinclude>
9372 <onlyinclude> on a page
9374 <onlyinclude>Foo</onlyinclude>bar
9381 Un-closed <onlyinclude>
9388 Self-closed noinclude, includeonly, onlyinclude tags
9399 Unbalanced includeonly and noinclude tags
9403 |b</noinclude></noinclude>
9404 |c</noinclude></includeonly>
9405 |d</includeonly></includeonly>
9414 <td>c</includeonly>
9416 <td>d</includeonly></includeonly>
9422 Template:Includeonly section
9425 ==Includeonly section==
9431 Bug 6563: Edit link generation for section shown by <includeonly>
9433 {{includeonly section}}
9435 <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>
9436 <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>
9440 # Uses same input as the contents of [[Template:Includeonly section]]
9442 Bug 6563: Section extraction for section shown by <includeonly>
9447 ==Includeonly section==
9455 Bug 6563: Edit link generation for section suppressed by <includeonly>
9458 ==Includeonly section==
9462 <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>
9467 Bug 6563: Section extraction for section suppressed by <includeonly>
9472 ==Includeonly section==
9480 Un-closed <includeonly>
9487 Includes and comments at SOL
9489 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9496 <includeonly>can have stuff</includeonly>=== here ===
9499 <h2><span class="mw-headline" id="hu">hu</span></h2>
9504 <h3><span class="mw-headline" id="here">here</span></h3>
9507 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2> hu </h2>
9509 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9511 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9514 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3> here </h3>
9518 # TODO: test with DOM fragment reuse!
9520 Parsoid: DOM fragment reuse
9522 parsoid=wt2wt,wt2html
9524 a{{echo|b<table></table>c}}d
9536 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b<table></table>c"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
9538 <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"]}' data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}'>ab</p><span about="#mwt2">
9539 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9540 </span><p about="#mwt2">cd</p>
9542 <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}}]}' data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}'>a</p><span about="#mwt3">
9544 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9546 </span><p about="#mwt3">b</p>
9550 Parsoid: Merge double tds (bug 50603)
9559 <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>
9564 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9574 <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}}]}'>
9576 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9582 ### <includeonly> and <noinclude> in attributes
9585 0. includeonly around the entire attribute
9587 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9589 <p><span id="v2">bar</span>
9594 1. includeonly in html attr key
9596 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9598 <p><span id="foo">bar</span>
9603 2. includeonly in html attr value
9605 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9606 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9608 <p><span id="v1">bar</span>
9609 <span id="v1">bar</span>
9614 3. includeonly in part of an attr value
9616 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9618 <p><span style="color:red;">bar</span>
9623 4. includeonly in table attributes
9647 ### Token Stream Patcher tests
9649 ### These tests won't always pass wt2wt and other modes because
9650 ### on serialization, the table will be output on a new line.
9651 ### For now, we are blacklisting them, and using this to test selser.
9655 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9657 parsoid=wt2html,wt2wt
9659 {{echo|}}{| width = '100%'
9663 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
9664 <tbody><tr><td>foo</td></tr>
9669 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9671 parsoid=wt2html,wt2wt
9673 <includeonly>a</includeonly>{| {{{b}}}
9677 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid=\"{&quot;dsr&quot;:[31,38,null,null],&quot;src&quot;:&quot;{{{b}}}&quot;}\">{{{b}}}</span>"},{"html":""}]]}' data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}'>
9678 <tbody><tr><td>c</td></tr>
9684 ### Testing parsing of templates where a template arg
9685 ### has the same name as the template itself.
9695 Templates: Template Name/Arg clash: 1. Use of positional param
9704 Templates: Template Name/Arg clash: 2. Use of named param
9713 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9722 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
9726 Templates: 1. Simple use
9735 Templates: 2. Inside a block tag
9737 <div>{{echo|Foo}}</div>
9738 <blockquote>{{echo|Foo}}</blockquote>
9741 <blockquote>Foo</blockquote>
9751 Templates: P-wrapping: 1a. Templates on consecutive lines
9762 Templates: P-wrapping: 1b. Templates on consecutive lines
9776 Templates: P-wrapping: 1c. Templates on consecutive lines
9779 {{echo|bar}} <div>baz</div>
9792 Templates: P-wrapping: 1d. Template preceded by comment-only line
9801 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
9805 Templates: Inline Text: 1. Multiple template uses
9807 {{echo|Foo}}bar{{echo|baz}}
9814 Templates: Inline Text: 2. Back-to-back template uses
9816 {{echo|Foo}}{{echo|bar}}
9823 Templates: Block Tags: 1. Multiple template uses
9825 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
9827 <div>Foo</div><div>bar</div><div>baz</div>
9832 Templates: Block Tags: 2. Back-to-back template uses
9834 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
9836 <div>Foo</div><div>bar</div>
9840 # This is an edge case relating to paragraph wrapping.
9842 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
9847 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\nb</p>"}},"i":0}}]}'>a
9852 Templates: Links: 1. Simple example
9854 {{echo|[[Foo|bar]]}}
9856 <p><a href="/wiki/Foo" title="Foo">bar</a>
9861 Templates: Links: 2. Generation of link href
9863 [[{{echo|Foo}}|bar]]
9865 <p><a href="/wiki/Foo" title="Foo">bar</a>
9870 Templates: Links: 3. Generation of part of a link href
9872 [[Fo{{echo|o}}|bar]]
9876 [[Foo{{echo|bar}}baz]]
9878 [[Foo{{echo|bar}}|bar]]
9880 [[:Foo{{echo|bar}}]]
9882 [[:Foo{{echo|bar}}|bar]]
9884 <p><a href="/wiki/Foo" title="Foo">bar</a>
9885 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9886 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9887 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9888 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9889 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9894 Templates: Links: 4. Multiple templates generating link href
9896 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9898 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9903 Templates: Links: 5. Generation of link text
9905 [[Foo|{{echo|bar}}]]
9907 <p><a href="/wiki/Foo" title="Foo">bar</a>
9912 Templates: Links: 5. Nested templates (only outermost template should be marked)
9914 {{echo|[[{{echo|Foo}}|bar]]}}
9916 <p><a href="/wiki/Foo" title="Foo">bar</a>
9921 Templates: HTML Tag: 1. Generation of HTML attr. key
9923 <div {{echo|style}}="color:red;">foo</div>
9925 <div style="color:red;">foo</div>
9930 Templates: HTML Tag: 2. Generation of HTML attr. value
9932 <div style={{echo|'color:red;'}}>foo</div>
9934 <div style="color:red;">foo</div>
9939 Templates: HTML Tag: 3. Generation of HTML attr key and value
9941 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9943 <div style="color:red;">foo</div>
9948 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9950 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9952 <div title="This is a long title with just one piece templated">foo</div>
9957 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9959 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9961 <div title="This is a long title with just one piece templated">foo</div>
9966 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9968 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9970 <div title="This is a long title with just one piece templated">foo</div>
9975 Templates: HTML Tag: 7. Generation of partial attribute key string
9977 <div st{{echo|yle}}="color:red;">foo</div>
9979 <div style="color:red;">foo</div>
9984 Templates: HTML Tables: 1. Generating start of a HTML table
9986 {{echo|<table><tr><td>foo</td>}}</tr></table>
9988 <table><tr><td>foo</td></tr></table>
9993 Templates: HTML Tables: 2a. Generating middle of a HTML table
9995 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9997 <table><tr><td>foo</td></tr></table>
10002 Templates: HTML Tables: 2b. Generating middle of a HTML table
10004 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10006 <table><tr><td>foo</td></tr></table>
10011 Templates: HTML Tables: 3. Generating end of a HTML table
10013 <table><tr>{{echo|<td>foo</td></tr></table>}}
10015 <table><tr><td>foo</td></tr></table>
10020 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10022 {{echo|<table>}}<tr><td>foo</td></tr></table>
10024 <table><tr><td>foo</td></tr></table>
10029 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10031 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10033 <table><tr><td>foo</td></tr></table>
10038 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10040 <table><tr>{{echo|<td>}}foo</td></tr></table>
10042 <table><tr><td>foo</td></tr></table>
10047 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10049 <table><tr><td>foo{{echo|</td>}}</tr></table>
10051 <table><tr><td>foo</td></tr></table>
10056 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10058 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10060 <table><tr><td>foo</td></tr></table>
10065 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10067 <table><tr><td>foo</td></tr>{{echo|</table>}}
10069 <table><tr><td>foo</td></tr></table>
10074 Templates: HTML Tables: 5. Proper fostering of categories from inside
10076 parsoid=wt2html,wt2wt
10078 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10079 <!--Two categories (Bug 50330)-->
10080 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10082 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10083 <!--Two categories (Bug 50330)-->
10084 <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>
10088 Templates: Wiki Tables: 1a. Fostering of entire template content
10096 <tr><td></td></tr></table>
10108 Templates: Wiki Tables: 1b. Fostering of entire template content
10121 <tr><td></td></tr></table>
10135 Templates: Wiki Tables: 2. Fostering of partial template content
10145 <tr><td></td></tr></table>
10158 Templates: Wiki Tables: 3. td-content via multiple templates
10161 {{echo|{{pipe}}a}}{{echo|b}}
10172 Templates: Wiki Tables: 4. Templated tags, no content
10178 <tr><td></td></tr></table>
10183 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10197 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10211 Templates: Lists: Multi-line list-items via templates
10213 *{{echo|a {{nonexistent|
10215 *{{echo|b {{nonexistent|
10218 <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>
10219 <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>
10224 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10226 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10228 <p><i>ab</i>c<i>d</i>e
10233 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10234 (PHP parser generates misnested html)
10236 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10238 <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>
10242 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10243 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10245 parsoid=wt2html,wt2wt
10247 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10249 <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>
10250 <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>
10251 <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>
10255 Templates: Ugly nesting: 4. Divs opened/closed across templates
10257 a<div>b{{echo|c</div>d}}e
10268 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10274 |{{echo|foo</table>}}
10278 <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|}"]}'>
10282 <td>foo</td></tr></tbody></table><span about="#mwt1">
10283 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10288 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10298 <td>1. {{echo|foo </table>}}</td>
10300 <td>2. {{echo|baz </table>}}</td>
10313 <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>"]}'>
10318 <td>1. foo </td></tr></tbody></table></td>
10320 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10321 </span><span about="#mwt2">
10322 </span><span about="#mwt2">
10323 </span><span about="#mwt2">abc</span><span about="#mwt2">
10324 </span><span about="#mwt2">
10325 </span><span about="#mwt2">
10326 </span><span about="#mwt2">
10327 </span><span about="#mwt2">
10328 </span><span about="#mwt2">
10329 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10330 </span><span about="#mwt2">
10335 Templates: Ugly templates: 3. newline-only template parameter
10344 # This looks like a bug: a single newline triggers p/br for some reason.
10346 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10355 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10356 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10358 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10364 <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
10365 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10369 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10370 # that are "identical" and generate nesting cycles in the algorithm
10372 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10374 {{echo|<table><tr><td><table>}}
10378 <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"}'>
10379 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10380 </table></td></tr></tbody></table>
10384 Parser Functions: 1. Simple example
10393 Parser Functions: 2. Nested use (only outermost should be marked up)
10402 ### Pre-save transform tests
10405 pre-save transform: subst:
10411 This is a test template
10415 pre-save transform: normal template
10425 pre-save transform: nonexistent template
10429 {{thistemplatedoesnotexist}}
10431 {{thistemplatedoesnotexist}}
10436 pre-save transform: subst magic variables
10445 # This is bug 89, which I fixed. -- wtm
10447 pre-save transform: subst: templates with parameters
10451 {{subst:paramtest|param="something else"}}
10453 This is a test template with parameter "something else"
10457 Template:nowikitest
10459 <nowiki>'''not wiki'''</nowiki>
10463 pre-save transform: nowiki in subst (bug 1188)
10467 {{subst:nowikitest}}
10469 <nowiki>'''not wiki'''</nowiki>
10474 Template:commenttest
10476 This template has <!-- a comment --> in it.
10480 pre-save transform: comment in subst (bug 1936)
10484 {{subst:commenttest}}
10486 This template has <!-- a comment --> in it.
10490 pre-save transform: unclosed tag
10494 <nowiki>'''not wiki'''
10496 <nowiki>'''not wiki'''
10500 pre-save transform: mixed tag case
10504 <NOwiki>'''not wiki'''</noWIKI>
10506 <NOwiki>'''not wiki'''</noWIKI>
10510 pre-save transform: unclosed comment in <nowiki>
10514 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10516 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10519 # Leading @ in this template definition works around a limitation
10520 # in parsoid's parserTests which otherwise strips the <span> from the
10521 # result (confusing it for a template wrapper)
10525 @<span onmouseover="alert('crap')">Oh no</span>
10529 (confirming safety of fix for subst bug 1936)
10531 {{Template:dangerous}}
10533 <p>@<span>Oh no</span>
10538 pre-save transform: comment containing gallery (bug 5024)
10542 <!-- <gallery>data</gallery> -->
10544 <!-- <gallery>data</gallery> -->
10548 pre-save transform: comment containing extension
10552 <!-- <tag>data</tag> -->
10554 <!-- <tag>data</tag> -->
10558 pre-save transform: comment containing nowiki
10562 <!-- <nowiki>data</nowiki> -->
10564 <!-- <nowiki>data</nowiki> -->
10568 pre-save transform: <noinclude> in subst (bug 3298)
10578 pre-save transform: <onlyinclude> in subst (bug 3298)
10582 {{subst:Includes2}}
10590 {{<includeonly>subst:</includeonly>Includes}}
10594 Template:SafeSubstTest
10596 {{<includeonly>safesubst:</includeonly>Includes}}
10600 bug 22297: safesubst: works during PST
10604 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10610 bug 22297: safesubst: works during normal parse
10619 subst: does not work during normal parse
10623 <p>{{subst:Includes}}
10628 pre-save transform: context links ("pipe trick")
10632 [[Article (context)|]]
10635 [[Bar:Article (context)|]]
10636 [[:Bar:Article (context)|]]
10638 [[|Article (context)]]
10642 [[Article (context)|Article]]
10643 [[Bar:Article|Article]]
10644 [[:Bar:Article|Article]]
10645 [[Bar:Article (context)|Article]]
10646 [[:Bar:Article (context)|Article]]
10648 [[Article (context)]]
10649 [[Bar:X (Y) Z|X (Y) Z]]
10650 [[:Bar:X (Y) Z|X (Y) Z]]
10654 pre-save transform: context links ("pipe trick") with interwiki prefix
10658 [[interwiki:Article|]]
10659 [[:interwiki:Article|]]
10660 [[interwiki:Bar:Article|]]
10661 [[:interwiki:Bar:Article|]]
10663 [[interwiki:Article|Article]]
10664 [[:interwiki:Article|Article]]
10665 [[interwiki:Bar:Article|Bar:Article]]
10666 [[:interwiki:Bar:Article|Bar:Article]]
10670 pre-save transform: context links ("pipe trick") with parens in title
10672 pst title=[[Somearticle (context)]]
10676 [[Article (context)|Article]]
10680 pre-save transform: context links ("pipe trick") with comma in title
10682 pst title=[[Someplace, Somewhere]]
10685 [[Otherplace, Elsewhere|]]
10686 [[Otherplace, Elsewhere, Anywhere|]]
10688 [[Otherplace, Somewhere|Otherplace]]
10689 [[Otherplace, Elsewhere|Otherplace]]
10690 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
10694 pre-save transform: context links ("pipe trick") with parens and comma
10696 pst title=[[Someplace (IGNORED), Somewhere]]
10699 [[Otherplace (place), Elsewhere|]]
10701 [[Otherplace, Somewhere|Otherplace]]
10702 [[Otherplace (place), Elsewhere|Otherplace]]
10706 pre-save transform: context links ("pipe trick") with comma and parens
10708 pst title=[[Who, me? (context)]]
10711 [[Me, Myself, and I (1937 song)|]]
10713 [[Yes, you. (context)|Yes, you.]]
10714 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
10718 pre-save transform: context links ("pipe trick") with namespace
10720 pst title=[[Ns:Somearticle]]
10724 [[Ns:Article|Article]]
10728 pre-save transform: context links ("pipe trick") with namespace and parens
10730 pst title=[[Ns:Somearticle (context)]]
10734 [[Ns:Article (context)|Article]]
10738 pre-save transform: context links ("pipe trick") with namespace and comma
10740 pst title=[[Ns:Somearticle, Context, Whatever]]
10744 [[Ns:Article, Context, Whatever|Article]]
10748 pre-save transform: context links ("pipe trick") with namespace, comma and parens
10750 pst title=[[Ns:Somearticle, Context (context)]]
10754 [[Ns:Article (context)|Article]]
10758 pre-save transform: context links ("pipe trick") with namespace, parens and comma
10760 pst title=[[Ns:Somearticle (IGNORED), Context]]
10764 [[Ns:Article, Context|Article]]
10768 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
10772 [[Article(context)|]]
10773 [[Bar:Article(context)|]]
10774 [[:Bar:Article(context)|]]
10775 [[|Article(context)]]
10779 [[Article(context)|Article]]
10780 [[Bar:Article(context)|Article]]
10781 [[:Bar:Article(context)|Article]]
10782 [[Article(context)]]
10783 [[Bar:X(Y)Z|X(Y)Z]]
10784 [[:Bar:X(Y)Z|X(Y)Z]]
10788 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
10792 [[Article (context)|]]
10793 [[Bar:Article (context)|]]
10794 [[:Bar:Article (context)|]]
10795 [[|Article (context)]]
10799 [[Article (context)|Article]]
10800 [[Bar:Article (context)|Article]]
10801 [[:Bar:Article (context)|Article]]
10802 [[Article (context)]]
10803 [[Bar:X (Y) Z|X (Y) Z]]
10804 [[:Bar:X (Y) Z|X (Y) Z]]
10808 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
10812 [[Article(context)|]]
10813 [[Bar:Article(context)|]]
10814 [[:Bar:Article(context)|]]
10815 [[|Article(context)]]
10819 [[Article(context)|Article]]
10820 [[Bar:Article(context)|Article]]
10821 [[:Bar:Article(context)|Article]]
10822 [[Article(context)]]
10823 [[Bar:X(Y)Z|X(Y)Z]]
10824 [[:Bar:X(Y)Z|X(Y)Z]]
10828 pre-save transform: context links ("pipe trick") with commas (bug 21660)
10832 [[Article (context), context|]]
10833 [[Article (context),context|]]
10834 [[Bar:Article (context), context|]]
10835 [[Bar:Article (context),context|]]
10836 [[:Bar:Article (context), context|]]
10837 [[:Bar:Article (context),context|]]
10839 [[Article (context), context|Article]]
10840 [[Article (context),context|Article]]
10841 [[Bar:Article (context), context|Article]]
10842 [[Bar:Article (context),context|Article]]
10843 [[:Bar:Article (context), context|Article]]
10844 [[:Bar:Article (context),context|Article]]
10848 pre-save transform: trim trailing empty lines
10852 Empty lines are trimmed
10858 Empty lines are trimmed
10862 pre-save transform: Signature expansion
10867 * <noinclude>~~~</noinclude>
10868 * <includeonly>~~~</includeonly>
10869 * <onlyinclude>~~~</onlyinclude>
10871 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
10872 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
10873 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
10874 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
10879 pre-save transform: Signature expansion in nowiki tags (bug 93)
10885 <nowiki>~~~~</nowiki>
10887 <includeonly><nowiki>~~~~</nowiki></includeonly>
10889 <noinclude><nowiki>~~~~</nowiki></noinclude>
10891 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10893 {{subst:Foo}} shall be converted to FOO
10895 As well as inside noinclude/onlyinclude
10896 <noinclude>{{subst:Foo}}</noinclude>
10897 <onlyinclude>{{subst:Foo}}</onlyinclude>
10899 But not inside includeonly
10900 <includeonly>{{subst:Foo}}</includeonly>
10904 <nowiki>~~~~</nowiki>
10906 <includeonly><nowiki>~~~~</nowiki></includeonly>
10908 <noinclude><nowiki>~~~~</nowiki></noinclude>
10910 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10912 FOO shall be converted to FOO
10914 As well as inside noinclude/onlyinclude
10915 <noinclude>FOO</noinclude>
10916 <onlyinclude>FOO</onlyinclude>
10918 But not inside includeonly
10919 <includeonly>{{subst:Foo}}</includeonly>
10923 Parsoid: Recognize nowiki with trailing space in tags
10927 <nowiki ><div>[[foo]]</nowiki >
10935 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10942 Parsoid: Recognize nowiki with odd capitalization
10946 <noWikI ><div>[[foo]]</Nowiki >
10948 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10953 Parsoid: Escape nowiki with trailing space in tags
10957 <nowiki > foo </nowiki >
10963 <p><nowiki > foo </nowiki ></p>
10964 <p>a<nowiki />b</p>
10965 <p>c<nowiki/ >d</p>
10969 Parsoid: Escape weird noWikI capitalizations
10973 <noWikI > foo </NoWikI >
10975 <p><noWikI > foo </NoWikI ></p>
10979 ### Message transform tests
10982 message transform: magic variables
10992 message transform: should not transform wiki markup
11002 message transform: <noinclude> in transcluded template (bug 4926)
11012 message transform: <onlyinclude> in transcluded template (bug 4926)
11022 {{#special:}} page name, known
11026 {{#special:Recentchanges}}
11028 Special:RecentChanges
11032 {{#special:}} page name with subpage, known
11036 {{#special:Recentchanges/param}}
11038 Special:RecentChanges/param
11042 {{#special:}} page name, unknown
11046 {{#special:foobar nonexistent}}
11048 Special:Foobar nonexistent
11052 {{#speciale:}} page name, known
11056 {{#speciale:Recentchanges}}
11058 Special:RecentChanges
11062 {{#speciale:}} page name with subpage, known
11066 {{#speciale:Recentchanges/param}}
11068 Special:RecentChanges/param
11072 {{#speciale:}} page name, unknown
11076 {{#speciale:foobar nonexistent}}
11078 Special:Foobar_nonexistent
11084 ### For Parsoid-specific tests, see
11085 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11090 parsoid=wt2html,wt2wt,html2html
11092 [[Image:foobar.jpg]]
11094 <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>
11097 <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></p>
11101 Simple image (using File: namespace, now canonical)
11103 [[File:Foobar.jpg]]
11105 <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>
11108 <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></p>
11112 Right-aligned image
11114 [[File:Foobar.jpg|right]]
11116 <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>
11119 <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>
11125 [[File:Foobar.jpg|right|Caption text]]
11127 <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>
11130 <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>
11134 Image with caption, bug 53312 #1
11136 [[File:Foobar.jpg|right|Caption page stuff]]
11138 <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>
11141 <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>
11145 Image with caption, bug 53312 #2
11147 [[File:Foobar.jpg|right|Caption page=]]
11149 <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>
11152 <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>
11156 Image with caption, bug 53312 #3
11158 [[File:Foobar.jpg|right|Caption page=stuff]]
11160 <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>
11163 <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>
11167 Allow empty links in image captions (Bug 60753)
11171 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11176 <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"></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>
11179 <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"}]}'><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/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>Caption <a rel="mw:WikiLink" href="./Link1" title="Link1" data-parsoid='{"stx":"simple","a":{"href":"./Link1"},"sa":{"href":"Link1"}}'>Link1</a>
11181 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11182 </figcaption></figure>
11186 Link with empty target
11195 Image with empty attribute
11197 parsoid=wt2html,wt2wt,html2html
11199 [[File:Foobar.jpg|right||Caption text]]
11201 <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>
11204 <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>
11208 1. Block image with individual attributes from templates
11210 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11212 <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"></a></div>This is a caption</div></div></div>
11215 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 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]}\" 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}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
11219 2. Block Image with individual attributes from templates
11221 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11223 <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"></a></div>This is a caption</div></div></div>
11226 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 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]}\" 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}}]}\">thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" 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]}\" 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}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
11230 3. Inline image with individual attributes from templates
11232 [[File:Foobar.jpg|{{echo|50px}}]]
11234 <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>
11237 <p><span typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}' data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 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]}\" 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}}]}\">50px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50"/></a></span></p>
11240 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11241 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11243 Image with multiple attributes from the same template
11245 [[File:Foobar.jpg|{{image_attribs}}]]
11247 <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>
11250 <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>
11254 Image with link tails
11258 123[[File:Foobar.jpg]]456
11259 123[[File:Foobar.jpg|right]]456
11260 123[[File:Foobar.jpg|thumb]]456
11262 <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
11264 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
11265 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"></a></div></div></div></div>456
11268 <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</p>
11270 <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>
11272 <div class="thumb tright">
11273 <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>
11274 <div class="thumbcaption">
11275 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11281 <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>
11282 <p>123</p><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><p>456</p>
11283 <p>123</p><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><p>456</p>
11287 Image with multiple captions -- only last one is accepted
11289 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11291 <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>
11294 <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>
11298 Image with multiple widths -- use last
11300 [[File:Foobar.jpg|200px|300px|caption]]
11302 <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>
11305 <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>
11309 Image with multiple alignments -- use first (bug 48664)
11313 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11315 [[File:Foobar.jpg|middle|text-top|caption]]
11317 <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"></a></div>caption</div></div></div>
11318 <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>
11321 <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>
11322 <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>
11326 Image with width attribute at different positions
11328 [[File:Foobar.jpg|200px|right|Caption]]
11329 [[File:Foobar.jpg|right|200px|Caption]]
11330 [[File:Foobar.jpg|right|Caption|200px]]
11332 <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>
11333 <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>
11334 <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>
11337 <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>
11338 <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>
11339 <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>
11342 # a sad bit of backward-compatibility
11344 Image with size specified with pxpx (bug 13500, 51628)
11346 parsoid=wt2html,wt2wt,html2html
11348 [[File:Foobar.jpg|20pxpx]]
11349 [[File:Foobar.jpg|200x20pxpx]]
11351 <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>
11352 <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>
11355 <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>
11359 Image with link parameter, wiki target
11361 [[File:Foobar.jpg|link=Main Page]]
11363 <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>
11366 <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>
11369 # parsoid bug 49293 (part 1)
11371 Image with link parameter, URL target
11373 [[File:Foobar.jpg|link=http://example.com/]]
11375 <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>
11378 <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>
11381 # parsoid bug 49293 (part 2)
11383 Image with link parameter, protocol-less URL target
11385 [[File:Foobar.jpg|link=//example.com/]]
11387 <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>
11390 <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>
11394 Image with link parameter, wgExternalLinkTarget
11396 [[Image:foobar.jpg|link=http://example.com/]]
11398 wgExternalLinkTarget='foobar'
11400 <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>
11405 Image with link parameter, wgNoFollowLinks set to false
11407 [[Image:foobar.jpg|link=http://example.com/]]
11409 wgNoFollowLinks=false
11411 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11416 Image with link parameter, wgNoFollowDomainExceptions
11418 [[Image:foobar.jpg|link=http://example.com/]]
11420 wgNoFollowDomainExceptions='example.com'
11422 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11427 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11429 [[Image:foobar.jpg|link=http://example.com/|Title]]
11431 wgExternalLinkTarget='foobar'
11433 <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>
11438 Image with empty link parameter
11440 [[File:Foobar.jpg|link=]]
11442 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11445 <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>
11449 Image with link parameter (wiki target) and unnamed parameter
11451 [[File:Foobar.jpg|link=Main_Page|Title]]
11453 <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>
11456 <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>
11460 Image with link parameter (URL target) and unnamed parameter
11462 [[File:Foobar.jpg|link=http://example.com/|Title]]
11464 <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>
11467 <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>
11471 Thumbnail image with link parameter
11474 parsoid=wt2html,wt2wt,html2html
11476 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11478 <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"></a></div>Title</div></div></div>
11481 <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>
11485 Manually-specified thumbnail image
11489 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11491 <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"></a></div>Title</div></div></div>
11494 <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>
11498 Manually-specified thumbnail image with explicit link to wiki page
11501 parsoid=wt2html,wt2wt,html2html
11503 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11505 <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"></a></div>Title</div></div></div>
11508 <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>
11512 Manually-specified thumbnail image with explicit link to url
11515 parsoid=wt2html,wt2wt,html2html
11517 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11519 <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"></a></div>Title</div></div></div>
11522 <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>
11526 Manually-specified thumbnail image with explicit no link
11529 parsoid=wt2html,wt2wt,html2html
11531 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11533 <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"></a></div>Title</div></div></div>
11536 <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>
11540 Manually-specified thumbnail image with explicit link and alt text
11543 parsoid=wt2html,wt2wt,html2html
11545 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11547 <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"></a></div>Title</div></div></div>
11550 <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>
11554 Image with frame and link
11556 parsoid=wt2html,wt2wt,html2html
11558 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11560 <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>
11563 <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" title="Main Page">Main Page</a></figcaption></figure>
11567 Image with frame and link and explicit alt
11569 parsoid=wt2html,wt2wt,html2html
11571 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11573 <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>
11576 <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" title="Main Page">Main Page</a></figcaption></figure>
11580 Image with wiki markup in implicit alt
11582 parsoid=wt2html,wt2wt,html2html
11584 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11586 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11588 <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>
11589 </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>
11592 <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>
11593 <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>
11596 ###################
11597 # Conflicting image format options.
11598 # First option specified should 'win'.
11599 # All three cases in each test should be identical.
11602 Image with 'frameless' first.
11604 parsoid=wt2html,wt2wt,html2html
11606 [[File:Foobar.jpg|frameless|caption]]
11608 [[File:Foobar.jpg|frameless|frame|caption]]
11610 [[File:Foobar.jpg|frameless|thumb|caption]]
11612 <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>
11613 </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>
11614 </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>
11617 <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>
11618 <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>
11619 <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>
11623 Image with 'frame' first.
11625 parsoid=wt2html,wt2wt,html2html
11627 [[File:Foobar.jpg|frame|caption]]
11628 [[File:Foobar.jpg|frame|frameless|caption]]
11629 [[File:Foobar.jpg|frame|thumb|caption]]
11631 <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>
11632 <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>
11633 <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>
11636 <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>
11637 <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>
11638 <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>
11642 Image with 'thumb' first.
11644 parsoid=wt2html,wt2wt,html2html
11646 [[File:Foobar.jpg|thumb|caption]]
11647 [[File:Foobar.jpg|thumb|frameless|caption]]
11648 [[File:Foobar.jpg|thumb|frame|caption]]
11650 <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"></a></div>caption</div></div></div>
11651 <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"></a></div>caption</div></div></div>
11652 <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"></a></div>caption</div></div></div>
11655 <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>
11656 <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>
11657 <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>
11660 ###################
11662 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
11663 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
11664 # Foobar has actual size of 1941x220
11665 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
11666 # a scalable format.
11667 # 2. Framed images always ignore size options; always render at default size.
11668 # 3. "Unspecified format" and border are the only types which can be
11672 Image: "unspecified format" and border enlarge
11674 parsoid=wt2html,wt2wt,html2html
11676 [[File:Foobar.jpg|2000px]]
11678 [[File:Foobar.jpg|border|2000px]]
11680 <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>
11681 </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>
11684 <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>
11685 <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>
11689 Image: "unspecified format" and border reduce
11691 parsoid=wt2html,wt2wt,html2html
11693 [[File:Foobar.jpg|1000px]]
11695 [[File:Foobar.jpg|border|1000px]]
11697 <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>
11698 </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>
11701 <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>
11702 <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>
11706 Image: thumbs reduce
11708 parsoid=wt2html,wt2wt,html2html
11710 [[File:Foobar.jpg|thumb|50px]]
11712 <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"></a></div></div></div></div>
11715 <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>
11719 Image: bitmap thumbs can't be enlarged past original size, but vector can.
11721 parsoid=wt2html,wt2wt,html2html
11723 [[File:Foobar.jpg|thumb|2000px]]
11725 [[File:Foobar.svg|thumb|2000px]]
11727 <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"></a></div></div></div></div>
11728 <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"></a></div></div></div></div>
11731 <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>
11732 <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>
11736 Image: frameless can reduce in size
11738 parsoid=wt2html,wt2wt,html2html
11740 [[File:Foobar.jpg|frameless|50px]]
11742 <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>
11745 <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>
11749 Image: bitmap frameless can't be enlarged past original size, but vector can
11751 parsoid=wt2html,wt2wt,html2html
11753 [[File:Foobar.jpg|frameless|2000px]]
11755 [[File:Foobar.svg|frameless|2000px]]
11757 <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>
11758 </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>
11761 <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>
11762 <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>
11766 Image: framed images are always unscaled.
11768 parsoid=wt2html,wt2wt,html2html
11770 [[File:Foobar.jpg|frame]]
11772 [[File:Foobar.jpg|frame|50px]]
11774 [[File:Foobar.jpg|frame|50x50px]]
11776 [[File:Foobar.jpg|frame|2000px]]
11778 <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>
11779 <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>
11780 <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>
11781 <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>
11784 <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>
11785 <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>
11786 <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>
11787 <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>
11790 ###################
11793 Link to image page- image page normally doesn't exists, hence edit link
11794 Add test with existing image page
11795 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
11799 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
11804 bug 18784 Link to non-existent image page with caption should use caption as link text
11806 [[:Image:test|caption]]
11808 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
11813 Frameless image caption with a free URL
11815 [[File:Foobar.jpg|http://example.com]]
11817 <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>
11820 <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>
11824 Thumbnail image caption with a free URL
11828 [[File:Foobar.jpg|thumb|http://example.com]]
11830 <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"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
11833 <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>
11837 Thumbnail image caption with a free URL and explicit alt
11840 parsoid=wt2html,wt2wt,html2html
11842 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
11844 <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"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
11847 <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>
11851 SVG thumbnails with no language set
11854 [[File:Foobar.svg|thumb|caption]]
11856 <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"></a></div>caption</div></div></div>
11859 <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>
11863 SVG thumbnails with language de
11865 parsoid=wt2html,wt2wt,html2html
11867 [[File:Foobar.svg|thumb|caption|lang=de]]
11869 <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"></a></div>caption</div></div></div>
11872 <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>
11876 SVG thumbnails with invalid language code
11878 parsoid=wt2html,wt2wt,html2html
11880 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
11882 <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"></a></div>lang=invalid.language.code</div></div></div>
11885 <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>
11889 BUG 1887: A ISBN with a thumbnail
11891 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11893 <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"></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
11896 <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>
11900 BUG 1887: A RFC with a thumbnail
11902 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11904 <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"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
11907 <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>
11911 BUG 1887: A mailto link with a thumbnail
11913 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11915 <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"></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
11918 <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>
11921 # Pending resolution to bug 368
11923 BUG 648: Frameless image caption with a link
11925 [[File:Foobar.jpg|text with a [[link]] in it]]
11927 <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>
11930 <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>
11934 BUG 648: Frameless image caption with a link (suffix)
11936 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11938 <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>
11941 <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>
11945 BUG 648: Frameless image caption with an interwiki link
11947 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11949 <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>
11952 <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>
11956 BUG 648: Frameless image caption with a piped interwiki link
11958 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11960 <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>
11963 <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>
11967 Escape HTML special chars in image alt text
11969 [[File:Foobar.jpg|& < > "]]
11971 <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>
11974 <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>
11978 BUG 499: Alt text should have Ӓ, not &1234;
11980 [[File:Foobar.jpg|♀]]
11982 <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>
11985 <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>
11989 Broken image caption with link
11991 parsoid=wt2html,wt2wt,html2html
11993 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11995 <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.
11998 <p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a rel="mw:WikiLink" href="Main_Page" title="Main Page">this</a> is just an ordinary link.</p>
12002 Image caption containing another image
12004 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12006 <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"></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>
12009 <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>
12013 Image: caption containing a newline
12015 [[File:Foobar.jpg|This
12018 <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>
12021 <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>
12025 Image: caption containing leading space
12026 (The leading space should not trigger nowiki escaping in wt2wt mode)
12028 [[File:Foobar.jpg|thumb| bar]]
12030 <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"></a></div>bar</div></div></div>
12033 <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>
12037 Image: caption containing a table
12039 parsoid=wt2html,wt2wt,html2html
12041 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12047 and some more text.]]
12049 <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"></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>
12052 <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
12055 <tr><th>Foo </th><th>Bar</th></tr>
12058 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12062 Bug 3090: External links other than http: in image captions
12064 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12066 <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"></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>
12069 <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>
12075 parsoid=wt2html,wt2wt,html2html
12077 [[Image:foobar.jpg|a|class=b]]
12079 <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>
12082 <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>
12086 Localized image handling (1).
12088 parsoid=wt2html,wt2wt,html2html
12091 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12093 <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>
12096 <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>
12100 Localized image handling (2).
12103 parsoid=wt2html,wt2wt,html2html
12106 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12108 <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"></a></div>caption</div></div></div>
12111 <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>
12115 "border", "frameless" and "class" attributes on an image.
12118 parsoid=wt2html,wt2wt,html2html
12120 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12122 <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>
12125 <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>
12128 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12130 Invalid image attributes (bug 62500)
12133 parsoid=wt2html,wt2wt,html2html
12135 [[File:Foobar.jpg|thumb|float|left|caption]]
12137 [[File:Foobar.jpg|thumb|righ|caption]]
12139 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12141 <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"></a></div>caption</div></div></div>
12142 <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"></a></div>caption</div></div></div>
12143 <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"></a></div>caption</div></div></div>
12146 <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>
12147 <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>
12148 <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>
12154 #REDIRECT [[File:Barfoo.jpg]]
12160 [[Image:Barfoo.jpg]]
12162 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12167 Missing image with uploads disabled
12171 [[Image:Foobaz.jpg]]
12173 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12177 # Parsoid-specific testing for images
12178 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12179 # Currently imperfect due to a flaw in the Parsoid testrunner
12181 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12185 Parsoid-specific image handling - simple image with size and middle alignment
12187 [[File:Foobar.jpg|middle|50px]]
12189 <p><span class="mw-valign-middle" typeof="mw:Image"><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"></a></span></p>
12193 Parsoid-specific image handling - simple image with size, middle alignment,
12194 non-standard namespace alias
12196 parsoid=wt2wt,wt2html,html2html
12198 [[Image:Foobar.jpg|middle|50px]]
12200 <p><span class="mw-valign-middle" typeof="mw:Image"><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"></a></span></p>
12204 Parsoid-specific image handling - simple image with size and middle alignment
12207 [[File:Foobar.jpg|50px|middle]]
12209 <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>
12213 Parsoid-specific image handling - simple image with size and middle alignment
12214 and non-standard namespace name
12216 parsoid=wt2html,wt2wt,html2html
12218 [[Image:Foobar.jpg|50px|middle]]
12220 <p><span class="mw-valign-middle" typeof="mw:Image"><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"></a></span></p>
12224 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12226 [[File:Foobar.jpg|500x10px|baseline|caption]]
12228 <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>
12232 Parsoid-specific image handling - simple image with border and size spec
12234 [[File:Foobar.jpg|50px|border|caption]]
12236 <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>
12240 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12242 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12244 <figure class="mw-default-size mw-halign-left mw-valign-baseline" 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><figcaption>caption content</figcaption></figure>
12248 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12251 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12253 <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>
12257 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12259 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12261 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb"><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" /></a><figcaption>caption</figcaption></figure>
12265 Parsoid-specific image handling - thumbnail with specific size, halign,
12266 valign, and caption (existing content)
12268 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12270 <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>
12274 Parsoid-specific image handling - framed image with specific size and caption
12277 parsoid=wt2html,wt2wt,html2html
12279 [[File:Foobar.jpg|frame|500x50px|caption]]
12281 <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><figcaption>caption</figcaption></figure>
12285 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12288 parsoid=wt2html,wt2wt,html2html
12290 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12292 <figure class="mw-halign-left mw-valign-baseline" 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>
12296 Parsoid-specific image handling - frameless image with specific size, border, and caption
12298 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12300 <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>
12304 Parsoid-specific image handling - simple image with a formatted caption
12306 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12308 <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>"}'><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>
12312 Parsoid-specific image handling - caption with a template in it
12314 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12316 <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>
12320 Parsoid-specific image handling - caption with unbalanced tags in it
12322 parsoid=wt2html,wt2wt,html2html
12325 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12329 <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>
12334 Parsoid-specific image handling - empty caption (1)
12336 parsoid=wt2html,wt2wt
12338 [[File:Foobar.jpg|thumb|]]
12340 <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>
12343 # empty captions don't get serialized unless we're in the "round trip" case
12345 Parsoid-specific image handling - empty caption (2)
12349 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12350 <a href="File:Foobar.jpg">
12351 <img resource="./File:Foobar.jpg"
12352 src="//example.com/images/3/3a/Foobar.jpg"
12353 height="25" width="220"/>
12355 <figcaption></figcaption>
12358 [[File:Foobar.jpg|thumb]]
12362 Parsoid-specific image handling - whitespace caption
12364 [[File:Foobar.jpg|thumb| ]]
12366 <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>
12370 Parsoid-specific image handling - lang option
12373 [[File:Foobar.svg|lang=de|caption]]
12377 <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>
12386 Subpage test/subpage
12394 subpage title=[[Subpage test]]
12398 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12403 Subpage noslash link
12405 subpage title=[[Subpage test]]
12409 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12413 # TODO: make this PHP-parser compatible!
12415 Relative subpage noslash link
12417 parsoid=wt2wt,wt2html,html2html
12418 subpage title=[[Subpage test/1/2/3/4]]
12424 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/" title="Subpage test/1/2/subpage/">subpage</a></p>
12425 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12429 Parsoid: dot-slash prefixed wikilinks
12439 </p><p>[[././baz/]]
12444 </p><p>[[././baz/]]
12449 Render invalid page names as plain text (bug 51090)
12462 [[{{echo|./../foo}}|bar]]
12463 [[{{echo|foo/.}}|bar]]
12464 [[{{echo|foo/..}}|bar]]
12465 [[{{echo|foo~~~~bar}}]]
12466 [[{{echo|foo>bar}}]]
12467 [[{{echo|foo././bar}}]]
12468 [[{{echo|foo{bar}}]]
12469 [[{{echo|foo}bar}}]]
12470 [[{{echo|foo[bar}}]]
12471 [[{{echo|foo]bar}}]]
12472 [[{{echo|foo<bar}}]]
12474 <p>[[./../foo|bar]]
12484 </p><p>[[./../foo|bar]]
12497 <p>[[./../foo|bar]]
12508 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12509 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12510 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12511 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12512 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12513 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12514 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12515 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12516 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12517 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12518 [[<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>
12526 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12531 BUG 561: {{/Subpage}}
12533 subpage title=[[Page]]
12537 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12545 Category:MediaWiki User's Guide
12553 [[:Category:MediaWiki User's Guide]]
12555 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12564 [[Category:MediaWiki User's Guide]]
12566 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12570 PAGESINCATEGORY invalid title fatal (r33546 fix)
12572 {{PAGESINCATEGORY:<bogus>}}
12579 Category with different sort key
12583 [[Category:MediaWiki User's Guide|Foo]]
12585 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12589 Category with identical sort key
12593 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12595 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12599 Category with empty sort key
12604 [[Category:MediaWiki User's Guide|]]
12606 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12610 Category with empty sort key and parentheses
12615 [[Category:Foo (bar)|]]
12617 [[Category:Foo (bar)|Foo]]
12621 Category with link tail
12626 123[[Category:Foo]]456
12628 123[[Category:Foo]]456
12632 Category with template
12637 [[Category:{{echo|Foo}}]]
12639 [[Category:{{echo|Foo}}]]
12643 Category with template in sort key
12648 [[Category:Foo|{{echo|Bar}}]]
12650 [[Category:Foo|{{echo|Bar}}]]
12654 Category with template in sort key and title
12659 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12661 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12665 Category / paragraph interactions
12667 Foo [[Category:Baz]] Bar
12669 Foo [[Category:Baz]]
12677 [[Category:Baz]] Bar
12690 {{echo|[[Category:Baz]]}}
12705 Parsoid: Serialize link to category page with colon escape
12711 [[:Category:Foo|Bar]]
12714 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
12715 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
12720 Parsoid: Link prefix/suffixes aren't applied to category links
12722 parsoid=wt2html,wt2wt,html2html
12727 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
12731 Parsoid: Serialize link to file page with colon escape
12737 [[:File:Foo.png|Bar]]
12740 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
12741 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
12746 Parsoid: Serialize a genuine category link without colon escape
12751 [[Category:Foo|Bar]]
12753 <link rel="mw:PageProp/Category" href="Category:Foo">
12754 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
12758 Normalize hrefs properly before testing for invalid link targets (bug 70894)
12762 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
12764 [[Category:Toxine bactérienne]]
12768 Parsoid: Defaultsort
12772 {{DEFAULTSORT:Foo}}
12774 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
12778 ### Inter-language links
12781 Interlanguage links
12789 es:Alimento fr:Nourriture zh:食品
12791 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
12792 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
12793 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
12797 Duplicate interlanguage links (bug 24502)
12808 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
12809 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
12810 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
12811 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
12818 Basic section headings
12825 ===Smaller headline===
12828 <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>
12831 <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>
12834 <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>
12840 Section headings with TOC
12843 === Subheadline 1 ===
12844 ===== Skipping a level =====
12845 ====== Skipping a level ======
12849 ===Another headline===
12851 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12853 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
12855 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
12857 <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>
12859 <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>
12866 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
12868 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
12874 <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>
12875 <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>
12876 <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>
12877 <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>
12878 <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>
12881 <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>
12885 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
12887 Handling of sections up to level 6 and beyond
12890 == Level 2 Heading==
12891 === Level 3 Heading===
12892 ==== Level 4 Heading====
12893 ===== Level 5 Heading=====
12894 ====== Level 6 Heading======
12895 ======= Level 7 Heading=======
12896 ======== Level 8 Heading========
12897 ========= Level 9 Heading=========
12898 ========== Level 10 Heading==========
12900 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12902 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12904 <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>
12906 <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>
12908 <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>
12910 <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>
12912 <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>
12913 <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>
12914 <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>
12915 <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>
12916 <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>
12930 <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>
12931 <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>
12932 <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>
12933 <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>
12934 <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>
12935 <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>
12936 <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>
12937 <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>
12938 <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>
12939 <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>
12944 TOC regression (bug 9764)
12948 ==== title 1.1.1 ====
12953 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12955 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12957 <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>
12959 <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>
12962 <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>
12965 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12967 <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>
12973 <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>
12974 <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>
12975 <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>
12976 <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>
12977 <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>
12978 <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>
12983 TOC with wgMaxTocLevel=3 (bug 6204)
12989 ==== title 1.1.1 ====
12994 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12996 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12998 <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>
12999 <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>
13002 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13004 <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>
13010 <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>
13011 <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>
13012 <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>
13013 <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>
13014 <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>
13015 <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>
13020 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13026 ====Section 1.1.1====
13027 ====Section 1.1.1.1====
13030 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13032 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13034 <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>
13037 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13041 <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>
13042 <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>
13043 <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>
13044 <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>
13045 <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>
13051 Resolving duplicate section names
13056 <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>
13057 <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>
13062 Resolving duplicate section names with differing case (bug 10721)
13067 <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>
13068 <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>
13080 Template with sections, __NOTOC__
13087 <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>
13088 <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>
13089 <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>
13090 <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>
13095 __NOEDITSECTION__ keyword
13101 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13102 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13107 Link inside a section heading
13109 ==Section with a [[Main Page|link]] in it==
13111 <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>
13116 TOC regression (bug 12077)
13123 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13125 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13127 <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>
13130 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13134 <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>
13135 <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>
13136 <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>
13141 BUG 1219 URL next to image (good)
13143 http://example.com [[Image:foobar.jpg]]
13145 <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>
13150 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13153 The line above must have a trailing space!
13156 But just in case it doesn't...
13158 <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>
13159 <p>The line above must have a trailing space!
13161 <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>
13162 <p>But just in case it doesn't...
13167 Header with special characters (bug 25462)
13169 The tooltips shall not show entities to the user (ie. be double escaped)
13186 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13188 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13190 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13191 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13192 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13193 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13194 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13198 <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>
13201 <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>
13204 <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>
13207 <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>
13210 <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>
13216 Header with space, plus and underscore as entity
13218 Id should not contain + for spaces
13220 == Space between Text ==
13223 == Space-Entity between Text ==
13226 == Plus+between+Text ==
13229 == Plus-Entity+between+Text ==
13232 == Underscore_between_Text ==
13235 == Underscore-Entity_between_Text ==
13238 [[#Space between Text]]
13239 [[#Space-Entity between Text]]
13240 [[#Plus+between+Text]]
13241 [[#Plus-Entity+between+Text]]
13242 [[#Underscore_between_Text]]
13243 [[#Underscore-Entity_between_Text]]
13245 <p>Id should not contain + for spaces
13247 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13249 <li class="toclevel-1 tocsection-1"><a href="#Space_between_Text"><span class="tocnumber">1</span> <span class="toctext">Space between Text</span></a></li>
13250 <li class="toclevel-1 tocsection-2"><a href="#Space-Entity_between_Text"><span class="tocnumber">2</span> <span class="toctext">Space-Entity between Text</span></a></li>
13251 <li class="toclevel-1 tocsection-3"><a href="#Plus.2Bbetween.2BText"><span class="tocnumber">3</span> <span class="toctext">Plus+between+Text</span></a></li>
13252 <li class="toclevel-1 tocsection-4"><a href="#Plus-Entity.2Bbetween.2BText"><span class="tocnumber">4</span> <span class="toctext">Plus-Entity+between+Text</span></a></li>
13253 <li class="toclevel-1 tocsection-5"><a href="#Underscore_between_Text"><span class="tocnumber">5</span> <span class="toctext">Underscore_between_Text</span></a></li>
13254 <li class="toclevel-1 tocsection-6"><a href="#Underscore-Entity_between_Text"><span class="tocnumber">6</span> <span class="toctext">Underscore-Entity_between_Text</span></a></li>
13258 <h2><span class="mw-headline" id="Space_between_Text">Space between 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: Space between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13261 <h2><span class="mw-headline" id="Space-Entity_between_Text">Space-Entity between 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: Space-Entity between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13264 <h2><span class="mw-headline" id="Plus.2Bbetween.2BText">Plus+between+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: Plus+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13267 <h2><span class="mw-headline" id="Plus-Entity.2Bbetween.2BText">Plus-Entity+between+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: Plus-Entity+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13270 <h2><span class="mw-headline" id="Underscore_between_Text">Underscore_between_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: Underscore between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13273 <h2><span class="mw-headline" id="Underscore-Entity_between_Text">Underscore-Entity_between_Text</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: Underscore-Entity_between_Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13275 </p><p><a href="#Space_between_Text">#Space between Text</a>
13276 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13277 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13278 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13279 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13280 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13285 Headers with excess '=' characters
13286 (Are similar tests necessary beyond the 1st level?)
13290 =''italic'' heading==
13291 ==''italic'' heading=
13293 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13295 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13296 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13297 <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>
13298 <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>
13302 <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>
13303 <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>
13304 <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>
13305 <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>
13310 HTML headers vs TOC (bug 23393)
13311 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13323 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13325 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13327 <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>
13328 <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>
13331 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13333 <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>
13334 <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>
13340 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13341 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13342 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13343 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13344 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13345 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13350 Single-line or multiline-comments can follow headings
13352 parsoid=wt2html,wt2wt
13360 <h2><span class="mw-headline" id="foo">foo</span></h2>
13361 <h2><span class="mw-headline" id="bar">bar</span></h2>
13362 <h2><span class="mw-headline" id="baz">baz</span></h2>
13367 BUG 1219 URL next to image (broken)
13369 http://example.com[[Image:foobar.jpg]]
13371 <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>
13376 Bug 1186 news: in the middle of text
13378 http://en.wikinews.org/wiki/Wikinews:Workplace
13380 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13386 Namespaced link must have a title
13395 Namespaced link must have a title (bad fragment version)
13397 [[Project:#fragment]]
13399 <p>[[Project:#fragment]]
13405 ### HTML tags and HTML attributes
13409 div with no attributes
13411 <div>HTML rocks</div>
13413 <div>HTML rocks</div>
13418 div with double-quoted attribute
13420 <div id="rock">HTML rocks</div>
13422 <div id="rock">HTML rocks</div>
13427 div with single-quoted attribute
13429 <div id='rock'>HTML rocks</div>
13431 <div id="rock">HTML rocks</div>
13436 div with unquoted attribute
13438 <div id=rock>HTML rocks</div>
13440 <div id="rock">HTML rocks</div>
13445 div with illegal double attributes
13447 <div id="a" id="b">HTML rocks</div>
13449 <div id="b">HTML rocks</div>
13453 # FIXME: produce empty string instead of "class" in the PHP parser, following
13456 div with empty attribute value, space before equals
13460 <div class =>HTML rocks</div>
13462 <div class="">HTML rocks</div>
13467 div with multiple empty attribute values
13471 <div id= title=>HTML rocks</div>
13473 <div id="" title="">HTML rocks</div>
13478 table with multiple empty attribute values
13486 <table title="" id="">
13487 <tbody><tr><td> hi</td></tr>
13492 div with braces in attribute value
13494 <div title="{}">Foo</div>
13496 <div title="{}">Foo</div>
13499 <div title="{}">Foo</div>
13502 # This it very inconsistent in the PHP parser: it returns
13503 # class="class" if there is a space between the name and the equal sign (see
13504 # 'div with empty attribute value, space before equals'), but strips the
13505 # attribute completely if the space is missing. We hope that not much content
13506 # depends on this, so are implementing the behavior below in Parsoid for
13507 # consistencies' sake.
13508 # FIXME: fix this behavior in the PHP parser?
13510 div with empty attribute value, no space before equals
13512 parsoid=wt2html,html2html
13514 <div class=>HTML rocks</div>
13516 <div>HTML rocks</div>
13519 <div class="">HTML rocks</div>
13523 HTML multiple attributes correction
13525 <p class="error" class="awesome">Awesome!</p>
13527 <p class="awesome">Awesome!</p>
13532 Table multiple attributes correction
13535 !+ class="error" class="awesome"| status
13540 <th class="awesome"> status
13548 <DIV ID="x">HTML ROCKS</DIV>
13550 <div id="x">HTML ROCKS</div>
13555 Non-ASCII pseudo-tags are rendered as text
13564 Pseudo-tag with URL 'name' renders as url link
13566 <http://example.com/>
13568 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13573 text with amp in the middle of nowhere
13577 <p>Remember AT&T?
13582 text with character entity: eacute
13584 I always thought é was a cute letter.
13586 <p>I always thought é was a cute letter.
13589 <p>I always thought é was a cute letter.</p>
13593 text with entity-escaped character entity-like string: eacute
13595 I always thought &eacute; was a cute letter.
13597 <p>I always thought &eacute; was a cute letter.
13602 text with undefined character entity: xacute
13604 I always thought &xacute; was a cute letter.
13606 <p>I always thought &xacute; was a cute letter.
13610 # TODO: generalize to PHP parser?
13616 <data value="5">five</data>
13617 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13618 <mark>This highlighted text</mark>
13620 <p><data value="5">five</data>
13621 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13622 <mark>This highlighted text</mark></p>
13626 HTML tag with leading space is parsed as text
13630 <p>< div>foo< /div>
13635 ### Nesting tests (see bug 41545, 50604, 51081)
13638 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13639 # Note that html2wt is considerably more difficult if we use <b> in
13640 # the test case, instead of <big>
13642 Ensure that HTML adoption agency algorithm is properly implemented.
13644 <big>X<big>Y</big>Z</big>
13646 <p><big>X<big>Y</big>Z</big>
13650 # This was bug 41545 in the PHP parser.
13651 # Note that tidy doesn't handle this correctly.
13655 <kbd>X<kbd>Y</kbd>Z</kbd>
13657 <p><kbd>X<kbd>Y</kbd>Z</kbd>
13661 # The following cases were bug 51081 in the PHP parser.
13662 # Note that there are some other nestable tags (b, i, etc) which are
13663 # not covered; see bug 51081 for discussion.
13665 # Note that tidy doesn't handle this correctly.
13669 <em>X<em>Y</em>Z</em>
13671 <p><em>X<em>Y</em>Z</em>
13675 # Note that tidy doesn't handle this correctly.
13677 Nesting of <strong>
13679 <strong>X<strong>Y</strong>Z</strong>
13681 <p><strong>X<strong>Y</strong>Z</strong>
13690 <p><q>X<q>Y</q>Z</q></p>
13693 # Note that tidy doesn't handle this correctly.
13697 <ruby>X<ruby>Y</ruby>Z</ruby>
13699 <p><ruby>X<ruby>Y</ruby>Z</ruby>
13703 # Note that tidy doesn't handle this correctly.
13707 <bdo>X<bdo>Y</bdo>Z</bdo>
13709 <p><bdo>X<bdo>Y</bdo>Z</bdo>
13721 [[Media:Foobar.jpg]]
13723 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
13728 Media link with text
13730 [[Media:Foobar.jpg|A neat file to look at]]
13732 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
13736 # FIXME: this is still bad HTML tag nesting
13738 Media link with nasty text
13739 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
13741 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
13743 <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>
13746 <p><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></p>
13750 Media link to nonexistent file (bug 1702)
13752 [[Media:No such.jpg]]
13754 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
13759 Image link to nonexistent file (bug 1850 - good)
13761 [[Image:No such.jpg]]
13763 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
13768 :Image link to nonexistent file (bug 1850 - bad)
13770 [[:Image:No such.jpg]]
13772 <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>
13779 Character reference normalization in link text (bug 1938)
13781 [[Main Page|this&that]]
13783 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
13790 Test for unicode normalization
13792 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
13796 (bug 19451) Links should refer to the normalized form.
13804 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13805 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13806 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13807 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13808 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13813 Empty attribute crash test (bug 2067)
13815 <font color="">foo</font>
13817 <p><font color="">foo</font>
13822 Empty attribute crash test single-quotes (bug 2067)
13824 <font color=''>foo</font>
13826 <p><font color="">foo</font>
13831 Attribute test: equals, then nothing
13833 <font color=>foo</font>
13835 <p><font>foo</font>
13840 Attribute test: unquoted value
13842 <font color=x>foo</font>
13844 <p><font color="x">foo</font>
13849 Attribute test: unquoted but illegal value (hash)
13851 <font color=#x>foo</font>
13853 <p><font color="#x">foo</font>
13858 Attribute test: no value
13860 <font color>foo</font>
13862 <p><font color="color">foo</font>
13867 Bug 2095: link with three closing brackets
13871 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
13874 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
13878 Bug 2095: link with pipe and three closing brackets
13880 [[Main Page|link]]]
13882 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
13885 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
13889 Bug 2095: link with pipe and three closing brackets, version 2
13891 [[Main Page|[http://example.com/]]]
13893 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
13896 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
13905 Template:Dangerous attribute
13907 " onmouseover="alert(document.cookie)
13911 Template:Dangerous style attribute
13913 border-size: expression(alert(document.cookie))
13919 <div style="float: right; {{{1}}}">Magic div</div>
13923 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
13925 <div title="{{test}}"></div>
13927 <div title="This is a test template"></div>
13931 # Parsoid has enough context to handle this case
13933 Bug 2304: HTML attribute safety (dangerous template; 2309)
13935 <div title="{{dangerous attribute}}"></div>
13937 <div title=""></div>
13940 <div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[12,35,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;dangerous attribute&quot;,&quot;href&quot;:&quot;./Template:Dangerous_attribute&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
13944 Bug 2304: HTML attribute safety (dangerous style template; 2309)
13946 <div style="{{dangerous style attribute}}"></div>
13948 <div style="/* insecure input */"></div>
13953 Bug 2304: HTML attribute safety (safe parameter; 2309)
13955 {{div style|width: 200px}}
13957 <div style="float: right; width: 200px">Magic div</div>
13962 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
13964 {{div style|width: expression(alert(document.cookie))}}
13966 <div style="/* insecure input */">Magic div</div>
13971 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
13973 {{div style|"><script>alert(document.cookie)</script>}}
13975 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13980 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
13982 {{div style|" ><script>alert(document.cookie)</script>}}
13984 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13989 Bug 2304: HTML attribute safety (link)
13991 <div title="[[Main Page]]"></div>
13993 <div title="[[Main Page]]"></div>
13998 Bug 2304: HTML attribute safety (italics)
14000 <div title="''foobar''"></div>
14002 <div title="''foobar''"></div>
14007 Bug 2304: HTML attribute safety (bold)
14009 <div title="'''foobar'''"></div>
14011 <div title="'''foobar'''"></div>
14017 Bug 2304: HTML attribute safety (ISBN)
14019 <div title="ISBN 1234567890"></div>
14021 <div title="ISBN 1234567890"></div>
14026 Bug 2304: HTML attribute safety (RFC)
14028 <div title="RFC 1234"></div>
14030 <div title="RFC 1234"></div>
14035 Bug 2304: HTML attribute safety (PMID)
14037 <div title="PMID 1234567890"></div>
14039 <div title="PMID 1234567890"></div>
14044 Bug 2304: HTML attribute safety (web link)
14046 <div title="http://example.com/"></div>
14048 <div title="http://example.com/"></div>
14053 Bug 2304: HTML attribute safety (named web link)
14055 <div title="[http://example.com/ link]"></div>
14057 <div title="[http://example.com/ link]"></div>
14062 Bug 3244: HTML attribute safety (extension; safe)
14064 <div style="<nowiki>background:blue</nowiki>"></div>
14066 <div style="background:blue"></div>
14071 Bug 3244: HTML attribute safety (extension; unsafe)
14073 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14075 <div style="/* insecure input */"></div>
14079 # More MSIE fun discovered by Tom Gilder
14082 MSIE CSS safety test: spurious slash
14084 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14086 <div style="/* insecure input */">evil</div>
14091 MSIE CSS safety test: hex code
14093 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14095 <div style="/* insecure input */">evil</div>
14100 MSIE CSS safety test: comment in url
14102 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14104 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14109 MSIE CSS safety test: comment in expression
14111 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14113 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14118 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14120 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14122 <p style="/* invalid control char */">A</p>
14127 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14129 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14130 <div style="top:EXPRESSION(alert())">B</div>
14132 <p style="/* insecure input */">A</p>
14133 <div style="/* insecure input */">B</div>
14138 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14140 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14141 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14143 <div style="/* insecure input */">A</div>
14144 <p style="/* insecure input */">B</p>
14149 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14151 <div style="background-image:url⁽javascript:alert())">A</div>
14152 <div style="background-image:url₍javascript:alert())">B</div>
14153 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14155 <div style="/* insecure input */">A</div>
14156 <div style="/* insecure input */">B</div>
14157 <p style="/* insecure input */">C</p>
14165 title="data:text/html,<img src=1 onerror=alert(1)>"
14166 style="-o-link:attr(title);-o-link-source:current">X</div>
14168 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14173 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14175 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14176 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14177 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14178 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14179 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14180 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14181 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14183 <p style="/* insecure input */">A</p>
14184 <p style="/* insecure input */">B</p>
14185 <p style="/* insecure input */">C</p>
14186 <p style="/* insecure input */">D</p>
14187 <p style="/* insecure input */">E</p>
14188 <p style="/* insecure input */">F</p>
14189 <p style="/* insecure input */">G</p>
14194 Table attribute legitimate extension
14197 !+ style="<nowiki>color:blue</nowiki>"| status
14202 <th style="color:blue"> status
14208 Table attribute safety
14211 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14216 <th style="/* insecure input */"> status
14222 CSS line continuation 1
14224 <div style="background-image: u\ rl(test.jpg);"></div>
14226 <div style="/* insecure input */"></div>
14231 CSS line continuation 2
14233 <div style="background-image: u\ rl(test.jpg); "></div>
14235 <div style="/* insecure input */"></div>
14246 Expansion of multi-line templates in attribute values (bug 6255)
14248 <div style="background: {{identity|#00FF00}}">-</div>
14250 <div style="background: #00FF00">-</div>
14256 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14258 <div style="background:
14261 <div style="background: #00FF00">-</div>
14264 <div style="background:
14269 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14271 <div style="background: #00FF00">-</div>
14273 <div style="background: #00FF00">-</div>
14278 evil <math>-wiki-tags without Extension:Math enabled
14280 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14282 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14286 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14289 Parser hook: empty input
14302 Parser hook: empty input using terminated empty elements
14315 Parser hook: empty input using terminated empty elements (space before)
14328 Parser hook: basic input
14342 Parser hook: case insensitive
14356 Parser hook: case insensitive, redux
14369 Parser hook: nested tags
14373 <tag><tag></tag></tag>
14384 Parser hook: basic arguments
14386 <tag width=200 height = "100" depth = '50' square></tag>
14394 'square' => 'square',
14401 Parser hook: argument containing a forward slash (bug 5344)
14403 <tag filename='/tmp/bla'></tag>
14408 'filename' => '/tmp/bla',
14415 Parser hook: empty input using terminated empty elements (bug 2374)
14428 # </tag> should be output literally since there is no matching tag that begins it
14430 Parser hook: basic arguments using terminated empty elements (bug 2374)
14432 <tag width=200 height = "100" depth = '50' square/>
14442 'square' => 'square',
14451 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14455 Parser hook: static parser hook not inside a comment
14457 <statictag>hello, world</statictag>
14458 <statictag action=flush/>
14466 Parser hook: static parser hook inside a comment
14468 <!-- <statictag>hello, world</statictag> -->
14469 <statictag action=flush/>
14475 # Nested template calls; this case was broken by Parser.php rev 1.506,
14479 Template:One-parameter
14481 (My parameter is: {{{1}}})
14485 Template:Map-one-parameter
14487 {{{{{1}}}|{{{2}}}}}
14491 Nested template calls
14493 {{Map-one-parameter|One-parameter|param}}
14495 <p>(My parameter is: param)
14504 # HTML+Tidy effectively strips out the empty tags completely
14505 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14506 # which Tidy would have done for the PHP parser had there been content inside it.
14508 Sanitizer: Closing of open tags
14510 <s></s><table></table>
14512 <s></s><table></table>
14515 <p><s></s></p><table></table>
14519 Sanitizer: Closing of open but not closed tags
14528 Sanitizer: Closing of closed but not open tags
14537 Sanitizer: Closing of closed but not open table tags
14539 Table not started</td></tr></table>
14541 <p>Table not started</td></tr></table>
14546 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14548 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14550 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14554 # In HTML5, the restrictions are that id must contain at least one character,
14555 # and must not contain any space characters.
14557 Sanitizer: Validating the contents of the id attribute (bug 4515)
14561 <br id="" /><br id="a space" />
14566 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
14568 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14572 <br id="foo" /><br id="foo" />
14574 Something need to be done. foo-2 ?
14578 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14581 <meta itemprop="hello" content="world">
14582 <meta http-equiv="refresh" content="5">
14583 <meta itemprop="hello" http-equiv="refresh" content="5">
14584 <link itemprop="hello" href="{{SERVER}}">
14585 <link rel="stylesheet" href="{{SERVER}}">
14586 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14589 <div itemscope="itemscope">
14590 <p> <meta itemprop="hello" content="world" />
14591 <meta http-equiv="refresh" content="5">
14592 <meta itemprop="hello" content="5" />
14594 <link itemprop="hello" href="http://example.org" />
14595 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14596 <link itemprop="hello" href="http://example.org" />
14602 Language converter: output gets cut off unexpectedly (bug 5757)
14606 this bit is safe: }-
14608 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14610 then we get cut off here: }-
14612 all additional text is vanished
14614 <p>this bit is safe: }-
14615 </p><p>but if we add a conversion instance: xxx
14616 </p><p>then we get cut off here: }-
14617 </p><p>all additional text is vanished
14622 Self closed html pairs (bug 5487)
14625 <center><font id="bug" />Centered text</center>
14626 <div><font id="bug2" />In div text</div>
14628 <center><font id="bug" />Centered text</center>
14629 <div><font id="bug2" />In div text</div>
14638 Punctuation: nbsp before exclamation
14642 <p>C'est grave !
14647 Punctuation: CSS !important (bug 11874)
14649 <div style="width:50% !important">important</div>
14651 <div style="width:50% !important">important</div>
14656 Punctuation: CSS ! important (bug 11874; with space after)
14658 <div style="width:50% ! important">important</div>
14660 <div style="width:50% ! important">important</div>
14666 HTML bullet list, closed tags (bug 5497)
14679 <ul data-parsoid='{"stx":"html"}'>
14680 <li data-parsoid='{"stx":"html"}'>One</li>
14681 <li data-parsoid='{"stx":"html"}'>Two</li>
14687 HTML bullet list, unclosed tags (bug 5497)
14699 <ul data-parsoid='{"stx":"html"}'>
14700 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14701 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14707 HTML ordered list, closed tags (bug 5497)
14720 <ol data-parsoid='{"stx":"html"}'>
14721 <li data-parsoid='{"stx":"html"}'>One</li>
14722 <li data-parsoid='{"stx":"html"}'>Two</li>
14728 HTML ordered list, unclosed tags (bug 5497)
14741 <ol data-parsoid='{"stx":"html"}'>
14742 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14743 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14749 HTML nested bullet list, closed tags (bug 5497)
14774 HTML nested bullet list, open tags (bug 5497)
14811 HTML nested ordered list, closed tags (bug 5497)
14836 HTML nested ordered list, open tags (bug 5497)
14873 HTML ordered list item with parameters oddity
14875 <ol><li id="fragment">One</li>
14878 <ol><li id="fragment">One</li>
14883 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
14885 bug 5918: autonumbering
14887 [http://first/] [http://second] [ftp://ftp]
14891 [mailto:enclosed@mail.tld With target]
14893 [mailto:enclosed@mail.tld]
14895 mailto:inline@mail.tld
14897 <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>
14898 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
14899 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
14900 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
14901 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
14904 <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>
14905 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
14906 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
14907 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
14908 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
14913 # Security and HTML correctness
14914 # From Nick Jenkins' fuzz testing
14918 Fuzz testing: Parser13
14933 Fuzz testing: Parser14
14938 <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>
14939 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14941 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14947 <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>
14949 <div id="toc" class="toc">
14950 <div id="toctitle">
14954 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14960 Fuzz testing: Parser14-table
14965 <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>
14966 <table style="__TOC__">
14971 <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>
14972 <table style="__TOC__">
14979 # Known to produce bogus xml (extra </td>)
14981 Fuzz testing: Parser16
15010 Fuzz testing: Parser21
15013 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15018 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15028 Fuzz testing: Parser22
15030 http://===r:::https://b
15034 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15042 # Known to produce bad XML for now
15044 Fuzz testing: Parser24
15051 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15052 <br style="onmouseover='alert(document.cookie);' " />
15054 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15059 <u class="|">}}}} >
15060 <br style="onmouseover='alert(document.cookie);'" />
15062 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15071 # Note: the current result listed for this is not what the original one was,
15072 # but the original bug was JavaScript injection, which is fixed in any case.
15073 # It's not clear that the original result listed was any more correct than the
15074 # current one. Original result:
15077 # <li class="||">
15078 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15080 Fuzz testing: Parser25 (bug 6055)
15086 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15088 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15093 Fuzz testing: URL adjacent extension (with space, clean)
15095 http://example.com <nowiki>junk</nowiki>
15097 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15102 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15104 http://example.com<nowiki>junk</nowiki>
15106 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15111 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15113 http://example.com<pre>junk</pre>
15115 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15118 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15125 Fuzz testing: image with bogus manual thumbnail
15127 [[Image:foobar.jpg|thumbnail= ]]
15129 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15132 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}'/>
15136 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15138 <pre dir=" "></pre>
15140 <pre dir=" "></pre>
15145 Parsing optional HTML elements (Bug 6171)
15150 <td> Some tabular data</td>
15151 <td> More tabular data ...
15152 <td> And yet som tabular data</td>
15158 <td> Some tabular data</td>
15159 <td> More tabular data ...
15160 </td><td> And yet som tabular data</td>
15167 Correct handling of <td>, <tr> (Bug 6171)
15172 <td> Some tabular data</td>
15173 <td> More tabular data ...</td>
15174 <td> And yet som tabular data</td>
15180 <td> Some tabular data</td>
15181 <td> More tabular data ...</td>
15182 <td> And yet som tabular data</td>
15190 Parsing crashing regression (fr:JavaScript)
15194 <p></body></x>
15199 Inline wiki vs wiki block nesting
15205 <p><b>Bold paragraph</b>
15206 </p><p>New wiki paragraph
15210 # FIXME: The current php output is documented
15211 # and desired output is the parsoid target.
15213 Inline HTML vs wiki block nesting
15219 <p><b>Bold paragraph
15220 </p><p>New wiki paragraph</b>
15223 <p><b>Bold paragraph</b>
15224 </p><p>New wiki paragraph
15228 # Original result was this:
15229 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15231 # While that might be marginally more intuitive, maybe, the six-apostrophe
15232 # construct is clearly pathological and the result stated here (which is what
15233 # the parser actually does) is about as reasonable as anything.
15235 Mixing markup for italics and bold
15238 '''bold''''''bold''bolditalics'''''
15240 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15248 Article for special page transclusion test
15252 Special page transclusion
15255 {{Special:Prefixindex/Xyzzyx}}
15257 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15262 Special page transclusion twice (bug 5021)
15265 {{Special:Prefixindex/Xyzzyx}}
15266 {{Special:Prefixindex/Xyzzyx}}
15268 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15269 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15274 Transclusion of default MediaWiki message
15276 {{MediaWiki:Mainpage}}
15283 Transclusion of nonexistent MediaWiki message
15285 {{MediaWiki:Mainpagexxx}}
15287 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15292 Transclusion of MediaWiki message with underscore
15294 {{MediaWiki:history_short}}
15301 Transclusion of MediaWiki message with space
15303 {{MediaWiki:history short}}
15310 Invalid header with following text
15320 Section extraction test (section 0)
15340 Section extraction test (section 1)
15362 Section extraction test (section 2)
15383 Section extraction test (section 3)
15403 Section extraction test (section 4)
15427 Section extraction test (section 5)
15447 Section extraction test (section 6)
15468 Section extraction test (section 7)
15488 Section extraction test (section 8)
15508 Section extraction test (section 9)
15529 Section extraction test (section 10)
15549 Section extraction test (nonexistent section 11)
15568 Section extraction test with bogus heading (section 1)
15573 ==bogus== not a legal section
15577 ==bogus== not a legal section
15581 Section extraction test with bogus heading (section 2)
15586 ==bogus== not a legal section
15593 Section extraction test with comment after heading (section 1)
15605 Section extraction test with comment after heading (section 2)
15617 Section extraction test with bogus <nowiki> heading (section 1)
15622 ==bogus== <nowiki>not a legal section</nowiki>
15626 ==bogus== <nowiki>not a legal section</nowiki>
15630 Section extraction test with bogus <nowiki> heading (section 2)
15635 ==bogus== <nowiki>not a legal section</nowiki>
15642 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
15643 # instead of respecting commented sections
15645 Section extraction prefixed by comment (section 1)
15656 Section extraction prefixed by comment (section 2)
15667 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
15668 # instead of respecting HTML-style headings
15670 Section extraction, mixed wiki and html (section 1)
15686 Section extraction, mixed wiki and html (section 2)
15702 # Formerly testing for bug 3342
15704 Section extraction, heading surrounded by <noinclude>
15708 <noinclude>==unmarked==</noinclude>
15714 # Test behavior of bug 19910
15716 Sectiion with all-equals
15721 The line above must have a trailing space
15724 But just in case it doesn't...
15728 But just in case it doesn't...
15732 Section replacement test (section 0)
15763 Section replacement test (section 1)
15792 Section replacement test (section 2)
15822 Section replacement test (section 3)
15853 Section replacement test (section 4)
15880 Section replacement test (section 5)
15911 Section replacement test (section 6)
15941 Section replacement test (section 7)
15972 Section replacement test (section 8)
16003 Section replacement test (section 9)
16032 Section replacement test (section 10)
16062 Section replacement test with initial whitespace (bug 13728)
16066 Preformatted initial line
16070 Preformatted initial line
16077 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16089 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16102 Section extraction, <pre> around bogus header (bug 10309)
16119 Section replacement, <pre> around bogus header (bug 10309)
16121 noxml replace=2,"xxx"
16142 Handling of 
 in URLs
16146 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16149 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16151 a</a></li></ul></li></ul>
16155 Handling of %0A in URLs
16159 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16162 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16166 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16168 5 quotes, code coverage +1 line
16175 <p><b><i></i></b></p>
16178 # same html as previous, but wikitext adjusted to match parsoid html2wt
16179 # note that wt2html and html2html will put the <i> before the <b>
16181 5 quotes, code coverage +1 line w/ nowiki (1)
16183 parsoid=wt2wt,html2wt
16185 '''''<nowiki/>'''''
16190 <p><b><i></i></b></p>
16193 # same as previous, just swapping the <i> and <b>
16195 5 quotes, code coverage +1 line w/ nowiki (2)
16197 '''''<nowiki/>'''''
16202 <p><i><b></b></i></p>
16206 Special:Search page linking.
16210 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16215 {{!}} is a magic word
16217 {{!}} is a magic word there and {{!}} is still a magic word here
16219 <p>| is a magic word there and | is still a magic word here
16222 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is still a magic word here</p>
16228 title=[[Parser test]]
16233 * {{FULLPAGENAMEE}}
16235 * {{BASEPAGENAMEE}}
16239 * {{ROOTPAGENAMEE}}
16241 * {{TALKPAGENAMEE}}
16242 * {{SUBJECTPAGENAME}}
16243 * {{SUBJECTPAGENAMEE}}
16246 * {{NAMESPACENUMBER}}
16250 * {{SUBJECTSPACEE}}
16251 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16253 <ul><li> Parser test</li>
16254 <li> Parser_test</li>
16255 <li> Parser test</li>
16256 <li> Parser_test</li>
16257 <li> Parser test</li>
16258 <li> Parser_test</li>
16259 <li> Parser test</li>
16260 <li> Parser_test</li>
16261 <li> Parser test</li>
16262 <li> Parser_test</li>
16263 <li> Talk:Parser test</li>
16264 <li> Talk:Parser_test</li>
16265 <li> Parser test</li>
16266 <li> Parser_test</li>
16274 <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>
16277 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16287 image4 |300px| centre
16288 image5.svg| http://///////
16293 <ul class="gallery mw-gallery-traditional">
16294 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16295 <div class="thumb" style="height: 150px;">Image1.png</div>
16296 <div class="gallerytext">
16299 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16300 <div class="thumb" style="height: 150px;">Image2.gif</div>
16301 <div class="gallerytext">
16306 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16307 <div class="thumb" style="height: 150px;">Image3</div>
16308 <div class="gallerytext">
16311 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16312 <div class="thumb" style="height: 150px;">Image4</div>
16313 <div class="gallerytext">
16318 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16319 <div class="thumb" style="height: 150px;">Image5.svg</div>
16320 <div class="gallerytext">
16321 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16325 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16326 <div class="thumb" style="height: 150px;">* image6</div>
16327 <div class="gallerytext">
16335 Gallery (with options)
16337 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16338 File:Nonexistant.jpg|caption
16339 File:Nonexistant.jpg
16340 image:foobar.jpg|some '''caption''' [[Main Page]]
16342 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16345 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16346 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16347 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16348 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16349 <div class="gallerytext">
16354 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16355 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16356 <div class="gallerytext">
16359 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16360 <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>
16361 <div class="gallerytext">
16362 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16366 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16367 <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>
16368 <div class="gallerytext">
16371 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16372 <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>
16373 <div class="gallerytext">
16383 Gallery with link that has fragment
16386 image:foobar.jpg|link=Main_Page
16387 image:foobar.jpg|link=Main_Page#section
16388 image:foobar.jpg|link=Main Page#section|caption
16391 <ul class="gallery mw-gallery-traditional">
16392 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16393 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16394 <div class="gallerytext">
16397 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16398 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16399 <div class="gallerytext">
16402 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16403 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16404 <div class="gallerytext">
16414 Gallery with wikitext inside caption
16417 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16418 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16421 <ul class="gallery mw-gallery-traditional">
16422 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16423 <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>
16424 <div class="gallerytext">
16425 <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>
16429 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16430 <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>
16431 <div class="gallerytext">
16432 <p>This is a test template
16441 gallery (with showfilename option)
16443 <gallery showfilename>
16444 File:Nonexistant.jpg|caption
16445 File:Nonexistant.jpg
16446 image:foobar.jpg|some '''caption''' [[Main Page]]
16450 <ul class="gallery mw-gallery-traditional">
16451 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16452 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16453 <div class="gallerytext">
16454 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16459 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16460 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16461 <div class="gallerytext">
16462 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16466 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16467 <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>
16468 <div class="gallerytext">
16469 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16470 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16474 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16475 <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>
16476 <div class="gallerytext">
16477 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16486 Gallery (with namespace-less filenames)
16489 File:Nonexistant.jpg
16495 <ul class="gallery mw-gallery-traditional">
16496 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16497 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16498 <div class="gallerytext">
16501 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16502 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16503 <div class="gallerytext">
16506 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16507 <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>
16508 <div class="gallerytext">
16511 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16512 <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>
16513 <div class="gallerytext">
16521 HTML Hex character encoding (spells the word "JavaScript")
16523 parsoid=wt2html,wt2wt,html2html
16525 JavaScript
16527 <p>JavaScript
16532 <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>
16536 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16540 <p>&#xsee;&#XSEE;
16543 <p>&#xsee;&#XSEE;</p>
16547 HTML Hex character encoding mixed case
16549 parsoid=wt2html,wt2wt,html2html
16558 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16562 __FORCETOC__ override
16574 ISBN 978-0-1234-56 789
16576 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16579 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16583 ISBN followed by 5 spaces
16594 ISBN ISBN 1234567890
16596 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16605 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16610 ISBN with empty prefix (parsoid test)
16614 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
16618 Bug 22905: <abbr> followed by ISBN followed by </a>
16620 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
16622 <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>
16631 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
16636 Double RFC with a wiki link
16640 <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>
16649 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
16652 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
16656 Centre-aligned image
16658 [[Image:foobar.jpg|centre]]
16660 <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>
16667 [[Image:foobar.jpg|none]]
16669 <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>
16674 Width + Height sized image (using px) (height is ignored)
16676 [[Image:foobar.jpg|640x480px]]
16678 <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>
16683 Width-sized image (using px, no following whitespace)
16685 [[Image:foobar.jpg|640px]]
16687 <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>
16692 Width-sized image (using px, with following whitespace - test regression from r39467)
16694 [[Image:foobar.jpg|640px ]]
16696 <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>
16701 Width-sized image (using px, with preceding whitespace - test regression from r39467)
16703 [[Image:foobar.jpg| 640px]]
16705 <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>
16710 Image with page parameter
16714 [[File:LoremIpsum.djvu|page=2]]
16716 <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>
16721 Another italics / bold test
16729 # FIXME: The php output seems broken. It's interleaving some open/close tags.
16735 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
16738 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
16743 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
16745 Images with the "|" character in the comment
16747 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
16749 <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"></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div>
16752 <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>
16756 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
16758 <html><script>alert(1);</script></html>
16760 <p><html><script>alert(1);</script></html>
16765 HTML with raw HTML ($wgRawHtml==true)
16769 <html><script>alert(1);</script></html>
16771 <p><script>alert(1);</script>
16776 Parents of subpages, one level up
16778 subpage title=[[Subpage test/L1/L2/L3]]
16782 <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>
16788 Parents of subpages, one level up, not named
16790 subpage title=[[Subpage test/L1/L2/L3]]
16794 <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>
16801 Parents of subpages, two levels up
16803 subpage title=[[Subpage test/L1/L2/L3]]
16809 <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
16810 </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>
16815 Parents of subpages, two levels up, without trailing slash or name.
16817 subpage title=[[Subpage test/L1/L2/L3]]
16826 Parents of subpages, two levels up, with lots of extra trailing slashes.
16828 subpage title=[[Subpage test/L1/L2/L3]]
16832 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">Subpage test/L1</a>
16837 Subpage test/L1/L2/L3Sibling
16843 Transclusion of a sibling page (one level up)
16845 subpage title=[[Subpage test/L1/L2/L3]]
16854 Transclusion of a child page
16856 subpage title=[[Subpage test/L1/L2]]
16865 Non-transclusion because of too many up levels
16867 subpage title=[[Subpage test/L1/L2/L3]]
16869 {{../../../../More than parent}}
16871 <p>{{../../../../More than parent}}
16876 Definition list code coverage
16882 <dl><dt> title  </dt>
16884 <dt> title </dt>
16890 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16891 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16892 <dt>title</dt><dd> def</dd></dl>
16896 Don't fall for the self-closing div
16898 <div>hello world</div/>
16900 <div>hello world</div>
16909 <p>[[:Template:Msg]]
16918 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
16922 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
16924 Always escape literal '>' in output, not just after '<'
16938 <p>This is a test template
16939 This is a test template
16951 Inclusion of !userCanEdit() content
16955 <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>
16961 Out-of-order TOC heading levels
16970 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16972 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
16974 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
16975 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
16978 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
16980 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
16981 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
16987 <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>
16988 <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>
16989 <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>
16990 <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>
16991 <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>
16992 <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>
16998 ISBN with a dummy number
17008 ISBN with space-delimited number
17012 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17018 ISBN with multiple spaces, no number
17037 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17038 </p><p>ISBN 12345678901
17044 ISBN with trailing year (bug 8110)
17046 ISBN 1-234-56789-0 - 2006
17048 ISBN 1 234 56789 0 - 2006
17050 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17051 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17059 {{anchorencode:foo bar©#%n}}
17061 <p>foo_bar.C2.A9.23.25n
17066 anchorencode trims spaces
17068 {{anchorencode: __pretty__please__}}
17075 anchorencode deals with links
17077 {{anchorencode: [[hello|world]] [[hi]]}}
17084 anchorencode deals with templates
17086 {{anchorencode: {{Foo}} }}
17093 anchorencode encodes like the TOC generator: (bug 18431)
17095 === _ +:.3A%3A&&]] ===
17096 {{anchorencode: _ +:.3A%3A&&]] }}
17099 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17100 <p>.2B:.3A.253A.26.26.5D.5D
17105 Bug 6200: blockquotes and paragraph formatting
17126 Bug 8293: Use of center tag ruins paragraph formatting
17147 Parsing of overlapping (improperly nested) inline html tags
17149 <span><s>x</span></s>
17151 <p><span><s>x</span></s></span>
17154 <p><span><s>x</s></span>
17159 ### Language variants related tests
17162 Self-link in language variants
17164 title=[[Dunav]] language=sr
17166 Both [[Dunav]] and [[Дунав]] are names for this river.
17168 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17179 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17181 title=[[Duna]] language=sr
17183 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17185 <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.
17190 Link to a section of a variant of this title shouldn't be parsed as self-link
17192 title=[[Duna]] language=sr
17194 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17196 <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.
17201 Link to pages in language variants
17205 Main Page can be written as [[Маин Паге]]
17207 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17213 Multiple links to pages in language variants
17217 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17219 <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>.
17225 Simple template in language variants
17231 <p>This is a test template
17237 Template with explicit namespace in language variants
17243 <p>This is a test template
17249 Basic test for template parameter in language variants
17253 {{парамтест|param=foo}}
17255 <p>This is a test template with parameter foo
17261 Simple category in language variants
17265 [[Category:МедиаWики Усер'с Гуиде]]
17267 <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>
17284 Don't convert blue categorylinks to another variant (bug 33210)
17288 [[A]][[Category:分类]]
17290 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17295 Stripping -{}- tags (language variants)
17299 Latin proverb: -{Ne nuntium necare}-
17301 <p>Latin proverb: Ne nuntium necare
17307 Prevent conversion with -{}- tags (language variants)
17309 language=sr variant=sr-ec
17311 Latinski: -{Ne nuntium necare}-
17313 <p>Латински: Ne nuntium necare
17319 Prevent conversion of text with -{}- tags (language variants)
17321 language=sr variant=sr-ec
17323 Latinski: -{Ne nuntium necare}-
17325 <p>Латински: Ne nuntium necare
17331 Prevent conversion of links with -{}- tags (language variants)
17333 language=sr variant=sr-ec
17337 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17343 -{}- tags within headlines (within html for parserConvert())
17345 language=sr variant=sr-ec
17349 <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>
17355 Explicit definition of language variant alternatives
17357 language=zh variant=zh-tw
17359 -{zh:China;zh-tw:Taiwan}-, not China
17361 <p>Taiwan, not China
17367 Conversion around HTML tags
17369 language=sr variant=sr-ec
17371 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17372 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17375 <span title="ЛаCтин">ски</span>
17381 Explicit session-wise language variant mapping (A flag and - flag)
17383 language=zh variant=zh-tw
17385 Taiwan is not China.
17386 But -{A|zh:China;zh-tw:Taiwan}- is China,
17387 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17388 and -{China}- is China.
17390 <p>Taiwan is not China.
17391 But Taiwan is Taiwan,
17392 (This should be stripped!)
17393 and China is China.
17398 Explicit session-wise language variant mapping (H flag for hide)
17400 language=zh variant=zh-tw
17402 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17405 <p>(This should be stripped!)
17411 Adding explicit conversion rule for title (T flag)
17413 language=zh variant=zh-tw showtitle
17415 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17418 <p>Should be stripped!
17423 Testing that changing the language variant here in the tests actually works
17425 language=zh variant=zh showtitle
17427 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17430 <p>Should be stripped!
17435 Recursive conversion of alt and title attrs shouldn't clear converter state
17437 language=zh variant=zh-cn showtitle
17439 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17440 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17444 Should be stripped<span title="Exclamation">!</span>
17449 Bug 24072: more test on conversion rule for title
17451 language=zh variant=zh-tw showtitle
17453 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17454 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17457 <p>This should be stripped!
17458 This won't take interferes with the title rule.
17463 Partly disable title conversion if variant == main language code
17465 language=zh variant=zh title=[[ZH]] showtitle
17467 -{T|zh-cn:CN;zh-tw:TW}-
17475 Partly disable title conversion if variant == main language code, more
17477 language=zh variant=zh title=[[ZH]] showtitle
17487 Raw output of variant escape tags (R flag)
17489 language=zh variant=zh-tw
17491 Raw: -{R|zh:China;zh-tw:Taiwan}-
17493 <p>Raw: zh:China;zh-tw:Taiwan
17498 Nested using of manual convert syntax
17500 language=zh variant=zh-hk
17502 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17504 <p>Nested: Hello Hong Kong!
17509 Proper conversion of text in external links
17511 language=sr variant=sr-ec
17513 http://www.google.com
17514 gopher://www.google.com
17515 [http://www.google.com http://www.google.com]
17516 [gopher://www.google.com gopher://www.google.com]
17517 [https://www.google.com irc://www.google.com]
17518 [ftp://www.google.com www.google.com/ftp://dir]
17519 [//www.google.com www.google.com]
17521 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17522 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17523 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17524 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17525 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17526 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17527 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17532 Do not convert roman numbers to language variants
17534 language=sr variant=sr-ec
17538 <p>Фридрих IV је цар.
17543 Unclosed language converter markup "-{"
17554 Don't convert raw rule "-{R|=>}-" to "=>"
17565 Don't break link parsing if language converter markup is in the caption.
17567 language=sr variant=sr-ec
17569 [[Main Page|-{R|main page}-]]
17571 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17575 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17577 Don't break image parsing if language converter markup is in the caption.
17581 [[File:Foobar.jpg|-{R|caption}-]]
17583 <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>
17587 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17589 Don't break list handling if language converter markup is in the item.
17591 language=zh variant=zh-cn
17593 ;-{zh-cn:AAA;zh-tw:BBB}-
17595 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
17602 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17604 Don't break table handling if language converter markup is in the cell.
17606 language=sr variant=sr-ec
17629 Bug 529: Uncovered bullet
17638 # Plain MediaWiki does not remove empty lists, but tidy actually does.
17639 # Templates in Wikipedia rely on this behavior, as tidy has always been
17640 # enabled there. These tests are normally run *without* tidy, so specify the
17641 # full output here.
17642 # To test realistic parsing behavior, apply a tidy-like transformation to both
17643 # the expected output and your parser's output.
17645 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
17647 ******* Foo {{bullet}}
17649 <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>
17655 Bug 529: Uncovered table already at line-start
17678 Bug 529: Uncovered bullet in parser function result
17680 * Foo {{lc:{{bullet}} }}
17688 Bug 5678: Double-parsed template argument
17690 {{lc:{{{1}}}|hello}}
17697 Bug 5678: Double-parsed template invocation
17699 {{lc:{{paramtest {{!}} param = hello }} }}
17701 <p>{{paramtest | param = hello }}
17706 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
17709 title=[[Main Page]]
17711 {{PRVNÍVELKÉ:ěščř}}
17712 {{prvnívelké:ěščř}}
17732 Morwen/13: Unclosed link followed by heading
17739 <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>
17744 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
17751 <h1><span class="mw-headline" id="heading">heading</span></h1>
17756 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
17763 <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>
17778 Paragraphs inside divs (no extra line breaks)
17790 Paragraphs inside divs (extra line break on open)
17805 Paragraphs inside divs (extra line break on close)
17820 Paragraphs inside divs (extra line break on open and close)
17837 Nesting tags, paragraphs on lines which begin with <div>
17839 <div></div><strong>A
17842 <p><strong>A</strong></p>
17843 <p><strong>B</strong></p>
17851 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
17853 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
17855 <blockquote>Line one
17857 Line two</blockquote>
17859 <blockquote>Line one
17860 Line two</blockquote>
17864 <p>Line one Line two</p>
17869 Bug 6200: paragraphs inside blockquotes (extra line break on open)
17874 Line two</blockquote>
17879 Line two</blockquote>
17884 Line two</blockquote>
17888 Bug 6200: paragraphs inside blockquotes (extra line break on close)
17890 <blockquote>Line one
17895 <blockquote>Line one
17908 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
17930 Paragraphs inside blockquotes/divs (no extra line breaks)
17932 <blockquote><div>Line one
17934 Line two</div></blockquote>
17936 <blockquote><div>Line one
17937 Line two</div></blockquote>
17942 Paragraphs inside blockquotes/divs (extra line break on open)
17947 Line two</div></blockquote>
17952 Line two</div></blockquote>
17957 Paragraphs inside blockquotes/divs (extra line break on close)
17959 <blockquote><div>Line one
17962 </div></blockquote>
17964 <blockquote><div>Line one
17967 </div></blockquote>
17972 Paragraphs inside blockquotes/divs (extra line break on open and close)
17978 </div></blockquote>
17984 </div></blockquote>
17989 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
17991 wgLinkHolderBatchSize=0
17997 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
17998 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
17999 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18004 Free external link invading image caption
18006 [[Image:Foobar.jpg|thumb|http://x|hello]]
18008 <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"></a></div>hello</div></div></div>
18013 Bug 15196: localised external link numbers
18017 [http://en.wikipedia.org/]
18019 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18022 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18026 Multibyte character in padleft
18028 {{padleft:-Hello|7|Æ}}
18035 Multibyte character in padright
18037 {{padright:Hello-|7|Æ}}
18044 formatdate parser function
18046 {{#formatdate:2009-03-24}}
18048 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18053 formatdate parser function, with default format
18055 {{#formatdate:2009-03-24|mdy}}
18057 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18062 Spacing of numbers in formatted dates
18064 {{#formatdate:January 15}}
18066 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18071 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
18073 language=nl title=[[MediaWiki:Common.css]]
18075 {{#formatdate:2009-03-24|dmy}}
18077 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18090 Edit comment with link
18094 I like the [[Main Page]] a lot
18096 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18100 Edit comment with link and link text
18104 I like the [[Main Page|best pages]] a lot
18106 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18110 Edit comment with link and link text with suffix
18114 I like the [[Main Page|best page]]s a lot
18116 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18120 Edit comment with section link (non-local, eg in history list)
18122 comment title=[[Main Page]]
18124 /* External links */ removed bogus entries
18126 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18130 Edit comment with section link and text before it (non-local, eg in history list)
18132 comment title=[[Main Page]]
18134 pre-comment text /* External links */ removed bogus entries
18136 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>
18140 Edit comment with section link (local, eg in diff view)
18142 comment local title=[[Main Page]]
18144 /* External links */ removed bogus entries
18146 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18150 Edit comment with subpage link (bug 14080)
18154 title=[[Subpage test]]
18156 Poked at a [[/subpage]] here...
18158 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18162 Edit comment with subpage link and link text (bug 14080)
18166 title=[[Subpage test]]
18168 Poked at a [[/subpage|neat little page]] here...
18170 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18174 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18177 title=[[Subpage test]]
18179 Poked at a [[/subpage]] here...
18181 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18185 Edit comment with bare anchor link (local, as on diff)
18189 title=[[Main Page]]
18193 <a href="#section">#section</a>
18197 Edit comment with bare anchor link (non-local, as on history)
18200 title=[[Main Page]]
18204 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18208 Anchor starting with underscore
18212 <p><a href="#_ref">One</a>
18217 Id starting with underscore
18219 <div id="_ref"></div>
18221 <div id="_ref"></div>
18226 Space normalisation on autocomment (bug 22784)
18229 title=[[Main Page]]
18231 /* __hello__world__ */
18233 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18237 percent-encoding and + signs in comments (Bug 26410)
18241 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18243 <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>
18246 # FIXME: Omitting the php sections here because of differences in the local and
18247 # jenkins output. But, more importantly, the Bad.jpg isn't being stripped,
18248 # which seems to be a problem with the testing infrastructure.
18250 Bad images - basic functionality
18254 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[File:Bad.jpg]]","optList":[]}'/>
18257 # FIXME: Same reasoning as above. The expected php is:
18262 Bad images - bug 16039: text after bad image disappears
18269 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[File:Bad.jpg]]","optList":[]}'/>
18274 Verify that displaytitle works (bug #22501) no displaytitle
18278 wgAllowDisplayTitle=true
18279 wgRestrictDisplayTitle=false
18281 this is not the the title
18284 <p>this is not the the title
18289 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18294 wgAllowDisplayTitle=true
18295 wgRestrictDisplayTitle=false
18297 this is not the the title
18298 {{DISPLAYTITLE:whatever}}
18301 <p>this is not the the title
18306 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18311 wgAllowDisplayTitle=true
18312 wgRestrictDisplayTitle=true
18314 this is not the the title
18315 {{DISPLAYTITLE:whatever}}
18318 <p>this is not the the title
18323 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18328 wgAllowDisplayTitle=true
18329 wgRestrictDisplayTitle=true
18331 this is not the the title
18332 {{DISPLAYTITLE:screen}}
18335 <p>this is not the the title
18340 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18345 wgAllowDisplayTitle=false
18347 this is not the the title
18348 {{DISPLAYTITLE:screen}}
18351 <p>this is not the the title
18352 <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>
18357 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18362 wgAllowDisplayTitle=false
18364 this is not the the title
18367 <p>this is not the the title
18372 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18377 wgAllowDisplayTitle=true
18378 wgRestrictDisplayTitle=true
18380 this is not the the title
18381 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18383 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18384 <p>this is not the the title
18389 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18394 wgAllowDisplayTitle=true
18395 wgRestrictDisplayTitle=true
18397 this is not the the title
18398 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18400 <span style="color: red;">s</span>creen
18401 <p>this is not the the title
18406 preload: check <noinclude> and <includeonly>
18410 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18416 preload: check <onlyinclude>
18420 Goodbye <onlyinclude>Hello world</onlyinclude>
18426 preload: can pass tags through if we want to
18430 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18432 <includeonly>Hello world</includeonly>
18436 preload: check that it doesn't try to do tricks
18440 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18442 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18446 Play a bit with r67090 and bug 3158
18448 <div style="width:50% !important"> </div>
18449 <div style="width:50% !important"> </div>
18450 <div style="width:50% !important"> </div>
18451 <div style="border : solid;"> </div>
18453 <div style="width:50% !important"> </div>
18454 <div style="width:50% !important"> </div>
18455 <div style="width:50% !important"> </div>
18456 <div style="border : solid;"> </div>
18459 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18460 <div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&nbsp;!important"}}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18461 <div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&#160;!important"}}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18462 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18467 HTML5 data attributes
18469 <span data-foo="bar">Baz</span>
18470 <p data-abc-def_hij="">Quuz</p>
18472 <p><span data-foo="bar">Baz</span>
18474 <p data-abc-def_hij="">Quuz</p>
18479 percent-encoding and + signs in internal links (Bug 26410)
18481 [[User:+%]] [[Page+title%]]
18482 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18483 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
18484 [[%33%45]] [[%33%45+]]
18486 <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>
18487 <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>
18488 <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>
18489 <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>
18494 Special characters in embedded file links (bug 27679)
18496 [[File:Contains & ampersand.jpg]]
18497 [[File:Does not exist.jpg|Title with & ampersand]]
18499 <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>
18500 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18506 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18508 Text's been normalized?
18510 <p>Text's been normalized?
18515 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18517 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18519 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18524 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18526 [http://www.example.org/ ideograms]
18528 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18533 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18535 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18537 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18561 Bug 31098 Template which includes system messages which includes the template
18565 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18566 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18571 Bug31490 Turkish: ucfirst 'blah'
18582 Bug31490 Turkish: ucfirst 'ix'
18593 Bug31490 Turkish: lcfirst 'BLAH'
18604 Bug31490 Turkish: ucfırst (with a dotless i)
18610 <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>
18615 Bug31490 ucfırst (with a dotless i) with English language
18621 <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>
18626 Bug 26375: TOC with italics
18628 title=[[Main Page]]
18631 == ''Lost'' episodes ==
18633 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18635 <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>
18639 <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>
18644 Bug 26375: TOC with bold
18646 title=[[Main Page]]
18649 == '''should be bold''' then normal text ==
18651 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18653 <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>
18657 <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>
18662 Bug 33845: Headings become cursive in TOC when they contain an image
18664 title=[[Main Page]]
18667 == Image [[Image:foobar.jpg]] ==
18669 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18671 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
18675 <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>
18680 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
18682 title=[[Main Page]]
18685 == <blockquote>Quote</blockquote> ==
18687 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18689 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18693 <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>
18696 <div id="toc" class="toc">
18697 <div id="toctitle">
18701 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18704 <h2><span class="mw-headline" id="Quote"></span></h2>
18706 <p><span class="mw-headline" id="Quote">Quote</span></p>
18708 <p><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></p>
18712 Unclosed tags in TOC
18714 title=[[Main Page]]
18718 <small>Hanc marginis exiguitas non caperet.</small>
18721 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18723 <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>
18727 <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>
18728 <p><small>Hanc marginis exiguitas non caperet.</small>
18734 Multiple tags in TOC
18737 == <i>Foo</i> <b>Bar</b> ==
18739 == <i>Foo</i> <blockquote>Bar</blockquote> ==
18741 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18743 <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>
18744 <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>
18748 <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>
18749 <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>
18752 <div id="toc" class="toc">
18753 <div id="toctitle">
18757 <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>
18758 <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>
18761 <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>
18762 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
18764 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
18766 <p><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></p>
18770 Tags with parameters in TOC
18773 == <sup class="in-h2">Hello</sup> ==
18775 == <sup class="a > b">Evilbye</sup> ==
18777 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18779 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
18780 <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>
18784 <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>
18785 <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>
18790 span tags with directionality in TOC
18793 == <span dir="ltr">C++</span> ==
18795 == <span dir="rtl">זבנג!</span> ==
18797 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
18799 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
18801 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
18803 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18805 <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>
18806 <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>
18807 <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>
18808 <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>
18809 <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>
18813 <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>
18814 <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>
18815 <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>
18816 <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>
18817 <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>
18824 == {{int:headline_sample}} ==
18828 Bug 32057: Title needed when expanding <h> nodes.
18830 title=[[Main Page]]
18834 <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>
18839 Strip marker in urlencode
18841 {{urlencode:x<nowiki/>y}}
18842 {{urlencode:x<nowiki/>y|wiki}}
18843 {{urlencode:x<nowiki/>y|path}}
18870 Strip marker in formatNum
18872 {{formatnum:1<nowiki/>2}}
18873 {{formatnum:1<nowiki/>2|R}}
18881 Check noCommafy in formatNum
18885 {{formatnum:123456.78}}
18886 {{formatnum:123456.78|NOSEP}}
18894 Wrong option for formatNum (bug 56199)
18896 {{formatnum:1,234.56|Random}}
18897 {{formatnum:1,234.56|EVERYTHING}}
18898 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
18907 Strip marker in grammar
18911 {{grammar:elative|foo<nowiki/>bar}}
18918 Strip marker in padleft
18920 {{padleft:|2|x<nowiki/>y}}
18927 Strip marker in padright
18929 {{padright:|2|x<nowiki/>y}}
18936 Strip marker in anchorencode
18938 {{anchorencode:x<nowiki/>y}}
18945 nowiki inside link inside heading (bug 18295)
18947 ==[[foo|x<nowiki>y</nowiki>z]]==
18949 <h2><span class="mw-headline" id="xyz"><a href="/wiki/Foo" title="Foo">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>
18954 new support for bdi element (bug 31817)
18956 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18958 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18963 Ignore pipe between table row attributes
18967 |- id=foo | style='color: red'
18975 <tr id="foo" style="color: red">
18982 Gallery override link with WikiLink (bug 34852)
18985 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
18988 <ul class="gallery mw-gallery-traditional">
18989 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18990 <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>
18991 <div class="gallerytext">
19001 Gallery override link with absolute external link (bug 34852)
19004 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19007 <ul class="gallery mw-gallery-traditional">
19008 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19009 <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>
19010 <div class="gallerytext">
19020 Gallery override link with malicious javascript (bug 34852)
19023 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19026 <ul class="gallery mw-gallery-traditional">
19027 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19028 <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>
19029 <div class="gallerytext">
19039 Gallery with invalid title as link (bug 43964)
19042 File:foobar.jpg|link=<
19045 <ul class="gallery mw-gallery-traditional">
19046 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19047 <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>
19048 <div class="gallerytext">
19056 Language parser function
19065 Padleft and padright as substr
19067 {{padleft:|3|abcde}}
19068 {{padright:|3|abcde}}
19076 Special parser function
19078 {{#special:RandomPage}}
19079 {{#special:BaDtItLe}}
19080 {{#special:Foobar}}
19089 Bug 34939 - Case insensitive link parsing ([HttP://])
19091 [HttP://MediaWiki.Org/]
19093 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19096 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19100 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19102 [HttP://MediaWiki.Org/ MediaWiki]
19104 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19109 Bug 34939 - Case insensitive link parsing (HttP://)
19111 HttP://MediaWiki.Org/
19113 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19116 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19134 <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>
19135 <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>
19136 <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>
19137 <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>
19138 <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>
19144 ### Parsoid-specific tests
19145 ### Parsoid-PHP parser incompatibilities
19148 1. SOL-sensitive wikitext tokens as template-args
19150 parsoid=wt2html,wt2wt
19156 <span about="#mwt1" typeof="mw:Transclusion">
19157 </span><ul about="#mwt1"><li>a</li>
19159 <span about="#mwt2" typeof="mw:Transclusion">
19160 </span><ol about="#mwt2"><li>a</li>
19162 <span about="#mwt3" typeof="mw:Transclusion">
19163 </span><dl about="#mwt3"><dd>a</dd>
19167 #### -----------------------------------------------------------------
19168 #### Parsoid-specific functionality tests
19169 #### -----------------------------------------------------------------
19171 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19172 # We know wt2wt will fail, but we expect selser to pass.
19173 # Due to the nature of our testing, wt2wt and selser tests will enter the
19174 # blacklist and we'll catch selser regressions based on changes to the
19175 # blacklist entries for selser tests.
19177 1. Bad treebuilder fixup of formatting elt is cleaned up
19179 parsoid=wt2html,wt2wt
19184 [[Image:Foobar.jpg|right|Test]]
19191 <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>Test</figcaption></figure>
19198 2. Bad treebuilder fixup of formatting elt is cleaned up
19200 parsoid=wt2html,wt2wt
19202 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19204 <small>[[Image:Foobar.jpg|right|300px]]</small>
19207 <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><b>caption</b></figcaption></figure>
19209 <small><figure class="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="34" width="300"/></a></figure></small>
19212 #### ----------------------------------------------------------------
19213 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19214 #### tags. Parsoid's output for these tags differs from that of the
19216 #### ----------------------------------------------------------------
19219 Ref: 1. ref-location should be replaced with an index span
19224 B <ref name="x">foo</ref>
19227 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
19228 B <span about="#mwt4" class="reference" id="cite_ref-x-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}'><a href="#cite_note-x-2">[2]</a></span>
19229 C <span about="#mwt6" class="reference" id="cite_ref-y-3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"y"}}'><a href="#cite_note-y-3">[3]</a></span></p>
19233 Ref: 2. ref-tags with identical names should all get the same index
19237 A <ref name="x">foo</ref>
19240 <p>A <span about="#mwt2" class="reference" id="cite_ref-x-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19241 B <span about="#mwt4" class="reference" id="cite_ref-x-1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span></p>
19245 Ref: 3. spaces in ref-names should be ignored
19249 A <ref name="x">foo</ref>
19250 B <ref name=" x " />
19253 <p>A <span about="#mwt2" class="reference" id="cite_ref-x-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19254 B <span about="#mwt4" class="reference" id="cite_ref-x-1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19255 C <span about="#mwt6" class="reference" id="cite_ref-x-1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span></p>
19258 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19260 Ref: 4. 'constructor' should be accepted as a valid ref-name
19264 A <ref name="constructor">foo</ref>
19266 <p>A <span about="#mwt2" class="reference" id="cite_ref-constructor-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"constructor"}}'><a href="#cite_note-constructor-1">[1]</a></span></p>
19270 Ref: 5. body should accept generic wikitext
19275 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19280 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"This is a <b data-parsoid='{\"dsr\":[19,40,3,3]}'><a rel=\"mw:WikiLink\" href=\"./Bolded_link\" title=\"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-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[55,76,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"transclusion\"}},\"i\":0}}]}'>transclusion</span>\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19282 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19283 <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" title="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>
19289 Ref: 6. indent-pres should not be output in ref-body
19301 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo\n bar\n baz\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19303 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19304 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19312 Ref: 7. No p-wrapping in ref-body
19331 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo\n\nbar\n\n\nbaz\n\n\n\nbooz\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19333 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19334 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19349 Ref: 8. transclusion wikitext has lower precedence
19353 A <ref> foo {{echo|</ref> B C}}
19357 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo <span typeof=\"mw:Nowiki\" data-parsoid='{\"src\":\"{{\",\"dsr\":[12,14,0,0]}'>{{</span>echo|"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C<span typeof="mw:Nowiki">}}</span></p>
19358 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19359 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <span typeof="mw:Nowiki">{{</span>echo|</li>
19364 Ref: 9. unclosed comments should not leak out of ref-body
19368 A <ref> foo <!--</ref> B C
19371 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo <!---->"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C</p>
19372 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19373 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li>
19378 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19382 A <ref> <b> foo </ref> B C
19386 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"<b data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[8,16,3,0]}'> foo </b>"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C</p>
19389 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19390 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> <b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></li>
19395 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19402 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B
19403 C <span about="#mwt4" class="reference" id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}'><a href="#cite_note-2">[2]</a></span> D</p>
19407 Ref: 12. ref-tags act as trailing newline migration barrier
19411 <!--the newline at the end of this line moves out of the p-tag-->a
19413 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19418 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19421 <p>b<!--the newline at the end of this line stays inside the p-tag--> <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-1">[1]</a></span>
19422 <span about="#mwt4" class="reference" id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-2">[2]</a></span></p>
19428 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19436 <p><span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> A
19437 <span about="#mwt4" class="reference" id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar\n"},"attrs":{}}'><a href="#cite_note-2">[2]</a></span> B</p>
19441 Ref: 14. A nested ref-tag should be emitted as plain text
19445 <ref>foo <ref>bar</ref> baz</ref>
19449 <p><span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo &lt;ref>bar&lt;/ref> baz"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19451 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19452 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <ref>bar</ref> baz</li>
19457 Ref: 15. ref-tags with identical names should get identical indexes
19461 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19462 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19466 <p>A1 <span about="#mwt3" class="reference" id="cite_ref-a-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a"}}'><a href="#cite_note-a-1">[1]</a></span> A2 <span about="#mwt4" class="reference" id="cite_ref-a-1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1">[1]</a></span>
19467 B1 <span about="#mwt7" class="reference" id="cite_ref-b-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span> B2 <span about="#mwt8" class="reference" id="cite_ref-b-2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span></p>
19469 <ol class="references" typeof="mw:Extension/references" about="#mwt10" 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>
19473 ## We don't bother wt2wt-ing non-standard whitespace
19475 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19483 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19485 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19486 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19490 References: 1. references tag without any refs should be handled properly
19496 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19500 References: 2. references tag with group only outputs references from that group
19504 A <ref group="a">foo</ref>
19505 B <ref group="b">bar</ref>
19507 <references group="a" />
19509 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"group":"a"}}'><a href="#cite_note-1">[a 1]</a></span>
19510 B <span about="#mwt4" class="reference" id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"group":"b"}}'><a href="#cite_note-2">[b 1]</a></span></p>
19512 <ol class="references" typeof="mw:Extension/references" about="#mwt6" 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>
19517 References: 3. ref list should be cleared after processing references
19529 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19531 <ol class="references" typeof="mw:Extension/references" about="#mwt4" 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>
19534 <p>B <span about="#mwt6" class="reference" id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
19536 <ol class="references" typeof="mw:Extension/references" about="#mwt8" 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>
19541 References: 4. only referenced group should be cleared after processing references
19545 A <ref group="a">afoo</ref>
19548 <references group="a" />
19554 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"afoo"},"attrs":{"group":"a"}}'><a href="#cite_note-1">[a 1]</a></span>
19555 B <span about="#mwt4" class="reference" id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bfoo"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
19557 <ol class="references" typeof="mw:Extension/references" about="#mwt6" 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>
19560 <p>C <span about="#mwt8" class="reference" id="cite_ref-3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"cfoo"},"attrs":{}}'><a href="#cite_note-3">[2]</a></span></p>
19562 <ol class="references" typeof="mw:Extension/references" about="#mwt10" 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>
19567 References: 5. ref tags in references should be processed while ignoring all other content
19572 B <ref name="b">bar</ref>
19575 <ref name="a">foo</ref>
19576 This should just get lost.
19579 <p>A <span about="#mwt2" class="reference" id="cite_ref-a-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1">[1]</a></span>
19580 B <span about="#mwt4" class="reference" id="cite_ref-b-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span></p>
19583 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"a\">foo</ref>\nThis should just get lost.","html":"\n<span about=\"#mwt8\" class=\"reference\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref name=\\\"a\\\">foo&lt;/ref>\",\"dsr\":[59,82,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"a\"}}'><a href=\"#cite_note-a-1\">[1]</a></span>\n"},"attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy"><a href="#cite_ref-a-1-0">↑</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">↑</a></span> bar</li>
19588 References: 6. <references /> from a transclusion
19592 <ref>Foo</ref> {{echo|<references />}}
19594 <p><span about="#mwt3" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p> <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>
19598 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
19602 A <ref>foo bar for a</ref>
19603 B <ref group="X" name="b" />
19607 <references group="X">
19608 <ref name="b">foo</ref>
19611 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo bar for a"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
19612 B <span about="#mwt4" class="reference" id="cite_ref-b-2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}'><a href="#cite_note-b-2">[X 1]</a></span></p>
19614 <ol class="references" typeof="mw:Extension/references" about="#mwt6" 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 bar for a</li></ol>
19616 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"b\">foo</ref>","html":"\n<span about=\"#mwt10\" class=\"reference\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref name=\\\"b\\\">foo&lt;/ref>\",\"dsr\":[96,119,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"#cite_note-b-2\">[X 1]</a></span>\n"},"attrs":{"group":"X"}}'><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b-2-0">↑</a></span> foo</li></ol>
19620 Entities in ref name
19624 <ref name="test & me">hi</ref>
19626 <p><span about="#mwt2" class="reference" id="cite_ref-test & me-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref name=\"test &amp; me\">hi</ref>"}' data-mw='{"name":"ref","body":{"html":"hi"},"attrs":{"name":"test & me"}}'><a href="#cite_note-test & me-1">[1]</a></span></p>
19629 # This test is wt2html only because we're permitting the serializer to produce
19630 # dirty diffs, normalizing the unclosed references to the self-closed version.
19632 Generate references for unclosed references tag
19640 <p>a<span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19643 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19644 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19648 New reference serializes on its own line
19650 parsoid=wt2wt,html2wt
19655 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
19658 #--------- Test stripping of empty nodes in template content ----------
19660 Empty LI and TR nodes should be stripped from template content
19665 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
19669 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
19682 Empty LI and TR nodes should not be stripped from top-level content
19709 Empty TR nodes should not be stripped if they have any attributes set
19711 {{EmptyTRWithHTMLAttrTest}}
19713 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
19714 <tr align="center"></tr>
19715 <tr><td>foo</td></tr>
19716 <tr align="center"></tr>
19717 <tr><td>bar</td></tr>
19721 #### ----------------------------------------------------------------
19722 #### The following section of tests are primarily to test
19723 #### wikitext escaping capabilities of Parsoid. Given that
19724 #### escaping can be done any number of ways, the wikitext (input)
19725 #### is always adjusted to reflect how Parsoid adds nowiki
19728 #### We are marking several tests as parsoid-only since the
19729 #### HTML in the result section is different from what the
19730 #### PHP parser generates for it.
19731 #### ----------------------------------------------------------------
19734 #### --------------- Headings ---------------
19736 #### 1. Nested inside html <h1>=foo=</h1>
19737 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
19738 #### 3. Nested inside html with wikitext split by html tags
19739 #### 4. No escape needed
19740 #### 5. Empty headings <h1></h1>
19741 #### 6. Heading chars in SOL context
19742 #### ----------------------------------------
19744 Headings: 0. Unnested
19748 <nowiki>=foo=</nowiki>
19750 <nowiki> =foo= </nowiki>
19752 <nowiki>=foo=</nowiki>
19754 =foo''a''<nowiki>=</nowiki>
19756 <p><span typeof="mw:Nowiki">=foo=</span></p>
19758 <p><span typeof="mw:Nowiki"> =foo= </span>
19760 <span typeof="mw:Nowiki">=foo=</span></p>
19762 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
19765 # New headings and existing headings are handled differently
19767 Headings: 1. Nested inside html
19777 =<nowiki>=foo=</nowiki>=
19778 ==<nowiki>=foo=</nowiki>==
19779 ===<nowiki>=foo=</nowiki>===
19780 ====<nowiki>=foo=</nowiki>====
19781 =====<nowiki>=foo=</nowiki>=====
19782 ======<nowiki>=foo=</nowiki>======
19789 <h1 data-parsoid=''>=foo=</h1>
19790 <h2 data-parsoid=''>=foo=</h2>
19791 <h3 data-parsoid=''>=foo=</h3>
19792 <h4 data-parsoid=''>=foo=</h4>
19793 <h5 data-parsoid=''>=foo=</h5>
19794 <h6 data-parsoid=''>=foo=</h6>
19798 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
19803 <nowiki>*</nowiki>bar
19809 <nowiki>=bar=</nowiki>
19817 Headings: 3. Nested inside html with wikitext split by html tags
19821 = ='''bold'''<nowiki>foo=</nowiki> =
19823 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
19827 Headings: 4a. No escaping needed (testing just h1 and h2)
19845 = <nowiki>=</nowiki> =
19853 <h1><i>=</i>foo=</h1>
19854 <h1><span typeof="mw:Nowiki">=</span></h1>
19858 Headings: 4b. No escaping needed (inside p-tags)
19873 Headings: 5. Empty headings
19885 =====<nowiki/>=====
19887 ======<nowiki/>======
19898 Headings: 6a. Heading chars in SOL context (with trailing spaces)
19902 <nowiki>=a=</nowiki>
19904 <nowiki>=a=</nowiki>
19906 <nowiki>=a=</nowiki>
19908 <nowiki>=a=</nowiki>
19917 Headings: 6b. Heading chars in SOL context (with trailing newlines)
19945 Headings: 6c. Heading chars in SOL context (leading newline break)
19950 <nowiki>=b=</nowiki>
19957 Headings: 6d. Heading chars in SOL context (with interspersed comments)
19961 <!--c0--><nowiki>=a=</nowiki>
19963 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
19965 <p><!--c0-->=a=</p>
19966 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
19970 Headings: 6d. Heading chars in SOL context (No escaping needed)
19979 #### --------------- Lists ---------------
19980 #### 0. Outside nests (*foo, etc.)
19981 #### 1. Nested inside html <ul><li>*foo</li></ul>
19982 #### 2. Inside definition lists
19983 #### 3. Only bullets at start should be escaped
19984 #### 4. No escapes needed
19985 #### 5. No unnecessary escapes
19986 #### 6. Escape bullets in SOL position
19987 #### 7. Escape bullets in a multi-line context
19988 #### ----------------------------------------
19991 Lists: 0. Outside nests
19993 <nowiki>*</nowiki>foo
19995 <nowiki>#</nowiki>foo
19997 <nowiki>;Foo:</nowiki>bar
20006 Lists: 1. Nested inside html
20008 *<nowiki>*foo</nowiki>
20010 *<nowiki>#foo</nowiki>
20012 *<nowiki>:foo</nowiki>
20014 *<nowiki>;foo</nowiki>
20016 #<nowiki>*foo</nowiki>
20018 #<nowiki>#foo</nowiki>
20020 #<nowiki>:foo</nowiki>
20022 #<nowiki>;foo</nowiki>
20024 <ul><li>*foo</li></ul>
20025 <ul><li>#foo</li></ul>
20026 <ul><li>:foo</li></ul>
20027 <ul><li>;foo</li></ul>
20028 <ol><li>*foo</li></ol>
20029 <ol><li>#foo</li></ol>
20030 <ol><li>:foo</li></ol>
20031 <ol><li>;foo</li></ol>
20036 Lists: 2. Inside definition lists
20038 ;<nowiki>;foo</nowiki>
20040 ;<nowiki>:foo</nowiki>
20042 ;<nowiki>:foo</nowiki>
20045 :<nowiki>:foo</nowiki>
20047 <dl><dt>;foo</dt></dl>
20048 <dl><dt>:foo</dt></dl>
20051 <dl><dd>:foo</dd></dl>
20056 Lists: 3. Only bullets at start of text should be escaped
20058 *<nowiki>*foo*bar</nowiki>
20060 *<nowiki>*foo</nowiki>''it''*bar
20062 <ul><li>*foo*bar</li></ul>
20063 <ul><li>*foo<i>it</i>*bar</li></ul>
20068 Lists: 4. No escapes needed
20089 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20093 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20099 Lists: 5. No unnecessary escapes
20101 * bar <span><nowiki>[[foo]]</nowiki></span>
20103 *=bar <span><nowiki>[[foo]]</nowiki></span>
20105 *[[bar <span><nowiki>[[foo]]</nowiki></span>
20107 *]]bar <span><nowiki>[[foo]]</nowiki></span>
20109 *=bar <span>foo]]</span>=
20113 <ul><li> bar <span>[[foo]]</span></li></ul>
20114 <ul><li>=bar <span>[[foo]]</span></li></ul>
20115 <ul><li>[[bar <span>[[foo]]</span></li></ul>
20116 <ul><li>]]bar <span>[[foo]]</span></li></ul>
20117 <ul><li>=bar <span>foo]]</span>=</li></ul>
20118 <ul><li> <s></s>: a</li></ul>
20123 Lists: 6. Escape bullets in SOL position
20127 <!--cmt--><nowiki>*foo</nowiki>
20129 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
20133 Lists: 7. Escape bullets in a multi-line context
20136 <nowiki>*</nowiki>b
20143 #### --------------- HRs ---------------
20144 #### 1. Single line
20145 #### -----------------------------------
20148 HRs: 1. Single line
20152 ----<nowiki>----</nowiki>
20156 <hr><p><span typeof="mw:Nowiki">----</span></p>
20161 #### --------------- Tables ---------------
20162 #### 1a. Simple example
20163 #### 1b. No escaping needed (!foo)
20164 #### 1c. No escaping needed (|foo)
20165 #### 1d. No escaping needed (|}foo)
20167 #### 2a. Nested in td (<td>foo|bar</td>)
20168 #### 2b. Nested in td (<td>foo||bar</td>)
20169 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20171 #### 3a. Nested in th (<th>foo!bar</th>)
20172 #### 3b. Nested in th (<th>foo!!bar</th>)
20173 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20177 #### 4c. No escaping needed
20178 #### --------------------------------------
20181 Tables: 1a. Simple example
20192 Tables: 1b. No escaping needed
20201 Tables: 1c. No escaping needed
20210 Tables: 1d. No escaping needed
20219 Tables: 2a. Nested in td
20224 |<nowiki>foo|bar</nowiki>
20226 |x<div><nowiki>a|b</nowiki></div>
20230 <td>foo|bar</td></tr>
20231 <tr><td>x<div>a|b</div></td>
20236 Tables: 2b. Nested in td
20241 |<nowiki>foo||bar</nowiki>
20242 |''it''<nowiki>foo||bar</nowiki>
20246 <td><span typeof="mw:Nowiki">foo||bar</span></td>
20247 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
20251 Tables: 2c. Nested in td -- no escaping needed
20259 <table><tbody><tr><td>foo!!bar
20260 </td></tr></tbody></table>
20265 Tables: 3a. Nested in th
20273 <table><tbody><tr><th>foo!bar
20274 </th></tr></tbody></table>
20279 Tables: 3b. Nested in th
20284 !<nowiki>foo!!bar</nowiki>
20288 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
20293 Tables: 3c. Nested in th -- no escaping needed
20298 !<nowiki>foo||bar</nowiki>
20302 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
20306 Tables: 4a. Escape -
20313 |<nowiki>-bar</nowiki>
20317 <tr><th>-bar</th></tr>
20319 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
20323 Tables: 4b. Escape +
20330 |<nowiki>+bar</nowiki>
20334 <tr><th>+bar</th></tr>
20336 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
20340 Tables: 4c. No escaping needed
20361 <tr><td>foo-bar</td><td>foo+bar</td></tr>
20362 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
20368 <div>a|b</div></td>
20373 Tables: 4d. No escaping needed
20384 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
20385 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20386 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
20391 Tables: Digest broken attributes on table and tr tag
20407 #### --------------- Links ----------------
20408 #### 1. Quote marks in link text
20409 #### 2. Wikilinks: Escapes needed
20410 #### 3. Wikilinks: No escapes needed
20411 #### 4. Extlinks: Escapes needed
20412 #### 5. Extlinks: No escapes needed
20413 #### --------------------------------------
20415 Links 1. Quote marks in link text
20419 [[Foo|Foo<nowiki>''boo''</nowiki>]]
20421 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
20425 Links 2. WikiLinks: Escapes needed
20430 [[Foo|<nowiki>Foobar]</nowiki>]]
20431 [[Foo|x [Foobar] x]]
20432 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
20433 [[Foo|<nowiki>[[Bar]]</nowiki>]]
20434 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
20435 [[Foo|<nowiki>|Bar</nowiki>]]
20436 [[Foo|<nowiki>]]bar</nowiki>]]
20437 [[Foo|<nowiki>[[bar</nowiki>]]
20438 [[Foo|<nowiki>x [[ y</nowiki>]]
20439 [[Foo|<nowiki>x ]] y</nowiki>]]
20440 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
20442 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
20443 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
20444 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
20445 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
20446 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
20447 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
20448 <a href="Foo" rel="mw:WikiLink">|Bar</a>
20449 <a href="Foo" rel="mw:WikiLink">]]bar</a>
20450 <a href="Foo" rel="mw:WikiLink">[[bar</a>
20451 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
20452 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
20453 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
20457 Links 3. WikiLinks: No escapes needed
20464 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
20465 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
20469 Links 4. ExtLinks: Escapes needed
20473 [http://google.com <nowiki>[google]</nowiki>]
20474 [http://google.com <nowiki>google]</nowiki>]
20476 <nowiki>[http://google.com]</nowiki>
20478 <nowiki>[http://google.com google]</nowiki>
20481 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
20482 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
20483 <p>[http://google.com]</p>
20484 <p>[http://google.com google]</p>
20488 Links 5. ExtLinks: No escapes needed
20492 [http://google.com [google]
20494 <a href="http://google.com" rel="mw:ExtLink">[google</a>
20498 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
20500 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
20501 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
20502 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
20503 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
20504 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
20505 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
20506 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20507 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
20508 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20509 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
20510 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
20511 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
20512 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
20515 x<nowiki/>http://example.com<nowiki/>y
20516 http://example.com<nowiki/>?x
20517 http://example.com<nowiki/>&x
20518 http://example.com<nowiki/>'x
20519 http://example.com<nowiki/>,x
20520 http://example.com<nowiki/>.x
20521 http://example.com<nowiki/>;x
20522 http://example.com<nowiki/>:x
20523 http://example.com<nowiki/>;x
20524 http://example.com<nowiki/>!x
20525 http://example.com<nowiki/>=x
20526 http://example.com<nowiki/>(x)
20527 http://example.com(x<nowiki/>)
20531 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20534 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
20536 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
20537 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
20538 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
20539 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
20540 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
20546 "http://example.com"
20547 (http://example.com)
20548 (http://example.com) foo
20549 http://example.com,
20550 http://example.com, foo
20553 ## Parsoid currently fails wt2html on this one!
20555 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20557 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
20559 http://example.com.,;:!?
20563 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
20565 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
20571 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
20573 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20574 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20575 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
20576 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
20586 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
20588 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
20594 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
20596 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20597 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20598 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
20599 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
20609 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
20611 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
20612 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
20613 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
20616 ISBN 1234567890<nowiki/>1
20617 ISBN 1234567890<nowiki/>x
20618 ISBN 1234567890<nowiki/>b
20622 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
20624 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
20629 #### --------------- Quotes ---------------
20630 #### 1. Quotes inside <b> and <i>
20631 #### 2. Link fragments separated by <i> and <b> tags
20632 #### 3. Link fragments inside <i> and <b>
20633 #### 4. No escaping needed
20634 #### --------------------------------------
20636 1. Quotes inside <b> and <i>
20638 parsoid=html2wt,wt2wt
20640 ''<nowiki>'foo'</nowiki>''
20641 ''<nowiki>''foo''</nowiki>''
20642 ''<nowiki>'''foo'''</nowiki>''
20644 '''<nowiki>'foo'</nowiki>'''
20645 '''<nowiki>''foo''</nowiki>'''
20646 '''<nowiki>'''foo'''</nowiki>'''
20647 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
20648 '''foo'''<nowiki/>'s
20651 '<nowiki/>''foo''<nowiki/>'
20653 '''foo'''<nowiki/>'
20654 '<nowiki/>'''foo'''<nowiki/>'
20655 ''fools'<span> errand</span>''
20656 ''<span>fool</span>'s errand''
20665 <b>foo'<i>bar'</i>baz</b>
20673 <i>fools'<span> errand</span></i>
20674 <i><span>fool</span>'s errand</i>
20678 2. Link fragments separated by <i> and <b> tags
20680 [[''foo''<nowiki>hello]]</nowiki>
20682 [['''foo'''<nowiki>hello]]</nowiki>
20684 <p>[[<i>foo</i>hello]]
20685 </p><p>[[<b>foo</b>hello]]
20689 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
20690 # this is one of the shortcomings of this format
20692 3. Link fragments inside <i> and <b>
20694 ''[[foo''<nowiki>]]</nowiki>
20696 '''[[foo'''<nowiki>]]</nowiki>
20699 </p><p><b>[[foo</b>]]
20704 4. No escaping needed
20706 '<span>''bar''</span>'
20707 '<span>'''bar'''</span>'
20709 <p>'<span><i>bar</i></span>'
20710 '<span><b>bar</b></span>'
20714 #### ----------- Paragraphs ---------------
20715 #### 1. No unnecessary escapes
20716 #### --------------------------------------
20719 1. No unnecessary escapes
20721 bar <span><nowiki>[[foo]]</nowiki></span>
20723 =bar <span><nowiki>[[foo]]</nowiki></span>
20725 [[bar <span><nowiki>[[foo]]</nowiki></span>
20727 ]]bar <span><nowiki>[[foo]]</nowiki></span>
20729 =bar <span>foo]]</span><nowiki>=</nowiki>
20731 <p>bar <span>[[foo]]</span>
20732 </p><p>=bar <span>[[foo]]</span>
20733 </p><p>[[bar <span>[[foo]]</span>
20734 </p><p>]]bar <span>[[foo]]</span>
20735 </p><p>=bar <span>foo]]</span>=
20739 #### ----------------------- PRE --------------------------
20740 #### 1. Leading whitespace in SOL context should be escaped
20741 #### ------------------------------------------------------
20743 1. Leading whitespace in SOL context should be escaped
20747 <nowiki> </nowiki>a
20749 <nowiki> </nowiki> a
20751 <nowiki> </nowiki>a(tab)
20753 <nowiki> </nowiki> a
20755 <nowiki> </nowiki> a
20758 <nowiki> </nowiki>b
20761 <nowiki> </nowiki>b
20764 <nowiki> </nowiki> b
20770 <p><!--cmt--> a</p>
20780 2. Leading whitespace in non-indent-pre contexts should not be escaped
20787 <p>foo <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"<i data-parsoid='{\"dsr\":[9,14,2,2]}'>a</i>\n b"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20791 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
20810 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
20814 [[File:Foobar.jpg|thumb|caption]]
20817 <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>
20821 5. Nowiki escaping should account for indent-pres
20830 #### --------------- Behavior Switches --------------------
20832 1. Valid behavior switches should be escaped
20836 <nowiki>__TOC__</nowiki>
20837 ''<nowiki>__TOC__</nowiki>''
20844 2. Invalid behavior switches should not be escaped
20855 #### --------------- HTML tags ---------------
20858 #### 3. multi-line html tag
20859 #### 4. extension tags
20860 #### -----------------------------------------
20866 <a href="http://google.com">google</a>
20868 <a href="http://google.com">google</a>
20874 <nowiki><div>foo</div>
20875 <div style="color:red">foo</div></nowiki>
20877 <p><div>foo</div>
20878 <div style="color:red">foo</div>
20883 3. multi-line html tag
20898 <nowiki><ref>foo</ref></nowiki>
20900 <nowiki><ref>bar</nowiki>
20902 baz<nowiki></ref></nowiki>
20904 <p><ref>foo</ref>
20905 </p><p><ref>bar
20906 </p><p>baz</ref>
20910 #### --------------- Others ---------------
20914 <nowiki>foo</nowiki>
20916 <p><nowiki>foo</nowiki>
20920 ## The quote-char in the input is necessary for triggering the bug
20922 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
20924 parsoid=wt2wt,html2wt
20933 Tag-like HTML structures are passed through as text
20955 </p><p>1<d e>f
20960 # This was a bug in the PHP parser (see bug 17663 and its dups,
20961 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
20963 Tag names followed by punctuation should not be recognized as tags
20967 <p><s.ome> text
20972 HTML tag with necessary entities in attributes
20974 <span title="&amp;">foo</span>
20976 <p><span title="&amp;">foo</span>
20981 HTML tag with 'unnecessary' entity encoding in attributes
20983 <span title="&">foo</span>
20985 <p><span title="&">foo</span>
20990 HTML tag with broken attribute value quoting
20992 <span title="Hello world>Foo</span>
20994 <p><span>Foo</span>
20997 <p><span title="Hello world">Foo</span>
21002 Parsoid-only: HTML tag with broken attribute value quoting
21006 <span title="Hello world>Foo</span>
21008 <p><span title="Hello world">Foo</span>
21013 Table with broken attribute value quoting
21016 | title="Hello world|Foo
21027 <td title="Hello world">Foo
21033 Table with broken attribute value quoting on consecutive lines
21036 | title="Hello world|Foo
21037 | style="color:red|Bar
21050 <td title="Hello world">Foo
21051 </td><td style="color: red">Bar
21052 </td></tr></tbody></table>
21057 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21067 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21077 Accept empty td cell attribute
21080 | align="center" | foo || |
21085 <td align="center"> foo </td>
21092 Non-empty attributes in th-cells
21095 ! Foo !! style="color: red" | Bar
21101 <th style="color: red"> Bar
21107 Accept empty attributes in th-cells
21122 Empty table rows go away
21143 ### Parsoid-centric tests for testing RTing of inter-element separators
21144 ### Edge cases not tested by existing parser tests and specific to
21145 ### Parsoid-specific serialization strategies.
21149 RT-ed inter-element separators should be valid separators
21161 # Parsoid-only since PHP parser relies on Tidy for correct output
21163 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
21177 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
21178 <p>bar</p></small></td></tr>
21182 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo<small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></small></td></tr>
21187 Empty TD followed by TD with tpl-generated attribute
21192 |{{echo|style='color:red'}}|foo
21206 Indented table with an empty td
21225 Indented block & table
21239 <div data-parsoid='{"stx":"html"}'>foo</div>
21241 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
21246 Indent and comment before table row
21261 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
21262 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
21266 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
21268 Empty TR followed by a template-generated TR
21274 {{echo|<tr><td>foo</td></tr>}}
21280 <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}}]}'>
21285 ## PHP and parsoid output differ for this, and since this is primarily
21286 ## for testing Parsoid's serializer, marking this Parsoid only
21288 Empty TR followed by mixed-ws-comment line should RT correctly
21304 <!--c--> </tr><!--d-->
21310 Multi-line image caption generated by templates with/without trailing newlines
21314 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
21315 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
21317 <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>
21318 <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>
21323 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
21327 <includeonly>foo</includeonly>
21334 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
21336 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
21339 ## PHP emits broken html for this, and since this is primarily
21340 ## a Parsoid serializer test, marking this Parsoid only
21342 Improperly nested inline or quotes tags with whitespace in between
21346 <span> <s>x</span> </s>
21349 <p><span> <s>x</s></span><s> </s>
21350 <b> <i>x</i></b><i> </i>
21355 Encapsulate protected attributes from wt
21359 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
21361 <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>
21365 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
21366 ## Having nested or stray pre tags results in the attempt to add duplicates,
21367 ## causing an assertion fail. This test tries to prevent that situation.
21369 Ensure ParagraphWrapper can deal with stray closing pre tags
21379 1. Ensure fostered text content is wrapped in element nodes
21383 <table>hi</table><table>ho</table>
21392 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
21394 parsoid=wt2html,wt2wt
21403 <tbody><tr><td> a</td></tr>
21408 Encapsulation properly handles null DSR information from foster box
21410 parsoid=wt2html,wt2wt
21412 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
21414 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>foo<tr><td>bar</td></tr></table>"}},"i":0}}]}">foo</span><table><tbody><tr><td>bar</td></tr></tbody></table>
21418 1. Encapsulate foster-parented transclusion content
21420 parsoid=wt2wt,wt2html
21422 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
21424 <p typeof="mw:Transclusion" data-mw="{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</p><table>
21434 2. Encapsulate foster-parented transclusion content
21436 parsoid=wt2wt,wt2html
21438 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
21440 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div><tr><td>bar</td></tr></table>"]}">foo</div>
21451 3. Encapsulate foster-parented transclusion content
21453 parsoid=wt2wt,wt2html
21455 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21457 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div><tr><td>"}},"i":0}},"bar</td></tr></table>"]}">
21470 4. Encapsulate foster-parented transclusion content
21472 parsoid=wt2wt,wt2html
21474 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21476 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div><tr><td>"}},"i":0}},"bar</td></tr></table>"]}">
21489 5. Encapsulate foster-parented transclusion content
21491 parsoid=wt2wt,wt2html
21493 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
21495 <p typeof="mw:Transclusion" data-mw="{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</p>
21510 6. Encapsulate foster-parented transclusion content
21512 parsoid=wt2wt,wt2html
21514 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
21516 <p typeof="mw:Transclusion" data-mw="{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</p>
21532 7. Encapsulate foster-parented transclusion content
21534 parsoid=wt2wt,wt2html
21536 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
21538 <p typeof="mw:Transclusion" data-mw="{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<p>foo</p>"}},"i":0}},"<td>bar</td></table>"]}">foo</p>
21549 8. Encapsulate foster-parented transclusion content
21551 parsoid=wt2wt,wt2html
21554 }}{|{{echo|style='color:red'}}
21559 <p typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}">a</p><p 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}}}</p><table>
21569 9. Encapsulate foster-parented transclusion content
21571 parsoid=wt2wt,wt2html
21573 <table>{{echo|hi</table>hello}}
21575 <p 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</p><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><p about="#mwt2">hello</p>
21579 Table in fosterable position
21581 parsoid=wt2html,wt2wt
21590 <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">
21592 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
21598 # Parsoid only for bug 64747
21600 Properly encapsulate empty-content transclusions in fosterable positions
21608 <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>"}'>
21614 Support <object> element with .data attribute
21618 <object data="test.swf"></object>
21620 <object data="test.swf"></object>
21623 # -----------------------------------------------------------------
21624 # The following section of tests are primarily to spec requirements
21625 # around serialization of new/edited content.
21627 # All these tests are marked Parsoid html2wt and html2html only
21628 # ----------------------------------------------------------------
21630 # 'mi' is a localinterwiki prefix as well as a language
21632 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
21638 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
21642 Image: Modifying size of an image (1)
21645 "modes": ["wt2wt"],
21647 ["img[height]", "attr", "height", "22"],
21648 ["img[width]", "attr", "width", "200"]
21652 [[Image:Foobar.jpg|230x230px]]
21654 [[Image:Foobar.jpg|200x200px]]
21658 Image: Modifying size of an image (2)
21661 "modes": ["wt2wt"],
21663 ["img[height]", "attr", "height", "100"],
21664 ["img[width]", "attr", "width", "500"]
21668 [[Image:Foobar.jpg|230x230px]]
21670 [[Image:Foobar.jpg|500x500px]]
21673 # Change in size is ignored so long as class='mw-default-size'
21675 Image: Modifying size of an image (3)
21678 "modes": ["wt2wt"],
21680 ["figure[class]", "removeClass", "mw-default-size"],
21681 ["figure img", "attr", "height", "19"],
21682 ["figure img", "attr", "width", "170"]
21686 [[Image:Foobar.jpg|thumb]]
21688 [[Image:Foobar.jpg|thumb|170x170px]]
21692 Image: Modifying alignment of an image (bug 48665)
21695 "modes": ["wt2wt"],
21697 ["figure[class]", "removeClass", "mw-halign-right"],
21698 ["figure[class]", "addClass", "mw-halign-left"]
21702 [[Image:Foobar.jpg|thumb|caption|right]]
21704 [[Image:Foobar.jpg|thumb|caption|left]]
21708 Image: Modifying mw-default-size of an frameless image (bug 62805)
21711 "modes": ["wt2wt"],
21713 ["figure.mw-default-size", "removeClass", "mw-default-size"]
21717 [[Image:Foobar.jpg|frameless|right]]
21719 [[Image:Foobar.jpg|frameless|right|220x220px]]
21723 Image: Modifying valign of an image (bug 49221)
21726 "modes": ["wt2wt"],
21728 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
21729 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
21733 [[File:Foobar.jpg|20px|middle]]
21735 [[File:Foobar.jpg|20px|text-top]]
21739 Image: Modifying alt attribute of an image (bug 56400)
21742 "modes": ["wt2wt"],
21744 ["img[alt]", "attr", "alt", "some alternate edited text"]
21748 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
21750 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
21754 Image: Modifying caption of an image
21757 "modes": ["wt2wt"],
21759 ["figcaption", "text", "new caption"]
21763 [[Image:Foobar.jpg|thumb|original caption]]
21765 [[Image:Foobar.jpg|thumb|new caption]]
21769 Image: empty alt attribute (bug 48924)
21773 [[File:Foobar.jpg|thumb|alt=|bar]]
21775 <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>
21779 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
21784 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
21786 #<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>
21790 Image: Block level image should have \n before and after
21795 [[File:Foobar.jpg|right|thumb|150x150px]]
21798 <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>
21802 Image: New block level image should have \n before and after (existing content)
21807 [[File:Foobar.jpg|right|thumb|150x150px]]
21811 <figure class="mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"right","ak":"right"},{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"150x150px"}]}'><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/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>
21816 Image: upright option (parsoid)
21820 [[File:Foobar.jpg|thumb|upright|caption]]
21821 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
21822 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
21824 <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>
21825 <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>
21826 <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>
21830 Image: upright option is ignored on inline and frame images (parsoid)
21834 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
21836 <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>
21840 Image: from basic HTML (1)
21844 <span typeof="mw:Image">
21845 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21848 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21852 Image: from basic HTML (2)
21856 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21858 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21862 Image: from basic HTML (3)
21866 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
21868 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
21872 Image: from basic HTML (4)
21876 <img src="File:Foobar.jpg">
21878 [[File:Foobar.jpg|link=]]
21882 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
21889 <li><p>foo</p></li>
21894 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
21900 <ul> <li>foo</li></ul>
21904 Don't strip leading whitespace when handling indent-pre suppressing tags
21912 '''This is very bold of you!'''
21916 indented cell (no pre-wrapping!)
21923 <tr><td> indented row</td></tr>
21926 <b>This is very bold of you!</b>
21929 indented cell (no pre-wrapping!)
21937 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
21942 <nowiki> </nowiki><span>bar</span>
21945 <nowiki> </nowiki></span>bar2
21948 <nowiki> </nowiki><span>bar</span>
21951 <nowiki> </nowiki><span>foo</span>
21969 Lists: Add space after bullets
21975 * <span> baz</span>
21980 <li><span> baz</span></li>
21985 Lists: Dont insert newlines in a serialized list item.
21992 <ul><li>a<br>b</li><li>c</li></ul>
21996 Headings: Add space before/after == (Bug 51744)
22006 == <span> baz</span> ==
22011 <h2><span> baz</span></h2>
22015 Parsoid: Serialize positional parameters with = in them as named parameter
22021 {{echo|1 = f=oo|2 = bar}}
22023 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22024 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22025 {{echo|<nowiki>f=oo</nowiki>|bar}}
22027 <p about="#mwt1" typeof="mw:Transclusion"
22028 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
22030 <p about="#mwt1" typeof="mw:Transclusion"
22031 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
22033 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22034 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22035 <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>
22039 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
22055 <div>a<p>b</p></div>
22064 Substrings resembling wikitext in hrefs should not get nowiki escapes
22070 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
22073 #-----------------------------
22074 # I/B quote minimization tests
22075 #-----------------------------
22078 1. I/B quote minimization: wikitext-only tags should be combined
22098 <p><i>A</i><i>B</i></p>
22099 <p><b>A</b><b>B</b></p>
22100 <p><i>A</i><b><i>B</i></b></p>
22101 <p><b>A</b><i><b>B</b></i></p>
22102 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
22103 <p><i><b>A</b></i><i><b>B</b></i></p>
22104 <p><i><b>A</b></i><b><i>B</i></b></p>
22105 <p><b><i>A</i></b><i><b>B</b></i></p>
22109 2. I/B quote minimization: wikitext and html tags should not be combined
22115 ''A'''''<i>B</i>'''
22117 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
22118 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
22122 3. I/B quote minimization: templated content stops minimization
22126 ''A''{{echo|''B''}}
22128 ''A''{{echo|'''''B'''''}}
22130 <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>
22131 <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>
22135 4. I/B quote minimization: new content should be mimimized with adjacent old content
22145 <p><i>A</i><i>B</i></p>
22146 <p><b>A</b><b>B</b></p>
22147 <p><i>A</i><b><i>B</i></b></p>
22150 #------------------------------------
22151 # End of I/B quote minimization tests
22152 #------------------------------------
22155 Bug 54262: New entities
22161 <span typeof="mw:Entity"> </span>
22164 ## Note that there is no wikitext output for 'unknownproperty' ##
22165 ## Unknown magic words are silently dropped ##
22180 __NOCONTENTCONVERT__
22182 <meta property='mw:PageProp/toc' />
22183 <meta property='mw:PageProp/notoc' />
22184 <meta property='mw:PageProp/forcetoc' />
22185 <meta property='mw:PageProp/index' />
22186 <meta property='mw:PageProp/noindex' />
22187 <meta property='mw:PageProp/nogallery' />
22188 <meta property='mw:PageProp/noeditsection' />
22189 <meta property='mw:PageProp/notitleconvert' />
22190 <meta property='mw:PageProp/nocontentconvert' />
22191 <meta property='mw:PageProp/unknownproperty' />
22195 Consecutive <pre>s should not get merged
22197 parsoid=html2wt,html2html
22213 <pre>a</pre><pre>b</pre>
22227 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
22231 [[Special:BookSources/1234567890|ISBN 1234567895]]
22233 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
22237 Edited RFC links not serializable as RFC links should serialize as extlinks
22241 [//tools.ietf.org/html/rfc123 New RFC]
22243 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
22247 Edited PMID links not serializable as PMID links should serialize as extlinks
22251 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
22253 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
22257 Edited Redirect link should emit a non-piped wikitext link
22263 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
22266 # -----------------------------------------------------------------
22267 # End of section for Parsoid-only html2wt tests for serialization
22269 # -----------------------------------------------------------------
22276 Try for 100% code coverage