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>
4105 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4107 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4112 External image from https
4114 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4116 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4121 External image (when not allowed)
4123 wgAllowExternalImages=0
4125 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4127 <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>
4132 Link to non-http image, no img tag
4134 Link to non-http image, no img tag: ftp://example.com/test.jpg
4136 <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>
4141 External links: terminating separator
4143 Terminating separator: http://example.com/thing,
4145 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4150 External links: intervening separator
4152 Intervening separator: http://example.com/1,2,3
4154 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4159 External links: old bug with URL in query
4161 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4163 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4168 External links: old URL-in-URL bug, mixed protocols
4170 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4172 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4177 External links: URL in text
4179 URL in text: [http://example.com http://example.com]
4181 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4186 External links: Clickable images
4188 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4190 <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>
4195 External links: raw ampersand
4197 Old & use: http://x&y
4199 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4204 External links: encoded ampersand
4206 Old & use: http://x&y
4208 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4211 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4215 External links: encoded equals (bug 6102)
4217 http://example.com/?foo=bar
4219 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4222 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4226 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4227 ## does it number them. As discussed in bug 53505, we can identify
4228 ## autonumbered links via CSS.
4232 External links: [raw ampersand]
4234 Old & use: [http://x&y]
4236 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4239 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4242 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4243 # mode will return the [raw ampersand] wikitext
4245 External links: [encoded ampersand]
4247 parsoid=wt2html,wt2wt,html2html
4249 Old & use: [http://x&y]
4251 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4254 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4258 External links: [raw equals]
4260 [http://example.com/?foo=bar]
4262 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4265 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4268 # note that parsoid html is identical to [raw equals] case; so html2wt
4269 # mode will return the [raw equals] wikitext
4271 External links: [encoded equals] (bug 6102)
4273 parsoid=wt2html,wt2wt,html2html
4275 [http://example.com/?foo=bar]
4277 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4280 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4283 # xxx parsoid strips the IDN character, so the round-trip tests will
4284 # obviously fail and are disabled. --cscott
4286 External links: [IDN ignored character reference in hostname; strip it right off]
4288 parsoid=wt2html,wt2wt,html2html
4290 [http://e‌xample.com/]
4292 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4295 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4298 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4299 # Where an external link could easily circumvent the sanitization of the text of
4300 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4301 # test demands a higher standard. That's a bit strange.
4305 # http://example.com -> [http://example.com|http://example.com]
4306 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4308 # The first example is sanitized, but the second is not. Any security benefits
4309 # from this production are trivial to circumvent. Either remove this test and
4310 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4311 # the test accordingly.
4315 # xxx parsoid strips the IDN character, so the round-trip tests will
4316 # obviously fail and are disabled. --cscott
4318 External links: IDN ignored character reference in hostname; strip it right off
4320 parsoid=wt2html,html2html
4322 http://e‌xample.com/
4324 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4327 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4331 External links: www.jpeg.org (bug 554)
4335 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4339 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4341 External links: URL within URL (original bug 2)
4343 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4345 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4348 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4352 BUG 361: URL inside bracketed URL
4354 [http://www.example.com/foo http://www.example.com/bar]
4356 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4361 BUG 361: URL within URL, not bracketed
4363 http://www.example.com/foo?=http://www.example.com/bar
4365 <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>
4370 BUG 289: ">"-token in URL-tail
4372 http://www.example.com/<hello>
4374 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4379 BUG 289: literal ">"-token in URL-tail
4381 http://www.example.com/<b>html</b>
4383 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4388 BUG 289: ">"-token in bracketed URL
4390 [http://www.example.com/<hello> stuff]
4392 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4397 BUG 289: literal ">"-token in bracketed URL
4399 [http://www.example.com/<b>html</b> stuff]
4401 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4406 BUG 289: literal double quote at end of URL
4408 http://www.example.com/"hello"
4410 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4415 BUG 289: literal double quote in bracketed URL
4417 [http://www.example.com/"hello" stuff]
4419 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4424 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4426 [http://www.example.com test]
4428 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4433 External links: link text with spaces
4435 [http://www.example.com a b c]
4436 [http://www.example.com ''a'' ''b'']
4438 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4439 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4444 External links: wiki links within external link (Bug 3695)
4446 [http://example.com [[wikilink]] embedded in ext link]
4448 <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>
4451 <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>
4455 BUG 787: Links with one slash after the url protocol are invalid
4459 [http:/example.com title]
4461 <p>http:/example.com
4462 </p><p>[http:/example.com title]
4467 Bracketed external links with template-generated invalid target
4469 [{{echo|http:/example.com}} title]
4471 <p>[http:/example.com title]
4476 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4478 ''[http://example.com text'']
4479 [http://example.com '''text]'''
4480 ''Something [http://example.com in italic'']
4481 ''Something [http://example.com mixed''''', even bold]'''
4482 '''''Now [http://example.com both''''']
4484 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4485 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4486 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4487 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4488 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4494 Bug 4781: %26 in URL
4496 http://www.example.com/?title=AT%26T
4498 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4501 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4504 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4505 # % is actually legal in HTML5. Any change in output would need testing though.
4507 Bug 4781, 5267: %25 in URL
4509 http://www.example.com/?title=100%25_Bran
4511 <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>
4514 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4518 Bug 4781, 5267: %28, %29 in URL
4520 http://www.example.com/?title=Ben-Hur_%281959_film%29
4522 <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>
4525 <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>
4530 Bug 4781: %26 in autonumber URL
4532 [http://www.example.com/?title=AT%26T]
4534 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4537 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4541 Bug 4781, 5267: %26 in autonumber URL
4543 [http://www.example.com/?title=100%25_Bran]
4545 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4548 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4552 Bug 4781, 5267: %28, %29 in autonumber URL
4554 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4556 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4559 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4564 Bug 4781: %26 in bracketed URL
4566 [http://www.example.com/?title=AT%26T link]
4568 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4571 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4575 Bug 4781, 5267: %25 in bracketed URL
4577 [http://www.example.com/?title=100%25_Bran link]
4579 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4584 Bug 4781, 5267: %28, %29 in bracketed URL
4586 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4588 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4591 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4595 External link containing a period in the anchor. (bug 63947)
4597 [//foo.org/bar#baz. bang]
4599 [//foo.org/bar. bang]
4601 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4602 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4605 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4606 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4610 External link containing a single quote. (bug 63947)
4614 [//foo.org/bar'baz bang]
4616 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4617 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4620 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4621 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4626 External link containing a period in the anchor. (bug 63947)
4628 [//foo.org/bar#baz. bang]
4630 [//foo.org/bar. bang]
4632 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4633 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4636 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4637 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4641 External link containing a single quote. (bug 63947)
4645 [//foo.org/bar'baz bang]
4647 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4648 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4651 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4652 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4657 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4659 Some [http://example.com/ pretty ''italics'' and stuff]!
4661 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4666 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4668 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4670 <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>
4675 External link containing double-single-quotes with no space separating the url from text in italics
4677 [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]].]
4679 <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>
4682 <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>
4684 <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>
4688 External link with comments in link text
4690 [http://www.google.com Google <!-- comment -->]
4692 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4697 URL-encoding in URL functions (single parameter)
4699 {{localurl:Some page|amp=&}}
4701 <p>/index.php?title=Some_page&amp=&
4706 URL-encoding in URL functions (multiple parameters)
4708 {{localurl:Some page|q=?&=&}}
4710 <p>/index.php?title=Some_page&q=?&amp=&
4717 http://example.com/index.php?foozoid%5B%5D=bar
4719 http://example.com/index.php?foozoid[]=bar
4721 <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>
4722 </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>
4725 <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>
4727 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4731 IPv6 urls (bug 21261)
4735 http://[2404:130:0:1000::187:2]/index.php
4737 <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>
4742 Non-extlinks in brackets
4751 [{{echo|foo}} ''bar'']
4752 [{{echo|foo}}l's] errand
4753 [{{echo|foo}}l's errand]
4755 [url=http://example.com]
4768 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4773 Percent encoding in external links
4775 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4777 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4780 <p><a rel="mw:ExtLink"
4781 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4785 Use url link syntax for links where the content is equal the link target
4789 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4792 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4796 Parenthesis in external links, especially URL links
4800 http://example.com/test)
4802 http://example.com/(test)
4804 http://example.com/((test)
4806 (http://example.com/(test))
4808 (http://example.com/(test)))))
4810 http://example.com/a)b
4812 [http://example.com) foo]
4814 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4815 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4816 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4817 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4818 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4819 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4820 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4821 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4824 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4825 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4826 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4827 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4828 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4829 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4830 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4831 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4835 Parenthesis in external links, w/ transclusion or comment
4837 (http://example.com/{{echo|hi}})
4839 (http://example.com<!-- hi -->)
4841 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4842 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4845 <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>
4847 <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>
4851 Replace invalid link targets when serializing
4855 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
4857 [[MediaWiki:Badtitletext|Manual]]
4867 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4869 Normal text. '''''Bold italic text.''''' Normal text.
4871 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4872 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4877 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4878 # parser strips. The wikitext contains just the first half of the bold
4881 Unclosed and unmatched quotes
4883 '''''Bold italic text '''with bold deactivated''' in between.'''''
4885 '''''Bold italic text ''with italic deactivated'' in between.'''''
4889 ..spanning two paragraphs (should not work).'''
4891 '''Bold tag left open
4893 ''Italic tag left open
4897 <!-- Unmatching number of opening, closing tags: -->
4898 '''This year''''s election ''should'' beat '''last year''''s.
4900 ''Tom'''s car is bigger than ''Susan'''s.
4902 Plain ''italic'''s plain
4904 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4905 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4906 </p><p><b>Bold text..</b>
4907 </p><p>..spanning two paragraphs (should not work).
4908 </p><p><b>Bold tag left open</b>
4909 </p><p><i>Italic tag left open</i>
4911 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4912 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4913 </p><p>Plain <i>italic'</i>s plain
4916 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4917 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4918 </p><p><b>Bold text..</b>
4919 </p><p>..spanning two paragraphs (should not work).<b></b>
4920 </p><p><b>Bold tag left open</b>
4921 </p><p><i>Italic tag left open</i>
4923 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4924 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4925 </p><p>Plain <i>italic'</i>s plain
4932 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
4935 # This should not produce <table></table> as <table><tr><td></td></tr></table>
4936 # is the bare minimum required by the spec, see:
4937 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
4938 # Parsoid team replies: empty table tags are legal in HTML5
4940 A table with no data.
4953 A table with stray table end tags on start tag line (wt2html)
4957 {|style="color: red;"|}
4959 {|style="color: red;" |}
4963 {|style="color: red;"|} id="foo"
4967 {|style="color: red;" |} id="foo"
4971 <table style="color: red;"></table>
4973 <table style="color: red;">
4979 <table style="color: red;" id="foo">
4985 <table style="color: red;" id="foo">
4994 A table with no data (take 2)
5002 # A table with nothing but a caption is invalid XHTML, we might want to render
5003 # this as <p>caption</p>
5004 # Parsoid team replies: table with only a caption is legal in HTML5
5006 A table with nothing but a caption
5014 </caption><tr><td></td></tr></table>
5017 <table><caption> caption</caption></table>
5021 A table with caption with default-spaced attributes and a table row
5024 |+ style="color: red;" | caption1
5030 <caption style="color: red;"> caption1
5039 A table with captions with non-default spaced attributes and a table row
5042 |+style="color: red;"|caption2
5043 |+ style="color: red;"| caption3
5049 <caption style="color: red;">caption2
5051 <caption style="color: red;"> caption3
5060 Table td-cell syntax variations
5064 | foo bar foo || baz
5065 | style='color:red;' | baz
5066 | style='color:red;' || baz
5073 <td> foo bar foo </td>
5076 <td style="color:red;"> baz
5078 <td> style='color:red;' </td>
5106 Simple table but with multiple dashes for row wikitext
5124 Multiplication table
5126 {| border="1" cellpadding="2"
5127 |+Multiplication table
5129 ! × !! 1 !! 2 !! 3
5147 <table border="1" cellpadding="2">
5148 <caption>Multiplication table
5195 Accept "||" in table headings
5210 Accept "!!" in table data
5224 <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>
5229 Accept "||" in indented table headings
5239 </th></tr></table></dd></dl>
5244 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5261 Accept "| !" at start of line in tables (ignore !-attribute)
5265 | !style="color:red" | bar
5277 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 +/-
5281 |style='color:red;'|+1
5282 |style='color:blue;'|-1
5294 <td style="color:red;">+1
5296 <td style="color:blue;">-1
5320 |rowspan=2| Cell 2, row 1 (and 2)
5331 <td rowspan="2"> Cell 2, row 1 (and 2)
5349 {| bgcolor=#ABCDEF border=2
5354 |the original table again
5362 <table bgcolor="#ABCDEF" border="2">
5370 <td>the original table again
5376 Invalid attributes in table cell (bug 1830)
5390 # The "|}" to close the table is missing from the input, so parsoid's
5391 # *2wt modes will fail.
5393 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5395 parsoid=wt2html,html2html
5398 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5402 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5403 <td>]" onmouseover="alert(document.cookie)">test
5411 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5416 Indented table markup mixed with indented pre content (proposed in bug 6200)
5421 Text that should be rendered preformatted
5429 <pre>Text that should be rendered preformatted
5438 Template-generated table cell attributes and cell content
5447 <td style="color: red"> Foo
5449 <td style="color: red"> Foo
5455 Template-generated table cell attributes and cell content (2)
5458 |align=center {{table_attribs}}
5463 <td align="center" style="color: red"> Foo
5469 Template-generated table cell attributes and cell content (3)
5472 |align=center {{table_cells}}
5477 <td align="center" style="color: red"> Foo </td>
5485 Table with row followed by newlines and table heading
5503 Table with empty line following the start tag
5520 # FIXME: Preserve the attribute properly (with an empty string as value) in
5521 # the PHP parser. Parsoid implements the behavior below.
5523 Table attributes with empty value
5533 </td></tr></tbody></table>
5538 Wikitext table with a lot of comments
5561 Wikitext table with double-line table cell
5578 Table cell with a single comment
5595 Table-cell after a comment-only-empty-line
5612 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5614 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5620 Build table with {{!}}
5622 {{{!}} class="wikitable"
5625 {{!}}- style="color:red;"
5626 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5629 <table class="wikitable">
5635 <tr style="color:red;">
5637 <td style="color:red;"> second data
5642 # The expected HTML structure in this test is debatable. The PHP parser does
5643 # not parse this kind of table at all. The main focus for Parsoid is on
5644 # round-tripping, so this output is ok for now. TODO: revisit!
5646 Wikitext table with html-syntax row
5656 <td>foo</td></tr></tbody></table>
5659 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5660 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5661 ## PHP parser, which tidy then compounds by fostering the content
5662 ## entirely out of the table. Parsoid recognizes the table context
5663 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5664 ## depends on PHP's treatment of broken table markup!
5666 Implicit <td> after a |-
5668 parsoid=wt2html,html2html
5688 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5690 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5692 parsoid=wt2html,html2html
5725 <tr><td><pre>a</pre></td></tr>
5726 <tr><td> b</td></tr>
5731 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5732 # Parsoid generates the missing <td>, so wt2wt won't succeed.
5734 Lists should be recognized in an implicit <td> context
5736 parsoid=wt2html,html2html
5763 Parsoid: Round-trip tables directly followed by content (bug 51219)
5765 parsoid=wt2html,wt2wt
5790 Parsoid: Default to a newline after tables in new content (bug 51219)
5797 <nowiki> </nowiki>bar
5804 <tr><td>foo</td></tr></tbody></table> bar
5806 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5810 Parsoid: newline inducing block nodes don't suppress <nowiki>
5822 Parsoid: Row-syntax table headings followed by comment & table cells
5824 parsoid=wt2html,wt2wt
5828 <!-- foo --> || baz || quux
5842 <tbody><tr><th> foo </th><th> bar
5843 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
5848 # PHP throws away the (semi-broken) "foo" class here; Parsoid
5851 Parsoid: Recover better from broken table attributes
5871 <p>foo</p></td></tr>
5876 Strip unsupported table tags
5927 Plain link, capitalized
5931 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5936 Plain link, uncapitalized
5940 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
5947 [[Main Page|The Main Page]]
5949 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5954 Piped link with comment in link text
5956 [[Main Page|The Main<!--front--> Page]]
5958 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5963 Piped link with multiple pipe characters in link text
5965 [[Main Page||The|Main|Page|]]
5967 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
5970 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
5978 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
5983 Broken link with fragment
5985 [[Zigzagzogzagzig#zug]]
5987 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
5992 Special page link with fragment
5994 [[Special:Version#anchor]]
5996 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6001 Nonexistent special page link with fragment
6003 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6005 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6012 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6014 <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>
6021 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6023 <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>!!!
6034 Bug 43661: Piped links with identical prefixes
6036 [[prefixed article|prefixed articles with spaces]]
6038 [[prefixed article|prefixed articlesaoeu]]
6040 [[Main Page|Main Page test]]
6042 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6043 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6044 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6050 Link with HTML entity in suffix / tail
6052 [[Main Page]]", [[Main Page]]a
6054 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6059 Link with 3 brackets
6068 Link with 4 brackets
6072 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6077 Piped link with 3 brackets
6079 [[[main page|the main page]]]
6081 <p>[[[main page|the main page]]]
6086 Piped link with extlink-like text
6089 [[Main Page|This is a [bar]]]
6091 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6092 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6097 Link with multiple pipes
6099 [[Main Page|The|Main|Page]]
6101 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6105 # Note that parsoid does not munge anchor text; all non-space
6106 # characters are valid in HTML5 ids.
6108 Anchor containing a #. (bug 63430)
6110 [[Main Page#And#Link]]
6112 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6115 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6121 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6123 <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>
6128 Link with space in namespace
6130 [[User talk:Foo bar]]
6132 <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>
6137 MemoryAlpha:AlphaTest
6139 This is an article in the MemoryAlpha namespace
6140 (which shadows the memoryalpha interwiki link).
6144 Namespace takes precedence over interwiki link (bug 51680)
6146 [[MemoryAlpha:AlphaTest]]
6148 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6152 # The previous test doesn't work correctly in html2*, due to not recognizing the
6153 # link as an internal one. This one checks for the correct behavior.
6155 Link to namespace preferred over interwiki with correct rel attribute
6157 parsoid=html2wt,html2html
6159 [[MemoryAlpha:AlphaTest]]
6161 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6166 Piped link to namespace
6168 [[Meta:Disclaimers|The disclaimers]]
6170 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6177 [[Usually caused by a typo (oops}]]
6179 <p>[[Usually caused by a typo (oops}]]
6186 Just a test of an article title containing a percent.
6190 Link containing % (not as a hex sequence)
6194 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6197 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6200 # note that the parsoid HTML is identical to the previous test output,
6201 # so the previous test ensures that the html2wt mode will generate the
6202 # "not as a hex sequence" wikitext.
6204 Link containing % as a single hex sequence interpreted to char
6206 parsoid=wt2wt,wt2html,html2html
6210 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6213 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6217 Link containing % as a double hex sequence interpreted to hex sequence
6221 <p>[[7%2525 Solution]]
6225 # note that parsoid does not munge anchor text; all non-space
6226 # characters are valid in HTML5 anchors.
6228 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6229 Example for such a section: == < ==
6231 [[%23%3c]][[%23%3e]]
6233 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6236 <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>
6240 Link containing "<#" and ">#" as a hex sequences
6242 [[%3c%23]][[%3e%23]]
6244 <p>[[%3c%23]][[%3e%23]]
6249 Link containing an equals sign
6251 [[Special:BookSources/isbn=4-00-026157-6]]
6253 <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>
6256 <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>
6262 Just a test of an article title containing a tilde.
6265 # note that links containing signatures, like [[Foo~~~~]], are
6266 # massaged by the pre-save transform (PST) and so the tildes are never
6267 # seen by the parser.
6269 Link containing a tilde
6273 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6276 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6280 Link containing double-single-quotes '' (bug 4598)
6282 [[Lista d''e paise d''o munno]]
6284 <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>
6287 <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>
6291 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6293 Some [[Link|pretty ''italics'' and stuff]]!
6295 <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>!
6298 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6302 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6304 ''Some [[Link|pretty ''italics'' and stuff]]!''
6306 <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>
6311 Link with double quotes in title part (literal) and alternate part (interpreted)
6313 [[File:Denys Savchenko ''Pentecoste''.jpg]]
6317 [[''Pentecoste''|Pentecoste]]
6319 [[''Pentecoste''|''Pentecoste'']]
6321 <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>
6322 </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>
6323 </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>
6324 </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>
6327 <meta typeof="mw:Placeholder"/>
6328 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6329 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6330 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6334 Broken image links with HTML captions (bug 39700)
6336 [[File:Nonexistent|<script></script>]]
6337 [[File:Nonexistent|100px|<script></script>]]
6338 [[File:Nonexistent|<]]
6339 [[File:Nonexistent|a<i>b</i>c]]
6341 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6342 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6343 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6344 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6351 [[http://www.example.com]]
6353 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6356 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6360 Plain link to URL with link text
6362 [[http://www.example.com Link text]]
6364 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6369 Plain link to protocol-relative URL
6371 [[//www.example.com]]
6373 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6376 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6380 Plain link to protocol-relative URL with link text
6382 [[//www.example.com Link text]]
6384 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6389 Plain link to page with question mark in title
6395 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6396 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6401 # I'm fairly sure the expected result here is wrong.
6402 # We want these to be URL links, not pseudo-pages with URLs for titles....
6403 # However the current output is also pretty screwy.
6406 # I'm changing it to match the current output--it arguably makes more
6407 # sense in the light of the test above. Old expected result was:
6408 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6410 # But I think this test is bordering on "garbage in, garbage out" anyway.
6415 Piped link to URL: [[http://www.example.com|an example URL]]
6417 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6420 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6424 BUG 2: [[page|http://url/]] should link to page, not http://url/
6426 [[Main Page|http://url/]]
6428 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6431 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6434 # Parsoid does not mark self-links, by design.
6436 BUG 337: Escaped self-links should be bold
6440 [[Bug462]] [[Bug462]]
6442 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6445 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6447 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6451 Self-link to section should not be bold
6455 [[Main Page#section]]
6457 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6468 Self-link to numeric title
6474 <p><strong class="selflink">0</strong>
6479 Link to numeric-equivalent title
6485 <p><a href="/wiki/00" title="00">00</a>
6490 <nowiki> inside a link
6492 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6494 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6499 Non-breaking spaces in title
6501 [[ Main Page ]]
6503 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6508 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6514 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6519 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6525 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6530 Internal link with en linktrail: no apostrophes (bug 27473)
6536 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6541 Internal link with ca linktrail with apostrophes (bug 27473)
6547 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6552 Internal link with kaa linktrail with apostrophes (bug 27473)
6558 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6563 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6565 [[User:Foo/Test/63636:Bar|Test]]
6567 <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>
6570 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6574 Purely hash wikilink
6576 title=[[User:test/123]]
6580 <p><a href="#a">b</a>
6583 <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>
6587 1. Interaction of linktrail and template encapsulation
6593 <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>
6597 2. Interaction of linktrail and template encapsulation
6601 {{echo|Some [[Fool]]}}s
6603 <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>
6607 3. Interaction of linktrail and template encapsulation
6611 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6613 <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>
6623 Internal link with is link prefix
6627 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6629 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6640 Internal link with is link trail and link prefix
6644 [[mótmælendatrú|xxx]]ar
6646 mótmælenda[[söfnuður]]
6647 mótmælenda[[söfnuður|söfnuðir]]
6648 mótmælenda[[söfnuður|söfnuðir]]xxx
6650 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6651 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6652 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6653 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6654 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6659 Parsoid link trail escaping
6661 parsoid=html2wt,html2html
6665 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6669 Parsoid link prefix escaping
6672 parsoid=html2wt,html2html
6674 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6676 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6680 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6688 [http://wp.org ''foo'']
6690 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6691 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6692 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6693 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6698 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6702 [[Foo|{{echo|a}} b {{echo|c}}]]
6704 <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>
6708 Link with angle bracket after anchor
6712 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6715 <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>
6719 ### Interwiki links (see maintenance/interwiki.sql)
6723 Inline interwiki link
6725 parsoid=wt2html,wt2wt,html2html
6727 [[MeatBall:SoftSecurity]]
6729 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6732 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
6736 Inline interwiki link with empty title (bug 2372)
6738 parsoid=wt2html,wt2wt,html2html
6742 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6745 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
6749 Interwiki link encoding conversion (bug 1636)
6751 *[[Wikipedia:ro:Olteniţa]]
6752 *[[Wikipedia:ro:Olteniţa]]
6754 <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>
6755 <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>
6759 <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>
6760 <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>
6765 Interwiki link with fragment (bug 2130)
6767 [[MeatBall:SoftSecurity#foo]]
6769 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6773 # Ideally the wikipedia: prefix here should be proto-relative too
6774 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
6775 # define the 'en' prefix, and originally the test used 'wikipedia',
6776 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
6779 Different interwiki prefixes mapping to the same URL
6787 [[:wikipedia:Foo|Foo]]
6789 [[wikipedia:en:Foo]]
6791 [[:wikipedia:en:Foo]]
6795 <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>
6797 <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>
6799 <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>
6801 <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>
6803 <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>
6805 <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>
6807 <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>
6811 Interwiki links that cannot be represented in wiki syntax
6814 [[meatball:ok#foo|ok with fragment]]
6815 [[meatball:ok_as_well?|ok ending with ? mark]]
6816 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6817 [http://de.wikipedia.org/wiki/#foo is just fragment]
6820 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
6821 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
6822 <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>
6823 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6824 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
6827 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
6828 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
6829 <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>
6830 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6831 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6835 Interwiki links: trail
6837 [[wikipedia:Foo|Ba]]r
6839 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
6842 <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>
6846 Local interwiki link
6848 parsoid=wt2html,wt2wt,html2html
6850 [[local:Template:Foo]]
6852 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
6855 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
6858 # Parsoid does not mark self-links, by design.
6860 Local interwiki link: self-link to current page
6863 parsoid=wt2html,wt2wt,html2html
6867 <p><strong class="selflink">local:Main Page</strong>
6870 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
6874 Local interwiki link: prefix only (bug 64167)
6876 parsoid=wt2html,wt2wt,html2html
6880 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
6883 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
6887 Local interwiki link: with additional interwiki prefix (bug 61357)
6889 parsoid=wt2html,wt2wt,html2html
6891 [[local:meatball:Hello]]
6893 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
6896 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
6900 Multiple local interwiki link prefixes
6902 [[local:local:local:local:mi:local:Foo]]
6904 parsoid=wt2html,wt2wt,html2html
6906 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
6909 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
6913 ### Interlanguage links
6914 ### Language links (so that searching for '### language' matches..)
6926 <p>Blah blah blah</p>
6927 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
6931 Interlanguage link with spacing
6933 parsoid=wt2html,wt2wt,html2html
6941 <p>Blah blah blah</p>
6942 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
6946 Double interlanguage link
6955 <p>Blah blah blah</p>
6956 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
6957 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
6961 Interlanguage link variations
6970 <p>Blah blah blah</p>
6971 <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"}}'/>
6972 <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"}}'/>
6976 Interlanguage link, with prefix links
6986 <p>Blah blah blah</p>
6987 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
6991 Double interlanguage link, with prefix links (bug 8897)
7002 <p>Blah blah blah</p>
7003 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7004 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7008 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7016 <p>Blah blah blah</p>
7017 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7021 Parsoid-specific test: Wikilinks with should RT properly
7027 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7032 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7036 He&nbsp;llo [[Foo|He&nbsp;llo]]
7038 He&nbsp;llo [[He&nbsp;llo]]
7040 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7041 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7045 Parsoid: handle constructor well
7051 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7052 </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>
7055 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7057 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7066 # Note that `ko` isn't a known interlanguage prefix
7068 Parsoid: recognize interlanguage links without a target page
7078 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7080 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7083 # Note that `ko` isn't a known interwiki prefix
7085 Parsoid: recognize interwiki links without a target page
7087 parsoid=wt2html,wt2wt,html2html
7093 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7094 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7097 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7098 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7102 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7106 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7109 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7113 Interlanguage link with preceding local interwiki link (bug 68085)
7115 parsoid=wt2html,wt2wt,html2html
7118 [[local:es:Spanish]]
7121 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7125 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7129 Looks like an interlanguage link, but is actually a local interwiki
7131 parsoid=wt2html,wt2wt,html2html
7137 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7141 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7145 ### Redirects, Parsoid-only
7148 1. Simple redirect to page
7152 #REDIRECT [[Main Page]]
7154 <link rel="mw:PageProp/redirect" href="./Main_Page">
7157 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7159 2. Other redirect variants
7161 parsoid=wt2html,wt2wt
7163 #REDIRECT [[Main_Page]]
7164 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7166 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7172 parsoid=wt2html,wt2wt
7177 <li>REDIRECT [[]]</li></ol>
7181 Optional colon in #REDIRECT
7183 # the colon is archaic syntax. we support it for wt2html, but we
7184 # don't care that it roundtrips back to the modern syntax.
7185 parsoid=wt2html,html2html
7187 #REDIRECT:[[Main Page]]
7189 <link rel="mw:PageProp/redirect" href="./Main_Page">
7193 Whitespace in #REDIRECT with optional colon
7195 # the colon and gratuitous whitespace is archaic syntax. we support
7196 # it for wt2html, but we don't care that it roundtrips back to the
7197 # modern syntax (without extra whitespace)
7198 parsoid=wt2html,html2html
7205 <link rel="mw:PageProp/redirect" href="./Main_Page">
7209 Piped link in #REDIRECT
7211 # content after piped link is ignored. we support this syntax,
7212 # but don't care that the piped link is lost when we roundtrip this.
7215 #REDIRECT [[Main Page|bar]]
7217 <link rel="mw:PageProp/redirect" href="./Main_Page">
7221 Redirect to category
7225 #REDIRECT [[Category:Foo]]
7227 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7231 Redirect to category with URL encoding
7235 #REDIRECT [[Category%3AFoo]]
7237 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7241 Redirect to category page
7243 parsoid=wt2html,html2html
7245 #REDIRECT [[:Category:Foo]]
7247 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7251 Redirect to image page (1)
7255 #REDIRECT [[File:Wiki.png]]
7257 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7261 Redirect to image page (2)
7265 #REDIRECT [[Image:Wiki.png]]
7267 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7271 Redirect to language
7275 #REDIRECT [[en:File:Wiki.png]]
7277 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7281 Redirect to interwiki
7285 #REDIRECT [[meatball:File:Wiki.png]]
7287 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7291 Non-English #REDIRECT
7296 #TILVÍSUN [[Main Page]]
7298 <link rel="mw:PageProp/redirect" href="./Main_Page">
7309 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7326 Broken br tag sanitization
7334 # TODO: Fix html2html mode (bug 51055)!
7335 # This </br> handling was added as part of bug 50831; but it
7336 # differs from how PHP+tidy handles this. We should investigate
7339 Parsoid: Broken br tag recognition
7355 Incorrecly removing closing slashes from correctly formed XHTML
7357 <br style="clear:both;" />
7359 <p><br style="clear:both;" />
7364 Failing to transform badly formed HTML into correct XHTML
7366 <br style="clear: left;">
7367 <br style="clear: right;">
7368 <br style="clear: both;">
7370 <p><br style="clear: left;" />
7371 <br style="clear: right;" />
7372 <br style="clear: both;" />
7377 Handling html with a div self-closing tag
7386 <p><div title />
7390 <p><div title=bar />
7391 <div title=bar/>
7393 <div title="bar/"></div>
7399 Handling html with a br self-closing tag
7408 <p><br title="title" />
7409 <br title="title" />
7426 Horizontal ruler (should it add that extra space?)
7441 Horizontal ruler -- 4+ dashes render hr
7450 Horizontal ruler -- eats additional dashes on the same line
7459 Horizontal ruler -- does not collapse dashes on consecutive lines
7470 Horizontal ruler -- <4 dashes render as plain text
7479 Horizontal ruler -- Supports content following dashes on same line
7491 ### Block-level elements
7500 <ul><li>Common list</li>
7502 <li>item 3</li></ul>
7513 <ol><li>Numbered list</li>
7515 <li> item 3</li></ol>
7529 ***#Number on level 4
7531 **#Number on level 3
7532 **#Number on level 3
7536 #** Level 3, but ordered
7539 <ol><li> with numbers</li></ol>
7540 <ul><li> and bullets</li></ul>
7541 <ol><li> and numbers</li></ol></li>
7543 <ul><li>bullet level 2
7544 <ul><li>bullet level 3
7545 <ol><li>Number on level 4</li></ol></li></ul></li>
7547 <ol><li>Number on level 3</li>
7548 <li>Number on level 3</li></ol></li></ul>
7549 <ol><li>number level 2</li></ol></li>
7551 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7552 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7563 <ul><li>bar</li></ul></li></ul>
7573 <ul><li><ul><li>foo</li></ul></li>
7579 Nested lists 3 (first element empty)
7585 <ul><li>bar</li></ul></li></ul>
7590 Nested lists 4 (first element empty)
7595 <ul><li><ul><li></li></ul></li>
7601 Nested lists 5 (both elements empty)
7606 <ul><li><ul><li></li></ul></li>
7612 Nested lists 6 (both elements empty)
7618 <ul><li></li></ul></li></ul>
7623 Nested lists 7 (skip initial nesting levels)
7627 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7632 Nested lists 8 (multiple nesting transitions)
7640 <ul><li><ul><li> bar</li></ul></li>
7641 <li> baz</li></ul></li>
7647 1. Lists with start-of-line-transparent tokens before bullets: Comments
7660 2. Lists with start-of-line-transparent tokens before bullets: Template close
7665 <ul><li>foo bar</li>
7671 List items are not parsed correctly following a <pre> block (bug 785)
7677 <ul><li> <pre>foo</pre></li>
7678 <li> <pre>bar</pre></li>
7684 List items from template
7695 * notSOL{{inner list}}
7698 <ul><li> item 1</li>
7699 <li> item 2</li></ul>
7700 <ul><li> item 0</li>
7702 <li> item 2</li></ul>
7703 <ul><li> item 0</li>
7706 <li> item 2</li></ul>
7711 List interrupted by empty line or heading
7719 <ul><li> foo</li></ul>
7720 <ul><li><ul><li> bar</li></ul></li></ul>
7721 <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>
7722 <ul><li> Another list item</li></ul>
7727 Multiple list tags generated by templates
7748 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7751 <!--This line will NOT split the list-->
7753 <!--This line will NOT split the list either-->
7755 <!--foo--> <!----> <!--This line NOT split the list either-->
7766 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7769 <!--This line will NOT split the list-->
7771 <!--This line will NOT split the list either-->
7773 <!--foo--> <!----> <!--This line NOT split the list
7786 (The PHP parser relies on Tidy for the hack)
7788 parsoid=wt2html,wt2wt
7792 * {{echo|<li>templated li-hack}}
7793 * <!--foo--> <li> unsupported li-hack with preceding comments
7796 <li><li>not a li-hack
7803 <li>templated li-hack</li>
7804 <li>unsupported li-hack with preceding comments</li>
7807 <li>not a li-hack</li>
7812 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7839 Parsoid: Test of whitespace serialization with Templated bullets
7846 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7850 # ------------------------------------------------------------------------
7851 # The next set of tests are about Parsoid's ability to handle badly nested
7852 # tags (parse, minimize scope of fixup, and roundtrip back)
7853 # ------------------------------------------------------------------------
7856 Unbalanced closing block tags break a list
7857 (php parser relies on Tidy to fix up)
7875 # Parsoid fails this test, but it might be tricky to support properly.
7878 Unbalanced closing non-block tags don't break a list
7879 (php parser relies on Tidy to fix up)
7886 <li><span>a</span></li>
7887 <li><span>b</span></li>
7901 Unclosed formatting tags that straddle lists are closed and reopened
7902 (php parser relies on Tidy to fix up)
7904 parsoid=wt2html,wt2wt,html2html
7914 <ol><li> <s> a</s></li>
7915 <li><s> b </s></li></ol>
7918 # Parsoid fails this test, but it might be tricky to support properly.
7921 List embedded in a non-block tag
7922 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
7929 <li><small>foo</small></li>
7939 # This is a bug in the PHP parser + tidy combination.
7940 # (The </tr> tag gets parsed as text and html-escaped by PHP,
7941 # and then fostered out of the table by tidy.)
7942 # We believe the Parsoid output to be correct.
7944 Table with missing opening <tr> tag
7946 parsoid=wt2html,wt2wt
7971 # Note that the current date is hard-coded as
7972 # 1970-01-01T00:02:03Z (a Thursday)
7973 # when running parser tests. The timezone is also fixed to GMT, so
7974 # local date will be identical to current date.
7977 Magic Word: {{CURRENTDAY}}
7986 Magic Word: {{CURRENTDAY2}}
7995 Magic Word: {{CURRENTDAYNAME}}
8004 Magic Word: {{CURRENTDOW}}
8013 Magic Word: {{CURRENTMONTH}}
8022 Magic Word: {{CURRENTMONTH1}}
8031 Magic Word: {{CURRENTMONTHABBREV}}
8033 {{CURRENTMONTHABBREV}}
8040 Magic Word: {{CURRENTMONTHNAME}}
8042 {{CURRENTMONTHNAME}}
8049 Magic Word: {{CURRENTMONTHNAMEGEN}}
8051 {{CURRENTMONTHNAMEGEN}}
8058 Magic Word: {{CURRENTTIME}}
8067 Magic Word: {{CURRENTHOUR}}
8076 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8085 Magic Word: {{CURRENTYEAR}}
8094 Magic Word: {{CURRENTTIMESTAMP}}
8096 {{CURRENTTIMESTAMP}}
8103 Magic Words LOCAL (UTC)
8107 * {{LOCALMONTHNAME}}
8108 * {{LOCALMONTHNAMEGEN}}
8109 * {{LOCALMONTHABBREV}}
8118 * {{LOCALTIMESTAMP}}
8133 <li> 19700101000203</li></ul>
8138 Magic Word: {{FULLPAGENAME}}
8140 title=[[User:Ævar Arnfjörð Bjarmason]]
8144 <p>User:Ævar Arnfjörð Bjarmason
8149 Magic Word: {{FULLPAGENAMEE}}
8151 title=[[User:Ævar Arnfjörð Bjarmason]]
8155 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8160 Magic Word: {{TALKSPACE}}
8162 title=[[User:Ævar Arnfjörð Bjarmason]]
8171 Magic Word: {{TALKSPACE}}, same namespace
8173 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8182 Magic Word: {{TALKSPACE}}, main namespace
8184 title=[[Parser Test]]
8193 Magic Word: {{TALKSPACEE}}
8195 title=[[User:Ævar Arnfjörð Bjarmason]]
8204 Magic Word: {{SUBJECTSPACE}}
8206 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8215 Magic Word: {{SUBJECTSPACE}}, same namespace
8217 title=[[User:Ævar Arnfjörð Bjarmason]]
8226 Magic Word: {{SUBJECTSPACE}}, main namespace
8228 title=[[Parser Test]]
8236 Magic Word: {{SUBJECTSPACEE}}
8238 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8247 Magic Word: {{NAMESPACE}}
8249 title=[[User:Ævar Arnfjörð Bjarmason]]
8258 Magic Word: {{NAMESPACEE}}
8260 title=[[User:Ævar Arnfjörð Bjarmason]]
8269 Magic Word: {{NAMESPACENUMBER}}
8271 title=[[User:Ævar Arnfjörð Bjarmason]]
8280 Magic Word: {{SUBPAGENAME}}
8282 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8291 Magic Word: {{SUBPAGENAMEE}}
8293 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8302 Magic Word: {{ROOTPAGENAME}}
8304 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8308 <p>Ævar Arnfjörð Bjarmason
8313 Magic Word: {{ROOTPAGENAMEE}}
8315 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8319 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8324 Magic Word: {{BASEPAGENAME}}
8326 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8330 <p>Ævar Arnfjörð Bjarmason
8335 Magic Word: {{BASEPAGENAMEE}}
8337 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8341 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8346 Magic Word: {{TALKPAGENAME}}
8348 title=[[User:Ævar Arnfjörð Bjarmason]]
8352 <p>User talk:Ævar Arnfjörð Bjarmason
8357 Magic Word: {{TALKPAGENAMEE}}
8359 title=[[User:Ævar Arnfjörð Bjarmason]]
8363 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8368 Magic Word: {{SUBJECTPAGENAME}}
8370 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8374 <p>User:Ævar Arnfjörð Bjarmason
8379 Magic Word: {{SUBJECTPAGENAMEE}}
8381 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8383 {{SUBJECTPAGENAMEE}}
8385 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8390 Magic Word: {{NUMBEROFFILES}}
8399 Magic Word: {{PAGENAME}}
8401 title=[[User:Ævar Arnfjörð Bjarmason]]
8405 <p>Ævar Arnfjörð Bjarmason
8410 Magic Word: {{PAGENAME}} with metacharacters
8412 title=[['foo & bar = baz']]
8416 <p><i>'foo & bar = baz'</i>
8419 <p><i>'foo & bar = baz'</i></p>
8423 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8425 title=[[*RFC 1234 http://example.com/]]
8429 <p>*RFC 1234 http://example.com/
8432 <p>*RFC 1234 http://example.com/</p>
8436 Magic Word: {{PAGENAMEE}}
8438 title=[[User:Ævar Arnfjörð Bjarmason]]
8442 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8447 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8449 title=[[*RFC 1234 http://example.com/]]
8453 <p>*RFC_1234_http://example.com/
8456 <p>*RFC_1234_http://example.com/</p>
8460 Magic Word: {{REVISIONID}}
8469 Magic Word: {{SCRIPTPATH}}
8478 Magic Word: {{STYLEPATH}}
8487 Magic Word: {{SERVER}}
8491 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8496 Magic Word: {{SERVERNAME}}
8505 Magic Word: {{SITENAME}}
8514 Case-sensitive magic words, when cased differently, should just be template transclusions
8521 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8522 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8523 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8524 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8529 Case-insensitive magic words should still work with weird casing.
8539 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8544 Namespace 1 {{ns:1}}
8553 Namespace 1 {{ns:01}}
8562 Namespace 0 {{ns:0}} (bug 4783)
8570 Namespace 0 {{ns:00}} (bug 4783)
8578 Namespace -1 {{ns:-1}}
8587 Namespace User {{ns:User}}
8596 Namespace User talk {{ns:User_talk}}
8605 Namespace User talk {{ns:uSeR tAlK}}
8614 Namespace File {{ns:File}}
8623 Namespace File {{ns:Image}}
8632 Namespace (lang=de) Benutzer {{ns:User}}
8643 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8649 <p>Benutzer Diskussion
8657 {{urlencode:hi world?!}}
8658 {{urlencode:hi world?!|WIKI}}
8659 {{urlencode:hi world?!|PATH}}
8660 {{urlencode:hi world?!|QUERY}}
8670 Magic Word: prioritize type info over data-parsoid
8676 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8680 Magic Word: serialize on separate line (parsoid)
8682 parsoid=wt2wt,html2wt
8688 foo<meta property="mw:PageProp/notoc"/>bar
8692 Magic Word: rt non-english wikis
8699 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8706 Magic links: internal link to RFC (bug 479)
8710 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8715 Magic links: RFC (bug 479)
8719 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8724 Magic links: ISBN (bug 1937)
8728 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8733 Magic links: PMID incorrectly converts space to underscore
8737 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8746 Nonexistent template
8748 {{thistemplatedoesnotexist}}
8750 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8755 Template with invalid target containing tags
8757 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8759 <p>{{a<b>b</b>|foo|a=b|a = b}}
8764 Template with invalid target containing unclosed tag
8766 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8768 <p>{{a<b>|foo|a=b|a = b}}</b>
8773 Template with invalid target containing wikilink
8777 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8780 <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>
8784 Template with just whitespace in it, bug #68421
8788 <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>
8794 This is a test template
8802 <p>This is a test template
8807 Template with explicit namespace
8811 <p>This is a test template
8819 This is a test template with parameter {{{param}}}
8825 {{paramtest|param=foo}}
8827 <p>This is a test template with parameter foo
8832 Template:paramtestnum
8838 Template unnamed parameter
8840 {{paramtestnum|Main Page|the main page}}
8842 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8847 Template:templatesimple
8853 Template:templateredirect
8855 #redirect [[Template:templatesimple]]
8859 Template:templateasargtestnum
8865 Template:templateasargtest
8867 {{template{{{templ}}}}}
8871 Template:templateasargtest2
8877 Template with template name as unnamed argument
8879 {{templateasargtestnum|templatesimple}}
8886 Template with template name as argument
8888 {{templateasargtest|templ=simple}}
8895 Template with template name as argument (2)
8897 {{templateasargtest2|templ=templatesimple}}
8904 Template:templateasargtestdefault
8906 {{{{{templ|templatesimple}}}}}
8916 Template with default value
8918 {{templateasargtestdefault}}
8925 Template with default value (value set)
8927 {{templateasargtestdefault|templ=templa}}
8936 {{templateredirect}}
8943 Template with argument in separate line
8945 {{ templateasargtest |
8953 Template with complex template as argument
8956 param ={{ templateasargtest |
8959 <p>This is a test template with parameter (test)
8964 Template with thumb image (with link in description)
8967 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
8969 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>
8972 <p>This is a test template with parameter</p>
8973 <div class="thumb tright">
8974 <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>
8975 <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>
8981 Template:complextemplate
8983 {{{1}}} {{paramtest|
8984 param ={{{param}}}}}
8988 Template with complex arguments
8991 param ={{ templateasargtest |
8992 templ = simple }}|[[Template:complextemplate|link]]}}
8994 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
8999 BUG 553: link with two variables in a piped link
9002 |[[{{{1}}}|{{{2}}}]]
9007 <td>[[{{{1}}}|{{{2}}}]]
9013 Magic variable as template parameter
9015 {{paramtest|param={{SITENAME}}}}
9017 <p>This is a test template with parameter MediaWiki
9024 [[{{{param}}}|link]]
9028 Template parameter as link source
9030 {{linktest|param=Main Page}}
9032 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9037 Template-generated attribute string (k='v')
9039 <span {{attr_str|id|v1}}>bar</span>
9041 <p><span id="v1">bar</span>
9048 including another template, {{paramtest|param={{{arg}}}}}
9052 Template passing argument to another template
9054 {{paramtest2|arg='hmm'}}
9056 <p>including another template, This is a test template with parameter 'hmm'
9067 Template as link source
9071 [[{{linktest2}}|Main Page]]
9073 [[{{linktest2}}]]Page
9075 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9076 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9077 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9095 Template infinite loop
9099 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9104 Template from main namespace
9123 BUG 529: Template with table, not included at beginning of line
9142 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9162 BUG 41: Template parameters shown as broken links
9171 Template with targets containing wikilinks
9175 {{[[{{echo|foo}}]]}}
9177 {{{{echo|[[foo}}]]}}
9179 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9180 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9188 ''None'' of '''this''' should be
9190 but rather passed unmodified
9197 # hmm, fix this or just deprecate msgnw and document its behavior?
9201 {{msgnw:MSGNW test}}
9203 <p>''None'' of '''this''' should be
9205  but rather passed unmodified
9206 {{test}}
9216 {{int:youhavenewmessages|lots of money|not!}}
9218 <p>You have lots of money (not!).
9225 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9229 <includeonly> and <noinclude> being included
9240 <onlyinclude>Foo</onlyinclude>bar
9244 <onlyinclude> being included
9256 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9260 <onlyinclude> and <includeonly> being included
9269 <includeonly> and <noinclude> on a page
9271 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9278 Un-closed <noinclude>
9285 <onlyinclude> on a page
9287 <onlyinclude>Foo</onlyinclude>bar
9294 Un-closed <onlyinclude>
9301 Self-closed noinclude, includeonly, onlyinclude tags
9312 Unbalanced includeonly and noinclude tags
9316 |b</noinclude></noinclude>
9317 |c</noinclude></includeonly>
9318 |d</includeonly></includeonly>
9327 <td>c</includeonly>
9329 <td>d</includeonly></includeonly>
9335 Template:Includeonly section
9338 ==Includeonly section==
9344 Bug 6563: Edit link generation for section shown by <includeonly>
9346 {{includeonly section}}
9348 <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>
9349 <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>
9353 # Uses same input as the contents of [[Template:Includeonly section]]
9355 Bug 6563: Section extraction for section shown by <includeonly>
9360 ==Includeonly section==
9368 Bug 6563: Edit link generation for section suppressed by <includeonly>
9371 ==Includeonly section==
9375 <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>
9380 Bug 6563: Section extraction for section suppressed by <includeonly>
9385 ==Includeonly section==
9393 Un-closed <includeonly>
9400 Includes and comments at SOL
9402 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9409 <includeonly>can have stuff</includeonly>=== here ===
9412 <h2><span class="mw-headline" id="hu">hu</span></h2>
9417 <h3><span class="mw-headline" id="here">here</span></h3>
9420 <!-- 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>
9422 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9424 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9427 <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>
9431 # TODO: test with DOM fragment reuse!
9433 Parsoid: DOM fragment reuse
9435 parsoid=wt2wt,wt2html
9437 a{{echo|b<table></table>c}}d
9449 <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>
9451 <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">
9452 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9453 </span><p about="#mwt2">cd</p>
9455 <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">
9457 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9459 </span><p about="#mwt3">b</p>
9463 Parsoid: Merge double tds (bug 50603)
9472 <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>
9477 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9487 <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}}]}'>
9489 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9495 ### <includeonly> and <noinclude> in attributes
9498 0. includeonly around the entire attribute
9500 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9502 <p><span id="v2">bar</span>
9507 1. includeonly in html attr key
9509 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9511 <p><span id="foo">bar</span>
9516 2. includeonly in html attr value
9518 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9519 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9521 <p><span id="v1">bar</span>
9522 <span id="v1">bar</span>
9527 3. includeonly in part of an attr value
9529 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9531 <p><span style="color:red;">bar</span>
9536 4. includeonly in table attributes
9560 ### Token Stream Patcher tests
9562 ### These tests won't always pass wt2wt and other modes because
9563 ### on serialization, the table will be output on a new line.
9564 ### For now, we are blacklisting them, and using this to test selser.
9568 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9570 parsoid=wt2html,wt2wt
9572 {{echo|}}{| width = '100%'
9576 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
9577 <tbody><tr><td>foo</td></tr>
9582 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9584 parsoid=wt2html,wt2wt
9586 <includeonly>a</includeonly>{| {{{b}}}
9590 <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}}}":""}}'>
9591 <tbody><tr><td>c</td></tr>
9597 ### Testing parsing of templates where a template arg
9598 ### has the same name as the template itself.
9608 Templates: Template Name/Arg clash: 1. Use of positional param
9617 Templates: Template Name/Arg clash: 2. Use of named param
9626 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9635 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
9639 Templates: 1. Simple use
9648 Templates: 2. Inside a block tag
9650 <div>{{echo|Foo}}</div>
9651 <blockquote>{{echo|Foo}}</blockquote>
9654 <blockquote>Foo</blockquote>
9664 Templates: P-wrapping: 1a. Templates on consecutive lines
9675 Templates: P-wrapping: 1b. Templates on consecutive lines
9689 Templates: P-wrapping: 1c. Templates on consecutive lines
9692 {{echo|bar}} <div>baz</div>
9705 Templates: P-wrapping: 1d. Template preceded by comment-only line
9714 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
9718 Templates: Inline Text: 1. Multiple template uses
9720 {{echo|Foo}}bar{{echo|baz}}
9727 Templates: Inline Text: 2. Back-to-back template uses
9729 {{echo|Foo}}{{echo|bar}}
9736 Templates: Block Tags: 1. Multiple template uses
9738 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
9740 <div>Foo</div><div>bar</div><div>baz</div>
9745 Templates: Block Tags: 2. Back-to-back template uses
9747 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
9749 <div>Foo</div><div>bar</div>
9753 # This is an edge case relating to paragraph wrapping.
9755 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
9760 <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
9765 Templates: Links: 1. Simple example
9767 {{echo|[[Foo|bar]]}}
9769 <p><a href="/wiki/Foo" title="Foo">bar</a>
9774 Templates: Links: 2. Generation of link href
9776 [[{{echo|Foo}}|bar]]
9778 <p><a href="/wiki/Foo" title="Foo">bar</a>
9783 Templates: Links: 3. Generation of part of a link href
9785 [[Fo{{echo|o}}|bar]]
9789 [[Foo{{echo|bar}}baz]]
9791 [[Foo{{echo|bar}}|bar]]
9793 [[:Foo{{echo|bar}}]]
9795 [[:Foo{{echo|bar}}|bar]]
9797 <p><a href="/wiki/Foo" title="Foo">bar</a>
9798 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9799 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9800 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9801 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9802 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9807 Templates: Links: 4. Multiple templates generating link href
9809 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9811 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9816 Templates: Links: 5. Generation of link text
9818 [[Foo|{{echo|bar}}]]
9820 <p><a href="/wiki/Foo" title="Foo">bar</a>
9825 Templates: Links: 5. Nested templates (only outermost template should be marked)
9827 {{echo|[[{{echo|Foo}}|bar]]}}
9829 <p><a href="/wiki/Foo" title="Foo">bar</a>
9834 Templates: HTML Tag: 1. Generation of HTML attr. key
9836 <div {{echo|style}}="color:red;">foo</div>
9838 <div style="color:red;">foo</div>
9843 Templates: HTML Tag: 2. Generation of HTML attr. value
9845 <div style={{echo|'color:red;'}}>foo</div>
9847 <div style="color:red;">foo</div>
9852 Templates: HTML Tag: 3. Generation of HTML attr key and value
9854 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9856 <div style="color:red;">foo</div>
9861 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9863 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9865 <div title="This is a long title with just one piece templated">foo</div>
9870 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9872 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9874 <div title="This is a long title with just one piece templated">foo</div>
9879 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9881 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9883 <div title="This is a long title with just one piece templated">foo</div>
9888 Templates: HTML Tag: 7. Generation of partial attribute key string
9890 <div st{{echo|yle}}="color:red;">foo</div>
9892 <div style="color:red;">foo</div>
9897 Templates: HTML Tables: 1. Generating start of a HTML table
9899 {{echo|<table><tr><td>foo</td>}}</tr></table>
9901 <table><tr><td>foo</td></tr></table>
9906 Templates: HTML Tables: 2a. Generating middle of a HTML table
9908 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9910 <table><tr><td>foo</td></tr></table>
9915 Templates: HTML Tables: 2b. Generating middle of a HTML table
9917 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9919 <table><tr><td>foo</td></tr></table>
9924 Templates: HTML Tables: 3. Generating end of a HTML table
9926 <table><tr>{{echo|<td>foo</td></tr></table>}}
9928 <table><tr><td>foo</td></tr></table>
9933 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9935 {{echo|<table>}}<tr><td>foo</td></tr></table>
9937 <table><tr><td>foo</td></tr></table>
9942 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9944 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9946 <table><tr><td>foo</td></tr></table>
9951 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9953 <table><tr>{{echo|<td>}}foo</td></tr></table>
9955 <table><tr><td>foo</td></tr></table>
9960 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9962 <table><tr><td>foo{{echo|</td>}}</tr></table>
9964 <table><tr><td>foo</td></tr></table>
9969 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9971 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9973 <table><tr><td>foo</td></tr></table>
9978 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
9980 <table><tr><td>foo</td></tr>{{echo|</table>}}
9982 <table><tr><td>foo</td></tr></table>
9987 Templates: HTML Tables: 5. Proper fostering of categories from inside
9989 parsoid=wt2html,wt2wt
9991 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
9992 <!--Two categories (Bug 50330)-->
9993 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
9995 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
9996 <!--Two categories (Bug 50330)-->
9997 <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>
10001 Templates: Wiki Tables: 1a. Fostering of entire template content
10009 <tr><td></td></tr></table>
10021 Templates: Wiki Tables: 1b. Fostering of entire template content
10034 <tr><td></td></tr></table>
10048 Templates: Wiki Tables: 2. Fostering of partial template content
10058 <tr><td></td></tr></table>
10071 Templates: Wiki Tables: 3. td-content via multiple templates
10074 {{echo|{{pipe}}a}}{{echo|b}}
10085 Templates: Wiki Tables: 4. Templated tags, no content
10091 <tr><td></td></tr></table>
10096 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10110 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10124 Templates: Lists: Multi-line list-items via templates
10126 *{{echo|a {{nonexistent|
10128 *{{echo|b {{nonexistent|
10131 <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>
10132 <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>
10137 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10139 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10141 <p><i>ab</i>c<i>d</i>e
10146 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10147 (PHP parser generates misnested html)
10149 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10151 <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>
10155 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10156 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10158 parsoid=wt2html,wt2wt
10160 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10162 <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>
10163 <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>
10164 <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>
10168 Templates: Ugly nesting: 4. Divs opened/closed across templates
10170 a<div>b{{echo|c</div>d}}e
10181 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10187 |{{echo|foo</table>}}
10191 <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|}"]}'>
10195 <td>foo</td></tr></tbody></table><span about="#mwt1">
10196 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10201 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10211 <td>1. {{echo|foo </table>}}</td>
10213 <td>2. {{echo|baz </table>}}</td>
10226 <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>"]}'>
10231 <td>1. foo </td></tr></tbody></table></td>
10233 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10234 </span><span about="#mwt2">
10235 </span><span about="#mwt2">
10236 </span><span about="#mwt2">abc</span><span about="#mwt2">
10237 </span><span about="#mwt2">
10238 </span><span about="#mwt2">
10239 </span><span about="#mwt2">
10240 </span><span about="#mwt2">
10241 </span><span about="#mwt2">
10242 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10243 </span><span about="#mwt2">
10248 Templates: Ugly templates: 3. newline-only template parameter
10257 # This looks like a bug: a single newline triggers p/br for some reason.
10259 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10268 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10269 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10271 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10277 <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
10278 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10282 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10283 # that are "identical" and generate nesting cycles in the algorithm
10285 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10287 {{echo|<table><tr><td><table>}}
10291 <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"}'>
10292 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10293 </table></td></tr></tbody></table>
10297 Parser Functions: 1. Simple example
10306 Parser Functions: 2. Nested use (only outermost should be marked up)
10315 ### Pre-save transform tests
10318 pre-save transform: subst:
10324 This is a test template
10328 pre-save transform: normal template
10338 pre-save transform: nonexistent template
10342 {{thistemplatedoesnotexist}}
10344 {{thistemplatedoesnotexist}}
10349 pre-save transform: subst magic variables
10358 # This is bug 89, which I fixed. -- wtm
10360 pre-save transform: subst: templates with parameters
10364 {{subst:paramtest|param="something else"}}
10366 This is a test template with parameter "something else"
10370 Template:nowikitest
10372 <nowiki>'''not wiki'''</nowiki>
10376 pre-save transform: nowiki in subst (bug 1188)
10380 {{subst:nowikitest}}
10382 <nowiki>'''not wiki'''</nowiki>
10387 Template:commenttest
10389 This template has <!-- a comment --> in it.
10393 pre-save transform: comment in subst (bug 1936)
10397 {{subst:commenttest}}
10399 This template has <!-- a comment --> in it.
10403 pre-save transform: unclosed tag
10407 <nowiki>'''not wiki'''
10409 <nowiki>'''not wiki'''
10413 pre-save transform: mixed tag case
10417 <NOwiki>'''not wiki'''</noWIKI>
10419 <NOwiki>'''not wiki'''</noWIKI>
10423 pre-save transform: unclosed comment in <nowiki>
10427 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10429 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10432 # Leading @ in this template definition works around a limitation
10433 # in parsoid's parserTests which otherwise strips the <span> from the
10434 # result (confusing it for a template wrapper)
10438 @<span onmouseover="alert('crap')">Oh no</span>
10442 (confirming safety of fix for subst bug 1936)
10444 {{Template:dangerous}}
10446 <p>@<span>Oh no</span>
10451 pre-save transform: comment containing gallery (bug 5024)
10455 <!-- <gallery>data</gallery> -->
10457 <!-- <gallery>data</gallery> -->
10461 pre-save transform: comment containing extension
10465 <!-- <tag>data</tag> -->
10467 <!-- <tag>data</tag> -->
10471 pre-save transform: comment containing nowiki
10475 <!-- <nowiki>data</nowiki> -->
10477 <!-- <nowiki>data</nowiki> -->
10481 pre-save transform: <noinclude> in subst (bug 3298)
10491 pre-save transform: <onlyinclude> in subst (bug 3298)
10495 {{subst:Includes2}}
10503 {{<includeonly>subst:</includeonly>Includes}}
10507 Template:SafeSubstTest
10509 {{<includeonly>safesubst:</includeonly>Includes}}
10513 bug 22297: safesubst: works during PST
10517 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10523 bug 22297: safesubst: works during normal parse
10532 subst: does not work during normal parse
10536 <p>{{subst:Includes}}
10541 pre-save transform: context links ("pipe trick")
10545 [[Article (context)|]]
10548 [[Bar:Article (context)|]]
10549 [[:Bar:Article (context)|]]
10551 [[|Article (context)]]
10555 [[Article (context)|Article]]
10556 [[Bar:Article|Article]]
10557 [[:Bar:Article|Article]]
10558 [[Bar:Article (context)|Article]]
10559 [[:Bar:Article (context)|Article]]
10561 [[Article (context)]]
10562 [[Bar:X (Y) Z|X (Y) Z]]
10563 [[:Bar:X (Y) Z|X (Y) Z]]
10567 pre-save transform: context links ("pipe trick") with interwiki prefix
10571 [[interwiki:Article|]]
10572 [[:interwiki:Article|]]
10573 [[interwiki:Bar:Article|]]
10574 [[:interwiki:Bar:Article|]]
10576 [[interwiki:Article|Article]]
10577 [[:interwiki:Article|Article]]
10578 [[interwiki:Bar:Article|Bar:Article]]
10579 [[:interwiki:Bar:Article|Bar:Article]]
10583 pre-save transform: context links ("pipe trick") with parens in title
10585 pst title=[[Somearticle (context)]]
10589 [[Article (context)|Article]]
10593 pre-save transform: context links ("pipe trick") with comma in title
10595 pst title=[[Someplace, Somewhere]]
10598 [[Otherplace, Elsewhere|]]
10599 [[Otherplace, Elsewhere, Anywhere|]]
10601 [[Otherplace, Somewhere|Otherplace]]
10602 [[Otherplace, Elsewhere|Otherplace]]
10603 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
10607 pre-save transform: context links ("pipe trick") with parens and comma
10609 pst title=[[Someplace (IGNORED), Somewhere]]
10612 [[Otherplace (place), Elsewhere|]]
10614 [[Otherplace, Somewhere|Otherplace]]
10615 [[Otherplace (place), Elsewhere|Otherplace]]
10619 pre-save transform: context links ("pipe trick") with comma and parens
10621 pst title=[[Who, me? (context)]]
10624 [[Me, Myself, and I (1937 song)|]]
10626 [[Yes, you. (context)|Yes, you.]]
10627 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
10631 pre-save transform: context links ("pipe trick") with namespace
10633 pst title=[[Ns:Somearticle]]
10637 [[Ns:Article|Article]]
10641 pre-save transform: context links ("pipe trick") with namespace and parens
10643 pst title=[[Ns:Somearticle (context)]]
10647 [[Ns:Article (context)|Article]]
10651 pre-save transform: context links ("pipe trick") with namespace and comma
10653 pst title=[[Ns:Somearticle, Context, Whatever]]
10657 [[Ns:Article, Context, Whatever|Article]]
10661 pre-save transform: context links ("pipe trick") with namespace, comma and parens
10663 pst title=[[Ns:Somearticle, Context (context)]]
10667 [[Ns:Article (context)|Article]]
10671 pre-save transform: context links ("pipe trick") with namespace, parens and comma
10673 pst title=[[Ns:Somearticle (IGNORED), Context]]
10677 [[Ns:Article, Context|Article]]
10681 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
10685 [[Article(context)|]]
10686 [[Bar:Article(context)|]]
10687 [[:Bar:Article(context)|]]
10688 [[|Article(context)]]
10692 [[Article(context)|Article]]
10693 [[Bar:Article(context)|Article]]
10694 [[:Bar:Article(context)|Article]]
10695 [[Article(context)]]
10696 [[Bar:X(Y)Z|X(Y)Z]]
10697 [[:Bar:X(Y)Z|X(Y)Z]]
10701 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
10705 [[Article (context)|]]
10706 [[Bar:Article (context)|]]
10707 [[:Bar:Article (context)|]]
10708 [[|Article (context)]]
10712 [[Article (context)|Article]]
10713 [[Bar:Article (context)|Article]]
10714 [[:Bar:Article (context)|Article]]
10715 [[Article (context)]]
10716 [[Bar:X (Y) Z|X (Y) Z]]
10717 [[:Bar:X (Y) Z|X (Y) Z]]
10721 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
10725 [[Article(context)|]]
10726 [[Bar:Article(context)|]]
10727 [[:Bar:Article(context)|]]
10728 [[|Article(context)]]
10732 [[Article(context)|Article]]
10733 [[Bar:Article(context)|Article]]
10734 [[:Bar:Article(context)|Article]]
10735 [[Article(context)]]
10736 [[Bar:X(Y)Z|X(Y)Z]]
10737 [[:Bar:X(Y)Z|X(Y)Z]]
10741 pre-save transform: context links ("pipe trick") with commas (bug 21660)
10745 [[Article (context), context|]]
10746 [[Article (context),context|]]
10747 [[Bar:Article (context), context|]]
10748 [[Bar:Article (context),context|]]
10749 [[:Bar:Article (context), context|]]
10750 [[:Bar:Article (context),context|]]
10752 [[Article (context), context|Article]]
10753 [[Article (context),context|Article]]
10754 [[Bar:Article (context), context|Article]]
10755 [[Bar:Article (context),context|Article]]
10756 [[:Bar:Article (context), context|Article]]
10757 [[:Bar:Article (context),context|Article]]
10761 pre-save transform: trim trailing empty lines
10765 Empty lines are trimmed
10771 Empty lines are trimmed
10775 pre-save transform: Signature expansion
10780 * <noinclude>~~~</noinclude>
10781 * <includeonly>~~~</includeonly>
10782 * <onlyinclude>~~~</onlyinclude>
10784 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
10785 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
10786 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
10787 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
10792 pre-save transform: Signature expansion in nowiki tags (bug 93)
10798 <nowiki>~~~~</nowiki>
10800 <includeonly><nowiki>~~~~</nowiki></includeonly>
10802 <noinclude><nowiki>~~~~</nowiki></noinclude>
10804 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10806 {{subst:Foo}} shall be converted to FOO
10808 As well as inside noinclude/onlyinclude
10809 <noinclude>{{subst:Foo}}</noinclude>
10810 <onlyinclude>{{subst:Foo}}</onlyinclude>
10812 But not inside includeonly
10813 <includeonly>{{subst:Foo}}</includeonly>
10817 <nowiki>~~~~</nowiki>
10819 <includeonly><nowiki>~~~~</nowiki></includeonly>
10821 <noinclude><nowiki>~~~~</nowiki></noinclude>
10823 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10825 FOO shall be converted to FOO
10827 As well as inside noinclude/onlyinclude
10828 <noinclude>FOO</noinclude>
10829 <onlyinclude>FOO</onlyinclude>
10831 But not inside includeonly
10832 <includeonly>{{subst:Foo}}</includeonly>
10836 Parsoid: Recognize nowiki with trailing space in tags
10840 <nowiki ><div>[[foo]]</nowiki >
10848 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10855 Parsoid: Recognize nowiki with odd capitalization
10859 <noWikI ><div>[[foo]]</Nowiki >
10861 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10866 Parsoid: Escape nowiki with trailing space in tags
10870 <nowiki > foo </nowiki >
10876 <p><nowiki > foo </nowiki ></p>
10877 <p>a<nowiki />b</p>
10878 <p>c<nowiki/ >d</p>
10882 Parsoid: Escape weird noWikI capitalizations
10886 <noWikI > foo </NoWikI >
10888 <p><noWikI > foo </NoWikI ></p>
10892 ### Message transform tests
10895 message transform: magic variables
10905 message transform: should not transform wiki markup
10915 message transform: <noinclude> in transcluded template (bug 4926)
10925 message transform: <onlyinclude> in transcluded template (bug 4926)
10935 {{#special:}} page name, known
10939 {{#special:Recentchanges}}
10941 Special:RecentChanges
10945 {{#special:}} page name with subpage, known
10949 {{#special:Recentchanges/param}}
10951 Special:RecentChanges/param
10955 {{#special:}} page name, unknown
10959 {{#special:foobar nonexistent}}
10961 Special:Foobar nonexistent
10965 {{#speciale:}} page name, known
10969 {{#speciale:Recentchanges}}
10971 Special:RecentChanges
10975 {{#speciale:}} page name with subpage, known
10979 {{#speciale:Recentchanges/param}}
10981 Special:RecentChanges/param
10985 {{#speciale:}} page name, unknown
10989 {{#speciale:foobar nonexistent}}
10991 Special:Foobar_nonexistent
10997 ### For Parsoid-specific tests, see
10998 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11003 parsoid=wt2html,wt2wt,html2html
11005 [[Image:foobar.jpg]]
11007 <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>
11010 <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>
11014 Simple image (using File: namespace, now canonical)
11016 [[File:Foobar.jpg]]
11018 <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>
11021 <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>
11025 Right-aligned image
11027 [[File:Foobar.jpg|right]]
11029 <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>
11032 <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>
11038 [[File:Foobar.jpg|right|Caption text]]
11040 <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>
11043 <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>
11047 Image with caption, bug 53312 #1
11049 [[File:Foobar.jpg|right|Caption page stuff]]
11051 <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>
11054 <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>
11058 Image with caption, bug 53312 #2
11060 [[File:Foobar.jpg|right|Caption page=]]
11062 <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>
11065 <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>
11069 Image with caption, bug 53312 #3
11071 [[File:Foobar.jpg|right|Caption page=stuff]]
11073 <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>
11076 <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>
11080 Allow empty links in image captions (Bug 60753)
11084 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11089 <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>
11092 <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>
11094 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11095 </figcaption></figure>
11099 Link with empty target
11108 Image with empty attribute
11110 parsoid=wt2html,wt2wt,html2html
11112 [[File:Foobar.jpg|right||Caption text]]
11114 <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>
11117 <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>
11121 1. Block image with individual attributes from templates
11123 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11125 <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>
11128 <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>
11132 2. Block Image with individual attributes from templates
11134 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11136 <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>
11139 <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>
11143 3. Inline image with individual attributes from templates
11145 [[File:Foobar.jpg|{{echo|50px}}]]
11147 <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>
11150 <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>
11153 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11154 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11156 Image with multiple attributes from the same template
11158 [[File:Foobar.jpg|{{image_attribs}}]]
11160 <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>
11163 <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>
11167 Image with link tails
11171 123[[File:Foobar.jpg]]456
11172 123[[File:Foobar.jpg|right]]456
11173 123[[File:Foobar.jpg|thumb]]456
11175 <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
11177 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
11178 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
11181 <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>
11183 <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>
11185 <div class="thumb tright">
11186 <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>
11187 <div class="thumbcaption">
11188 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11194 <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>
11195 <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>
11196 <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>
11200 Image with multiple captions -- only last one is accepted
11202 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11204 <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>
11207 <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>
11211 Image with multiple widths -- use last
11213 [[File:Foobar.jpg|200px|300px|caption]]
11215 <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>
11218 <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>
11222 Image with multiple alignments -- use first (bug 48664)
11226 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11228 [[File:Foobar.jpg|middle|text-top|caption]]
11230 <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>
11231 <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>
11234 <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>
11235 <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>
11239 Image with width attribute at different positions
11241 [[File:Foobar.jpg|200px|right|Caption]]
11242 [[File:Foobar.jpg|right|200px|Caption]]
11243 [[File:Foobar.jpg|right|Caption|200px]]
11245 <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>
11246 <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>
11247 <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>
11250 <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>
11251 <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>
11252 <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>
11255 # a sad bit of backward-compatibility
11257 Image with size specified with pxpx (bug 13500, 51628)
11259 parsoid=wt2html,wt2wt,html2html
11261 [[File:Foobar.jpg|20pxpx]]
11262 [[File:Foobar.jpg|200x20pxpx]]
11264 <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>
11265 <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>
11268 <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>
11272 Image with link parameter, wiki target
11274 [[File:Foobar.jpg|link=Main Page]]
11276 <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>
11279 <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>
11282 # parsoid bug 49293 (part 1)
11284 Image with link parameter, URL target
11286 [[File:Foobar.jpg|link=http://example.com/]]
11288 <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>
11291 <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>
11294 # parsoid bug 49293 (part 2)
11296 Image with link parameter, protocol-less URL target
11298 [[File:Foobar.jpg|link=//example.com/]]
11300 <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>
11303 <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>
11307 Image with link parameter, wgExternalLinkTarget
11309 [[Image:foobar.jpg|link=http://example.com/]]
11311 wgExternalLinkTarget='foobar'
11313 <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>
11318 Image with link parameter, wgNoFollowLinks set to false
11320 [[Image:foobar.jpg|link=http://example.com/]]
11322 wgNoFollowLinks=false
11324 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11329 Image with link parameter, wgNoFollowDomainExceptions
11331 [[Image:foobar.jpg|link=http://example.com/]]
11333 wgNoFollowDomainExceptions='example.com'
11335 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11340 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11342 [[Image:foobar.jpg|link=http://example.com/|Title]]
11344 wgExternalLinkTarget='foobar'
11346 <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>
11351 Image with empty link parameter
11353 [[File:Foobar.jpg|link=]]
11355 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11358 <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>
11362 Image with link parameter (wiki target) and unnamed parameter
11364 [[File:Foobar.jpg|link=Main_Page|Title]]
11366 <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>
11369 <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>
11373 Image with link parameter (URL target) and unnamed parameter
11375 [[File:Foobar.jpg|link=http://example.com/|Title]]
11377 <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>
11380 <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>
11384 Thumbnail image with link parameter
11387 parsoid=wt2html,wt2wt,html2html
11389 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11391 <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>
11394 <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>
11398 Manually-specified thumbnail image
11402 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11404 <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>
11407 <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>
11411 Manually-specified thumbnail image with explicit link to wiki page
11414 parsoid=wt2html,wt2wt,html2html
11416 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11418 <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>
11421 <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>
11425 Manually-specified thumbnail image with explicit link to url
11428 parsoid=wt2html,wt2wt,html2html
11430 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11432 <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>
11435 <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>
11439 Manually-specified thumbnail image with explicit no link
11442 parsoid=wt2html,wt2wt,html2html
11444 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11446 <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>
11449 <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>
11453 Manually-specified thumbnail image with explicit link and alt text
11456 parsoid=wt2html,wt2wt,html2html
11458 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11460 <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>
11463 <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>
11467 Image with frame and link
11469 parsoid=wt2html,wt2wt,html2html
11471 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11473 <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>
11476 <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>
11480 Image with frame and link and explicit alt
11482 parsoid=wt2html,wt2wt,html2html
11484 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11486 <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>
11489 <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>
11493 Image with wiki markup in implicit alt
11495 parsoid=wt2html,wt2wt,html2html
11497 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11499 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11501 <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>
11502 </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>
11505 <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>
11506 <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>
11509 ###################
11510 # Conflicting image format options.
11511 # First option specified should 'win'.
11512 # All three cases in each test should be identical.
11515 Image with 'frameless' first.
11517 parsoid=wt2html,wt2wt,html2html
11519 [[File:Foobar.jpg|frameless|caption]]
11521 [[File:Foobar.jpg|frameless|frame|caption]]
11523 [[File:Foobar.jpg|frameless|thumb|caption]]
11525 <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>
11526 </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>
11527 </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>
11530 <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>
11531 <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>
11532 <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>
11536 Image with 'frame' first.
11538 parsoid=wt2html,wt2wt,html2html
11540 [[File:Foobar.jpg|frame|caption]]
11541 [[File:Foobar.jpg|frame|frameless|caption]]
11542 [[File:Foobar.jpg|frame|thumb|caption]]
11544 <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>
11545 <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>
11546 <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>
11549 <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>
11550 <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>
11551 <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>
11555 Image with 'thumb' first.
11557 parsoid=wt2html,wt2wt,html2html
11559 [[File:Foobar.jpg|thumb|caption]]
11560 [[File:Foobar.jpg|thumb|frameless|caption]]
11561 [[File:Foobar.jpg|thumb|frame|caption]]
11563 <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>
11564 <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>
11565 <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>
11568 <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>
11569 <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>
11570 <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>
11573 ###################
11575 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
11576 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
11577 # Foobar has actual size of 1941x220
11578 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
11579 # a scalable format.
11580 # 2. Framed images always ignore size options; always render at default size.
11581 # 3. "Unspecified format" and border are the only types which can be
11585 Image: "unspecified format" and border enlarge
11587 parsoid=wt2html,wt2wt,html2html
11589 [[File:Foobar.jpg|2000px]]
11591 [[File:Foobar.jpg|border|2000px]]
11593 <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>
11594 </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>
11597 <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>
11598 <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>
11602 Image: "unspecified format" and border reduce
11604 parsoid=wt2html,wt2wt,html2html
11606 [[File:Foobar.jpg|1000px]]
11608 [[File:Foobar.jpg|border|1000px]]
11610 <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>
11611 </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>
11614 <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>
11615 <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>
11619 Image: thumbs reduce
11621 parsoid=wt2html,wt2wt,html2html
11623 [[File:Foobar.jpg|thumb|50px]]
11625 <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>
11628 <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>
11632 Image: bitmap thumbs can't be enlarged past original size, but vector can.
11634 parsoid=wt2html,wt2wt,html2html
11636 [[File:Foobar.jpg|thumb|2000px]]
11638 [[File:Foobar.svg|thumb|2000px]]
11640 <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>
11641 <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>
11644 <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>
11645 <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>
11649 Image: frameless can reduce in size
11651 parsoid=wt2html,wt2wt,html2html
11653 [[File:Foobar.jpg|frameless|50px]]
11655 <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>
11658 <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>
11662 Image: bitmap frameless can't be enlarged past original size, but vector can
11664 parsoid=wt2html,wt2wt,html2html
11666 [[File:Foobar.jpg|frameless|2000px]]
11668 [[File:Foobar.svg|frameless|2000px]]
11670 <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>
11671 </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>
11674 <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>
11675 <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>
11679 Image: framed images are always unscaled.
11681 parsoid=wt2html,wt2wt,html2html
11683 [[File:Foobar.jpg|frame]]
11685 [[File:Foobar.jpg|frame|50px]]
11687 [[File:Foobar.jpg|frame|50x50px]]
11689 [[File:Foobar.jpg|frame|2000px]]
11691 <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>
11692 <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>
11693 <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>
11694 <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>
11697 <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>
11698 <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>
11699 <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>
11700 <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>
11703 ###################
11706 Link to image page- image page normally doesn't exists, hence edit link
11707 Add test with existing image page
11708 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
11712 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
11717 bug 18784 Link to non-existent image page with caption should use caption as link text
11719 [[:Image:test|caption]]
11721 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
11726 Frameless image caption with a free URL
11728 [[File:Foobar.jpg|http://example.com]]
11730 <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>
11733 <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>
11737 Thumbnail image caption with a free URL
11741 [[File:Foobar.jpg|thumb|http://example.com]]
11743 <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>
11746 <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>
11750 Thumbnail image caption with a free URL and explicit alt
11753 parsoid=wt2html,wt2wt,html2html
11755 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
11757 <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>
11760 <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>
11764 SVG thumbnails with no language set
11767 [[File:Foobar.svg|thumb|caption]]
11769 <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>
11772 <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>
11776 SVG thumbnails with language de
11778 parsoid=wt2html,wt2wt,html2html
11780 [[File:Foobar.svg|thumb|caption|lang=de]]
11782 <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>
11785 <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>
11789 SVG thumbnails with invalid language code
11791 parsoid=wt2html,wt2wt,html2html
11793 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
11795 <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>
11798 <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>
11802 BUG 1887: A ISBN with a thumbnail
11804 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11806 <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>
11809 <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>
11813 BUG 1887: A RFC with a thumbnail
11815 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11817 <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>
11820 <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>
11824 BUG 1887: A mailto link with a thumbnail
11826 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11828 <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>
11831 <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>
11834 # Pending resolution to bug 368
11836 BUG 648: Frameless image caption with a link
11838 [[File:Foobar.jpg|text with a [[link]] in it]]
11840 <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>
11843 <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>
11847 BUG 648: Frameless image caption with a link (suffix)
11849 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11851 <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>
11854 <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>
11858 BUG 648: Frameless image caption with an interwiki link
11860 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11862 <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>
11865 <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>
11869 BUG 648: Frameless image caption with a piped interwiki link
11871 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11873 <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>
11876 <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>
11880 Escape HTML special chars in image alt text
11882 [[File:Foobar.jpg|& < > "]]
11884 <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>
11887 <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>
11891 BUG 499: Alt text should have Ӓ, not &1234;
11893 [[File:Foobar.jpg|♀]]
11895 <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>
11898 <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>
11902 Broken image caption with link
11904 parsoid=wt2html,wt2wt,html2html
11906 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11908 <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.
11911 <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>
11915 Image caption containing another image
11917 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
11919 <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>
11922 <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>
11926 Image: caption containing a newline
11928 [[File:Foobar.jpg|This
11931 <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>
11934 <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>
11938 Image: caption containing leading space
11939 (The leading space should not trigger nowiki escaping in wt2wt mode)
11941 [[File:Foobar.jpg|thumb| bar]]
11943 <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>
11946 <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>
11950 Image: caption containing a table
11952 parsoid=wt2html,wt2wt,html2html
11954 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11960 and some more text.]]
11962 <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>
11965 <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
11968 <tr><th>Foo </th><th>Bar</th></tr>
11971 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11975 Bug 3090: External links other than http: in image captions
11977 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11979 <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>
11982 <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>
11988 parsoid=wt2html,wt2wt,html2html
11990 [[Image:foobar.jpg|a|class=b]]
11992 <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>
11995 <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>
11999 Localized image handling (1).
12001 parsoid=wt2html,wt2wt,html2html
12004 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12006 <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>
12009 <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>
12013 Localized image handling (2).
12016 parsoid=wt2html,wt2wt,html2html
12019 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12021 <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>
12024 <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>
12028 "border", "frameless" and "class" attributes on an image.
12031 parsoid=wt2html,wt2wt,html2html
12033 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12035 <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>
12038 <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>
12041 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12043 Invalid image attributes (bug 62500)
12046 parsoid=wt2html,wt2wt,html2html
12048 [[File:Foobar.jpg|thumb|float|left|caption]]
12050 [[File:Foobar.jpg|thumb|righ|caption]]
12052 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12054 <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>
12055 <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>
12056 <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>
12059 <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>
12060 <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>
12061 <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>
12067 #REDIRECT [[File:Barfoo.jpg]]
12073 [[Image:Barfoo.jpg]]
12075 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12080 Missing image with uploads disabled
12084 [[Image:Foobaz.jpg]]
12086 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12090 # Parsoid-specific testing for images
12091 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12092 # Currently imperfect due to a flaw in the Parsoid testrunner
12094 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12098 Parsoid-specific image handling - simple image with size and middle alignment
12100 [[File:Foobar.jpg|middle|50px]]
12102 <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>
12106 Parsoid-specific image handling - simple image with size, middle alignment,
12107 non-standard namespace alias
12109 parsoid=wt2wt,wt2html,html2html
12111 [[Image:Foobar.jpg|middle|50px]]
12113 <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>
12117 Parsoid-specific image handling - simple image with size and middle alignment
12120 [[File:Foobar.jpg|50px|middle]]
12122 <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>
12126 Parsoid-specific image handling - simple image with size and middle alignment
12127 and non-standard namespace name
12129 parsoid=wt2html,wt2wt,html2html
12131 [[Image:Foobar.jpg|50px|middle]]
12133 <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>
12137 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12139 [[File:Foobar.jpg|500x10px|baseline|caption]]
12141 <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>
12145 Parsoid-specific image handling - simple image with border and size spec
12147 [[File:Foobar.jpg|50px|border|caption]]
12149 <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>
12153 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12155 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12157 <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>
12161 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12164 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12166 <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>
12170 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12172 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12174 <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>
12178 Parsoid-specific image handling - thumbnail with specific size, halign,
12179 valign, and caption (existing content)
12181 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12183 <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>
12187 Parsoid-specific image handling - framed image with specific size and caption
12190 parsoid=wt2html,wt2wt,html2html
12192 [[File:Foobar.jpg|frame|500x50px|caption]]
12194 <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>
12198 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12201 parsoid=wt2html,wt2wt,html2html
12203 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12205 <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>
12209 Parsoid-specific image handling - frameless image with specific size, border, and caption
12211 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12213 <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>
12217 Parsoid-specific image handling - simple image with a formatted caption
12219 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12221 <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>
12225 Parsoid-specific image handling - caption with a template in it
12227 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12229 <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>
12233 Parsoid-specific image handling - caption with unbalanced tags in it
12235 parsoid=wt2html,wt2wt,html2html
12238 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12242 <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>
12247 Parsoid-specific image handling - empty caption (1)
12249 parsoid=wt2html,wt2wt
12251 [[File:Foobar.jpg|thumb|]]
12253 <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>
12256 # empty captions don't get serialized unless we're in the "round trip" case
12258 Parsoid-specific image handling - empty caption (2)
12262 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12263 <a href="File:Foobar.jpg">
12264 <img resource="./File:Foobar.jpg"
12265 src="//example.com/images/3/3a/Foobar.jpg"
12266 height="25" width="220"/>
12268 <figcaption></figcaption>
12271 [[File:Foobar.jpg|thumb]]
12275 Parsoid-specific image handling - whitespace caption
12277 [[File:Foobar.jpg|thumb| ]]
12279 <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>
12283 Parsoid-specific image handling - lang option
12286 [[File:Foobar.svg|lang=de|caption]]
12290 <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>
12299 Subpage test/subpage
12307 subpage title=[[Subpage test]]
12311 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12316 Subpage noslash link
12318 subpage title=[[Subpage test]]
12322 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12326 # TODO: make this PHP-parser compatible!
12328 Relative subpage noslash link
12330 parsoid=wt2wt,wt2html,html2html
12331 subpage title=[[Subpage test/1/2/3/4]]
12337 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/" title="Subpage test/1/2/subpage/">subpage</a></p>
12338 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12342 Parsoid: dot-slash prefixed wikilinks
12352 </p><p>[[././baz/]]
12357 </p><p>[[././baz/]]
12362 Render invalid page names as plain text (bug 51090)
12375 [[{{echo|./../foo}}|bar]]
12376 [[{{echo|foo/.}}|bar]]
12377 [[{{echo|foo/..}}|bar]]
12378 [[{{echo|foo~~~~bar}}]]
12379 [[{{echo|foo>bar}}]]
12380 [[{{echo|foo././bar}}]]
12381 [[{{echo|foo{bar}}]]
12382 [[{{echo|foo}bar}}]]
12383 [[{{echo|foo[bar}}]]
12384 [[{{echo|foo]bar}}]]
12385 [[{{echo|foo<bar}}]]
12387 <p>[[./../foo|bar]]
12397 </p><p>[[./../foo|bar]]
12410 <p>[[./../foo|bar]]
12421 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12422 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12423 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12424 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12425 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12426 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12427 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12428 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12429 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12430 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12431 [[<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>
12439 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12444 BUG 561: {{/Subpage}}
12446 subpage title=[[Page]]
12450 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12458 Category:MediaWiki User's Guide
12466 [[:Category:MediaWiki User's Guide]]
12468 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12477 [[Category:MediaWiki User's Guide]]
12479 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12483 PAGESINCATEGORY invalid title fatal (r33546 fix)
12485 {{PAGESINCATEGORY:<bogus>}}
12492 Category with different sort key
12496 [[Category:MediaWiki User's Guide|Foo]]
12498 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12502 Category with identical sort key
12506 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12508 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12512 Category with empty sort key
12517 [[Category:MediaWiki User's Guide|]]
12519 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12523 Category with empty sort key and parentheses
12528 [[Category:Foo (bar)|]]
12530 [[Category:Foo (bar)|Foo]]
12534 Category with link tail
12539 123[[Category:Foo]]456
12541 123[[Category:Foo]]456
12545 Category with template
12550 [[Category:{{echo|Foo}}]]
12552 [[Category:{{echo|Foo}}]]
12556 Category with template in sort key
12561 [[Category:Foo|{{echo|Bar}}]]
12563 [[Category:Foo|{{echo|Bar}}]]
12567 Category with template in sort key and title
12572 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12574 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12578 Category / paragraph interactions
12580 Foo [[Category:Baz]] Bar
12582 Foo [[Category:Baz]]
12590 [[Category:Baz]] Bar
12603 {{echo|[[Category:Baz]]}}
12618 Parsoid: Serialize link to category page with colon escape
12624 [[:Category:Foo|Bar]]
12627 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
12628 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
12633 Parsoid: Link prefix/suffixes aren't applied to category links
12635 parsoid=wt2html,wt2wt,html2html
12640 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
12644 Parsoid: Serialize link to file page with colon escape
12650 [[:File:Foo.png|Bar]]
12653 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
12654 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
12659 Parsoid: Serialize a genuine category link without colon escape
12664 [[Category:Foo|Bar]]
12666 <link rel="mw:PageProp/Category" href="Category:Foo">
12667 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
12671 Normalize hrefs properly before testing for invalid link targets (bug 70894)
12675 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
12677 [[Category:Toxine bactérienne]]
12681 Parsoid: Defaultsort
12685 {{DEFAULTSORT:Foo}}
12687 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
12691 ### Inter-language links
12694 Interlanguage links
12702 es:Alimento fr:Nourriture zh:食品
12704 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
12705 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
12706 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
12710 Duplicate interlanguage links (bug 24502)
12721 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
12722 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
12723 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
12724 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
12731 Basic section headings
12738 ===Smaller headline===
12741 <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>
12744 <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>
12747 <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>
12753 Section headings with TOC
12756 === Subheadline 1 ===
12757 ===== Skipping a level =====
12758 ====== Skipping a level ======
12762 ===Another headline===
12764 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12766 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
12768 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
12770 <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>
12772 <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>
12779 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
12781 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
12787 <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>
12788 <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>
12789 <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>
12790 <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>
12791 <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>
12794 <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>
12798 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
12800 Handling of sections up to level 6 and beyond
12803 == Level 2 Heading==
12804 === Level 3 Heading===
12805 ==== Level 4 Heading====
12806 ===== Level 5 Heading=====
12807 ====== Level 6 Heading======
12808 ======= Level 7 Heading=======
12809 ======== Level 8 Heading========
12810 ========= Level 9 Heading=========
12811 ========== Level 10 Heading==========
12813 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12815 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12817 <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>
12819 <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>
12821 <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>
12823 <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>
12825 <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>
12826 <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>
12827 <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>
12828 <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>
12829 <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>
12843 <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>
12844 <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>
12845 <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>
12846 <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>
12847 <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>
12848 <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>
12849 <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>
12850 <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>
12851 <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>
12852 <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>
12857 TOC regression (bug 9764)
12861 ==== title 1.1.1 ====
12866 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12868 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12870 <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>
12872 <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>
12875 <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>
12878 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12880 <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>
12886 <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>
12887 <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>
12888 <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>
12889 <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>
12890 <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>
12891 <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>
12896 TOC with wgMaxTocLevel=3 (bug 6204)
12902 ==== title 1.1.1 ====
12907 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12909 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12911 <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>
12912 <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>
12915 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12917 <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>
12923 <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>
12924 <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>
12925 <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>
12926 <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>
12927 <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>
12928 <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>
12933 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
12939 ====Section 1.1.1====
12940 ====Section 1.1.1.1====
12943 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12945 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
12947 <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>
12950 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
12954 <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>
12955 <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>
12956 <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>
12957 <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>
12958 <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>
12964 Resolving duplicate section names
12969 <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>
12970 <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>
12975 Resolving duplicate section names with differing case (bug 10721)
12980 <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>
12981 <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>
12993 Template with sections, __NOTOC__
13000 <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>
13001 <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>
13002 <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>
13003 <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>
13008 __NOEDITSECTION__ keyword
13014 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13015 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13020 Link inside a section heading
13022 ==Section with a [[Main Page|link]] in it==
13024 <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>
13029 TOC regression (bug 12077)
13036 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13038 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13040 <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>
13043 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13047 <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>
13048 <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>
13049 <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>
13054 BUG 1219 URL next to image (good)
13056 http://example.com [[Image:foobar.jpg]]
13058 <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>
13063 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13066 The line above must have a trailing space!
13069 But just in case it doesn't...
13071 <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>
13072 <p>The line above must have a trailing space!
13074 <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>
13075 <p>But just in case it doesn't...
13080 Header with special characters (bug 25462)
13082 The tooltips shall not show entities to the user (ie. be double escaped)
13099 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13101 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13103 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13104 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13105 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13106 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13107 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13111 <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>
13114 <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>
13117 <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>
13120 <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>
13123 <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>
13129 Header with space, plus and underscore as entity
13131 Id should not contain + for spaces
13133 == Space between Text ==
13136 == Space-Entity between Text ==
13139 == Plus+between+Text ==
13142 == Plus-Entity+between+Text ==
13145 == Underscore_between_Text ==
13148 == Underscore-Entity_between_Text ==
13151 [[#Space between Text]]
13152 [[#Space-Entity between Text]]
13153 [[#Plus+between+Text]]
13154 [[#Plus-Entity+between+Text]]
13155 [[#Underscore_between_Text]]
13156 [[#Underscore-Entity_between_Text]]
13158 <p>Id should not contain + for spaces
13160 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13162 <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>
13163 <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>
13164 <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>
13165 <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>
13166 <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>
13167 <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>
13171 <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>
13174 <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>
13177 <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>
13180 <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>
13183 <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>
13186 <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>
13188 </p><p><a href="#Space_between_Text">#Space between Text</a>
13189 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13190 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13191 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13192 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13193 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13198 Headers with excess '=' characters
13199 (Are similar tests necessary beyond the 1st level?)
13203 =''italic'' heading==
13204 ==''italic'' heading=
13206 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13208 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13209 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13210 <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>
13211 <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>
13215 <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>
13216 <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>
13217 <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>
13218 <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>
13223 HTML headers vs TOC (bug 23393)
13224 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13236 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13238 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13240 <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>
13241 <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>
13244 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13246 <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>
13247 <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>
13253 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13254 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13255 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13256 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13257 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13258 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13263 Single-line or multiline-comments can follow headings
13265 parsoid=wt2html,wt2wt
13273 <h2><span class="mw-headline" id="foo">foo</span></h2>
13274 <h2><span class="mw-headline" id="bar">bar</span></h2>
13275 <h2><span class="mw-headline" id="baz">baz</span></h2>
13280 BUG 1219 URL next to image (broken)
13282 http://example.com[[Image:foobar.jpg]]
13284 <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>
13289 Bug 1186 news: in the middle of text
13291 http://en.wikinews.org/wiki/Wikinews:Workplace
13293 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13299 Namespaced link must have a title
13308 Namespaced link must have a title (bad fragment version)
13310 [[Project:#fragment]]
13312 <p>[[Project:#fragment]]
13318 ### HTML tags and HTML attributes
13322 div with no attributes
13324 <div>HTML rocks</div>
13326 <div>HTML rocks</div>
13331 div with double-quoted attribute
13333 <div id="rock">HTML rocks</div>
13335 <div id="rock">HTML rocks</div>
13340 div with single-quoted attribute
13342 <div id='rock'>HTML rocks</div>
13344 <div id="rock">HTML rocks</div>
13349 div with unquoted attribute
13351 <div id=rock>HTML rocks</div>
13353 <div id="rock">HTML rocks</div>
13358 div with illegal double attributes
13360 <div id="a" id="b">HTML rocks</div>
13362 <div id="b">HTML rocks</div>
13366 # FIXME: produce empty string instead of "class" in the PHP parser, following
13369 div with empty attribute value, space before equals
13373 <div class =>HTML rocks</div>
13375 <div class="">HTML rocks</div>
13380 div with multiple empty attribute values
13384 <div id= title=>HTML rocks</div>
13386 <div id="" title="">HTML rocks</div>
13391 table with multiple empty attribute values
13399 <table title="" id="">
13400 <tbody><tr><td> hi</td></tr>
13405 div with braces in attribute value
13407 <div title="{}">Foo</div>
13409 <div title="{}">Foo</div>
13412 <div title="{}">Foo</div>
13415 # This it very inconsistent in the PHP parser: it returns
13416 # class="class" if there is a space between the name and the equal sign (see
13417 # 'div with empty attribute value, space before equals'), but strips the
13418 # attribute completely if the space is missing. We hope that not much content
13419 # depends on this, so are implementing the behavior below in Parsoid for
13420 # consistencies' sake.
13421 # FIXME: fix this behavior in the PHP parser?
13423 div with empty attribute value, no space before equals
13425 parsoid=wt2html,html2html
13427 <div class=>HTML rocks</div>
13429 <div>HTML rocks</div>
13432 <div class="">HTML rocks</div>
13436 HTML multiple attributes correction
13438 <p class="error" class="awesome">Awesome!</p>
13440 <p class="awesome">Awesome!</p>
13445 Table multiple attributes correction
13448 !+ class="error" class="awesome"| status
13453 <th class="awesome"> status
13461 <DIV ID="x">HTML ROCKS</DIV>
13463 <div id="x">HTML ROCKS</div>
13468 Non-ASCII pseudo-tags are rendered as text
13477 Pseudo-tag with URL 'name' renders as url link
13479 <http://example.com/>
13481 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13486 text with amp in the middle of nowhere
13490 <p>Remember AT&T?
13495 text with character entity: eacute
13497 I always thought é was a cute letter.
13499 <p>I always thought é was a cute letter.
13502 <p>I always thought é was a cute letter.</p>
13506 text with entity-escaped character entity-like string: eacute
13508 I always thought &eacute; was a cute letter.
13510 <p>I always thought &eacute; was a cute letter.
13515 text with undefined character entity: xacute
13517 I always thought &xacute; was a cute letter.
13519 <p>I always thought &xacute; was a cute letter.
13523 # TODO: generalize to PHP parser?
13529 <data value="5">five</data>
13530 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13531 <mark>This highlighted text</mark>
13533 <p><data value="5">five</data>
13534 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13535 <mark>This highlighted text</mark></p>
13539 HTML tag with leading space is parsed as text
13543 <p>< div>foo< /div>
13548 ### Nesting tests (see bug 41545, 50604, 51081)
13551 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13552 # Note that html2wt is considerably more difficult if we use <b> in
13553 # the test case, instead of <big>
13555 Ensure that HTML adoption agency algorithm is properly implemented.
13557 <big>X<big>Y</big>Z</big>
13559 <p><big>X<big>Y</big>Z</big>
13563 # This was bug 41545 in the PHP parser.
13564 # Note that tidy doesn't handle this correctly.
13568 <kbd>X<kbd>Y</kbd>Z</kbd>
13570 <p><kbd>X<kbd>Y</kbd>Z</kbd>
13574 # The following cases were bug 51081 in the PHP parser.
13575 # Note that there are some other nestable tags (b, i, etc) which are
13576 # not covered; see bug 51081 for discussion.
13578 # Note that tidy doesn't handle this correctly.
13582 <em>X<em>Y</em>Z</em>
13584 <p><em>X<em>Y</em>Z</em>
13588 # Note that tidy doesn't handle this correctly.
13590 Nesting of <strong>
13592 <strong>X<strong>Y</strong>Z</strong>
13594 <p><strong>X<strong>Y</strong>Z</strong>
13603 <p><q>X<q>Y</q>Z</q></p>
13606 # Note that tidy doesn't handle this correctly.
13610 <ruby>X<ruby>Y</ruby>Z</ruby>
13612 <p><ruby>X<ruby>Y</ruby>Z</ruby>
13616 # Note that tidy doesn't handle this correctly.
13620 <bdo>X<bdo>Y</bdo>Z</bdo>
13622 <p><bdo>X<bdo>Y</bdo>Z</bdo>
13634 [[Media:Foobar.jpg]]
13636 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
13641 Media link with text
13643 [[Media:Foobar.jpg|A neat file to look at]]
13645 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
13649 # FIXME: this is still bad HTML tag nesting
13651 Media link with nasty text
13652 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
13654 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
13656 <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>
13659 <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>
13663 Media link to nonexistent file (bug 1702)
13665 [[Media:No such.jpg]]
13667 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
13672 Image link to nonexistent file (bug 1850 - good)
13674 [[Image:No such.jpg]]
13676 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
13681 :Image link to nonexistent file (bug 1850 - bad)
13683 [[:Image:No such.jpg]]
13685 <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>
13692 Character reference normalization in link text (bug 1938)
13694 [[Main Page|this&that]]
13696 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
13703 Test for unicode normalization
13705 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
13709 (bug 19451) Links should refer to the normalized form.
13717 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13718 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13719 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13720 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13721 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13726 Empty attribute crash test (bug 2067)
13728 <font color="">foo</font>
13730 <p><font color="">foo</font>
13735 Empty attribute crash test single-quotes (bug 2067)
13737 <font color=''>foo</font>
13739 <p><font color="">foo</font>
13744 Attribute test: equals, then nothing
13746 <font color=>foo</font>
13748 <p><font>foo</font>
13753 Attribute test: unquoted value
13755 <font color=x>foo</font>
13757 <p><font color="x">foo</font>
13762 Attribute test: unquoted but illegal value (hash)
13764 <font color=#x>foo</font>
13766 <p><font color="#x">foo</font>
13771 Attribute test: no value
13773 <font color>foo</font>
13775 <p><font color="color">foo</font>
13780 Bug 2095: link with three closing brackets
13784 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
13787 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
13791 Bug 2095: link with pipe and three closing brackets
13793 [[Main Page|link]]]
13795 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
13798 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
13802 Bug 2095: link with pipe and three closing brackets, version 2
13804 [[Main Page|[http://example.com/]]]
13806 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
13809 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
13818 Template:Dangerous attribute
13820 " onmouseover="alert(document.cookie)
13824 Template:Dangerous style attribute
13826 border-size: expression(alert(document.cookie))
13832 <div style="float: right; {{{1}}}">Magic div</div>
13836 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
13838 <div title="{{test}}"></div>
13840 <div title="This is a test template"></div>
13844 # Parsoid has enough context to handle this case
13846 Bug 2304: HTML attribute safety (dangerous template; 2309)
13848 <div title="{{dangerous attribute}}"></div>
13850 <div title=""></div>
13853 <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>
13857 Bug 2304: HTML attribute safety (dangerous style template; 2309)
13859 <div style="{{dangerous style attribute}}"></div>
13861 <div style="/* insecure input */"></div>
13866 Bug 2304: HTML attribute safety (safe parameter; 2309)
13868 {{div style|width: 200px}}
13870 <div style="float: right; width: 200px">Magic div</div>
13875 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
13877 {{div style|width: expression(alert(document.cookie))}}
13879 <div style="/* insecure input */">Magic div</div>
13884 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
13886 {{div style|"><script>alert(document.cookie)</script>}}
13888 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13893 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
13895 {{div style|" ><script>alert(document.cookie)</script>}}
13897 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13902 Bug 2304: HTML attribute safety (link)
13904 <div title="[[Main Page]]"></div>
13906 <div title="[[Main Page]]"></div>
13911 Bug 2304: HTML attribute safety (italics)
13913 <div title="''foobar''"></div>
13915 <div title="''foobar''"></div>
13920 Bug 2304: HTML attribute safety (bold)
13922 <div title="'''foobar'''"></div>
13924 <div title="'''foobar'''"></div>
13930 Bug 2304: HTML attribute safety (ISBN)
13932 <div title="ISBN 1234567890"></div>
13934 <div title="ISBN 1234567890"></div>
13939 Bug 2304: HTML attribute safety (RFC)
13941 <div title="RFC 1234"></div>
13943 <div title="RFC 1234"></div>
13948 Bug 2304: HTML attribute safety (PMID)
13950 <div title="PMID 1234567890"></div>
13952 <div title="PMID 1234567890"></div>
13957 Bug 2304: HTML attribute safety (web link)
13959 <div title="http://example.com/"></div>
13961 <div title="http://example.com/"></div>
13966 Bug 2304: HTML attribute safety (named web link)
13968 <div title="[http://example.com/ link]"></div>
13970 <div title="[http://example.com/ link]"></div>
13975 Bug 3244: HTML attribute safety (extension; safe)
13977 <div style="<nowiki>background:blue</nowiki>"></div>
13979 <div style="background:blue"></div>
13984 Bug 3244: HTML attribute safety (extension; unsafe)
13986 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
13988 <div style="/* insecure input */"></div>
13992 # More MSIE fun discovered by Tom Gilder
13995 MSIE CSS safety test: spurious slash
13997 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
13999 <div style="/* insecure input */">evil</div>
14004 MSIE CSS safety test: hex code
14006 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14008 <div style="/* insecure input */">evil</div>
14013 MSIE CSS safety test: comment in url
14015 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14017 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14022 MSIE CSS safety test: comment in expression
14024 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14026 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14031 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14033 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14035 <p style="/* invalid control char */">A</p>
14040 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14042 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14043 <div style="top:EXPRESSION(alert())">B</div>
14045 <p style="/* insecure input */">A</p>
14046 <div style="/* insecure input */">B</div>
14051 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14053 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14054 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14056 <div style="/* insecure input */">A</div>
14057 <p style="/* insecure input */">B</p>
14062 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14064 <div style="background-image:url⁽javascript:alert())">A</div>
14065 <div style="background-image:url₍javascript:alert())">B</div>
14066 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14068 <div style="/* insecure input */">A</div>
14069 <div style="/* insecure input */">B</div>
14070 <p style="/* insecure input */">C</p>
14078 title="data:text/html,<img src=1 onerror=alert(1)>"
14079 style="-o-link:attr(title);-o-link-source:current">X</div>
14081 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14086 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14088 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14089 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14090 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14091 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14092 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14093 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14094 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14096 <p style="/* insecure input */">A</p>
14097 <p style="/* insecure input */">B</p>
14098 <p style="/* insecure input */">C</p>
14099 <p style="/* insecure input */">D</p>
14100 <p style="/* insecure input */">E</p>
14101 <p style="/* insecure input */">F</p>
14102 <p style="/* insecure input */">G</p>
14107 Table attribute legitimate extension
14110 !+ style="<nowiki>color:blue</nowiki>"| status
14115 <th style="color:blue"> status
14121 Table attribute safety
14124 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14129 <th style="/* insecure input */"> status
14135 CSS line continuation 1
14137 <div style="background-image: u\ rl(test.jpg);"></div>
14139 <div style="/* insecure input */"></div>
14144 CSS line continuation 2
14146 <div style="background-image: u\ rl(test.jpg); "></div>
14148 <div style="/* insecure input */"></div>
14159 Expansion of multi-line templates in attribute values (bug 6255)
14161 <div style="background: {{identity|#00FF00}}">-</div>
14163 <div style="background: #00FF00">-</div>
14169 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14171 <div style="background:
14174 <div style="background: #00FF00">-</div>
14177 <div style="background:
14182 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14184 <div style="background: #00FF00">-</div>
14186 <div style="background: #00FF00">-</div>
14191 evil <math>-wiki-tags without Extension:Math enabled
14193 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14195 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14199 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14202 Parser hook: empty input
14215 Parser hook: empty input using terminated empty elements
14228 Parser hook: empty input using terminated empty elements (space before)
14241 Parser hook: basic input
14255 Parser hook: case insensitive
14269 Parser hook: case insensitive, redux
14282 Parser hook: nested tags
14286 <tag><tag></tag></tag>
14297 Parser hook: basic arguments
14299 <tag width=200 height = "100" depth = '50' square></tag>
14307 'square' => 'square',
14314 Parser hook: argument containing a forward slash (bug 5344)
14316 <tag filename='/tmp/bla'></tag>
14321 'filename' => '/tmp/bla',
14328 Parser hook: empty input using terminated empty elements (bug 2374)
14341 # </tag> should be output literally since there is no matching tag that begins it
14343 Parser hook: basic arguments using terminated empty elements (bug 2374)
14345 <tag width=200 height = "100" depth = '50' square/>
14355 'square' => 'square',
14364 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14368 Parser hook: static parser hook not inside a comment
14370 <statictag>hello, world</statictag>
14371 <statictag action=flush/>
14379 Parser hook: static parser hook inside a comment
14381 <!-- <statictag>hello, world</statictag> -->
14382 <statictag action=flush/>
14388 # Nested template calls; this case was broken by Parser.php rev 1.506,
14392 Template:One-parameter
14394 (My parameter is: {{{1}}})
14398 Template:Map-one-parameter
14400 {{{{{1}}}|{{{2}}}}}
14404 Nested template calls
14406 {{Map-one-parameter|One-parameter|param}}
14408 <p>(My parameter is: param)
14417 # HTML+Tidy effectively strips out the empty tags completely
14418 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14419 # which Tidy would have done for the PHP parser had there been content inside it.
14421 Sanitizer: Closing of open tags
14423 <s></s><table></table>
14425 <s></s><table></table>
14428 <p><s></s></p><table></table>
14432 Sanitizer: Closing of open but not closed tags
14441 Sanitizer: Closing of closed but not open tags
14450 Sanitizer: Closing of closed but not open table tags
14452 Table not started</td></tr></table>
14454 <p>Table not started</td></tr></table>
14459 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14461 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14463 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14467 # In HTML5, the restrictions are that id must contain at least one character,
14468 # and must not contain any space characters.
14470 Sanitizer: Validating the contents of the id attribute (bug 4515)
14474 <br id="" /><br id="a space" />
14479 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
14481 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14485 <br id="foo" /><br id="foo" />
14487 Something need to be done. foo-2 ?
14491 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14494 <meta itemprop="hello" content="world">
14495 <meta http-equiv="refresh" content="5">
14496 <meta itemprop="hello" http-equiv="refresh" content="5">
14497 <link itemprop="hello" href="{{SERVER}}">
14498 <link rel="stylesheet" href="{{SERVER}}">
14499 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14502 <div itemscope="itemscope">
14503 <p> <meta itemprop="hello" content="world" />
14504 <meta http-equiv="refresh" content="5">
14505 <meta itemprop="hello" content="5" />
14507 <link itemprop="hello" href="http://example.org" />
14508 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14509 <link itemprop="hello" href="http://example.org" />
14515 Language converter: output gets cut off unexpectedly (bug 5757)
14519 this bit is safe: }-
14521 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14523 then we get cut off here: }-
14525 all additional text is vanished
14527 <p>this bit is safe: }-
14528 </p><p>but if we add a conversion instance: xxx
14529 </p><p>then we get cut off here: }-
14530 </p><p>all additional text is vanished
14535 Self closed html pairs (bug 5487)
14538 <center><font id="bug" />Centered text</center>
14539 <div><font id="bug2" />In div text</div>
14541 <center><font id="bug" />Centered text</center>
14542 <div><font id="bug2" />In div text</div>
14551 Punctuation: nbsp before exclamation
14555 <p>C'est grave !
14560 Punctuation: CSS !important (bug 11874)
14562 <div style="width:50% !important">important</div>
14564 <div style="width:50% !important">important</div>
14569 Punctuation: CSS ! important (bug 11874; with space after)
14571 <div style="width:50% ! important">important</div>
14573 <div style="width:50% ! important">important</div>
14579 HTML bullet list, closed tags (bug 5497)
14592 <ul data-parsoid='{"stx":"html"}'>
14593 <li data-parsoid='{"stx":"html"}'>One</li>
14594 <li data-parsoid='{"stx":"html"}'>Two</li>
14600 HTML bullet list, unclosed tags (bug 5497)
14612 <ul data-parsoid='{"stx":"html"}'>
14613 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14614 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14620 HTML ordered list, closed tags (bug 5497)
14633 <ol data-parsoid='{"stx":"html"}'>
14634 <li data-parsoid='{"stx":"html"}'>One</li>
14635 <li data-parsoid='{"stx":"html"}'>Two</li>
14641 HTML ordered list, unclosed tags (bug 5497)
14654 <ol data-parsoid='{"stx":"html"}'>
14655 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14656 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14662 HTML nested bullet list, closed tags (bug 5497)
14687 HTML nested bullet list, open tags (bug 5497)
14724 HTML nested ordered list, closed tags (bug 5497)
14749 HTML nested ordered list, open tags (bug 5497)
14786 HTML ordered list item with parameters oddity
14788 <ol><li id="fragment">One</li>
14791 <ol><li id="fragment">One</li>
14796 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
14798 bug 5918: autonumbering
14800 [http://first/] [http://second] [ftp://ftp]
14804 [mailto:enclosed@mail.tld With target]
14806 [mailto:enclosed@mail.tld]
14808 mailto:inline@mail.tld
14810 <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>
14811 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
14812 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
14813 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
14814 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
14817 <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>
14818 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
14819 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
14820 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
14821 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
14826 # Security and HTML correctness
14827 # From Nick Jenkins' fuzz testing
14831 Fuzz testing: Parser13
14846 Fuzz testing: Parser14
14851 <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>
14852 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14854 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14860 <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>
14862 <div id="toc" class="toc">
14863 <div id="toctitle">
14867 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14873 Fuzz testing: Parser14-table
14878 <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>
14879 <table style="__TOC__">
14884 <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>
14885 <table style="__TOC__">
14892 # Known to produce bogus xml (extra </td>)
14894 Fuzz testing: Parser16
14923 Fuzz testing: Parser21
14926 ! irc://{{ftp://a" onmouseover="alert('hello world');"
14931 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
14941 Fuzz testing: Parser22
14943 http://===r:::https://b
14947 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
14955 # Known to produce bad XML for now
14957 Fuzz testing: Parser24
14964 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
14965 <br style="onmouseover='alert(document.cookie);' " />
14967 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14972 <u class="|">}}}} >
14973 <br style="onmouseover='alert(document.cookie);'" />
14975 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14984 # Note: the current result listed for this is not what the original one was,
14985 # but the original bug was JavaScript injection, which is fixed in any case.
14986 # It's not clear that the original result listed was any more correct than the
14987 # current one. Original result:
14990 # <li class="||">
14991 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14993 Fuzz testing: Parser25 (bug 6055)
14999 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15001 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15006 Fuzz testing: URL adjacent extension (with space, clean)
15008 http://example.com <nowiki>junk</nowiki>
15010 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15015 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15017 http://example.com<nowiki>junk</nowiki>
15019 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15024 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15026 http://example.com<pre>junk</pre>
15028 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15031 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15038 Fuzz testing: image with bogus manual thumbnail
15040 [[Image:foobar.jpg|thumbnail= ]]
15042 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15045 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}'/>
15049 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15051 <pre dir=" "></pre>
15053 <pre dir=" "></pre>
15058 Parsing optional HTML elements (Bug 6171)
15063 <td> Some tabular data</td>
15064 <td> More tabular data ...
15065 <td> And yet som tabular data</td>
15071 <td> Some tabular data</td>
15072 <td> More tabular data ...
15073 </td><td> And yet som tabular data</td>
15080 Correct handling of <td>, <tr> (Bug 6171)
15085 <td> Some tabular data</td>
15086 <td> More tabular data ...</td>
15087 <td> And yet som tabular data</td>
15093 <td> Some tabular data</td>
15094 <td> More tabular data ...</td>
15095 <td> And yet som tabular data</td>
15103 Parsing crashing regression (fr:JavaScript)
15107 <p></body></x>
15112 Inline wiki vs wiki block nesting
15118 <p><b>Bold paragraph</b>
15119 </p><p>New wiki paragraph
15123 # FIXME: The current php output is documented
15124 # and desired output is the parsoid target.
15126 Inline HTML vs wiki block nesting
15132 <p><b>Bold paragraph
15133 </p><p>New wiki paragraph</b>
15136 <p><b>Bold paragraph</b>
15137 </p><p>New wiki paragraph
15141 # Original result was this:
15142 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15144 # While that might be marginally more intuitive, maybe, the six-apostrophe
15145 # construct is clearly pathological and the result stated here (which is what
15146 # the parser actually does) is about as reasonable as anything.
15148 Mixing markup for italics and bold
15151 '''bold''''''bold''bolditalics'''''
15153 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15161 Article for special page transclusion test
15165 Special page transclusion
15168 {{Special:Prefixindex/Xyzzyx}}
15170 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15175 Special page transclusion twice (bug 5021)
15178 {{Special:Prefixindex/Xyzzyx}}
15179 {{Special:Prefixindex/Xyzzyx}}
15181 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15182 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15187 Transclusion of default MediaWiki message
15189 {{MediaWiki:Mainpage}}
15196 Transclusion of nonexistent MediaWiki message
15198 {{MediaWiki:Mainpagexxx}}
15200 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15205 Transclusion of MediaWiki message with underscore
15207 {{MediaWiki:history_short}}
15214 Transclusion of MediaWiki message with space
15216 {{MediaWiki:history short}}
15223 Invalid header with following text
15233 Section extraction test (section 0)
15253 Section extraction test (section 1)
15275 Section extraction test (section 2)
15296 Section extraction test (section 3)
15316 Section extraction test (section 4)
15340 Section extraction test (section 5)
15360 Section extraction test (section 6)
15381 Section extraction test (section 7)
15401 Section extraction test (section 8)
15421 Section extraction test (section 9)
15442 Section extraction test (section 10)
15462 Section extraction test (nonexistent section 11)
15481 Section extraction test with bogus heading (section 1)
15486 ==bogus== not a legal section
15490 ==bogus== not a legal section
15494 Section extraction test with bogus heading (section 2)
15499 ==bogus== not a legal section
15506 Section extraction test with comment after heading (section 1)
15518 Section extraction test with comment after heading (section 2)
15530 Section extraction test with bogus <nowiki> heading (section 1)
15535 ==bogus== <nowiki>not a legal section</nowiki>
15539 ==bogus== <nowiki>not a legal section</nowiki>
15543 Section extraction test with bogus <nowiki> heading (section 2)
15548 ==bogus== <nowiki>not a legal section</nowiki>
15555 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
15556 # instead of respecting commented sections
15558 Section extraction prefixed by comment (section 1)
15569 Section extraction prefixed by comment (section 2)
15580 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
15581 # instead of respecting HTML-style headings
15583 Section extraction, mixed wiki and html (section 1)
15599 Section extraction, mixed wiki and html (section 2)
15615 # Formerly testing for bug 3342
15617 Section extraction, heading surrounded by <noinclude>
15621 <noinclude>==unmarked==</noinclude>
15627 # Test behavior of bug 19910
15629 Sectiion with all-equals
15634 The line above must have a trailing space
15637 But just in case it doesn't...
15641 But just in case it doesn't...
15645 Section replacement test (section 0)
15676 Section replacement test (section 1)
15705 Section replacement test (section 2)
15735 Section replacement test (section 3)
15766 Section replacement test (section 4)
15793 Section replacement test (section 5)
15824 Section replacement test (section 6)
15854 Section replacement test (section 7)
15885 Section replacement test (section 8)
15916 Section replacement test (section 9)
15945 Section replacement test (section 10)
15975 Section replacement test with initial whitespace (bug 13728)
15979 Preformatted initial line
15983 Preformatted initial line
15990 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16002 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16015 Section extraction, <pre> around bogus header (bug 10309)
16032 Section replacement, <pre> around bogus header (bug 10309)
16034 noxml replace=2,"xxx"
16055 Handling of 
 in URLs
16059 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16062 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16064 a</a></li></ul></li></ul>
16068 Handling of %0A in URLs
16072 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16075 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16079 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16081 5 quotes, code coverage +1 line
16088 <p><b><i></i></b></p>
16091 # same html as previous, but wikitext adjusted to match parsoid html2wt
16092 # note that wt2html and html2html will put the <i> before the <b>
16094 5 quotes, code coverage +1 line w/ nowiki (1)
16096 parsoid=wt2wt,html2wt
16098 '''''<nowiki/>'''''
16103 <p><b><i></i></b></p>
16106 # same as previous, just swapping the <i> and <b>
16108 5 quotes, code coverage +1 line w/ nowiki (2)
16110 '''''<nowiki/>'''''
16115 <p><i><b></b></i></p>
16119 Special:Search page linking.
16123 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16128 {{!}} is a magic word
16130 {{!}} is a magic word there and {{!}} is still a magic word here
16132 <p>| is a magic word there and | is still a magic word here
16135 <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>
16141 title=[[Parser test]]
16146 * {{FULLPAGENAMEE}}
16148 * {{BASEPAGENAMEE}}
16152 * {{ROOTPAGENAMEE}}
16154 * {{TALKPAGENAMEE}}
16155 * {{SUBJECTPAGENAME}}
16156 * {{SUBJECTPAGENAMEE}}
16159 * {{NAMESPACENUMBER}}
16163 * {{SUBJECTSPACEE}}
16164 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16166 <ul><li> Parser test</li>
16167 <li> Parser_test</li>
16168 <li> Parser test</li>
16169 <li> Parser_test</li>
16170 <li> Parser test</li>
16171 <li> Parser_test</li>
16172 <li> Parser test</li>
16173 <li> Parser_test</li>
16174 <li> Parser test</li>
16175 <li> Parser_test</li>
16176 <li> Talk:Parser test</li>
16177 <li> Talk:Parser_test</li>
16178 <li> Parser test</li>
16179 <li> Parser_test</li>
16187 <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>
16190 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16200 image4 |300px| centre
16201 image5.svg| http://///////
16206 <ul class="gallery mw-gallery-traditional">
16207 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16208 <div class="thumb" style="height: 150px;">Image1.png</div>
16209 <div class="gallerytext">
16212 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16213 <div class="thumb" style="height: 150px;">Image2.gif</div>
16214 <div class="gallerytext">
16219 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16220 <div class="thumb" style="height: 150px;">Image3</div>
16221 <div class="gallerytext">
16224 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16225 <div class="thumb" style="height: 150px;">Image4</div>
16226 <div class="gallerytext">
16231 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16232 <div class="thumb" style="height: 150px;">Image5.svg</div>
16233 <div class="gallerytext">
16234 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16238 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16239 <div class="thumb" style="height: 150px;">* image6</div>
16240 <div class="gallerytext">
16248 Gallery (with options)
16250 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16251 File:Nonexistant.jpg|caption
16252 File:Nonexistant.jpg
16253 image:foobar.jpg|some '''caption''' [[Main Page]]
16255 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16258 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16259 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16260 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16261 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16262 <div class="gallerytext">
16267 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16268 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16269 <div class="gallerytext">
16272 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16273 <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>
16274 <div class="gallerytext">
16275 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16279 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16280 <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>
16281 <div class="gallerytext">
16284 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16285 <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>
16286 <div class="gallerytext">
16296 Gallery with link that has fragment
16299 image:foobar.jpg|link=Main_Page
16300 image:foobar.jpg|link=Main_Page#section
16301 image:foobar.jpg|link=Main Page#section|caption
16304 <ul class="gallery mw-gallery-traditional">
16305 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16306 <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>
16307 <div class="gallerytext">
16310 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16311 <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>
16312 <div class="gallerytext">
16315 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16316 <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>
16317 <div class="gallerytext">
16327 Gallery with wikitext inside caption
16330 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16331 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16334 <ul class="gallery mw-gallery-traditional">
16335 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16336 <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>
16337 <div class="gallerytext">
16338 <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>
16342 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16343 <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>
16344 <div class="gallerytext">
16345 <p>This is a test template
16354 gallery (with showfilename option)
16356 <gallery showfilename>
16357 File:Nonexistant.jpg|caption
16358 File:Nonexistant.jpg
16359 image:foobar.jpg|some '''caption''' [[Main Page]]
16363 <ul class="gallery mw-gallery-traditional">
16364 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16365 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16366 <div class="gallerytext">
16367 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16372 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16373 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16374 <div class="gallerytext">
16375 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16379 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16380 <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>
16381 <div class="gallerytext">
16382 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16383 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16387 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16388 <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>
16389 <div class="gallerytext">
16390 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16399 Gallery (with namespace-less filenames)
16402 File:Nonexistant.jpg
16408 <ul class="gallery mw-gallery-traditional">
16409 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16410 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16411 <div class="gallerytext">
16414 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16415 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16416 <div class="gallerytext">
16419 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16420 <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>
16421 <div class="gallerytext">
16424 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16425 <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>
16426 <div class="gallerytext">
16434 HTML Hex character encoding (spells the word "JavaScript")
16436 parsoid=wt2html,wt2wt,html2html
16438 JavaScript
16440 <p>JavaScript
16445 <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>
16449 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16453 <p>&#xsee;&#XSEE;
16456 <p>&#xsee;&#XSEE;</p>
16460 HTML Hex character encoding mixed case
16462 parsoid=wt2html,wt2wt,html2html
16471 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16475 __FORCETOC__ override
16487 ISBN 978-0-1234-56 789
16489 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16492 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16496 ISBN followed by 5 spaces
16507 ISBN ISBN 1234567890
16509 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16518 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16523 ISBN with empty prefix (parsoid test)
16527 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
16531 Bug 22905: <abbr> followed by ISBN followed by </a>
16533 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
16535 <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>
16544 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
16549 Double RFC with a wiki link
16553 <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>
16562 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
16565 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
16569 Centre-aligned image
16571 [[Image:foobar.jpg|centre]]
16573 <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>
16580 [[Image:foobar.jpg|none]]
16582 <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>
16587 Width + Height sized image (using px) (height is ignored)
16589 [[Image:foobar.jpg|640x480px]]
16591 <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>
16596 Width-sized image (using px, no following whitespace)
16598 [[Image:foobar.jpg|640px]]
16600 <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>
16605 Width-sized image (using px, with following whitespace - test regression from r39467)
16607 [[Image:foobar.jpg|640px ]]
16609 <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>
16614 Width-sized image (using px, with preceding whitespace - test regression from r39467)
16616 [[Image:foobar.jpg| 640px]]
16618 <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>
16623 Image with page parameter
16627 [[File:LoremIpsum.djvu|page=2]]
16629 <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>
16634 Another italics / bold test
16642 # FIXME: The php output seems broken. It's interleaving some open/close tags.
16648 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
16651 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
16656 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
16658 Images with the "|" character in the comment
16660 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
16662 <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>
16665 <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>
16669 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
16671 <html><script>alert(1);</script></html>
16673 <p><html><script>alert(1);</script></html>
16678 HTML with raw HTML ($wgRawHtml==true)
16682 <html><script>alert(1);</script></html>
16684 <p><script>alert(1);</script>
16689 Parents of subpages, one level up
16691 subpage title=[[Subpage test/L1/L2/L3]]
16695 <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>
16701 Parents of subpages, one level up, not named
16703 subpage title=[[Subpage test/L1/L2/L3]]
16707 <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>
16714 Parents of subpages, two levels up
16716 subpage title=[[Subpage test/L1/L2/L3]]
16722 <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
16723 </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>
16728 Parents of subpages, two levels up, without trailing slash or name.
16730 subpage title=[[Subpage test/L1/L2/L3]]
16739 Parents of subpages, two levels up, with lots of extra trailing slashes.
16741 subpage title=[[Subpage test/L1/L2/L3]]
16745 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
16750 Subpage test/L1/L2/L3Sibling
16756 Transclusion of a sibling page (one level up)
16758 subpage title=[[Subpage test/L1/L2/L3]]
16767 Transclusion of a child page
16769 subpage title=[[Subpage test/L1/L2]]
16778 Non-transclusion because of too many up levels
16780 subpage title=[[Subpage test/L1/L2/L3]]
16782 {{../../../../More than parent}}
16784 <p>{{../../../../More than parent}}
16789 Definition list code coverage
16795 <dl><dt> title  </dt>
16797 <dt> title </dt>
16803 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16804 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16805 <dt>title</dt><dd> def</dd></dl>
16809 Don't fall for the self-closing div
16811 <div>hello world</div/>
16813 <div>hello world</div>
16822 <p>[[:Template:Msg]]
16831 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
16835 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
16837 Always escape literal '>' in output, not just after '<'
16851 <p>This is a test template
16852 This is a test template
16864 Inclusion of !userCanEdit() content
16868 <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>
16874 Out-of-order TOC heading levels
16883 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16885 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
16887 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
16888 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
16891 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
16893 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
16894 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
16900 <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>
16901 <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>
16902 <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>
16903 <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>
16904 <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>
16905 <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>
16911 ISBN with a dummy number
16921 ISBN with space-delimited number
16925 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
16931 ISBN with multiple spaces, no number
16950 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16951 </p><p>ISBN 12345678901
16957 ISBN with trailing year (bug 8110)
16959 ISBN 1-234-56789-0 - 2006
16961 ISBN 1 234 56789 0 - 2006
16963 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
16964 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
16972 {{anchorencode:foo bar©#%n}}
16974 <p>foo_bar.C2.A9.23.25n
16979 anchorencode trims spaces
16981 {{anchorencode: __pretty__please__}}
16988 anchorencode deals with links
16990 {{anchorencode: [[hello|world]] [[hi]]}}
16997 anchorencode deals with templates
16999 {{anchorencode: {{Foo}} }}
17006 anchorencode encodes like the TOC generator: (bug 18431)
17008 === _ +:.3A%3A&&]] ===
17009 {{anchorencode: _ +:.3A%3A&&]] }}
17012 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17013 <p>.2B:.3A.253A.26.26.5D.5D
17018 Bug 6200: blockquotes and paragraph formatting
17039 Bug 8293: Use of center tag ruins paragraph formatting
17060 Parsing of overlapping (improperly nested) inline html tags
17062 <span><s>x</span></s>
17064 <p><span><s>x</span></s></span>
17067 <p><span><s>x</s></span>
17072 ### Language variants related tests
17075 Self-link in language variants
17077 title=[[Dunav]] language=sr
17079 Both [[Dunav]] and [[Дунав]] are names for this river.
17081 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17092 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17094 title=[[Duna]] language=sr
17096 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17098 <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.
17103 Link to a section of a variant of this title shouldn't be parsed as self-link
17105 title=[[Duna]] language=sr
17107 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17109 <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.
17114 Link to pages in language variants
17118 Main Page can be written as [[Маин Паге]]
17120 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17126 Multiple links to pages in language variants
17130 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17132 <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>.
17138 Simple template in language variants
17144 <p>This is a test template
17150 Template with explicit namespace in language variants
17156 <p>This is a test template
17162 Basic test for template parameter in language variants
17166 {{парамтест|param=foo}}
17168 <p>This is a test template with parameter foo
17174 Simple category in language variants
17178 [[Category:МедиаWики Усер'с Гуиде]]
17180 <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>
17197 Don't convert blue categorylinks to another variant (bug 33210)
17201 [[A]][[Category:分类]]
17203 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17208 Stripping -{}- tags (language variants)
17212 Latin proverb: -{Ne nuntium necare}-
17214 <p>Latin proverb: Ne nuntium necare
17220 Prevent conversion with -{}- tags (language variants)
17222 language=sr variant=sr-ec
17224 Latinski: -{Ne nuntium necare}-
17226 <p>Латински: Ne nuntium necare
17232 Prevent conversion of text with -{}- tags (language variants)
17234 language=sr variant=sr-ec
17236 Latinski: -{Ne nuntium necare}-
17238 <p>Латински: Ne nuntium necare
17244 Prevent conversion of links with -{}- tags (language variants)
17246 language=sr variant=sr-ec
17250 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17256 -{}- tags within headlines (within html for parserConvert())
17258 language=sr variant=sr-ec
17262 <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>
17268 Explicit definition of language variant alternatives
17270 language=zh variant=zh-tw
17272 -{zh:China;zh-tw:Taiwan}-, not China
17274 <p>Taiwan, not China
17280 Conversion around HTML tags
17282 language=sr variant=sr-ec
17284 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17285 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17288 <span title="ЛаCтин">ски</span>
17294 Explicit session-wise language variant mapping (A flag and - flag)
17296 language=zh variant=zh-tw
17298 Taiwan is not China.
17299 But -{A|zh:China;zh-tw:Taiwan}- is China,
17300 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17301 and -{China}- is China.
17303 <p>Taiwan is not China.
17304 But Taiwan is Taiwan,
17305 (This should be stripped!)
17306 and China is China.
17311 Explicit session-wise language variant mapping (H flag for hide)
17313 language=zh variant=zh-tw
17315 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17318 <p>(This should be stripped!)
17324 Adding explicit conversion rule for title (T flag)
17326 language=zh variant=zh-tw showtitle
17328 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17331 <p>Should be stripped!
17336 Testing that changing the language variant here in the tests actually works
17338 language=zh variant=zh showtitle
17340 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17343 <p>Should be stripped!
17348 Recursive conversion of alt and title attrs shouldn't clear converter state
17350 language=zh variant=zh-cn showtitle
17352 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17353 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17357 Should be stripped<span title="Exclamation">!</span>
17362 Bug 24072: more test on conversion rule for title
17364 language=zh variant=zh-tw showtitle
17366 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17367 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17370 <p>This should be stripped!
17371 This won't take interferes with the title rule.
17376 Partly disable title conversion if variant == main language code
17378 language=zh variant=zh title=[[ZH]] showtitle
17380 -{T|zh-cn:CN;zh-tw:TW}-
17388 Partly disable title conversion if variant == main language code, more
17390 language=zh variant=zh title=[[ZH]] showtitle
17400 Raw output of variant escape tags (R flag)
17402 language=zh variant=zh-tw
17404 Raw: -{R|zh:China;zh-tw:Taiwan}-
17406 <p>Raw: zh:China;zh-tw:Taiwan
17411 Nested using of manual convert syntax
17413 language=zh variant=zh-hk
17415 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17417 <p>Nested: Hello Hong Kong!
17422 Proper conversion of text in external links
17424 language=sr variant=sr-ec
17426 http://www.google.com
17427 gopher://www.google.com
17428 [http://www.google.com http://www.google.com]
17429 [gopher://www.google.com gopher://www.google.com]
17430 [https://www.google.com irc://www.google.com]
17431 [ftp://www.google.com www.google.com/ftp://dir]
17432 [//www.google.com www.google.com]
17434 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17435 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17436 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17437 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17438 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17439 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17440 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17445 Do not convert roman numbers to language variants
17447 language=sr variant=sr-ec
17451 <p>Фридрих IV је цар.
17456 Unclosed language converter markup "-{"
17467 Don't convert raw rule "-{R|=>}-" to "=>"
17478 Don't break link parsing if language converter markup is in the caption.
17480 language=sr variant=sr-ec
17482 [[Main Page|-{R|main page}-]]
17484 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17488 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17490 Don't break image parsing if language converter markup is in the caption.
17494 [[File:Foobar.jpg|-{R|caption}-]]
17496 <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>
17500 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17502 Don't break list handling if language converter markup is in the item.
17504 language=zh variant=zh-cn
17506 ;-{zh-cn:AAA;zh-tw:BBB}-
17508 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
17515 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17517 Don't break table handling if language converter markup is in the cell.
17519 language=sr variant=sr-ec
17542 Bug 529: Uncovered bullet
17551 # Plain MediaWiki does not remove empty lists, but tidy actually does.
17552 # Templates in Wikipedia rely on this behavior, as tidy has always been
17553 # enabled there. These tests are normally run *without* tidy, so specify the
17554 # full output here.
17555 # To test realistic parsing behavior, apply a tidy-like transformation to both
17556 # the expected output and your parser's output.
17558 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
17560 ******* Foo {{bullet}}
17562 <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>
17568 Bug 529: Uncovered table already at line-start
17591 Bug 529: Uncovered bullet in parser function result
17593 * Foo {{lc:{{bullet}} }}
17601 Bug 5678: Double-parsed template argument
17603 {{lc:{{{1}}}|hello}}
17610 Bug 5678: Double-parsed template invocation
17612 {{lc:{{paramtest {{!}} param = hello }} }}
17614 <p>{{paramtest | param = hello }}
17619 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
17622 title=[[Main Page]]
17624 {{PRVNÍVELKÉ:ěščř}}
17625 {{prvnívelké:ěščř}}
17645 Morwen/13: Unclosed link followed by heading
17652 <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>
17657 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
17664 <h1><span class="mw-headline" id="heading">heading</span></h1>
17669 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
17676 <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>
17691 Paragraphs inside divs (no extra line breaks)
17703 Paragraphs inside divs (extra line break on open)
17718 Paragraphs inside divs (extra line break on close)
17733 Paragraphs inside divs (extra line break on open and close)
17750 Nesting tags, paragraphs on lines which begin with <div>
17752 <div></div><strong>A
17755 <p><strong>A</strong></p>
17756 <p><strong>B</strong></p>
17764 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
17766 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
17768 <blockquote>Line one
17770 Line two</blockquote>
17772 <blockquote>Line one
17773 Line two</blockquote>
17777 <p>Line one Line two</p>
17782 Bug 6200: paragraphs inside blockquotes (extra line break on open)
17787 Line two</blockquote>
17792 Line two</blockquote>
17797 Line two</blockquote>
17801 Bug 6200: paragraphs inside blockquotes (extra line break on close)
17803 <blockquote>Line one
17808 <blockquote>Line one
17821 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
17843 Paragraphs inside blockquotes/divs (no extra line breaks)
17845 <blockquote><div>Line one
17847 Line two</div></blockquote>
17849 <blockquote><div>Line one
17850 Line two</div></blockquote>
17855 Paragraphs inside blockquotes/divs (extra line break on open)
17860 Line two</div></blockquote>
17865 Line two</div></blockquote>
17870 Paragraphs inside blockquotes/divs (extra line break on close)
17872 <blockquote><div>Line one
17875 </div></blockquote>
17877 <blockquote><div>Line one
17880 </div></blockquote>
17885 Paragraphs inside blockquotes/divs (extra line break on open and close)
17891 </div></blockquote>
17897 </div></blockquote>
17902 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
17904 wgLinkHolderBatchSize=0
17910 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
17911 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
17912 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
17917 Free external link invading image caption
17919 [[Image:Foobar.jpg|thumb|http://x|hello]]
17921 <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>
17926 Bug 15196: localised external link numbers
17930 [http://en.wikipedia.org/]
17932 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
17935 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
17939 Multibyte character in padleft
17941 {{padleft:-Hello|7|Æ}}
17948 Multibyte character in padright
17950 {{padright:Hello-|7|Æ}}
17957 formatdate parser function
17959 {{#formatdate:2009-03-24}}
17961 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
17966 formatdate parser function, with default format
17968 {{#formatdate:2009-03-24|mdy}}
17970 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
17975 Spacing of numbers in formatted dates
17977 {{#formatdate:January 15}}
17979 <p><span class="mw-formatted-date" title="01-15">January 15</span>
17984 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
17986 language=nl title=[[MediaWiki:Common.css]]
17988 {{#formatdate:2009-03-24|dmy}}
17990 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18003 Edit comment with link
18007 I like the [[Main Page]] a lot
18009 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18013 Edit comment with link and link text
18017 I like the [[Main Page|best pages]] a lot
18019 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18023 Edit comment with link and link text with suffix
18027 I like the [[Main Page|best page]]s a lot
18029 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18033 Edit comment with section link (non-local, eg in history list)
18035 comment title=[[Main Page]]
18037 /* External links */ removed bogus entries
18039 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18043 Edit comment with section link and text before it (non-local, eg in history list)
18045 comment title=[[Main Page]]
18047 pre-comment text /* External links */ removed bogus entries
18049 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>
18053 Edit comment with section link (local, eg in diff view)
18055 comment local title=[[Main Page]]
18057 /* External links */ removed bogus entries
18059 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18063 Edit comment with subpage link (bug 14080)
18067 title=[[Subpage test]]
18069 Poked at a [[/subpage]] here...
18071 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18075 Edit comment with subpage link and link text (bug 14080)
18079 title=[[Subpage test]]
18081 Poked at a [[/subpage|neat little page]] here...
18083 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18087 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18090 title=[[Subpage test]]
18092 Poked at a [[/subpage]] here...
18094 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18098 Edit comment with bare anchor link (local, as on diff)
18102 title=[[Main Page]]
18106 <a href="#section">#section</a>
18110 Edit comment with bare anchor link (non-local, as on history)
18113 title=[[Main Page]]
18117 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18121 Anchor starting with underscore
18125 <p><a href="#_ref">One</a>
18130 Id starting with underscore
18132 <div id="_ref"></div>
18134 <div id="_ref"></div>
18139 Space normalisation on autocomment (bug 22784)
18142 title=[[Main Page]]
18144 /* __hello__world__ */
18146 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18150 percent-encoding and + signs in comments (Bug 26410)
18154 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18156 <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>
18159 # FIXME: Omitting the php sections here because of differences in the local and
18160 # jenkins output. But, more importantly, the Bad.jpg isn't being stripped,
18161 # which seems to be a problem with the testing infrastructure.
18163 Bad images - basic functionality
18167 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[File:Bad.jpg]]","optList":[]}'/>
18170 # FIXME: Same reasoning as above. The expected php is:
18175 Bad images - bug 16039: text after bad image disappears
18182 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[File:Bad.jpg]]","optList":[]}'/>
18187 Verify that displaytitle works (bug #22501) no displaytitle
18191 wgAllowDisplayTitle=true
18192 wgRestrictDisplayTitle=false
18194 this is not the the title
18197 <p>this is not the the title
18202 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18207 wgAllowDisplayTitle=true
18208 wgRestrictDisplayTitle=false
18210 this is not the the title
18211 {{DISPLAYTITLE:whatever}}
18214 <p>this is not the the title
18219 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18224 wgAllowDisplayTitle=true
18225 wgRestrictDisplayTitle=true
18227 this is not the the title
18228 {{DISPLAYTITLE:whatever}}
18231 <p>this is not the the title
18236 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18241 wgAllowDisplayTitle=true
18242 wgRestrictDisplayTitle=true
18244 this is not the the title
18245 {{DISPLAYTITLE:screen}}
18248 <p>this is not the the title
18253 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18258 wgAllowDisplayTitle=false
18260 this is not the the title
18261 {{DISPLAYTITLE:screen}}
18264 <p>this is not the the title
18265 <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>
18270 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18275 wgAllowDisplayTitle=false
18277 this is not the the title
18280 <p>this is not the the title
18285 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18290 wgAllowDisplayTitle=true
18291 wgRestrictDisplayTitle=true
18293 this is not the the title
18294 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18296 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18297 <p>this is not the the title
18302 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18307 wgAllowDisplayTitle=true
18308 wgRestrictDisplayTitle=true
18310 this is not the the title
18311 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18313 <span style="color: red;">s</span>creen
18314 <p>this is not the the title
18319 preload: check <noinclude> and <includeonly>
18323 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18329 preload: check <onlyinclude>
18333 Goodbye <onlyinclude>Hello world</onlyinclude>
18339 preload: can pass tags through if we want to
18343 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18345 <includeonly>Hello world</includeonly>
18349 preload: check that it doesn't try to do tricks
18353 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18355 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18359 Play a bit with r67090 and bug 3158
18361 <div style="width:50% !important"> </div>
18362 <div style="width:50% !important"> </div>
18363 <div style="width:50% !important"> </div>
18364 <div style="border : solid;"> </div>
18366 <div style="width:50% !important"> </div>
18367 <div style="width:50% !important"> </div>
18368 <div style="width:50% !important"> </div>
18369 <div style="border : solid;"> </div>
18372 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18373 <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>
18374 <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>
18375 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18380 HTML5 data attributes
18382 <span data-foo="bar">Baz</span>
18383 <p data-abc-def_hij="">Quuz</p>
18385 <p><span data-foo="bar">Baz</span>
18387 <p data-abc-def_hij="">Quuz</p>
18392 percent-encoding and + signs in internal links (Bug 26410)
18394 [[User:+%]] [[Page+title%]]
18395 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18396 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
18397 [[%33%45]] [[%33%45+]]
18399 <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>
18400 <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>
18401 <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>
18402 <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>
18407 Special characters in embedded file links (bug 27679)
18409 [[File:Contains & ampersand.jpg]]
18410 [[File:Does not exist.jpg|Title with & ampersand]]
18412 <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>
18413 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18419 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18421 Text's been normalized?
18423 <p>Text's been normalized?
18428 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18430 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18432 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18437 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18439 [http://www.example.org/ ideograms]
18441 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18446 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18448 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18450 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18474 Bug 31098 Template which includes system messages which includes the template
18478 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18479 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18484 Bug31490 Turkish: ucfirst 'blah'
18495 Bug31490 Turkish: ucfirst 'ix'
18506 Bug31490 Turkish: lcfirst 'BLAH'
18517 Bug31490 Turkish: ucfırst (with a dotless i)
18523 <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>
18528 Bug31490 ucfırst (with a dotless i) with English language
18534 <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>
18539 Bug 26375: TOC with italics
18541 title=[[Main Page]]
18544 == ''Lost'' episodes ==
18546 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18548 <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>
18552 <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>
18557 Bug 26375: TOC with bold
18559 title=[[Main Page]]
18562 == '''should be bold''' then normal text ==
18564 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18566 <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>
18570 <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>
18575 Bug 33845: Headings become cursive in TOC when they contain an image
18577 title=[[Main Page]]
18580 == Image [[Image:foobar.jpg]] ==
18582 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18584 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
18588 <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>
18593 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
18595 title=[[Main Page]]
18598 == <blockquote>Quote</blockquote> ==
18600 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18602 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18606 <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>
18609 <div id="toc" class="toc">
18610 <div id="toctitle">
18614 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18617 <h2><span class="mw-headline" id="Quote"></span></h2>
18619 <p><span class="mw-headline" id="Quote">Quote</span></p>
18621 <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>
18625 Unclosed tags in TOC
18627 title=[[Main Page]]
18631 <small>Hanc marginis exiguitas non caperet.</small>
18634 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18636 <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>
18640 <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>
18641 <p><small>Hanc marginis exiguitas non caperet.</small>
18647 Multiple tags in TOC
18650 == <i>Foo</i> <b>Bar</b> ==
18652 == <i>Foo</i> <blockquote>Bar</blockquote> ==
18654 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18656 <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>
18657 <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>
18661 <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>
18662 <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>
18665 <div id="toc" class="toc">
18666 <div id="toctitle">
18670 <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>
18671 <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>
18674 <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>
18675 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
18677 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
18679 <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>
18683 Tags with parameters in TOC
18686 == <sup class="in-h2">Hello</sup> ==
18688 == <sup class="a > b">Evilbye</sup> ==
18690 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18692 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
18693 <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>
18697 <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>
18698 <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>
18703 span tags with directionality in TOC
18706 == <span dir="ltr">C++</span> ==
18708 == <span dir="rtl">זבנג!</span> ==
18710 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
18712 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
18714 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
18716 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18718 <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>
18719 <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>
18720 <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>
18721 <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>
18722 <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>
18726 <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>
18727 <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>
18728 <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>
18729 <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>
18730 <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>
18737 == {{int:headline_sample}} ==
18741 Bug 32057: Title needed when expanding <h> nodes.
18743 title=[[Main Page]]
18747 <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>
18752 Strip marker in urlencode
18754 {{urlencode:x<nowiki/>y}}
18755 {{urlencode:x<nowiki/>y|wiki}}
18756 {{urlencode:x<nowiki/>y|path}}
18783 Strip marker in formatNum
18785 {{formatnum:1<nowiki/>2}}
18786 {{formatnum:1<nowiki/>2|R}}
18794 Check noCommafy in formatNum
18798 {{formatnum:123456.78}}
18799 {{formatnum:123456.78|NOSEP}}
18807 Wrong option for formatNum (bug 56199)
18809 {{formatnum:1,234.56|Random}}
18810 {{formatnum:1,234.56|EVERYTHING}}
18811 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
18820 Strip marker in grammar
18824 {{grammar:elative|foo<nowiki/>bar}}
18831 Strip marker in padleft
18833 {{padleft:|2|x<nowiki/>y}}
18840 Strip marker in padright
18842 {{padright:|2|x<nowiki/>y}}
18849 Strip marker in anchorencode
18851 {{anchorencode:x<nowiki/>y}}
18858 nowiki inside link inside heading (bug 18295)
18860 ==[[foo|x<nowiki>y</nowiki>z]]==
18862 <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>
18867 new support for bdi element (bug 31817)
18869 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18871 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18876 Ignore pipe between table row attributes
18880 |- id=foo | style='color: red'
18888 <tr id="foo" style="color: red">
18895 Gallery override link with WikiLink (bug 34852)
18898 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
18901 <ul class="gallery mw-gallery-traditional">
18902 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18903 <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>
18904 <div class="gallerytext">
18914 Gallery override link with absolute external link (bug 34852)
18917 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
18920 <ul class="gallery mw-gallery-traditional">
18921 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18922 <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>
18923 <div class="gallerytext">
18933 Gallery override link with malicious javascript (bug 34852)
18936 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
18939 <ul class="gallery mw-gallery-traditional">
18940 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18941 <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>
18942 <div class="gallerytext">
18952 Gallery with invalid title as link (bug 43964)
18955 File:foobar.jpg|link=<
18958 <ul class="gallery mw-gallery-traditional">
18959 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18960 <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>
18961 <div class="gallerytext">
18969 Language parser function
18978 Padleft and padright as substr
18980 {{padleft:|3|abcde}}
18981 {{padright:|3|abcde}}
18989 Special parser function
18991 {{#special:RandomPage}}
18992 {{#special:BaDtItLe}}
18993 {{#special:Foobar}}
19002 Bug 34939 - Case insensitive link parsing ([HttP://])
19004 [HttP://MediaWiki.Org/]
19006 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19009 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19013 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19015 [HttP://MediaWiki.Org/ MediaWiki]
19017 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19022 Bug 34939 - Case insensitive link parsing (HttP://)
19024 HttP://MediaWiki.Org/
19026 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19029 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19047 <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>
19048 <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>
19049 <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>
19050 <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>
19051 <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>
19057 ### Parsoid-specific tests
19058 ### Parsoid-PHP parser incompatibilities
19061 1. SOL-sensitive wikitext tokens as template-args
19063 parsoid=wt2html,wt2wt
19069 <span about="#mwt1" typeof="mw:Transclusion">
19070 </span><ul about="#mwt1"><li>a</li>
19072 <span about="#mwt2" typeof="mw:Transclusion">
19073 </span><ol about="#mwt2"><li>a</li>
19075 <span about="#mwt3" typeof="mw:Transclusion">
19076 </span><dl about="#mwt3"><dd>a</dd>
19080 #### -----------------------------------------------------------------
19081 #### Parsoid-specific functionality tests
19082 #### -----------------------------------------------------------------
19084 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19085 # We know wt2wt will fail, but we expect selser to pass.
19086 # Due to the nature of our testing, wt2wt and selser tests will enter the
19087 # blacklist and we'll catch selser regressions based on changes to the
19088 # blacklist entries for selser tests.
19090 1. Bad treebuilder fixup of formatting elt is cleaned up
19092 parsoid=wt2html,wt2wt
19097 [[Image:Foobar.jpg|right|Test]]
19104 <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>
19111 2. Bad treebuilder fixup of formatting elt is cleaned up
19113 parsoid=wt2html,wt2wt
19115 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19117 <small>[[Image:Foobar.jpg|right|300px]]</small>
19120 <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>
19122 <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>
19125 #### ----------------------------------------------------------------
19126 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19127 #### tags. Parsoid's output for these tags differs from that of the
19129 #### ----------------------------------------------------------------
19132 Ref: 1. ref-location should be replaced with an index span
19137 B <ref name="x">foo</ref>
19140 <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>
19141 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>
19142 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>
19146 Ref: 2. ref-tags with identical names should all get the same index
19150 A <ref name="x">foo</ref>
19153 <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>
19154 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>
19158 Ref: 3. spaces in ref-names should be ignored
19162 A <ref name="x">foo</ref>
19163 B <ref name=" x " />
19166 <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>
19167 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>
19168 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>
19171 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19173 Ref: 4. 'constructor' should be accepted as a valid ref-name
19177 A <ref name="constructor">foo</ref>
19179 <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>
19183 Ref: 5. body should accept generic wikitext
19188 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19193 <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>
19195 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19196 <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>
19202 Ref: 6. indent-pres should not be output in ref-body
19214 <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>
19216 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19217 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19225 Ref: 7. No p-wrapping in ref-body
19244 <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>
19246 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19247 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19262 Ref: 8. transclusion wikitext has lower precedence
19266 A <ref> foo {{echo|</ref> B C}}
19270 <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>
19271 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19272 <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>
19277 Ref: 9. unclosed comments should not leak out of ref-body
19281 A <ref> foo <!--</ref> B C
19284 <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>
19285 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19286 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li>
19291 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19295 A <ref> <b> foo </ref> B C
19299 <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>
19302 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19303 <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>
19308 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19315 <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
19316 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>
19320 Ref: 12. ref-tags act as trailing newline migration barrier
19324 <!--the newline at the end of this line moves out of the p-tag-->a
19326 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19331 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19334 <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>
19335 <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>
19341 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19349 <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
19350 <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>
19354 Ref: 14. A nested ref-tag should be emitted as plain text
19358 <ref>foo <ref>bar</ref> baz</ref>
19362 <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>
19364 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19365 <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>
19370 Ref: 15. ref-tags with identical names should get identical indexes
19374 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19375 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19379 <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>
19380 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>
19382 <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>
19386 ## We don't bother wt2wt-ing non-standard whitespace
19388 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19396 <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>
19398 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19399 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19403 References: 1. references tag without any refs should be handled properly
19409 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19413 References: 2. references tag with group only outputs references from that group
19417 A <ref group="a">foo</ref>
19418 B <ref group="b">bar</ref>
19420 <references group="a" />
19422 <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>
19423 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>
19425 <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>
19430 References: 3. ref list should be cleared after processing references
19442 <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>
19444 <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>
19447 <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>
19449 <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>
19454 References: 4. only referenced group should be cleared after processing references
19458 A <ref group="a">afoo</ref>
19461 <references group="a" />
19467 <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>
19468 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>
19470 <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>
19473 <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>
19475 <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>
19480 References: 5. ref tags in references should be processed while ignoring all other content
19485 B <ref name="b">bar</ref>
19488 <ref name="a">foo</ref>
19489 This should just get lost.
19492 <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>
19493 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>
19496 <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>
19501 References: 6. <references /> from a transclusion
19505 <ref>Foo</ref> {{echo|<references />}}
19507 <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>
19511 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
19515 A <ref>foo bar for a</ref>
19516 B <ref group="X" name="b" />
19520 <references group="X">
19521 <ref name="b">foo</ref>
19524 <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>
19525 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>
19527 <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>
19529 <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>
19533 Entities in ref name
19537 <ref name="test & me">hi</ref>
19539 <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>
19542 # This test is wt2html only because we're permitting the serializer to produce
19543 # dirty diffs, normalizing the unclosed references to the self-closed version.
19545 Generate references for unclosed references tag
19553 <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>
19556 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19557 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19561 New reference serializes on its own line
19563 parsoid=wt2wt,html2wt
19568 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
19571 #--------- Test stripping of empty nodes in template content ----------
19573 Empty LI and TR nodes should be stripped from template content
19578 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
19582 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
19595 Empty LI and TR nodes should not be stripped from top-level content
19622 Empty TR nodes should not be stripped if they have any attributes set
19624 {{EmptyTRWithHTMLAttrTest}}
19626 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
19627 <tr align="center"></tr>
19628 <tr><td>foo</td></tr>
19629 <tr align="center"></tr>
19630 <tr><td>bar</td></tr>
19634 #### ----------------------------------------------------------------
19635 #### The following section of tests are primarily to test
19636 #### wikitext escaping capabilities of Parsoid. Given that
19637 #### escaping can be done any number of ways, the wikitext (input)
19638 #### is always adjusted to reflect how Parsoid adds nowiki
19641 #### We are marking several tests as parsoid-only since the
19642 #### HTML in the result section is different from what the
19643 #### PHP parser generates for it.
19644 #### ----------------------------------------------------------------
19647 #### --------------- Headings ---------------
19649 #### 1. Nested inside html <h1>=foo=</h1>
19650 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
19651 #### 3. Nested inside html with wikitext split by html tags
19652 #### 4. No escape needed
19653 #### 5. Empty headings <h1></h1>
19654 #### 6. Heading chars in SOL context
19655 #### ----------------------------------------
19657 Headings: 0. Unnested
19661 <nowiki>=foo=</nowiki>
19663 <nowiki> =foo= </nowiki>
19665 <nowiki>=foo=</nowiki>
19667 =foo''a''<nowiki>=</nowiki>
19669 <p><span typeof="mw:Nowiki">=foo=</span></p>
19671 <p><span typeof="mw:Nowiki"> =foo= </span>
19673 <span typeof="mw:Nowiki">=foo=</span></p>
19675 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
19678 # New headings and existing headings are handled differently
19680 Headings: 1. Nested inside html
19690 =<nowiki>=foo=</nowiki>=
19691 ==<nowiki>=foo=</nowiki>==
19692 ===<nowiki>=foo=</nowiki>===
19693 ====<nowiki>=foo=</nowiki>====
19694 =====<nowiki>=foo=</nowiki>=====
19695 ======<nowiki>=foo=</nowiki>======
19702 <h1 data-parsoid=''>=foo=</h1>
19703 <h2 data-parsoid=''>=foo=</h2>
19704 <h3 data-parsoid=''>=foo=</h3>
19705 <h4 data-parsoid=''>=foo=</h4>
19706 <h5 data-parsoid=''>=foo=</h5>
19707 <h6 data-parsoid=''>=foo=</h6>
19711 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
19716 <nowiki>*</nowiki>bar
19722 <nowiki>=bar=</nowiki>
19730 Headings: 3. Nested inside html with wikitext split by html tags
19734 = ='''bold'''<nowiki>foo=</nowiki> =
19736 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
19740 Headings: 4a. No escaping needed (testing just h1 and h2)
19758 = <nowiki>=</nowiki> =
19766 <h1><i>=</i>foo=</h1>
19767 <h1><span typeof="mw:Nowiki">=</span></h1>
19771 Headings: 4b. No escaping needed (inside p-tags)
19786 Headings: 5. Empty headings
19798 =====<nowiki/>=====
19800 ======<nowiki/>======
19811 Headings: 6a. Heading chars in SOL context (with trailing spaces)
19815 <nowiki>=a=</nowiki>
19817 <nowiki>=a=</nowiki>
19819 <nowiki>=a=</nowiki>
19821 <nowiki>=a=</nowiki>
19830 Headings: 6b. Heading chars in SOL context (with trailing newlines)
19858 Headings: 6c. Heading chars in SOL context (leading newline break)
19863 <nowiki>=b=</nowiki>
19870 Headings: 6d. Heading chars in SOL context (with interspersed comments)
19874 <!--c0--><nowiki>=a=</nowiki>
19876 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
19878 <p><!--c0-->=a=</p>
19879 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
19883 Headings: 6d. Heading chars in SOL context (No escaping needed)
19892 #### --------------- Lists ---------------
19893 #### 0. Outside nests (*foo, etc.)
19894 #### 1. Nested inside html <ul><li>*foo</li></ul>
19895 #### 2. Inside definition lists
19896 #### 3. Only bullets at start should be escaped
19897 #### 4. No escapes needed
19898 #### 5. No unnecessary escapes
19899 #### 6. Escape bullets in SOL position
19900 #### 7. Escape bullets in a multi-line context
19901 #### ----------------------------------------
19904 Lists: 0. Outside nests
19906 <nowiki>*</nowiki>foo
19908 <nowiki>#</nowiki>foo
19910 <nowiki>;Foo:</nowiki>bar
19919 Lists: 1. Nested inside html
19921 *<nowiki>*foo</nowiki>
19923 *<nowiki>#foo</nowiki>
19925 *<nowiki>:foo</nowiki>
19927 *<nowiki>;foo</nowiki>
19929 #<nowiki>*foo</nowiki>
19931 #<nowiki>#foo</nowiki>
19933 #<nowiki>:foo</nowiki>
19935 #<nowiki>;foo</nowiki>
19937 <ul><li>*foo</li></ul>
19938 <ul><li>#foo</li></ul>
19939 <ul><li>:foo</li></ul>
19940 <ul><li>;foo</li></ul>
19941 <ol><li>*foo</li></ol>
19942 <ol><li>#foo</li></ol>
19943 <ol><li>:foo</li></ol>
19944 <ol><li>;foo</li></ol>
19949 Lists: 2. Inside definition lists
19951 ;<nowiki>;foo</nowiki>
19953 ;<nowiki>:foo</nowiki>
19955 ;<nowiki>:foo</nowiki>
19958 :<nowiki>:foo</nowiki>
19960 <dl><dt>;foo</dt></dl>
19961 <dl><dt>:foo</dt></dl>
19964 <dl><dd>:foo</dd></dl>
19969 Lists: 3. Only bullets at start of text should be escaped
19971 *<nowiki>*foo*bar</nowiki>
19973 *<nowiki>*foo</nowiki>''it''*bar
19975 <ul><li>*foo*bar</li></ul>
19976 <ul><li>*foo<i>it</i>*bar</li></ul>
19981 Lists: 4. No escapes needed
20002 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20006 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20012 Lists: 5. No unnecessary escapes
20014 * bar <span><nowiki>[[foo]]</nowiki></span>
20016 *=bar <span><nowiki>[[foo]]</nowiki></span>
20018 *[[bar <span><nowiki>[[foo]]</nowiki></span>
20020 *]]bar <span><nowiki>[[foo]]</nowiki></span>
20022 *=bar <span>foo]]</span>=
20026 <ul><li> bar <span>[[foo]]</span></li></ul>
20027 <ul><li>=bar <span>[[foo]]</span></li></ul>
20028 <ul><li>[[bar <span>[[foo]]</span></li></ul>
20029 <ul><li>]]bar <span>[[foo]]</span></li></ul>
20030 <ul><li>=bar <span>foo]]</span>=</li></ul>
20031 <ul><li> <s></s>: a</li></ul>
20036 Lists: 6. Escape bullets in SOL position
20040 <!--cmt--><nowiki>*foo</nowiki>
20042 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
20046 Lists: 7. Escape bullets in a multi-line context
20049 <nowiki>*</nowiki>b
20056 #### --------------- HRs ---------------
20057 #### 1. Single line
20058 #### -----------------------------------
20061 HRs: 1. Single line
20065 ----<nowiki>----</nowiki>
20069 <hr><p><span typeof="mw:Nowiki">----</span></p>
20074 #### --------------- Tables ---------------
20075 #### 1a. Simple example
20076 #### 1b. No escaping needed (!foo)
20077 #### 1c. No escaping needed (|foo)
20078 #### 1d. No escaping needed (|}foo)
20080 #### 2a. Nested in td (<td>foo|bar</td>)
20081 #### 2b. Nested in td (<td>foo||bar</td>)
20082 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20084 #### 3a. Nested in th (<th>foo!bar</th>)
20085 #### 3b. Nested in th (<th>foo!!bar</th>)
20086 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20090 #### 4c. No escaping needed
20091 #### --------------------------------------
20094 Tables: 1a. Simple example
20105 Tables: 1b. No escaping needed
20114 Tables: 1c. No escaping needed
20123 Tables: 1d. No escaping needed
20132 Tables: 2a. Nested in td
20137 |<nowiki>foo|bar</nowiki>
20139 |x<div><nowiki>a|b</nowiki></div>
20143 <td>foo|bar</td></tr>
20144 <tr><td>x<div>a|b</div></td>
20149 Tables: 2b. Nested in td
20154 |<nowiki>foo||bar</nowiki>
20155 |''it''<nowiki>foo||bar</nowiki>
20159 <td><span typeof="mw:Nowiki">foo||bar</span></td>
20160 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
20164 Tables: 2c. Nested in td -- no escaping needed
20172 <table><tbody><tr><td>foo!!bar
20173 </td></tr></tbody></table>
20178 Tables: 3a. Nested in th
20186 <table><tbody><tr><th>foo!bar
20187 </th></tr></tbody></table>
20192 Tables: 3b. Nested in th
20197 !<nowiki>foo!!bar</nowiki>
20201 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
20206 Tables: 3c. Nested in th -- no escaping needed
20211 !<nowiki>foo||bar</nowiki>
20215 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
20219 Tables: 4a. Escape -
20226 |<nowiki>-bar</nowiki>
20230 <tr><th>-bar</th></tr>
20232 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
20236 Tables: 4b. Escape +
20243 |<nowiki>+bar</nowiki>
20247 <tr><th>+bar</th></tr>
20249 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
20253 Tables: 4c. No escaping needed
20274 <tr><td>foo-bar</td><td>foo+bar</td></tr>
20275 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
20281 <div>a|b</div></td>
20286 Tables: 4d. No escaping needed
20297 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
20298 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20299 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
20304 Tables: Digest broken attributes on table and tr tag
20320 #### --------------- Links ----------------
20321 #### 1. Quote marks in link text
20322 #### 2. Wikilinks: Escapes needed
20323 #### 3. Wikilinks: No escapes needed
20324 #### 4. Extlinks: Escapes needed
20325 #### 5. Extlinks: No escapes needed
20326 #### --------------------------------------
20328 Links 1. Quote marks in link text
20332 [[Foo|Foo<nowiki>''boo''</nowiki>]]
20334 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
20338 Links 2. WikiLinks: Escapes needed
20343 [[Foo|<nowiki>Foobar]</nowiki>]]
20344 [[Foo|x [Foobar] x]]
20345 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
20346 [[Foo|<nowiki>[[Bar]]</nowiki>]]
20347 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
20348 [[Foo|<nowiki>|Bar</nowiki>]]
20349 [[Foo|<nowiki>]]bar</nowiki>]]
20350 [[Foo|<nowiki>[[bar</nowiki>]]
20351 [[Foo|<nowiki>x [[ y</nowiki>]]
20352 [[Foo|<nowiki>x ]] y</nowiki>]]
20353 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
20355 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
20356 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
20357 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
20358 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
20359 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
20360 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
20361 <a href="Foo" rel="mw:WikiLink">|Bar</a>
20362 <a href="Foo" rel="mw:WikiLink">]]bar</a>
20363 <a href="Foo" rel="mw:WikiLink">[[bar</a>
20364 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
20365 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
20366 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
20370 Links 3. WikiLinks: No escapes needed
20377 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
20378 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
20382 Links 4. ExtLinks: Escapes needed
20386 [http://google.com <nowiki>[google]</nowiki>]
20387 [http://google.com <nowiki>google]</nowiki>]
20389 <nowiki>[http://google.com]</nowiki>
20391 <nowiki>[http://google.com google]</nowiki>
20394 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
20395 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
20396 <p>[http://google.com]</p>
20397 <p>[http://google.com google]</p>
20401 Links 5. ExtLinks: No escapes needed
20405 [http://google.com [google]
20407 <a href="http://google.com" rel="mw:ExtLink">[google</a>
20411 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
20413 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
20414 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
20415 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
20416 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
20417 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
20418 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
20419 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20420 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
20421 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20422 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
20423 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
20424 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
20425 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
20428 x<nowiki/>http://example.com<nowiki/>y
20429 http://example.com<nowiki/>?x
20430 http://example.com<nowiki/>&x
20431 http://example.com<nowiki/>'x
20432 http://example.com<nowiki/>,x
20433 http://example.com<nowiki/>.x
20434 http://example.com<nowiki/>;x
20435 http://example.com<nowiki/>:x
20436 http://example.com<nowiki/>;x
20437 http://example.com<nowiki/>!x
20438 http://example.com<nowiki/>=x
20439 http://example.com<nowiki/>(x)
20440 http://example.com(x<nowiki/>)
20444 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20447 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
20449 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
20450 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
20451 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
20452 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
20453 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
20459 "http://example.com"
20460 (http://example.com)
20461 (http://example.com) foo
20462 http://example.com,
20463 http://example.com, foo
20466 ## Parsoid currently fails wt2html on this one!
20468 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20470 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
20472 http://example.com.,;:!?
20476 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
20478 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
20484 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
20486 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20487 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20488 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
20489 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
20499 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
20501 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
20507 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
20509 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20510 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20511 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
20512 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
20522 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
20524 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
20525 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
20526 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
20529 ISBN 1234567890<nowiki/>1
20530 ISBN 1234567890<nowiki/>x
20531 ISBN 1234567890<nowiki/>b
20535 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
20537 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
20542 #### --------------- Quotes ---------------
20543 #### 1. Quotes inside <b> and <i>
20544 #### 2. Link fragments separated by <i> and <b> tags
20545 #### 3. Link fragments inside <i> and <b>
20546 #### 4. No escaping needed
20547 #### --------------------------------------
20549 1. Quotes inside <b> and <i>
20551 parsoid=html2wt,wt2wt
20553 ''<nowiki>'foo'</nowiki>''
20554 ''<nowiki>''foo''</nowiki>''
20555 ''<nowiki>'''foo'''</nowiki>''
20557 '''<nowiki>'foo'</nowiki>'''
20558 '''<nowiki>''foo''</nowiki>'''
20559 '''<nowiki>'''foo'''</nowiki>'''
20560 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
20561 '''foo'''<nowiki/>'s
20564 '<nowiki/>''foo''<nowiki/>'
20566 '''foo'''<nowiki/>'
20567 '<nowiki/>'''foo'''<nowiki/>'
20568 ''fools'<span> errand</span>''
20569 ''<span>fool</span>'s errand''
20578 <b>foo'<i>bar'</i>baz</b>
20586 <i>fools'<span> errand</span></i>
20587 <i><span>fool</span>'s errand</i>
20591 2. Link fragments separated by <i> and <b> tags
20593 [[''foo''<nowiki>hello]]</nowiki>
20595 [['''foo'''<nowiki>hello]]</nowiki>
20597 <p>[[<i>foo</i>hello]]
20598 </p><p>[[<b>foo</b>hello]]
20602 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
20603 # this is one of the shortcomings of this format
20605 3. Link fragments inside <i> and <b>
20607 ''[[foo''<nowiki>]]</nowiki>
20609 '''[[foo'''<nowiki>]]</nowiki>
20612 </p><p><b>[[foo</b>]]
20617 4. No escaping needed
20619 '<span>''bar''</span>'
20620 '<span>'''bar'''</span>'
20622 <p>'<span><i>bar</i></span>'
20623 '<span><b>bar</b></span>'
20627 #### ----------- Paragraphs ---------------
20628 #### 1. No unnecessary escapes
20629 #### --------------------------------------
20632 1. No unnecessary escapes
20634 bar <span><nowiki>[[foo]]</nowiki></span>
20636 =bar <span><nowiki>[[foo]]</nowiki></span>
20638 [[bar <span><nowiki>[[foo]]</nowiki></span>
20640 ]]bar <span><nowiki>[[foo]]</nowiki></span>
20642 =bar <span>foo]]</span><nowiki>=</nowiki>
20644 <p>bar <span>[[foo]]</span>
20645 </p><p>=bar <span>[[foo]]</span>
20646 </p><p>[[bar <span>[[foo]]</span>
20647 </p><p>]]bar <span>[[foo]]</span>
20648 </p><p>=bar <span>foo]]</span>=
20652 #### ----------------------- PRE --------------------------
20653 #### 1. Leading whitespace in SOL context should be escaped
20654 #### ------------------------------------------------------
20656 1. Leading whitespace in SOL context should be escaped
20660 <nowiki> </nowiki>a
20662 <nowiki> </nowiki> a
20664 <nowiki> </nowiki>a(tab)
20666 <nowiki> </nowiki> a
20668 <nowiki> </nowiki> a
20671 <nowiki> </nowiki>b
20674 <nowiki> </nowiki>b
20677 <nowiki> </nowiki> b
20683 <p><!--cmt--> a</p>
20693 2. Leading whitespace in non-indent-pre contexts should not be escaped
20700 <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>
20704 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
20723 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
20727 [[File:Foobar.jpg|thumb|caption]]
20730 <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>
20734 5. Nowiki escaping should account for indent-pres
20743 #### --------------- Behavior Switches --------------------
20745 1. Valid behavior switches should be escaped
20749 <nowiki>__TOC__</nowiki>
20750 ''<nowiki>__TOC__</nowiki>''
20757 2. Invalid behavior switches should not be escaped
20768 #### --------------- HTML tags ---------------
20771 #### 3. multi-line html tag
20772 #### 4. extension tags
20773 #### -----------------------------------------
20779 <a href="http://google.com">google</a>
20781 <a href="http://google.com">google</a>
20787 <nowiki><div>foo</div>
20788 <div style="color:red">foo</div></nowiki>
20790 <p><div>foo</div>
20791 <div style="color:red">foo</div>
20796 3. multi-line html tag
20811 <nowiki><ref>foo</ref></nowiki>
20813 <nowiki><ref>bar</nowiki>
20815 baz<nowiki></ref></nowiki>
20817 <p><ref>foo</ref>
20818 </p><p><ref>bar
20819 </p><p>baz</ref>
20823 #### --------------- Others ---------------
20827 <nowiki>foo</nowiki>
20829 <p><nowiki>foo</nowiki>
20833 ## The quote-char in the input is necessary for triggering the bug
20835 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
20837 parsoid=wt2wt,html2wt
20846 Tag-like HTML structures are passed through as text
20868 </p><p>1<d e>f
20873 # This was a bug in the PHP parser (see bug 17663 and its dups,
20874 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
20876 Tag names followed by punctuation should not be recognized as tags
20880 <p><s.ome> text
20885 HTML tag with necessary entities in attributes
20887 <span title="&amp;">foo</span>
20889 <p><span title="&amp;">foo</span>
20894 HTML tag with 'unnecessary' entity encoding in attributes
20896 <span title="&">foo</span>
20898 <p><span title="&">foo</span>
20903 HTML tag with broken attribute value quoting
20905 <span title="Hello world>Foo</span>
20907 <p><span>Foo</span>
20910 <p><span title="Hello world">Foo</span>
20915 Parsoid-only: HTML tag with broken attribute value quoting
20919 <span title="Hello world>Foo</span>
20921 <p><span title="Hello world">Foo</span>
20926 Table with broken attribute value quoting
20929 | title="Hello world|Foo
20940 <td title="Hello world">Foo
20946 Table with broken attribute value quoting on consecutive lines
20949 | title="Hello world|Foo
20950 | style="color:red|Bar
20963 <td title="Hello world">Foo
20964 </td><td style="color: red">Bar
20965 </td></tr></tbody></table>
20970 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
20980 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
20990 Accept empty td cell attribute
20993 | align="center" | foo || |
20998 <td align="center"> foo </td>
21005 Non-empty attributes in th-cells
21008 ! Foo !! style="color: red" | Bar
21014 <th style="color: red"> Bar
21020 Accept empty attributes in th-cells
21035 Empty table rows go away
21056 ### Parsoid-centric tests for testing RTing of inter-element separators
21057 ### Edge cases not tested by existing parser tests and specific to
21058 ### Parsoid-specific serialization strategies.
21062 RT-ed inter-element separators should be valid separators
21074 # Parsoid-only since PHP parser relies on Tidy for correct output
21076 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
21090 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
21091 <p>bar</p></small></td></tr>
21095 <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>
21100 Empty TD followed by TD with tpl-generated attribute
21105 |{{echo|style='color:red'}}|foo
21119 Indented table with an empty td
21138 Indented block & table
21152 <div data-parsoid='{"stx":"html"}'>foo</div>
21154 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
21159 Indent and comment before table row
21174 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
21175 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
21179 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
21181 Empty TR followed by a template-generated TR
21187 {{echo|<tr><td>foo</td></tr>}}
21193 <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}}]}'>
21198 ## PHP and parsoid output differ for this, and since this is primarily
21199 ## for testing Parsoid's serializer, marking this Parsoid only
21201 Empty TR followed by mixed-ws-comment line should RT correctly
21217 <!--c--> </tr><!--d-->
21223 Multi-line image caption generated by templates with/without trailing newlines
21227 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
21228 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
21230 <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>
21231 <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>
21236 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
21240 <includeonly>foo</includeonly>
21247 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
21249 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
21252 ## PHP emits broken html for this, and since this is primarily
21253 ## a Parsoid serializer test, marking this Parsoid only
21255 Improperly nested inline or quotes tags with whitespace in between
21259 <span> <s>x</span> </s>
21262 <p><span> <s>x</s></span><s> </s>
21263 <b> <i>x</i></b><i> </i>
21268 Encapsulate protected attributes from wt
21272 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
21274 <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>
21278 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
21279 ## Having nested or stray pre tags results in the attempt to add duplicates,
21280 ## causing an assertion fail. This test tries to prevent that situation.
21282 Ensure ParagraphWrapper can deal with stray closing pre tags
21292 1. Ensure fostered text content is wrapped in element nodes
21296 <table>hi</table><table>ho</table>
21305 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
21307 parsoid=wt2html,wt2wt
21316 <tbody><tr><td> a</td></tr>
21321 Encapsulation properly handles null DSR information from foster box
21323 parsoid=wt2html,wt2wt
21325 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
21327 <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>
21331 1. Encapsulate foster-parented transclusion content
21333 parsoid=wt2wt,wt2html
21335 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
21337 <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>
21347 2. Encapsulate foster-parented transclusion content
21349 parsoid=wt2wt,wt2html
21351 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
21353 <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>
21364 3. Encapsulate foster-parented transclusion content
21366 parsoid=wt2wt,wt2html
21368 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21370 <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>"]}">
21383 4. Encapsulate foster-parented transclusion content
21385 parsoid=wt2wt,wt2html
21387 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21389 <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>"]}">
21402 5. Encapsulate foster-parented transclusion content
21404 parsoid=wt2wt,wt2html
21406 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
21408 <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>
21423 6. Encapsulate foster-parented transclusion content
21425 parsoid=wt2wt,wt2html
21427 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
21429 <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>
21445 7. Encapsulate foster-parented transclusion content
21447 parsoid=wt2wt,wt2html
21449 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
21451 <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>
21462 8. Encapsulate foster-parented transclusion content
21464 parsoid=wt2wt,wt2html
21467 }}{|{{echo|style='color:red'}}
21472 <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>
21482 9. Encapsulate foster-parented transclusion content
21484 parsoid=wt2wt,wt2html
21486 <table>{{echo|hi</table>hello}}
21488 <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>
21492 Table in fosterable position
21494 parsoid=wt2html,wt2wt
21503 <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">
21505 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
21511 # Parsoid only for bug 64747
21513 Properly encapsulate empty-content transclusions in fosterable positions
21521 <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>"}'>
21527 Support <object> element with .data attribute
21531 <object data="test.swf"></object>
21533 <object data="test.swf"></object>
21536 # -----------------------------------------------------------------
21537 # The following section of tests are primarily to spec requirements
21538 # around serialization of new/edited content.
21540 # All these tests are marked Parsoid html2wt and html2html only
21541 # ----------------------------------------------------------------
21543 # 'mi' is a localinterwiki prefix as well as a language
21545 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
21551 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
21555 Image: Modifying size of an image (1)
21558 "modes": ["wt2wt"],
21560 ["img[height]", "attr", "height", "22"],
21561 ["img[width]", "attr", "width", "200"]
21565 [[Image:Foobar.jpg|230x230px]]
21567 [[Image:Foobar.jpg|200x200px]]
21571 Image: Modifying size of an image (2)
21574 "modes": ["wt2wt"],
21576 ["img[height]", "attr", "height", "100"],
21577 ["img[width]", "attr", "width", "500"]
21581 [[Image:Foobar.jpg|230x230px]]
21583 [[Image:Foobar.jpg|500x500px]]
21586 # Change in size is ignored so long as class='mw-default-size'
21588 Image: Modifying size of an image (3)
21591 "modes": ["wt2wt"],
21593 ["figure[class]", "removeClass", "mw-default-size"],
21594 ["figure img", "attr", "height", "19"],
21595 ["figure img", "attr", "width", "170"]
21599 [[Image:Foobar.jpg|thumb]]
21601 [[Image:Foobar.jpg|thumb|170x170px]]
21605 Image: Modifying alignment of an image (bug 48665)
21608 "modes": ["wt2wt"],
21610 ["figure[class]", "removeClass", "mw-halign-right"],
21611 ["figure[class]", "addClass", "mw-halign-left"]
21615 [[Image:Foobar.jpg|thumb|caption|right]]
21617 [[Image:Foobar.jpg|thumb|caption|left]]
21621 Image: Modifying mw-default-size of an frameless image (bug 62805)
21624 "modes": ["wt2wt"],
21626 ["figure.mw-default-size", "removeClass", "mw-default-size"]
21630 [[Image:Foobar.jpg|frameless|right]]
21632 [[Image:Foobar.jpg|frameless|right|220x220px]]
21636 Image: Modifying valign of an image (bug 49221)
21639 "modes": ["wt2wt"],
21641 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
21642 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
21646 [[File:Foobar.jpg|20px|middle]]
21648 [[File:Foobar.jpg|20px|text-top]]
21652 Image: Modifying alt attribute of an image (bug 56400)
21655 "modes": ["wt2wt"],
21657 ["img[alt]", "attr", "alt", "some alternate edited text"]
21661 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
21663 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
21667 Image: Modifying caption of an image
21670 "modes": ["wt2wt"],
21672 ["figcaption", "text", "new caption"]
21676 [[Image:Foobar.jpg|thumb|original caption]]
21678 [[Image:Foobar.jpg|thumb|new caption]]
21682 Image: empty alt attribute (bug 48924)
21686 [[File:Foobar.jpg|thumb|alt=|bar]]
21688 <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>
21692 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
21697 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
21699 #<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>
21703 Image: Block level image should have \n before and after
21708 [[File:Foobar.jpg|right|thumb|150x150px]]
21711 <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>
21715 Image: New block level image should have \n before and after (existing content)
21720 [[File:Foobar.jpg|right|thumb|150x150px]]
21724 <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>
21729 Image: upright option (parsoid)
21733 [[File:Foobar.jpg|thumb|upright|caption]]
21734 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
21735 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
21737 <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>
21738 <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>
21739 <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>
21743 Image: upright option is ignored on inline and frame images (parsoid)
21747 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
21749 <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>
21753 Image: from basic HTML (1)
21757 <span typeof="mw:Image">
21758 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21761 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21765 Image: from basic HTML (2)
21769 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21771 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21775 Image: from basic HTML (3)
21779 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
21781 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
21785 Image: from basic HTML (4)
21789 <img src="File:Foobar.jpg">
21791 [[File:Foobar.jpg|link=]]
21795 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
21802 <li><p>foo</p></li>
21807 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
21813 <ul> <li>foo</li></ul>
21817 Don't strip leading whitespace when handling indent-pre suppressing tags
21825 '''This is very bold of you!'''
21829 indented cell (no pre-wrapping!)
21836 <tr><td> indented row</td></tr>
21839 <b>This is very bold of you!</b>
21842 indented cell (no pre-wrapping!)
21850 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
21855 <nowiki> </nowiki><span>bar</span>
21858 <nowiki> </nowiki></span>bar2
21861 <nowiki> </nowiki><span>bar</span>
21864 <nowiki> </nowiki><span>foo</span>
21882 Lists: Add space after bullets
21888 * <span> baz</span>
21893 <li><span> baz</span></li>
21898 Lists: Dont insert newlines in a serialized list item.
21905 <ul><li>a<br>b</li><li>c</li></ul>
21909 Headings: Add space before/after == (Bug 51744)
21919 == <span> baz</span> ==
21924 <h2><span> baz</span></h2>
21928 Parsoid: Serialize positional parameters with = in them as named parameter
21934 {{echo|1 = f=oo|2 = bar}}
21936 <!--Orig params with data-parsoid has heuristics for handling = chars-->
21937 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
21938 {{echo|<nowiki>f=oo</nowiki>|bar}}
21940 <p about="#mwt1" typeof="mw:Transclusion"
21941 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
21943 <p about="#mwt1" typeof="mw:Transclusion"
21944 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
21946 <!--Orig params with data-parsoid has heuristics for handling = chars-->
21947 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
21948 <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>
21952 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
21968 <div>a<p>b</p></div>
21977 Substrings resembling wikitext in hrefs should not get nowiki escapes
21983 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
21986 #-----------------------------
21987 # I/B quote minimization tests
21988 #-----------------------------
21991 1. I/B quote minimization: wikitext-only tags should be combined
22011 <p><i>A</i><i>B</i></p>
22012 <p><b>A</b><b>B</b></p>
22013 <p><i>A</i><b><i>B</i></b></p>
22014 <p><b>A</b><i><b>B</b></i></p>
22015 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
22016 <p><i><b>A</b></i><i><b>B</b></i></p>
22017 <p><i><b>A</b></i><b><i>B</i></b></p>
22018 <p><b><i>A</i></b><i><b>B</b></i></p>
22022 2. I/B quote minimization: wikitext and html tags should not be combined
22028 ''A'''''<i>B</i>'''
22030 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
22031 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
22035 3. I/B quote minimization: templated content stops minimization
22039 ''A''{{echo|''B''}}
22041 ''A''{{echo|'''''B'''''}}
22043 <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>
22044 <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>
22048 4. I/B quote minimization: new content should be mimimized with adjacent old content
22058 <p><i>A</i><i>B</i></p>
22059 <p><b>A</b><b>B</b></p>
22060 <p><i>A</i><b><i>B</i></b></p>
22063 #------------------------------------
22064 # End of I/B quote minimization tests
22065 #------------------------------------
22068 Bug 54262: New entities
22074 <span typeof="mw:Entity"> </span>
22077 ## Note that there is no wikitext output for 'unknownproperty' ##
22078 ## Unknown magic words are silently dropped ##
22093 __NOCONTENTCONVERT__
22095 <meta property='mw:PageProp/toc' />
22096 <meta property='mw:PageProp/notoc' />
22097 <meta property='mw:PageProp/forcetoc' />
22098 <meta property='mw:PageProp/index' />
22099 <meta property='mw:PageProp/noindex' />
22100 <meta property='mw:PageProp/nogallery' />
22101 <meta property='mw:PageProp/noeditsection' />
22102 <meta property='mw:PageProp/notitleconvert' />
22103 <meta property='mw:PageProp/nocontentconvert' />
22104 <meta property='mw:PageProp/unknownproperty' />
22108 Consecutive <pre>s should not get merged
22110 parsoid=html2wt,html2html
22126 <pre>a</pre><pre>b</pre>
22140 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
22144 [[Special:BookSources/1234567890|ISBN 1234567895]]
22146 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
22150 Edited RFC links not serializable as RFC links should serialize as extlinks
22154 [//tools.ietf.org/html/rfc123 New RFC]
22156 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
22160 Edited PMID links not serializable as PMID links should serialize as extlinks
22164 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
22166 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
22170 Edited Redirect link should emit a non-piped wikitext link
22176 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
22179 # -----------------------------------------------------------------
22180 # End of section for Parsoid-only html2wt tests for serialization
22182 # -----------------------------------------------------------------
22189 Try for 100% code coverage