1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well formdness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-specific options (not run by PHP parser unless
25 # the test includes an html/php section)
26 # php php-only test (not run by the parsoid parser unless
27 # the test includes an html/parsoid section)
28 # showtitle make the first line the title
29 # comment run through Linker::formatComment() instead of main parser
30 # local format section links in edit comment text as local links
31 # notoc disable table of contents
32 # thumbsize=NNN set the default thumb size to NNNpx for this test
34 # You can also set the following parser properties via test options:
35 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
36 # wgLinkHolderBatchSize, wgRawHtml
38 # For testing purposes, temporary articles can created:
39 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
40 # where '/' denotes a newline.
42 # This is the standard article assumed to exist.
73 MediaWiki:bad image list
75 * [[File:Bad.jpg]] except [[Nasty page]]
103 Template:echo_with_span
109 Template:echo_with_div
121 Template:table_attribs
124 |</noinclude>style="color: red"| Foo
130 {{table_attribs}} || Bar || Baz
134 Template:image_attribs
137 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
181 Template:EmptyTRWithHTMLAttrTest
184 <tr align="center"></tr>
185 <tr><td>foo</td></tr>
186 <tr align="center"></tr>
187 <tr><td>bar</td></tr>
204 This is a simple paragraph.
206 <p>This is a simple paragraph.
211 Paragraphs with extra newline spacing
234 Paragraphs with newline spacing with comment lines in between
242 <!--foo--><!--More than 1 comment, still stripped-->
246 <!--foo--> <!----> <!-- bar -->
307 Paragraphs with newline spacing with non-empty white-space lines in between
334 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
342 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
381 Extra newlines: More paragraphs with indented comment
396 Extra newlines followed by heading
411 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
412 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
415 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
420 Extra newlines between heading and content are swallowed
428 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
429 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
436 http://fr.wikipedia.org/wiki/🍺
437 <!-- EasterEgg we love beer, better be able be able to link to it -->
439 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
443 # Note that the html+tidy output removes the spaces after the <li>,
444 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
445 # This is an issue for all tests with lists. We intentionally do
446 # *not* add html+tidy clauses for these, as we don't want to
447 # document/test the broken behavior. (Parsoid matches the non-tidy
448 # output in these cases.)
457 <li> Item 2</li></ul>
465 * plain''italic''plain
466 * plain''italic''plain''italic''plain
467 * plain'''bold'''plain
468 * plain'''bold'''plain'''bold'''plain
469 * plain''italic''plain'''bold'''plain
470 * plain'''bold'''plain''italic''plain
471 * plain''italic'''bold-italic'''italic''plain
472 * plain'''bold''bold-italic''bold'''plain
473 * plain'''''bold-italic'''italic''plain
474 * plain'''''bold-italic''bold'''plain
475 * plain''italic'''bold-italic'''''plain
476 * plain'''bold''bold-italic'''''plain
477 * plain l'''italic''plain
478 * plain l''''bold''' plain
481 <li> plain<i>italic</i>plain</li>
482 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
483 <li> plain<b>bold</b>plain</li>
484 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
485 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
486 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
487 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
488 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
489 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
490 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
491 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
492 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
493 <li> plain l'<i>italic</i>plain</li>
494 <li> plain l'<b>bold</b> plain</li></ul>
498 # this example taken from the [[simple:Moon]] article (bug 47326)
500 Italics and possessives (1)
502 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
504 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
508 # this example taken from [[en:Flaming Pie]] (bug 49926)
510 Italics and possessives (2)
512 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
514 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
518 # this example taken from [[en:Dictionary]] (bug 49926)
520 Italics and possessives (3)
522 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
524 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
530 ### 2-quote opening sequence tests
533 Italics and bold: 2-quote opening sequence: (2,2)
543 Italics and bold: 2-quote opening sequence: (2,3)
554 # same html as previous, but wikitext adjusted to match parsoid html2wt
556 Italics and bold: 2-quote opening sequence: (2,3) w/ nowiki
558 ''<nowiki>foo'</nowiki>''
566 Italics and bold: 2-quote opening sequence: (2,4)
577 # same html as previous, but wikitext adjusted to match parsoid html2wt
579 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
581 ''<nowiki>foo''</nowiki>''
588 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
590 Italics and bold: 2-quote opening sequence: (2,5)
603 # same html as previous, but wikitext adjusted to match parsoid html2wt
605 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
607 ''foo'''''<nowiki/>'''
618 ### 3-quote opening sequence tests
622 Italics and bold: 3-quote opening sequence: (3,2)
632 Italics and bold: 3-quote opening sequence: (3,3)
642 Italics and bold: 3-quote opening sequence: (3,4)
653 # same html as previous, but wikitext adjusted to match parsoid html2wt
655 Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki
657 '''<nowiki>foo'</nowiki>'''
664 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
666 Italics and bold: 3-quote opening sequence: (3,5)
679 # same html as previous, but wikitext adjusted to match parsoid html2wt
681 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
683 '''foo'''''<nowiki/>''
694 ### 4-quote opening sequence tests
698 Italics and bold: 4-quote opening sequence: (4,2)
709 # same html as previous, but wikitext adjusted to match parsoid html2wt
711 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
713 <nowiki>''</nowiki>''foo''
721 Italics and bold: 4-quote opening sequence: (4,3)
731 Italics and bold: 4-quote opening sequence: (4,4)
742 # same html as previous, but wikitext adjusted to match parsoid html2wt
744 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
746 ''''<nowiki>foo'</nowiki>'''
753 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
755 Italics and bold: 4-quote opening sequence: (4,5)
764 <p>'<b>foo</b><i></i>
768 # same html as previous, but wikitext adjusted to match parsoid html2wt
770 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
772 ''''foo'''''<nowiki/>''
777 <p>'<b>foo</b><i></i>
783 ### 5-quote opening sequence tests
787 Italics and bold: 5-quote opening sequence: (5,2)
798 # same html as previous, but wikitext adjusted to match parsoid html2wt
799 # skipping wt2html and html2html because it wants to put <i> before <b>
801 Italics and bold: 5-quote opening sequence: (5,2+3)
803 parsoid=wt2wt,html2wt
812 Italics and bold: 5-quote opening sequence: (5,3)
823 # same html as previous, but wikitext adjusted to match parsoid html2wt
825 Italics and bold: 5-quote opening sequence: (5,3+2)
835 Italics and bold: 5-quote opening sequence: (5,4)
841 <p><i><b>foo'</b></i>
846 # same html as previous, but wikitext adjusted to match parsoid html2wt
848 Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki
850 '''''<nowiki>foo'</nowiki>'''''
852 <p><i><b>foo'</b></i>
858 Italics and bold: 5-quote opening sequence: (5,5)
867 ### multiple quote sequences in a line
870 Italics and bold: multiple quote sequences: (2,4,2)
876 <p><i>foo'<b>bar</b></i>
881 # same html as previous, but wikitext adjusted to match parsoid html2wt
883 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
885 ''<nowiki>foo'</nowiki>'''bar'''''
887 <p><i>foo'<b>bar</b></i>
893 Italics and bold: multiple quote sequences: (2,4,3)
899 <p><i>foo'<b>bar</b></i>
904 # same html as previous, but wikitext adjusted to match parsoid html2wt
906 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
908 ''<nowiki>foo'</nowiki>'''bar'''''
910 <p><i>foo'<b>bar</b></i>
916 Italics and bold: multiple quote sequences: (2,4,4)
922 <p><i>foo'<b>bar'</b></i>
927 # same html as previous, but wikitext adjusted to match parsoid html2wt
929 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
931 ''<nowiki>foo'</nowiki>'''<nowiki>bar'</nowiki>'''''
933 <p><i>foo'<b>bar'</b></i>
938 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
940 Italics and bold: multiple quote sequences: (3,4,2)
949 <p><b>foo'</b>bar<i></i>
953 # same html as previous, but wikitext adjusted to match parsoid html2wt
955 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
959 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
964 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
969 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
971 Italics and bold: multiple quote sequences: (3,4,3)
980 <p><b>foo'</b>bar<b></b>
984 # same html as previous, but wikitext adjusted to match parsoid html2wt
986 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
988 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
993 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
998 ### other quote tests
1001 Italics and bold: other quote tests: (2,3,5)
1003 ''this is about '''foo's family'''''
1005 <p><i>this is about <b>foo's family</b></i>
1011 Italics and bold: other quote tests: (2,(3,3),2)
1013 ''this is about '''foo's''' family''
1015 <p><i>this is about <b>foo's</b> family</i>
1021 Italics and bold: other quote tests: (3,2,3,2)
1025 '''this is about ''foo'''s family''
1027 <p><b>this is about <i>foo</i></b><i>s family</i>
1032 # same html as previous, but wikitext adjusted to match parsoid html2wt
1033 # add 'parsoid' option to use 'parsoid' normalization of the placeholder
1035 Italics and bold: other quote tests: (3,2,3+2+2,2)
1039 '''this is about ''foo'''''<nowiki/>''s family''
1041 <p><b>this is about <i>foo</i></b><i>s family</i>
1047 Italics and bold: other quote tests: (3,2,3,3)
1050 '''this is about ''foo'''s family'''
1052 <p>'<i>this is about </i>foo<b>s family</b>
1058 Italics and bold: other quote tests: (3,(2,2),3)
1060 '''this is about ''foo's'' family'''
1062 <p><b>this is about <i>foo's</i> family</b>
1068 Italicized possessive
1070 The ''[[Main Page]]'''s talk page.
1072 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1077 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1078 (Requires tidy for PHP parser output to be fixed up)
1080 parsoid=wt2html,wt2wt
1097 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1098 <td><i>a</i></td><td><i>b</i></td></tr>
1107 Non-html5 tags should be accepted
1109 <center>''foo''</center>
1111 <font>''foo''</font>
1112 <strike>''foo''</strike>
1115 <center><i>foo</i></center>
1116 <p><big><i>foo</i></big>
1117 <font><i>foo</i></font>
1118 <strike><i>foo</i></strike>
1124 <wbr> is valid wikitext (bug 52468)
1132 # <strike> is HTML4, <s> is HTML4/5.
1134 <s> or <strike> for strikethrough
1136 <strike>strike</strike>
1140 <p><strike>strike</strike>
1148 Text-level semantic html elements in wikitext
1151 <strong>text</strong>
1167 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1174 <strong>text</strong>
1190 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1198 # test cases taken from
1199 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1201 Ruby markup (W3C-style)
1203 ; Mono-ruby for individual base characters
1204 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1206 : <ruby>今日<rt>きょう</rt></ruby>
1208 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1210 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1212 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1214 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1215 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1216 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1219 <dl><dt> Mono-ruby for individual base characters</dt>
1220 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1221 <dt> Group ruby</dt>
1222 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1223 <dt> Jukugo ruby</dt>
1224 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1225 <dt> Inline ruby</dt>
1226 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1227 <dt> Double-sided ruby</dt>
1228 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1230 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1231 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1232 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1237 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1239 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1241 <b→> doesn't work! </b→>
1243 <bä> doesn't work! </bä>
1245 <boo> works fine </boo>
1247 <s.foo>s.foo</s.foo>
1251 <p><b→> doesn't work! </b→>
1252 </p><p><bä> doesn't work! </bä>
1253 </p><p><boo> works fine </boo>
1254 </p><p><s.foo>s.foo</s.foo>
1255 </p><p><sub-ID#1>
1260 Isolated close tags should be treated as literal text (bug 52760)
1267 </p><p><s.foo>s</s>
1272 ### Special characters
1276 Bare pipe character (bug 52363)
1285 Bare pipe character from a template (bug 52363)
1294 ### <nowiki> test cases
1298 <nowiki> unordered list
1300 <nowiki>* This is not an unordered list item.</nowiki>
1302 <p>* This is not an unordered list item.
1309 <nowiki>Lorem ipsum dolor
1317 <p>Lorem ipsum dolor
1330 :There is not nowiki.
1331 :There is <nowiki>nowiki</nowiki>.
1333 #There is not nowiki.
1334 #There is <nowiki>nowiki</nowiki>.
1336 *There is not nowiki.
1337 *There is <nowiki>nowiki</nowiki>.
1339 <dl><dd>There is not nowiki.</dd>
1340 <dd>There is nowiki.</dd></dl>
1341 <ol><li>There is not nowiki.</li>
1342 <li>There is nowiki.</li></ol>
1343 <ul><li>There is not nowiki.</li>
1344 <li>There is nowiki.</li></ul>
1349 Entities inside <nowiki>
1351 <nowiki><</nowiki>
1358 Entities inside template parameters
1364 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1368 Properly escape nowiki when combined with other wiki markup
1372 <nowiki>* </nowiki></nowiki> tag
1374 <p>* </nowiki> tag</p>
1381 Comments and Indent-Pre
1383 <!-- comment 1 --> asdf
1385 <!-- comment 1 --> asdf
1388 <!-- comment 1 --> asdf
1389 <!-- comment 2 -->xyz
1391 <!-- comment 1 --> asdf
1392 <!-- comment 2 --> xyz
1448 asdf<!-- comment 1 -->jkl
1458 <!-- foo --> b <!-- bar -->
1472 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1478 Comment semantics and delimiters
1480 <!-- --><!----><!-----><!------>
1486 Comment semantics and delimiters, redux
1488 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1489 -- foo -- funky huh? ... -->
1495 Comment semantics and delimiters: directors cut
1497 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1498 everything starting with < followed by !-- until the first -- and > we see,
1499 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1507 Comment semantics: nesting
1509 <!--<!-- no, we're not going to do anything fancy here -->-->
1516 Comment semantics: unclosed comment at end
1518 <!--This comment will run out to the end of the document
1523 # Bug 58184: document parsoid's behaviour
1525 Suppress comment closing tag in lenient browsers
1527 parsoid=wt2html,html2html
1529 <!-- Browsers--!> think this is closed -->
1533 <!-- Browsers--¡> think this is closed -->
1537 Comment in template title
1546 Comment on its own line post-expand
1558 Comment on its own line post-expand with non-significant whitespace
1570 Multiple comments should still parse as SOL-transparent
1572 parsoid=wt2html,wt2wt
1575 <!--c2--><!--c3--><!--c4-->*b
1586 ### paragraph wrapping tests
1601 Block tag on one line (<div>)
1617 Block tag on one line (<blockquote>)
1619 a <blockquote>foo</blockquote>
1623 a <blockquote>foo</blockquote>
1635 Block tag on both lines (<div>)
1652 Block tag on both lines (<blockquote>)
1654 a <blockquote>foo</blockquote>
1656 b <blockquote>foo</blockquote>
1658 a <blockquote>foo</blockquote>
1659 b <blockquote>foo</blockquote>
1673 Multiple lines without block tags
1697 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1698 # So, we have a separate section for Parsoid. We don't want
1699 # to mimic this stripping behavior in Parsoid. It affects
1700 # editing experience and also requires us to maintain additional
1703 Empty lines between lines with block tags
1741 <div data-parsoid='{"stx":"html"}'></div>
1744 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1747 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1749 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1752 <div data-parsoid='{"stx":"html"}'>e</div>
1755 ## PHP parser emits output which is broken
1756 ## XXX The parsoid output doesn't match the tidy output.
1758 Unclosed HTML p-tags should be handled properly
1766 <p>foo</div></p>
1770 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1775 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1776 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1779 P-wrapping should leave sol-transparent tags outside p-tags where possible
1783 a [[Category:A1]] [[Category:A2]]
1788 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1792 ### Preformatted text
1801 And a [[Main Page|link]]
1807 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1812 Tabs don't trigger preformatted text
1816 This is preformatted text.
1822 <pre>This is preformatted text.
1828 Ident preformatting with inline content
1839 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1856 Regression with preformatted in <center>
1870 Bug 52763: Preformatted in <blockquote>
1876 indented cell (no pre-wrapping!)
1886 <p> indented cell (no pre-wrapping!)
1894 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1911 Bug 15491: <ins>/<del> in blockquote
1914 Foo <del>bar</del> <ins>baz</ins> quux
1918 <p>Foo <del>bar</del> <ins>baz</ins> quux
1924 # Note that the p-wrapping is newline sensitive, which could be
1925 # considered a bug: tidy will wrap only the 'Foo' in the example
1926 # below in a <p> tag. (see comment 23-25 of bug #6200)
1928 Bug 15491: <ins>/<del> in blockquote (2)
1930 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1933 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1939 <del>bar</del> <ins>baz</ins> quux</blockquote>
1943 <pre> with attributes (bug 3202)
1945 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1947 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1952 <pre> with width attribute (bug 3202)
1954 <pre width="8">Narrow screen goodies</pre>
1956 <pre width="8">Narrow screen goodies</pre>
1961 <pre> with forbidden attribute (bug 3202)
1963 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1965 <pre width="8">Narrow screen goodies</pre>
1970 Entities inside <pre>
1979 <pre> with forbidden attribute values (bug 3202)
1981 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1983 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1988 <nowiki> inside <pre> (bug 13238)
1996 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2004 <pre><nowiki>Foo</nowiki></pre>
2009 <nowiki> and <pre> preference (first one wins)
2040 </pre> inside nowiki
2042 <nowiki></pre></nowiki>
2048 # Parsoid doesn't strip empty tags, like Tidy does.
2050 Empty pre; pre inside other HTML tags (bug 54946)
2052 parsoid=wt2html,wt2wt
2083 HTML pre followed by indent-pre
2098 <p><pre>foo</pre></p>
2100 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2104 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2112 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2122 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2134 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2155 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2159 {{echo| foo}}{{echo| bar}}
2164 {{echo|<!--cmt--> foo}}
2166 <!--cmt-->{{echo| foo}}
2168 {{echo|{{echo| }}bar}}
2186 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2223 Things that look like <pre> tags aren't treated as such
2225 Barack Obama <President> of the United States
2226 <President></President>
2228 <p>Barack Obama <President> of the United States
2229 <President></President>
2233 ## PHP parser discards the "<pre " string
2235 Handle broken pre-like tags (bug 64025)
2239 {{echo|<pre <pre>x</pre>}}
2241 <table><pre </table>
2244 <table><pre></pre></table>
2247 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'><pre </p><pre>x</pre>
2255 Parsoid: handle pre with space after attribute
2259 <pre style="width:50%;" >{{echo|foo}}</pre>
2261 <pre style="width:50%;">{{echo|foo}}</pre>
2264 # TODO / maybe: fix wt2wt for this
2266 Parsoid: Don't paragraph-wrap fosterable content
2292 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2320 #--------------------------------------------------------------------
2321 # Transclusion parameter whitespace stripping tests
2322 # Behavior is different for positional and named parameters
2323 #--------------------------------------------------------------------
2325 Templates: Strip leading and trailing whitespace from named-param values
2329 {{echo|1= {{echo|b}} }}
2342 <ul><li> d</li></ul>
2347 Templates: Don't strip whitespace from positional-param values
2351 {{echo|{{echo|b}} }}
2383 <ul><li> f</li></ul>
2391 Templates: Handle empty comment-and-ws-only lines correctly
2394 <!--should be ignored-->
2395 <!--should be ignored as well-->
2404 Templates: Handle comments in the target
2407 <!-- should be ignored -->
2410 {{echo<!-- should be ignored -->
2413 {{echo<!-- should be ignored -->|foo}}
2415 {{<!-- should be ignored -->echo|foo}}
2417 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2419 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2421 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2423 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2426 #--------------------------------------------------------------------
2427 # Transclusion parameter escaping tests
2428 #--------------------------------------------------------------------
2430 Templates: Parsoid parameter escaping test 1
2434 {{echo|[foo]|{{echo|[bar]}}}}
2436 <p about="#mwt1" typeof="mw:Transclusion"
2437 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2441 Parsoid: Pipes in external links in template parameter
2445 {{echo|[{{echo|http://example.com}} link]}}
2447 <p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
2451 Parsoid: pipe in transclusion parameter
2455 {{echo|http://foo.com/a|b}}
2457 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2458 typeof="mw:Transclusion"
2459 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a|b</a></p>
2463 Parsoid: Pipe in external link target and content in template parameter
2465 parsoid=html2wt,wt2wt
2467 {{echo|[http://foo.com/a|b a|b]}}
2469 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2470 typeof="mw:Transclusion"
2471 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2472 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2476 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2480 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2482 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
2486 Templates: Don't escape already nowiki-escaped text in template parameters
2488 parsoid=html2wt,wt2wt
2490 {{echo|foo<nowiki>|</nowiki>bar}}
2491 {{echo|<nowiki><div></nowiki>}}
2492 {{echo|<nowiki></nowiki>}}
2494 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
2495 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
2496 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
2502 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2504 parsoid=html2wt,wt2wt
2506 {{echo|{{echo|1=bar}}}}
2508 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
2513 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2519 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2523 ### Parsoid-centric tests for testing RT edge cases for pre
2527 1a. Indent-Pre and Comments
2540 1b. Indent-Pre and Comments
2553 1c. Indent-Pre and Comments
2566 1d. Indent-Pre and Comments
2567 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2580 2a. Indent-Pre and tables
2601 2b. Indent-Pre and tables
2617 2c. Indent-Pre and tables (bug 42252)
2634 2d. Indent-Pre and tables
2651 <tbody><tr><td> b</td></tr>
2656 2e. Indent-Pre and table-line syntax
2669 2f. Indent-pre started by table-line syntax
2688 3a. Indent-Pre and block tags (single-line html)
2692 c <blockquote> foo </blockquote>
2697 c <blockquote> foo </blockquote>
2698 <pre><span> foo </span>
2701 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2702 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2703 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2704 <pre><span> foo </span>
2721 3b. Indent-Pre and block tags (multi-line html)
2726 <pre>a <span>foo</span>
2731 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2732 b <div data-parsoid='{"stx":"html"}'> foo </div>
2742 3c. Indent-Pre and block tags (pre-content on separate line)
2806 4. Indent-Pre and extension tags
2812 a <ul class="gallery mw-gallery-traditional">
2813 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2814 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
2815 <div class="gallerytext">
2822 <ul class="gallery mw-gallery-traditional">
2823 <li class="gallerybox" style="width: 155px">
2824 <div style="width: 155px">
2825 <div class="thumb" style="width: 150px;">
2826 <div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div>
2828 <div class="gallerytext"></div>
2835 Table wikitext syntax outside wiki-tables
2838 ! not a table heading
2841 | class="foo bar" | baz
2848 ! not a table heading
2851 | class="foo bar" | baz
2860 Render paragraphs when indent-pre is suppressed in blocklevels
2877 4. Multiple spaces at start-of-line
2895 ## NOTE: the leading white-space chars on empty line are significant
2897 5a. White-space in indent-pre
2909 ## NOTE: the leading white-space chars on empty line are significant
2911 5b. White-space in indent-pre
2930 5c. White-space in indent-pre
2943 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2966 7a. Indent-pre and category links
2968 parsoid=wt2html,wt2wt
2970 [[Category:foo]] <!-- No pre-wrapping -->
2971 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2973 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2974 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2978 7b. Indent-pre and category links
2980 parsoid=wt2html,wt2wt
2983 [[Category:foo]] {{echo|b}}
2986 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
2987 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
2991 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2995 HTML-pre: 1. embedded newlines
3029 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3031 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3035 <pre data-parsoid='{"stx":"html"}'>
3040 <pre data-parsoid='{"stx":"html"}'>
3048 HTML-pre: big spaces
3085 <pre data-parsoid='{"stx":"html"}'>
3104 HTML-pre: 2: indented text
3117 HTML-pre: 3: other wikitext
3138 ### Definition lists
3145 <dl><dt> name </dt>
3146 <dd> Definition</dd></dl>
3151 Definition list for indentation only
3155 <dl><dd> Indented text</dd></dl>
3160 Definition list with no space
3165 <dd>Definition</dd></dl>
3170 Definition list with URL link
3172 ; http://example.com/ : definition
3174 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3175 <dd> definition</dd></dl>
3180 Definition list with bracketed URL link
3182 ;[http://www.example.com/ Example]:Something about it
3184 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3185 <dd>Something about it</dd></dl>
3190 Definition list with wikilink containing colon
3192 ; [[Help:FAQ]]: The least-read page on Wikipedia
3194 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
3195 <dd> The least-read page on Wikipedia</dd></dl>
3199 # At Brion's and JeLuF's insistence... :)
3201 Definition list with news link containing colon
3203 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3205 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3206 <dd> This isn't even a real newsgroup!</dd></dl>
3211 Malformed definition list with colon
3213 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3215 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
3220 Definition lists: colon in external link text
3222 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3224 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3225 <dd> OK, I made that up</dd></dl>
3230 Definition lists: colon in HTML attribute
3232 ;<b style="display: inline">bold</b>
3234 <dl><dt><b style="display: inline">bold</b></dt></dl>
3239 Definition lists: self-closed tag
3241 ;one<br/>two : two-line fun
3243 <dl><dt>one<br />two </dt>
3244 <dd> two-line fun</dd></dl>
3249 Bug 11748: Literal closing tags
3253 <dd>test test test test test</dd>
3255 <dd>test test test test test</dd>
3260 <dd>test test test test test</dd>
3262 <dd>test test test test test</dd>
3268 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3271 ; term : description
3276 <dl><dt> term </dt>
3277 <dd> description</dd></dl>
3278 <ul><li> unordered</li></ul>
3285 Definition list with empty definition and following paragraph
3297 Nested definition lists using html syntax
3306 Definition Lists: No nesting: Multiple dd's
3319 Definition Lists: Indentation: Regular
3327 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3332 Definition Lists: Indentation: Missing 1st level
3338 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3343 Definition Lists: Indentation: Multi-level indent
3347 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3352 Definition Lists: Hacky use to indent tables
3359 should be left alone
3361 <dl><dd><dl><dd><table>
3366 </td></tr></table></dd></dl></dd></dl>
3368 should be left alone
3373 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3381 should be left alone
3384 <dl><dd><dl><dd><table><tr>
3387 </tr></table><!-- bar --></dd></dl></dd></dl>
3389 should be left alone</p>
3393 Definition Lists: Hacky use to indent tables, with comment before table
3399 <dl><dd><dl><dd><!-- foo --><table><tr>
3401 </tr></table></dd></dl></dd></dl>
3406 Definition Lists: Hacky use to indent tables (WS-insensitive)
3415 <dd> <table><tr><td>a</td></tr></table> </dd>
3418 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3419 ## as an empty dt item. It also ignores all but the last ";" when followed
3420 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3421 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3424 ## Ex: ";;t2 ::d2" is transformed into:
3436 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3437 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3448 ## All Parsoid only definition list tests have this difference.
3450 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3451 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3454 Table / list interaction: indented table with lists in table contents
3469 <ul><li> b</li></ul>
3473 <ul><li> d</li></ul>
3474 </td></tr></table></dd></dl>
3479 Table / list interaction: lists nested in tables nested in indented lists
3502 </td></tr></table></dd></dl>
3509 Definition Lists: Nesting: Multi-level (Parsoid only)
3539 Definition Lists: Nesting: Test 2 (Parsoid only)
3559 Definition Lists: Nesting: Test 3 (Parsoid only)
3587 Definition Lists: Nesting: Test 4
3592 <dl><dd><dl><dd><dl><dt>t3</dt>
3593 <dd>d3</dd></dl></dd></dl></dd></dl>
3598 ## The Parsoid team believes the following three test exposes a
3599 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3600 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3601 ## It also exposes a "misfeature" in tidy, which doesn't like
3602 ## <dl> tags with a single <dt> child; it converts the <dt> into
3603 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3605 Definition Lists: Mixed Lists: Test 1
3611 <dl><dd><dl><dt><ul><li> foo</li>
3612 <li> bar</li></ul></dt></dl>
3613 <dl><dt> baz</dt></dl></dd></dl>
3648 Definition Lists: Mixed Lists: Test 2
3653 <ul><li><dl><dd> d1</dd>
3654 <dd> d2</dd></dl></li></ul>
3660 Definition Lists: Mixed Lists: Test 3
3665 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3666 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3672 Definition Lists: Mixed Lists: Test 4
3677 <ul><li><dl><dt>d1 </dt>
3680 <dd>d4</dd></dl></li></ul>
3686 Definition Lists: Mixed Lists: Test 5
3692 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3698 Definition Lists: Mixed Lists: Test 6
3703 <ol><li><ul><li><dl><dd>d1
3704 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3710 Definition Lists: Mixed Lists: Test 7
3715 <dl><dd><ul><li> d1</li>
3716 <li> d2</li></ul></dd></dl>
3722 Definition Lists: Mixed Lists: Test 8
3727 <dl><dd><ul><li> d1</li></ul>
3728 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3734 Definition Lists: Mixed Lists: Test 9
3738 <ul><li><dl><dt>foo </dt>
3739 <dd>bar</dd></dl></li></ul>
3745 Definition Lists: Mixed Lists: Test 10
3749 <ul><li><ol><li><dl><dt>foo </dt>
3750 <dd>bar</dd></dl></li></ol></li></ul>
3754 # The Parsoid team disagrees with the PHP parser's seemingly-random
3755 # rules regarding dd/dt on the next two tests. Parsoid is more
3756 # consistent, and recognizes the shared nesting and keeps the
3757 # still-open tags around until the nesting is complete.
3758 # (And tidy again converts <dt> to <dd> before 'bar'.)
3761 Definition Lists: Mixed Lists: Test 11
3766 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3767 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3768 <dl><dt>boo </dt>
3769 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3824 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3825 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3829 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3830 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3839 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
3841 Definition Lists: Weird Ones: Test 1
3843 *#;*::;; foo : bar (who uses this?)
3845 <ul><li><ol><li><dl><dt> foo </dt>
3846 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
3865 <dt>bar (who uses this?)</dt>
3897 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3898 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3913 External links: non-bracketed
3915 Non-bracketed: http://example.com
3917 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3921 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3923 External links: numbered
3925 Numbered: [http://example.com]
3926 Numbered: [http://example.net]
3927 Numbered: [http://example.com]
3929 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
3930 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
3931 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
3934 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
3935 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
3936 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
3940 External links: specified text
3942 Specified text: [http://example.com link]
3944 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
3949 External links: trail
3951 Linktrails should not work for external links: [http://example.com link]s
3953 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3958 External links: dollar sign in URL
3960 http://example.com/1$2345
3962 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3966 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3968 External links: dollar sign in URL (autonumber)
3970 [http://example.com/1$2345]
3972 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3975 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
3979 External links: open square bracket forbidden in URL (bug 4377)
3981 parsoid=wt2html,wt2wt,html2html
3983 http://example.com/1[2345
3985 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3988 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
3992 External links: open square bracket forbidden in URL (named) (bug 4377)
3994 parsoid=wt2html,html2html
3996 [http://example.com/1[2345]
3998 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4001 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4004 # parsoid adds a space before the link name
4006 External links: open square bracket forbidden in URL (named) (bug 4377)
4009 [http://example.com/1 [2345]
4011 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4016 External links: nowiki in URL link text (bug 6230)
4018 [http://example.com/ <nowiki>''example site''</nowiki>]
4020 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4025 External links: newline forbidden in text (bug 6230 regression check)
4027 [http://example.com/ first
4030 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4036 External links: Pipe char between url and text
4038 [http://example.com | link]
4040 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4045 External links: protocol-relative URL in brackets
4047 [//example.com/ Test]
4049 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4053 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4055 External links: protocol-relative URL in brackets without text
4059 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4062 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4066 External links: protocol-relative URL in free text is left alone
4070 <p>//example.com/Foo
4075 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4077 foo//example.com/Foo
4079 <p>foo//example.com/Foo
4084 External links: with no contents
4086 [http://en.wikipedia.org/wiki/Foo]
4088 [[wikipedia:Foo|Bar]]
4090 [[wikipedia:Foo|<span>Bar</span>]]
4092 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4093 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4094 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4097 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4098 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4099 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4103 External links: Free with trailing punctuation
4113 http://example.com/url_with_(brackets)
4115 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4116 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4117 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4118 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4119 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4120 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4121 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4122 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4123 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4130 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4132 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4137 External image from https
4139 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4141 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4146 External image (when not allowed)
4148 wgAllowExternalImages=0
4150 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4152 <p>External image: <a rel="nofollow" class="external free" href="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png">http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png</a>
4157 Link to non-http image, no img tag
4159 Link to non-http image, no img tag: ftp://example.com/test.jpg
4161 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
4166 External links: terminating separator
4168 Terminating separator: http://example.com/thing,
4170 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4175 External links: intervening separator
4177 Intervening separator: http://example.com/1,2,3
4179 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4184 External links: old bug with URL in query
4186 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4188 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4193 External links: old URL-in-URL bug, mixed protocols
4195 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4197 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4202 External links: URL in text
4204 URL in text: [http://example.com http://example.com]
4206 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4211 External links: Clickable images
4213 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4215 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a>
4220 External links: raw ampersand
4222 Old & use: http://x&y
4224 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4229 External links: encoded ampersand
4231 Old & use: http://x&y
4233 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4236 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4240 External links: encoded equals (bug 6102)
4242 http://example.com/?foo=bar
4244 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4247 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4251 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4252 ## does it number them. As discussed in bug 53505, we can identify
4253 ## autonumbered links via CSS.
4257 External links: [raw ampersand]
4259 Old & use: [http://x&y]
4261 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4264 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4267 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4268 # mode will return the [raw ampersand] wikitext
4270 External links: [encoded ampersand]
4272 parsoid=wt2html,wt2wt,html2html
4274 Old & use: [http://x&y]
4276 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4279 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4283 External links: [raw equals]
4285 [http://example.com/?foo=bar]
4287 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4290 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4293 # note that parsoid html is identical to [raw equals] case; so html2wt
4294 # mode will return the [raw equals] wikitext
4296 External links: [encoded equals] (bug 6102)
4298 parsoid=wt2html,wt2wt,html2html
4300 [http://example.com/?foo=bar]
4302 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4305 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4308 # xxx parsoid strips the IDN character, so the round-trip tests will
4309 # obviously fail and are disabled. --cscott
4311 External links: [IDN ignored character reference in hostname; strip it right off]
4313 parsoid=wt2html,wt2wt,html2html
4315 [http://e‌xample.com/]
4317 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4320 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4323 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4324 # Where an external link could easily circumvent the sanitization of the text of
4325 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4326 # test demands a higher standard. That's a bit strange.
4330 # http://example.com -> [http://example.com|http://example.com]
4331 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4333 # The first example is sanitized, but the second is not. Any security benefits
4334 # from this production are trivial to circumvent. Either remove this test and
4335 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4336 # the test accordingly.
4340 # xxx parsoid strips the IDN character, so the round-trip tests will
4341 # obviously fail and are disabled. --cscott
4343 External links: IDN ignored character reference in hostname; strip it right off
4345 parsoid=wt2html,html2html
4347 http://e‌xample.com/
4349 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4352 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4356 External links: www.jpeg.org (bug 554)
4360 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4364 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4366 External links: URL within URL (original bug 2)
4368 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4370 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4373 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4377 BUG 361: URL inside bracketed URL
4379 [http://www.example.com/foo http://www.example.com/bar]
4381 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4386 BUG 361: URL within URL, not bracketed
4388 http://www.example.com/foo?=http://www.example.com/bar
4390 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
4395 BUG 289: ">"-token in URL-tail
4397 http://www.example.com/<hello>
4399 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4404 BUG 289: literal ">"-token in URL-tail
4406 http://www.example.com/<b>html</b>
4408 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4413 BUG 289: ">"-token in bracketed URL
4415 [http://www.example.com/<hello> stuff]
4417 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4422 BUG 289: literal ">"-token in bracketed URL
4424 [http://www.example.com/<b>html</b> stuff]
4426 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4431 BUG 289: literal double quote at end of URL
4433 http://www.example.com/"hello"
4435 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4440 BUG 289: literal double quote in bracketed URL
4442 [http://www.example.com/"hello" stuff]
4444 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4449 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4451 [http://www.example.com test]
4453 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4458 External links: link text with spaces
4460 [http://www.example.com a b c]
4461 [http://www.example.com ''a'' ''b'']
4463 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4464 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4469 External links: wiki links within external link (Bug 3695)
4471 [http://example.com [[wikilink]] embedded in ext link]
4473 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
4476 <p><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
4480 BUG 787: Links with one slash after the url protocol are invalid
4484 [http:/example.com title]
4486 <p>http:/example.com
4487 </p><p>[http:/example.com title]
4492 Bracketed external links with template-generated invalid target
4494 [{{echo|http:/example.com}} title]
4496 <p>[http:/example.com title]
4501 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4503 ''[http://example.com text'']
4504 [http://example.com '''text]'''
4505 ''Something [http://example.com in italic'']
4506 ''Something [http://example.com mixed''''', even bold]'''
4507 '''''Now [http://example.com both''''']
4509 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4510 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4511 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4512 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4513 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4519 Bug 4781: %26 in URL
4521 http://www.example.com/?title=AT%26T
4523 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4526 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4529 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4530 # % is actually legal in HTML5. Any change in output would need testing though.
4532 Bug 4781, 5267: %25 in URL
4534 http://www.example.com/?title=100%25_Bran
4536 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
4539 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4543 Bug 4781, 5267: %28, %29 in URL
4545 http://www.example.com/?title=Ben-Hur_%281959_film%29
4547 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
4550 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
4555 Bug 4781: %26 in autonumber URL
4557 [http://www.example.com/?title=AT%26T]
4559 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4562 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4566 Bug 4781, 5267: %26 in autonumber URL
4568 [http://www.example.com/?title=100%25_Bran]
4570 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4573 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4577 Bug 4781, 5267: %28, %29 in autonumber URL
4579 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4581 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4584 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4589 Bug 4781: %26 in bracketed URL
4591 [http://www.example.com/?title=AT%26T link]
4593 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4596 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4600 Bug 4781, 5267: %25 in bracketed URL
4602 [http://www.example.com/?title=100%25_Bran link]
4604 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4609 Bug 4781, 5267: %28, %29 in bracketed URL
4611 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4613 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4616 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4620 External link containing a period in the anchor. (bug 63947)
4622 [//foo.org/bar#baz. bang]
4624 [//foo.org/bar. bang]
4626 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4627 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4630 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4631 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4635 External link containing a single quote. (bug 63947)
4639 [//foo.org/bar'baz bang]
4641 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4642 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4645 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4646 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4651 External link containing a period in the anchor. (bug 63947)
4653 [//foo.org/bar#baz. bang]
4655 [//foo.org/bar. bang]
4657 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4658 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4661 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4662 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4666 External link containing a single quote. (bug 63947)
4670 [//foo.org/bar'baz bang]
4672 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4673 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4676 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4677 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4682 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4684 Some [http://example.com/ pretty ''italics'' and stuff]!
4686 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4691 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4693 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4695 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
4700 External link containing double-single-quotes with no space separating the url from text in italics
4702 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
4704 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a>
4707 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de</a> <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</p>
4709 <p><a rel="mw:ExtLink" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
4713 External link with comments in link text
4715 [http://www.google.com Google <!-- comment -->]
4717 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4722 URL-encoding in URL functions (single parameter)
4724 {{localurl:Some page|amp=&}}
4726 <p>/index.php?title=Some_page&amp=&
4731 URL-encoding in URL functions (multiple parameters)
4733 {{localurl:Some page|q=?&=&}}
4735 <p>/index.php?title=Some_page&q=?&amp=&
4742 http://example.com/index.php?foozoid%5B%5D=bar
4744 http://example.com/index.php?foozoid[]=bar
4746 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
4747 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
4750 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
4752 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4756 IPv6 urls (bug 21261)
4760 http://[2404:130:0:1000::187:2]/index.php
4762 <p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
4767 Non-extlinks in brackets
4776 [{{echo|foo}} ''bar'']
4777 [{{echo|foo}}l's] errand
4778 [{{echo|foo}}l's errand]
4780 [url=http://example.com]
4793 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4798 Percent encoding in external links
4800 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4802 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4805 <p><a rel="mw:ExtLink"
4806 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4810 Use url link syntax for links where the content is equal the link target
4814 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4817 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4821 Parenthesis in external links, especially URL links
4825 http://example.com/test)
4827 http://example.com/(test)
4829 http://example.com/((test)
4831 (http://example.com/(test))
4833 (http://example.com/(test)))))
4835 http://example.com/a)b
4837 [http://example.com) foo]
4839 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4840 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4841 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4842 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4843 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4844 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4845 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4846 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4849 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4850 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4851 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4852 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4853 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4854 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4855 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4856 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4860 Parenthesis in external links, w/ transclusion or comment
4862 (http://example.com/{{echo|hi}})
4864 (http://example.com<!-- hi -->)
4866 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4867 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4870 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[20,31,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;hi&quot;}},&quot;i&quot;:0}}]}\">hi</span>"}]]}'>http://example.com/hi</a>)</p>
4872 <p>(<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
4876 Replace invalid link targets when serializing
4880 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
4882 [[MediaWiki:Badtitletext|Manual]]
4892 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4894 Normal text. '''''Bold italic text.''''' Normal text.
4896 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4897 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4902 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4903 # parser strips. The wikitext contains just the first half of the bold
4906 Unclosed and unmatched quotes
4908 '''''Bold italic text '''with bold deactivated''' in between.'''''
4910 '''''Bold italic text ''with italic deactivated'' in between.'''''
4914 ..spanning two paragraphs (should not work).'''
4916 '''Bold tag left open
4918 ''Italic tag left open
4922 <!-- Unmatching number of opening, closing tags: -->
4923 '''This year''''s election ''should'' beat '''last year''''s.
4925 ''Tom'''s car is bigger than ''Susan'''s.
4927 Plain ''italic'''s plain
4929 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4930 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4931 </p><p><b>Bold text..</b>
4932 </p><p>..spanning two paragraphs (should not work).
4933 </p><p><b>Bold tag left open</b>
4934 </p><p><i>Italic tag left open</i>
4936 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4937 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4938 </p><p>Plain <i>italic'</i>s plain
4941 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4942 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4943 </p><p><b>Bold text..</b>
4944 </p><p>..spanning two paragraphs (should not work).<b></b>
4945 </p><p><b>Bold tag left open</b>
4946 </p><p><i>Italic tag left open</i>
4948 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4949 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4950 </p><p>Plain <i>italic'</i>s plain
4957 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
4960 # This should not produce <table></table> as <table><tr><td></td></tr></table>
4961 # is the bare minimum required by the spec, see:
4962 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
4963 # Parsoid team replies: empty table tags are legal in HTML5
4965 A table with no data.
4978 A table with stray table end tags on start tag line (wt2html)
4982 {|style="color: red;"|}
4984 {|style="color: red;" |}
4988 {|style="color: red;"|} id="foo"
4992 {|style="color: red;" |} id="foo"
4996 <table style="color: red;"></table>
4998 <table style="color: red;">
5004 <table style="color: red;" id="foo">
5010 <table style="color: red;" id="foo">
5019 A table with no data (take 2)
5027 # A table with nothing but a caption is invalid XHTML, we might want to render
5028 # this as <p>caption</p>
5029 # Parsoid team replies: table with only a caption is legal in HTML5
5031 A table with nothing but a caption
5039 </caption><tr><td></td></tr></table>
5042 <table><caption> caption</caption></table>
5046 A table with caption with default-spaced attributes and a table row
5049 |+ style="color: red;" | caption1
5055 <caption style="color: red;"> caption1
5064 A table with captions with non-default spaced attributes and a table row
5067 |+style="color: red;"|caption2
5068 |+ style="color: red;"| caption3
5074 <caption style="color: red;">caption2
5076 <caption style="color: red;"> caption3
5085 Table td-cell syntax variations
5089 | foo bar foo || baz
5090 | style='color:red;' | baz
5091 | style='color:red;' || baz
5098 <td> foo bar foo </td>
5101 <td style="color:red;"> baz
5103 <td> style='color:red;' </td>
5131 Simple table but with multiple dashes for row wikitext
5149 Multiplication table
5151 {| border="1" cellpadding="2"
5152 |+Multiplication table
5154 ! × !! 1 !! 2 !! 3
5172 <table border="1" cellpadding="2">
5173 <caption>Multiplication table
5220 Accept "||" in table headings
5235 Accept "!!" in table data
5249 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
5254 Accept "||" in indented table headings
5264 </th></tr></table></dd></dl>
5269 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5286 Accept "| !" at start of line in tables (ignore !-attribute)
5290 | !style="color:red" | bar
5302 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
5306 |style='color:red;'|+1
5307 |style='color:blue;'|-1
5319 <td style="color:red;">+1
5321 <td style="color:blue;">-1
5345 |rowspan=2| Cell 2, row 1 (and 2)
5356 <td rowspan="2"> Cell 2, row 1 (and 2)
5374 {| bgcolor=#ABCDEF border=2
5379 |the original table again
5387 <table bgcolor="#ABCDEF" border="2">
5395 <td>the original table again
5401 Invalid attributes in table cell (bug 1830)
5415 # The "|}" to close the table is missing from the input, so parsoid's
5416 # *2wt modes will fail.
5418 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5420 parsoid=wt2html,html2html
5423 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5427 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5428 <td>]" onmouseover="alert(document.cookie)">test
5436 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5441 Indented table markup mixed with indented pre content (proposed in bug 6200)
5446 Text that should be rendered preformatted
5454 <pre>Text that should be rendered preformatted
5463 Template-generated table cell attributes and cell content
5472 <td style="color: red"> Foo
5474 <td style="color: red"> Foo
5480 Template-generated table cell attributes and cell content (2)
5483 |align=center {{table_attribs}}
5488 <td align="center" style="color: red"> Foo
5494 Template-generated table cell attributes and cell content (3)
5497 |align=center {{table_cells}}
5502 <td align="center" style="color: red"> Foo </td>
5510 Table with row followed by newlines and table heading
5528 Table with empty line following the start tag
5545 # FIXME: Preserve the attribute properly (with an empty string as value) in
5546 # the PHP parser. Parsoid implements the behavior below.
5548 Table attributes with empty value
5558 </td></tr></tbody></table>
5563 Wikitext table with a lot of comments
5586 Wikitext table with double-line table cell
5603 Table cell with a single comment
5620 Table-cell after a comment-only-empty-line
5637 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5639 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5645 Build table with {{!}}
5647 {{{!}} class="wikitable"
5650 {{!}}- style="color:red;"
5651 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5654 <table class="wikitable">
5660 <tr style="color:red;">
5662 <td style="color:red;"> second data
5667 # The expected HTML structure in this test is debatable. The PHP parser does
5668 # not parse this kind of table at all. The main focus for Parsoid is on
5669 # round-tripping, so this output is ok for now. TODO: revisit!
5671 Wikitext table with html-syntax row
5681 <td>foo</td></tr></tbody></table>
5684 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5685 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5686 ## PHP parser, which tidy then compounds by fostering the content
5687 ## entirely out of the table. Parsoid recognizes the table context
5688 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5689 ## depends on PHP's treatment of broken table markup!
5691 Implicit <td> after a |-
5693 parsoid=wt2html,html2html
5713 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5715 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5717 parsoid=wt2html,html2html
5750 <tr><td><pre>a</pre></td></tr>
5751 <tr><td> b</td></tr>
5756 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5757 # Parsoid generates the missing <td>, so wt2wt won't succeed.
5759 Lists should be recognized in an implicit <td> context
5761 parsoid=wt2html,html2html
5788 Parsoid: Round-trip tables directly followed by content (bug 51219)
5790 parsoid=wt2html,wt2wt
5815 Parsoid: Default to a newline after tables in new content (bug 51219)
5822 <nowiki> </nowiki>bar
5829 <tr><td>foo</td></tr></tbody></table> bar
5831 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5835 Parsoid: newline inducing block nodes don't suppress <nowiki>
5847 Parsoid: Row-syntax table headings followed by comment & table cells
5849 parsoid=wt2html,wt2wt
5853 <!-- foo --> || baz || quux
5867 <tbody><tr><th> foo </th><th> bar
5868 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
5873 # PHP throws away the (semi-broken) "foo" class here; Parsoid
5876 Parsoid: Recover better from broken table attributes
5896 <p>foo</p></td></tr>
5901 Strip unsupported table tags
5952 Plain link, capitalized
5956 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5961 Plain link, uncapitalized
5965 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
5972 [[Main Page|The Main Page]]
5974 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5979 Piped link with comment in link text
5981 [[Main Page|The Main<!--front--> Page]]
5983 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5988 Piped link with multiple pipe characters in link text
5990 [[Main Page||The|Main|Page|]]
5992 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
5995 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6003 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6008 Broken link with fragment
6010 [[Zigzagzogzagzig#zug]]
6012 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6017 Special page link with fragment
6019 [[Special:Version#anchor]]
6021 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6026 Nonexistent special page link with fragment
6028 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6030 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6037 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6039 <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>
6046 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6048 <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>!!!
6059 Bug 43661: Piped links with identical prefixes
6061 [[prefixed article|prefixed articles with spaces]]
6063 [[prefixed article|prefixed articlesaoeu]]
6065 [[Main Page|Main Page test]]
6067 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6068 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6069 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6075 Link with HTML entity in suffix / tail
6077 [[Main Page]]", [[Main Page]]a
6079 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6084 Link with 3 brackets
6093 Link with 4 brackets
6097 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6102 Piped link with 3 brackets
6104 [[[main page|the main page]]]
6106 <p>[[[main page|the main page]]]
6111 Piped link with extlink-like text
6114 [[Main Page|This is a [bar]]]
6116 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6117 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6122 Link with multiple pipes
6124 [[Main Page|The|Main|Page]]
6126 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6130 # Note that parsoid does not munge anchor text; all non-space
6131 # characters are valid in HTML5 ids.
6133 Anchor containing a #. (bug 63430)
6135 [[Main Page#And#Link]]
6137 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6140 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6146 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6148 <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>
6153 Link with space in namespace
6155 [[User talk:Foo bar]]
6157 <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>
6162 MemoryAlpha:AlphaTest
6164 This is an article in the MemoryAlpha namespace
6165 (which shadows the memoryalpha interwiki link).
6169 Namespace takes precedence over interwiki link (bug 51680)
6171 [[MemoryAlpha:AlphaTest]]
6173 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6177 # The previous test doesn't work correctly in html2*, due to not recognizing the
6178 # link as an internal one. This one checks for the correct behavior.
6180 Link to namespace preferred over interwiki with correct rel attribute
6182 parsoid=html2wt,html2html
6184 [[MemoryAlpha:AlphaTest]]
6186 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6191 Piped link to namespace
6193 [[Meta:Disclaimers|The disclaimers]]
6195 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6202 [[Usually caused by a typo (oops}]]
6204 <p>[[Usually caused by a typo (oops}]]
6211 Just a test of an article title containing a percent.
6215 Link containing % (not as a hex sequence)
6219 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6222 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6225 # note that the parsoid HTML is identical to the previous test output,
6226 # so the previous test ensures that the html2wt mode will generate the
6227 # "not as a hex sequence" wikitext.
6229 Link containing % as a single hex sequence interpreted to char
6231 parsoid=wt2wt,wt2html,html2html
6235 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6238 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6242 Link containing % as a double hex sequence interpreted to hex sequence
6246 <p>[[7%2525 Solution]]
6250 # note that parsoid does not munge anchor text; all non-space
6251 # characters are valid in HTML5 anchors.
6253 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6254 Example for such a section: == < ==
6256 [[%23%3c]][[%23%3e]]
6258 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6261 <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>
6265 Link containing "<#" and ">#" as a hex sequences
6267 [[%3c%23]][[%3e%23]]
6269 <p>[[%3c%23]][[%3e%23]]
6274 Link containing an equals sign
6276 [[Special:BookSources/isbn=4-00-026157-6]]
6278 <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>
6281 <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>
6287 Just a test of an article title containing a tilde.
6290 # note that links containing signatures, like [[Foo~~~~]], are
6291 # massaged by the pre-save transform (PST) and so the tildes are never
6292 # seen by the parser.
6294 Link containing a tilde
6298 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6301 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6305 Link containing double-single-quotes '' (bug 4598)
6307 [[Lista d''e paise d''o munno]]
6309 <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>
6312 <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>
6316 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6318 Some [[Link|pretty ''italics'' and stuff]]!
6320 <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>!
6323 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6327 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6329 ''Some [[Link|pretty ''italics'' and stuff]]!''
6331 <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>
6336 Link with double quotes in title part (literal) and alternate part (interpreted)
6338 [[File:Denys Savchenko ''Pentecoste''.jpg]]
6342 [[''Pentecoste''|Pentecoste]]
6344 [[''Pentecoste''|''Pentecoste'']]
6346 <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>
6347 </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>
6348 </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>
6349 </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>
6352 <meta typeof="mw:Placeholder"/>
6353 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6354 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6355 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6359 Broken image links with HTML captions (bug 39700)
6361 [[File:Nonexistent|<script></script>]]
6362 [[File:Nonexistent|100px|<script></script>]]
6363 [[File:Nonexistent|<]]
6364 [[File:Nonexistent|a<i>b</i>c]]
6366 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6367 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6368 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6369 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6376 [[http://www.example.com]]
6378 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6381 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6385 Plain link to URL with link text
6387 [[http://www.example.com Link text]]
6389 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6394 Plain link to protocol-relative URL
6396 [[//www.example.com]]
6398 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6401 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6405 Plain link to protocol-relative URL with link text
6407 [[//www.example.com Link text]]
6409 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6414 Plain link to page with question mark in title
6420 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6421 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6426 # I'm fairly sure the expected result here is wrong.
6427 # We want these to be URL links, not pseudo-pages with URLs for titles....
6428 # However the current output is also pretty screwy.
6431 # I'm changing it to match the current output--it arguably makes more
6432 # sense in the light of the test above. Old expected result was:
6433 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6435 # But I think this test is bordering on "garbage in, garbage out" anyway.
6440 Piped link to URL: [[http://www.example.com|an example URL]]
6442 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6445 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6449 BUG 2: [[page|http://url/]] should link to page, not http://url/
6451 [[Main Page|http://url/]]
6453 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6456 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6459 # Parsoid does not mark self-links, by design.
6461 BUG 337: Escaped self-links should be bold
6465 [[Bug462]] [[Bug462]]
6467 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6470 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6472 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6476 Self-link to section should not be bold
6480 [[Main Page#section]]
6482 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6493 Self-link to numeric title
6499 <p><strong class="selflink">0</strong>
6504 Link to numeric-equivalent title
6510 <p><a href="/wiki/00" title="00">00</a>
6515 <nowiki> inside a link
6517 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6519 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6524 Non-breaking spaces in title
6526 [[ Main Page ]]
6528 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6533 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6539 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6544 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6550 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6555 Internal link with en linktrail: no apostrophes (bug 27473)
6561 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6566 Internal link with ca linktrail with apostrophes (bug 27473)
6572 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6577 Internal link with kaa linktrail with apostrophes (bug 27473)
6583 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6588 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6590 [[User:Foo/Test/63636:Bar|Test]]
6592 <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>
6595 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6599 Purely hash wikilink
6601 title=[[User:test/123]]
6605 <p><a href="#a">b</a>
6608 <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>
6612 1. Interaction of linktrail and template encapsulation
6618 <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>
6622 2. Interaction of linktrail and template encapsulation
6626 {{echo|Some [[Fool]]}}s
6628 <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>
6632 3. Interaction of linktrail and template encapsulation
6636 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6638 <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>
6648 Internal link with is link prefix
6652 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6654 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6665 Internal link with is link trail and link prefix
6669 [[mótmælendatrú|xxx]]ar
6671 mótmælenda[[söfnuður]]
6672 mótmælenda[[söfnuður|söfnuðir]]
6673 mótmælenda[[söfnuður|söfnuðir]]xxx
6675 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6676 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6677 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6678 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6679 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6684 Parsoid link trail escaping
6686 parsoid=html2wt,html2html
6690 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6694 Parsoid link prefix escaping
6697 parsoid=html2wt,html2html
6699 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6701 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6705 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6713 [http://wp.org ''foo'']
6715 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6716 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6717 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6718 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6723 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6727 [[Foo|{{echo|a}} b {{echo|c}}]]
6729 <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>
6733 Link with angle bracket after anchor
6737 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6740 <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>
6744 ### Interwiki links (see maintenance/interwiki.sql)
6748 Inline interwiki link
6750 parsoid=wt2html,wt2wt,html2html
6752 [[MeatBall:SoftSecurity]]
6754 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6757 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
6761 Inline interwiki link with empty title (bug 2372)
6763 parsoid=wt2html,wt2wt,html2html
6767 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6770 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
6774 Interwiki link encoding conversion (bug 1636)
6776 *[[Wikipedia:ro:Olteniţa]]
6777 *[[Wikipedia:ro:Olteniţa]]
6779 <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>
6780 <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>
6784 <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>
6785 <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>
6790 Interwiki link with fragment (bug 2130)
6792 [[MeatBall:SoftSecurity#foo]]
6794 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6798 # Ideally the wikipedia: prefix here should be proto-relative too
6799 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
6800 # define the 'en' prefix, and originally the test used 'wikipedia',
6801 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
6804 Different interwiki prefixes mapping to the same URL
6812 [[:wikipedia:Foo|Foo]]
6814 [[wikipedia:en:Foo]]
6816 [[:wikipedia:en:Foo]]
6820 <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>
6822 <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>
6824 <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>
6826 <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>
6828 <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>
6830 <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>
6832 <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>
6836 Interwiki links that cannot be represented in wiki syntax
6839 [[meatball:ok#foo|ok with fragment]]
6840 [[meatball:ok_as_well?|ok ending with ? mark]]
6841 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6842 [http://de.wikipedia.org/wiki/#foo is just fragment]
6845 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
6846 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
6847 <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>
6848 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6849 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
6852 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
6853 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
6854 <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>
6855 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6856 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6860 Interwiki links: trail
6862 [[wikipedia:Foo|Ba]]r
6864 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
6867 <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>
6871 Local interwiki link
6873 parsoid=wt2html,wt2wt,html2html
6875 [[local:Template:Foo]]
6877 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
6880 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
6883 # Parsoid does not mark self-links, by design.
6885 Local interwiki link: self-link to current page
6888 parsoid=wt2html,wt2wt,html2html
6892 <p><strong class="selflink">local:Main Page</strong>
6895 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
6899 Local interwiki link: prefix only (bug 64167)
6901 parsoid=wt2html,wt2wt,html2html
6905 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
6908 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
6912 Local interwiki link: with additional interwiki prefix (bug 61357)
6914 parsoid=wt2html,wt2wt,html2html
6916 [[local:meatball:Hello]]
6918 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
6921 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
6925 Multiple local interwiki link prefixes
6927 [[local:local:local:local:mi:local:Foo]]
6929 parsoid=wt2html,wt2wt,html2html
6931 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
6934 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
6938 ### Interlanguage links
6939 ### Language links (so that searching for '### language' matches..)
6951 <p>Blah blah blah</p>
6952 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
6956 Interlanguage link with spacing
6958 parsoid=wt2html,wt2wt,html2html
6966 <p>Blah blah blah</p>
6967 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
6971 Double interlanguage link
6980 <p>Blah blah blah</p>
6981 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
6982 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
6986 Interlanguage link variations
6995 <p>Blah blah blah</p>
6996 <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"}}'/>
6997 <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"}}'/>
7001 Interlanguage link, with prefix links
7011 <p>Blah blah blah</p>
7012 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7016 Double interlanguage link, with prefix links (bug 8897)
7027 <p>Blah blah blah</p>
7028 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7029 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7033 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7041 <p>Blah blah blah</p>
7042 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7046 Parsoid-specific test: Wikilinks with should RT properly
7052 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7057 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7061 He&nbsp;llo [[Foo|He&nbsp;llo]]
7063 He&nbsp;llo [[He&nbsp;llo]]
7065 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7066 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7070 Parsoid: handle constructor well
7076 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7077 </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>
7080 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7082 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7091 # Note that `ko` isn't a known interlanguage prefix
7093 Parsoid: recognize interlanguage links without a target page
7103 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7105 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7108 # Note that `ko` isn't a known interwiki prefix
7110 Parsoid: recognize interwiki links without a target page
7112 parsoid=wt2html,wt2wt,html2html
7118 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7119 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7122 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7123 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7127 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7131 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7134 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7138 Interlanguage link with preceding local interwiki link (bug 68085)
7140 parsoid=wt2html,wt2wt,html2html
7143 [[local:es:Spanish]]
7146 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7150 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7154 Looks like an interlanguage link, but is actually a local interwiki
7156 parsoid=wt2html,wt2wt,html2html
7162 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7166 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7170 ### Redirects, Parsoid-only
7173 1. Simple redirect to page
7177 #REDIRECT [[Main Page]]
7179 <link rel="mw:PageProp/redirect" href="./Main_Page">
7182 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7184 2. Other redirect variants
7186 parsoid=wt2html,wt2wt
7188 #REDIRECT [[Main_Page]]
7189 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7191 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7197 parsoid=wt2html,wt2wt
7202 <li>REDIRECT [[]]</li></ol>
7206 Optional colon in #REDIRECT
7208 # the colon is archaic syntax. we support it for wt2html, but we
7209 # don't care that it roundtrips back to the modern syntax.
7210 parsoid=wt2html,html2html
7212 #REDIRECT:[[Main Page]]
7214 <link rel="mw:PageProp/redirect" href="./Main_Page">
7218 Whitespace in #REDIRECT with optional colon
7220 # the colon and gratuitous whitespace is archaic syntax. we support
7221 # it for wt2html, but we don't care that it roundtrips back to the
7222 # modern syntax (without extra whitespace)
7223 parsoid=wt2html,html2html
7230 <link rel="mw:PageProp/redirect" href="./Main_Page">
7234 Piped link in #REDIRECT
7236 # content after piped link is ignored. we support this syntax,
7237 # but don't care that the piped link is lost when we roundtrip this.
7240 #REDIRECT [[Main Page|bar]]
7242 <link rel="mw:PageProp/redirect" href="./Main_Page">
7246 Redirect to category
7250 #REDIRECT [[Category:Foo]]
7252 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7256 Redirect to category with URL encoding
7260 #REDIRECT [[Category%3AFoo]]
7262 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7266 Redirect to category page
7268 parsoid=wt2html,html2html
7270 #REDIRECT [[:Category:Foo]]
7272 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7276 Redirect to image page (1)
7280 #REDIRECT [[File:Wiki.png]]
7282 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7286 Redirect to image page (2)
7290 #REDIRECT [[Image:Wiki.png]]
7292 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7296 Redirect to language
7300 #REDIRECT [[en:File:Wiki.png]]
7302 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7306 Redirect to interwiki
7310 #REDIRECT [[meatball:File:Wiki.png]]
7312 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7316 Non-English #REDIRECT
7321 #TILVÍSUN [[Main Page]]
7323 <link rel="mw:PageProp/redirect" href="./Main_Page">
7334 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7351 Broken br tag sanitization
7359 # TODO: Fix html2html mode (bug 51055)!
7360 # This </br> handling was added as part of bug 50831; but it
7361 # differs from how PHP+tidy handles this. We should investigate
7364 Parsoid: Broken br tag recognition
7380 Incorrecly removing closing slashes from correctly formed XHTML
7382 <br style="clear:both;" />
7384 <p><br style="clear:both;" />
7389 Failing to transform badly formed HTML into correct XHTML
7391 <br style="clear: left;">
7392 <br style="clear: right;">
7393 <br style="clear: both;">
7395 <p><br style="clear: left;" />
7396 <br style="clear: right;" />
7397 <br style="clear: both;" />
7402 Handling html with a div self-closing tag
7411 <p><div title />
7415 <p><div title=bar />
7416 <div title=bar/>
7418 <div title="bar/"></div>
7424 Handling html with a br self-closing tag
7433 <p><br title="title" />
7434 <br title="title" />
7451 Horizontal ruler (should it add that extra space?)
7466 Horizontal ruler -- 4+ dashes render hr
7475 Horizontal ruler -- eats additional dashes on the same line
7484 Horizontal ruler -- does not collapse dashes on consecutive lines
7495 Horizontal ruler -- <4 dashes render as plain text
7504 Horizontal ruler -- Supports content following dashes on same line
7516 ### Block-level elements
7525 <ul><li>Common list</li>
7527 <li>item 3</li></ul>
7538 <ol><li>Numbered list</li>
7540 <li> item 3</li></ol>
7554 ***#Number on level 4
7556 **#Number on level 3
7557 **#Number on level 3
7561 #** Level 3, but ordered
7564 <ol><li> with numbers</li></ol>
7565 <ul><li> and bullets</li></ul>
7566 <ol><li> and numbers</li></ol></li>
7568 <ul><li>bullet level 2
7569 <ul><li>bullet level 3
7570 <ol><li>Number on level 4</li></ol></li></ul></li>
7572 <ol><li>Number on level 3</li>
7573 <li>Number on level 3</li></ol></li></ul>
7574 <ol><li>number level 2</li></ol></li>
7576 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7577 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7588 <ul><li>bar</li></ul></li></ul>
7598 <ul><li><ul><li>foo</li></ul></li>
7604 Nested lists 3 (first element empty)
7610 <ul><li>bar</li></ul></li></ul>
7615 Nested lists 4 (first element empty)
7620 <ul><li><ul><li></li></ul></li>
7626 Nested lists 5 (both elements empty)
7631 <ul><li><ul><li></li></ul></li>
7637 Nested lists 6 (both elements empty)
7643 <ul><li></li></ul></li></ul>
7648 Nested lists 7 (skip initial nesting levels)
7652 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7657 Nested lists 8 (multiple nesting transitions)
7665 <ul><li><ul><li> bar</li></ul></li>
7666 <li> baz</li></ul></li>
7672 1. Lists with start-of-line-transparent tokens before bullets: Comments
7685 2. Lists with start-of-line-transparent tokens before bullets: Template close
7690 <ul><li>foo bar</li>
7696 List items are not parsed correctly following a <pre> block (bug 785)
7702 <ul><li> <pre>foo</pre></li>
7703 <li> <pre>bar</pre></li>
7709 List items from template
7720 * notSOL{{inner list}}
7723 <ul><li> item 1</li>
7724 <li> item 2</li></ul>
7725 <ul><li> item 0</li>
7727 <li> item 2</li></ul>
7728 <ul><li> item 0</li>
7731 <li> item 2</li></ul>
7736 List interrupted by empty line or heading
7744 <ul><li> foo</li></ul>
7745 <ul><li><ul><li> bar</li></ul></li></ul>
7746 <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>
7747 <ul><li> Another list item</li></ul>
7752 Multiple list tags generated by templates
7773 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7776 <!--This line will NOT split the list-->
7778 <!--This line will NOT split the list either-->
7780 <!--foo--> <!----> <!--This line NOT split the list either-->
7791 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7794 <!--This line will NOT split the list-->
7796 <!--This line will NOT split the list either-->
7798 <!--foo--> <!----> <!--This line NOT split the list
7811 (The PHP parser relies on Tidy for the hack)
7813 parsoid=wt2html,wt2wt
7817 * {{echo|<li>templated li-hack}}
7818 * <!--foo--> <li> unsupported li-hack with preceding comments
7821 <li><li>not a li-hack
7828 <li>templated li-hack</li>
7829 <li>unsupported li-hack with preceding comments</li>
7832 <li>not a li-hack</li>
7837 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7864 Parsoid: Test of whitespace serialization with Templated bullets
7871 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7875 # ------------------------------------------------------------------------
7876 # The next set of tests are about Parsoid's ability to handle badly nested
7877 # tags (parse, minimize scope of fixup, and roundtrip back)
7878 # ------------------------------------------------------------------------
7881 Unbalanced closing block tags break a list
7882 (php parser relies on Tidy to fix up)
7900 # Parsoid fails this test, but it might be tricky to support properly.
7903 Unbalanced closing non-block tags don't break a list
7904 (php parser relies on Tidy to fix up)
7911 <li><span>a</span></li>
7912 <li><span>b</span></li>
7926 Unclosed formatting tags that straddle lists are closed and reopened
7927 (php parser relies on Tidy to fix up)
7929 parsoid=wt2html,wt2wt,html2html
7939 <ol><li> <s> a</s></li>
7940 <li><s> b </s></li></ol>
7943 # Parsoid fails this test, but it might be tricky to support properly.
7946 List embedded in a non-block tag
7947 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
7954 <li><small>foo</small></li>
7964 # This is a bug in the PHP parser + tidy combination.
7965 # (The </tr> tag gets parsed as text and html-escaped by PHP,
7966 # and then fostered out of the table by tidy.)
7967 # We believe the Parsoid output to be correct.
7969 Table with missing opening <tr> tag
7971 parsoid=wt2html,wt2wt
7996 # Note that the current date is hard-coded as
7997 # 1970-01-01T00:02:03Z (a Thursday)
7998 # when running parser tests. The timezone is also fixed to GMT, so
7999 # local date will be identical to current date.
8002 Magic Word: {{CURRENTDAY}}
8011 Magic Word: {{CURRENTDAY2}}
8020 Magic Word: {{CURRENTDAYNAME}}
8029 Magic Word: {{CURRENTDOW}}
8038 Magic Word: {{CURRENTMONTH}}
8047 Magic Word: {{CURRENTMONTH1}}
8056 Magic Word: {{CURRENTMONTHABBREV}}
8058 {{CURRENTMONTHABBREV}}
8065 Magic Word: {{CURRENTMONTHNAME}}
8067 {{CURRENTMONTHNAME}}
8074 Magic Word: {{CURRENTMONTHNAMEGEN}}
8076 {{CURRENTMONTHNAMEGEN}}
8083 Magic Word: {{CURRENTTIME}}
8092 Magic Word: {{CURRENTHOUR}}
8101 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8110 Magic Word: {{CURRENTYEAR}}
8119 Magic Word: {{CURRENTTIMESTAMP}}
8121 {{CURRENTTIMESTAMP}}
8128 Magic Words LOCAL (UTC)
8132 * {{LOCALMONTHNAME}}
8133 * {{LOCALMONTHNAMEGEN}}
8134 * {{LOCALMONTHABBREV}}
8143 * {{LOCALTIMESTAMP}}
8158 <li> 19700101000203</li></ul>
8163 Magic Word: {{FULLPAGENAME}}
8165 title=[[User:Ævar Arnfjörð Bjarmason]]
8169 <p>User:Ævar Arnfjörð Bjarmason
8174 Magic Word: {{FULLPAGENAMEE}}
8176 title=[[User:Ævar Arnfjörð Bjarmason]]
8180 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8185 Magic Word: {{TALKSPACE}}
8187 title=[[User:Ævar Arnfjörð Bjarmason]]
8196 Magic Word: {{TALKSPACE}}, same namespace
8198 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8207 Magic Word: {{TALKSPACE}}, main namespace
8209 title=[[Parser Test]]
8218 Magic Word: {{TALKSPACEE}}
8220 title=[[User:Ævar Arnfjörð Bjarmason]]
8229 Magic Word: {{SUBJECTSPACE}}
8231 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8240 Magic Word: {{SUBJECTSPACE}}, same namespace
8242 title=[[User:Ævar Arnfjörð Bjarmason]]
8251 Magic Word: {{SUBJECTSPACE}}, main namespace
8253 title=[[Parser Test]]
8261 Magic Word: {{SUBJECTSPACEE}}
8263 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8272 Magic Word: {{NAMESPACE}}
8274 title=[[User:Ævar Arnfjörð Bjarmason]]
8283 Magic Word: {{NAMESPACEE}}
8285 title=[[User:Ævar Arnfjörð Bjarmason]]
8294 Magic Word: {{NAMESPACENUMBER}}
8296 title=[[User:Ævar Arnfjörð Bjarmason]]
8305 Magic Word: {{SUBPAGENAME}}
8307 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8316 Magic Word: {{SUBPAGENAMEE}}
8318 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8327 Magic Word: {{ROOTPAGENAME}}
8329 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8333 <p>Ævar Arnfjörð Bjarmason
8338 Magic Word: {{ROOTPAGENAMEE}}
8340 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8344 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8349 Magic Word: {{BASEPAGENAME}}
8351 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8355 <p>Ævar Arnfjörð Bjarmason
8360 Magic Word: {{BASEPAGENAMEE}}
8362 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8366 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8371 Magic Word: {{TALKPAGENAME}}
8373 title=[[User:Ævar Arnfjörð Bjarmason]]
8377 <p>User talk:Ævar Arnfjörð Bjarmason
8382 Magic Word: {{TALKPAGENAMEE}}
8384 title=[[User:Ævar Arnfjörð Bjarmason]]
8388 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8393 Magic Word: {{SUBJECTPAGENAME}}
8395 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8399 <p>User:Ævar Arnfjörð Bjarmason
8404 Magic Word: {{SUBJECTPAGENAMEE}}
8406 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8408 {{SUBJECTPAGENAMEE}}
8410 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8415 Magic Word: {{NUMBEROFFILES}}
8424 Magic Word: {{PAGENAME}}
8426 title=[[User:Ævar Arnfjörð Bjarmason]]
8430 <p>Ævar Arnfjörð Bjarmason
8435 Magic Word: {{PAGENAME}} with metacharacters
8437 title=[['foo & bar = baz']]
8441 <p><i>'foo & bar = baz'</i>
8444 <p><i>'foo & bar = baz'</i></p>
8448 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8450 title=[[*RFC 1234 http://example.com/]]
8454 <p>*RFC 1234 http://example.com/
8457 <p>*RFC 1234 http://example.com/</p>
8461 Magic Word: {{PAGENAMEE}}
8463 title=[[User:Ævar Arnfjörð Bjarmason]]
8467 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8472 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8474 title=[[*RFC 1234 http://example.com/]]
8478 <p>*RFC_1234_http://example.com/
8481 <p>*RFC_1234_http://example.com/</p>
8485 Magic Word: {{REVISIONID}}
8494 Magic Word: {{SCRIPTPATH}}
8503 Magic Word: {{STYLEPATH}}
8512 Magic Word: {{SERVER}}
8516 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8521 Magic Word: {{SERVERNAME}}
8530 Magic Word: {{SITENAME}}
8539 Case-sensitive magic words, when cased differently, should just be template transclusions
8546 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8547 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8548 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8549 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8554 Case-insensitive magic words should still work with weird casing.
8564 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8569 Namespace 1 {{ns:1}}
8578 Namespace 1 {{ns:01}}
8587 Namespace 0 {{ns:0}} (bug 4783)
8595 Namespace 0 {{ns:00}} (bug 4783)
8603 Namespace -1 {{ns:-1}}
8612 Namespace User {{ns:User}}
8621 Namespace User talk {{ns:User_talk}}
8630 Namespace User talk {{ns:uSeR tAlK}}
8639 Namespace File {{ns:File}}
8648 Namespace File {{ns:Image}}
8657 Namespace (lang=de) Benutzer {{ns:User}}
8668 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8674 <p>Benutzer Diskussion
8682 {{urlencode:hi world?!}}
8683 {{urlencode:hi world?!|WIKI}}
8684 {{urlencode:hi world?!|PATH}}
8685 {{urlencode:hi world?!|QUERY}}
8695 Magic Word: prioritize type info over data-parsoid
8701 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8705 Magic Word: serialize on separate line (parsoid)
8707 parsoid=wt2wt,html2wt
8713 foo<meta property="mw:PageProp/notoc"/>bar
8717 Magic Word: rt non-english wikis
8724 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8731 Magic links: internal link to RFC (bug 479)
8735 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8740 Magic links: RFC (bug 479)
8744 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8749 Magic links: ISBN (bug 1937)
8753 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8758 Magic links: PMID incorrectly converts space to underscore
8762 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8771 Nonexistent template
8773 {{thistemplatedoesnotexist}}
8775 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8780 Template with invalid target containing tags
8782 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8784 <p>{{a<b>b</b>|foo|a=b|a = b}}
8789 Template with invalid target containing unclosed tag
8791 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8793 <p>{{a<b>|foo|a=b|a = b}}</b>
8798 Template with invalid target containing wikilink
8802 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8805 <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>
8809 Template with just whitespace in it, bug #68421
8813 <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>
8819 This is a test template
8827 <p>This is a test template
8832 Template with explicit namespace
8836 <p>This is a test template
8844 This is a test template with parameter {{{param}}}
8850 {{paramtest|param=foo}}
8852 <p>This is a test template with parameter foo
8857 Template:paramtestnum
8863 Template unnamed parameter
8865 {{paramtestnum|Main Page|the main page}}
8867 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8872 Template:templatesimple
8878 Template:templateredirect
8880 #redirect [[Template:templatesimple]]
8884 Template:templateasargtestnum
8890 Template:templateasargtest
8892 {{template{{{templ}}}}}
8896 Template:templateasargtest2
8902 Template with template name as unnamed argument
8904 {{templateasargtestnum|templatesimple}}
8911 Template with template name as argument
8913 {{templateasargtest|templ=simple}}
8920 Template with template name as argument (2)
8922 {{templateasargtest2|templ=templatesimple}}
8929 Template:templateasargtestdefault
8931 {{{{{templ|templatesimple}}}}}
8941 Template with default value
8943 {{templateasargtestdefault}}
8950 Template with default value (value set)
8952 {{templateasargtestdefault|templ=templa}}
8961 {{templateredirect}}
8968 Template with argument in separate line
8970 {{ templateasargtest |
8978 Template with complex template as argument
8981 param ={{ templateasargtest |
8984 <p>This is a test template with parameter (test)
8989 Template with thumb image (with link in description)
8992 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
8994 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>
8997 <p>This is a test template with parameter</p>
8998 <div class="thumb tright">
8999 <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>
9000 <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>
9006 Template:complextemplate
9008 {{{1}}} {{paramtest|
9009 param ={{{param}}}}}
9013 Template with complex arguments
9016 param ={{ templateasargtest |
9017 templ = simple }}|[[Template:complextemplate|link]]}}
9019 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9024 BUG 553: link with two variables in a piped link
9027 |[[{{{1}}}|{{{2}}}]]
9032 <td>[[{{{1}}}|{{{2}}}]]
9038 Magic variable as template parameter
9040 {{paramtest|param={{SITENAME}}}}
9042 <p>This is a test template with parameter MediaWiki
9049 [[{{{param}}}|link]]
9053 Template parameter as link source
9055 {{linktest|param=Main Page}}
9057 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9062 Template-generated attribute string (k='v')
9064 <span {{attr_str|id|v1}}>bar</span>
9066 <p><span id="v1">bar</span>
9073 including another template, {{paramtest|param={{{arg}}}}}
9077 Template passing argument to another template
9079 {{paramtest2|arg='hmm'}}
9081 <p>including another template, This is a test template with parameter 'hmm'
9092 Template as link source
9096 [[{{linktest2}}|Main Page]]
9098 [[{{linktest2}}]]Page
9100 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9101 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9102 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9120 Template infinite loop
9124 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9129 Template from main namespace
9148 BUG 529: Template with table, not included at beginning of line
9167 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9187 BUG 41: Template parameters shown as broken links
9196 Template with targets containing wikilinks
9200 {{[[{{echo|foo}}]]}}
9202 {{{{echo|[[foo}}]]}}
9204 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9205 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9213 ''None'' of '''this''' should be
9215 but rather passed unmodified
9222 # hmm, fix this or just deprecate msgnw and document its behavior?
9226 {{msgnw:MSGNW test}}
9228 <p>''None'' of '''this''' should be
9230  but rather passed unmodified
9231 {{test}}
9241 {{int:youhavenewmessages|lots of money|not!}}
9243 <p>You have lots of money (not!).
9250 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9254 <includeonly> and <noinclude> being included
9265 <onlyinclude>Foo</onlyinclude>bar
9269 <onlyinclude> being included
9281 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9285 <onlyinclude> and <includeonly> being included
9294 <includeonly> and <noinclude> on a page
9296 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9303 Un-closed <noinclude>
9310 <onlyinclude> on a page
9312 <onlyinclude>Foo</onlyinclude>bar
9319 Un-closed <onlyinclude>
9326 Self-closed noinclude, includeonly, onlyinclude tags
9337 Unbalanced includeonly and noinclude tags
9341 |b</noinclude></noinclude>
9342 |c</noinclude></includeonly>
9343 |d</includeonly></includeonly>
9352 <td>c</includeonly>
9354 <td>d</includeonly></includeonly>
9360 Template:Includeonly section
9363 ==Includeonly section==
9369 Bug 6563: Edit link generation for section shown by <includeonly>
9371 {{includeonly section}}
9373 <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>
9374 <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>
9378 # Uses same input as the contents of [[Template:Includeonly section]]
9380 Bug 6563: Section extraction for section shown by <includeonly>
9385 ==Includeonly section==
9393 Bug 6563: Edit link generation for section suppressed by <includeonly>
9396 ==Includeonly section==
9400 <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>
9405 Bug 6563: Section extraction for section suppressed by <includeonly>
9410 ==Includeonly section==
9418 Un-closed <includeonly>
9425 Includes and comments at SOL
9427 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9434 <includeonly>can have stuff</includeonly>=== here ===
9437 <h2><span class="mw-headline" id="hu">hu</span></h2>
9442 <h3><span class="mw-headline" id="here">here</span></h3>
9445 <!-- 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>
9447 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9449 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9452 <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>
9456 # TODO: test with DOM fragment reuse!
9458 Parsoid: DOM fragment reuse
9460 parsoid=wt2wt,wt2html
9462 a{{echo|b<table></table>c}}d
9474 <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>
9476 <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">
9477 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9478 </span><p about="#mwt2">cd</p>
9480 <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">
9482 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9484 </span><p about="#mwt3">b</p>
9488 Parsoid: Merge double tds (bug 50603)
9497 <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>
9502 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9512 <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}}]}'>
9514 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9520 ### <includeonly> and <noinclude> in attributes
9523 0. includeonly around the entire attribute
9525 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9527 <p><span id="v2">bar</span>
9532 1. includeonly in html attr key
9534 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9536 <p><span id="foo">bar</span>
9541 2. includeonly in html attr value
9543 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9544 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9546 <p><span id="v1">bar</span>
9547 <span id="v1">bar</span>
9552 3. includeonly in part of an attr value
9554 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9556 <p><span style="color:red;">bar</span>
9561 4. includeonly in table attributes
9585 ### Token Stream Patcher tests
9587 ### These tests won't always pass wt2wt and other modes because
9588 ### on serialization, the table will be output on a new line.
9589 ### For now, we are blacklisting them, and using this to test selser.
9593 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9595 parsoid=wt2html,wt2wt
9597 {{echo|}}{| width = '100%'
9601 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
9602 <tbody><tr><td>foo</td></tr>
9607 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9609 parsoid=wt2html,wt2wt
9611 <includeonly>a</includeonly>{| {{{b}}}
9615 <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}}}":""}}'>
9616 <tbody><tr><td>c</td></tr>
9622 ### Testing parsing of templates where a template arg
9623 ### has the same name as the template itself.
9633 Templates: Template Name/Arg clash: 1. Use of positional param
9642 Templates: Template Name/Arg clash: 2. Use of named param
9651 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9660 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
9664 Templates: 1. Simple use
9673 Templates: 2. Inside a block tag
9675 <div>{{echo|Foo}}</div>
9676 <blockquote>{{echo|Foo}}</blockquote>
9679 <blockquote>Foo</blockquote>
9689 Templates: P-wrapping: 1a. Templates on consecutive lines
9700 Templates: P-wrapping: 1b. Templates on consecutive lines
9714 Templates: P-wrapping: 1c. Templates on consecutive lines
9717 {{echo|bar}} <div>baz</div>
9730 Templates: P-wrapping: 1d. Template preceded by comment-only line
9739 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
9743 Templates: Inline Text: 1. Multiple template uses
9745 {{echo|Foo}}bar{{echo|baz}}
9752 Templates: Inline Text: 2. Back-to-back template uses
9754 {{echo|Foo}}{{echo|bar}}
9761 Templates: Block Tags: 1. Multiple template uses
9763 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
9765 <div>Foo</div><div>bar</div><div>baz</div>
9770 Templates: Block Tags: 2. Back-to-back template uses
9772 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
9774 <div>Foo</div><div>bar</div>
9778 # This is an edge case relating to paragraph wrapping.
9780 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
9785 <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
9790 Templates: Links: 1. Simple example
9792 {{echo|[[Foo|bar]]}}
9794 <p><a href="/wiki/Foo" title="Foo">bar</a>
9799 Templates: Links: 2. Generation of link href
9801 [[{{echo|Foo}}|bar]]
9803 <p><a href="/wiki/Foo" title="Foo">bar</a>
9808 Templates: Links: 3. Generation of part of a link href
9810 [[Fo{{echo|o}}|bar]]
9814 [[Foo{{echo|bar}}baz]]
9816 [[Foo{{echo|bar}}|bar]]
9818 [[:Foo{{echo|bar}}]]
9820 [[:Foo{{echo|bar}}|bar]]
9822 <p><a href="/wiki/Foo" title="Foo">bar</a>
9823 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9824 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9825 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9826 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9827 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9832 Templates: Links: 4. Multiple templates generating link href
9834 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9836 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9841 Templates: Links: 5. Generation of link text
9843 [[Foo|{{echo|bar}}]]
9845 <p><a href="/wiki/Foo" title="Foo">bar</a>
9850 Templates: Links: 5. Nested templates (only outermost template should be marked)
9852 {{echo|[[{{echo|Foo}}|bar]]}}
9854 <p><a href="/wiki/Foo" title="Foo">bar</a>
9859 Templates: HTML Tag: 1. Generation of HTML attr. key
9861 <div {{echo|style}}="color:red;">foo</div>
9863 <div style="color:red;">foo</div>
9868 Templates: HTML Tag: 2. Generation of HTML attr. value
9870 <div style={{echo|'color:red;'}}>foo</div>
9872 <div style="color:red;">foo</div>
9877 Templates: HTML Tag: 3. Generation of HTML attr key and value
9879 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9881 <div style="color:red;">foo</div>
9886 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9888 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9890 <div title="This is a long title with just one piece templated">foo</div>
9895 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9897 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9899 <div title="This is a long title with just one piece templated">foo</div>
9904 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9906 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9908 <div title="This is a long title with just one piece templated">foo</div>
9913 Templates: HTML Tag: 7. Generation of partial attribute key string
9915 <div st{{echo|yle}}="color:red;">foo</div>
9917 <div style="color:red;">foo</div>
9922 Templates: HTML Tables: 1. Generating start of a HTML table
9924 {{echo|<table><tr><td>foo</td>}}</tr></table>
9926 <table><tr><td>foo</td></tr></table>
9931 Templates: HTML Tables: 2a. Generating middle of a HTML table
9933 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9935 <table><tr><td>foo</td></tr></table>
9940 Templates: HTML Tables: 2b. Generating middle of a HTML table
9942 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9944 <table><tr><td>foo</td></tr></table>
9949 Templates: HTML Tables: 3. Generating end of a HTML table
9951 <table><tr>{{echo|<td>foo</td></tr></table>}}
9953 <table><tr><td>foo</td></tr></table>
9958 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9960 {{echo|<table>}}<tr><td>foo</td></tr></table>
9962 <table><tr><td>foo</td></tr></table>
9967 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9969 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9971 <table><tr><td>foo</td></tr></table>
9976 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9978 <table><tr>{{echo|<td>}}foo</td></tr></table>
9980 <table><tr><td>foo</td></tr></table>
9985 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9987 <table><tr><td>foo{{echo|</td>}}</tr></table>
9989 <table><tr><td>foo</td></tr></table>
9994 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9996 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9998 <table><tr><td>foo</td></tr></table>
10003 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10005 <table><tr><td>foo</td></tr>{{echo|</table>}}
10007 <table><tr><td>foo</td></tr></table>
10012 Templates: HTML Tables: 5. Proper fostering of categories from inside
10014 parsoid=wt2html,wt2wt
10016 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10017 <!--Two categories (Bug 50330)-->
10018 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10020 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10021 <!--Two categories (Bug 50330)-->
10022 <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>
10026 Templates: Wiki Tables: 1a. Fostering of entire template content
10034 <tr><td></td></tr></table>
10046 Templates: Wiki Tables: 1b. Fostering of entire template content
10059 <tr><td></td></tr></table>
10073 Templates: Wiki Tables: 2. Fostering of partial template content
10083 <tr><td></td></tr></table>
10096 Templates: Wiki Tables: 3. td-content via multiple templates
10099 {{echo|{{pipe}}a}}{{echo|b}}
10110 Templates: Wiki Tables: 4. Templated tags, no content
10116 <tr><td></td></tr></table>
10121 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10135 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10149 Templates: Lists: Multi-line list-items via templates
10151 *{{echo|a {{nonexistent|
10153 *{{echo|b {{nonexistent|
10156 <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>
10157 <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>
10162 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10164 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10166 <p><i>ab</i>c<i>d</i>e
10171 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10172 (PHP parser generates misnested html)
10174 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10176 <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>
10180 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10181 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10183 parsoid=wt2html,wt2wt
10185 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10187 <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>
10188 <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>
10189 <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>
10193 Templates: Ugly nesting: 4. Divs opened/closed across templates
10195 a<div>b{{echo|c</div>d}}e
10206 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10212 |{{echo|foo</table>}}
10216 <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|}"]}'>
10220 <td>foo</td></tr></tbody></table><span about="#mwt1">
10221 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10226 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10236 <td>1. {{echo|foo </table>}}</td>
10238 <td>2. {{echo|baz </table>}}</td>
10251 <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>"]}'>
10256 <td>1. foo </td></tr></tbody></table></td>
10258 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10259 </span><span about="#mwt2">
10260 </span><span about="#mwt2">
10261 </span><span about="#mwt2">abc</span><span about="#mwt2">
10262 </span><span about="#mwt2">
10263 </span><span about="#mwt2">
10264 </span><span about="#mwt2">
10265 </span><span about="#mwt2">
10266 </span><span about="#mwt2">
10267 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10268 </span><span about="#mwt2">
10273 Templates: Ugly templates: 3. newline-only template parameter
10282 # This looks like a bug: a single newline triggers p/br for some reason.
10284 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10293 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10294 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10296 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10302 <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
10303 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10307 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10308 # that are "identical" and generate nesting cycles in the algorithm
10310 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10312 {{echo|<table><tr><td><table>}}
10316 <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"}'>
10317 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10318 </table></td></tr></tbody></table>
10322 Parser Functions: 1. Simple example
10331 Parser Functions: 2. Nested use (only outermost should be marked up)
10340 ### Pre-save transform tests
10343 pre-save transform: subst:
10349 This is a test template
10353 pre-save transform: normal template
10363 pre-save transform: nonexistent template
10367 {{thistemplatedoesnotexist}}
10369 {{thistemplatedoesnotexist}}
10374 pre-save transform: subst magic variables
10383 # This is bug 89, which I fixed. -- wtm
10385 pre-save transform: subst: templates with parameters
10389 {{subst:paramtest|param="something else"}}
10391 This is a test template with parameter "something else"
10395 Template:nowikitest
10397 <nowiki>'''not wiki'''</nowiki>
10401 pre-save transform: nowiki in subst (bug 1188)
10405 {{subst:nowikitest}}
10407 <nowiki>'''not wiki'''</nowiki>
10412 Template:commenttest
10414 This template has <!-- a comment --> in it.
10418 pre-save transform: comment in subst (bug 1936)
10422 {{subst:commenttest}}
10424 This template has <!-- a comment --> in it.
10428 pre-save transform: unclosed tag
10432 <nowiki>'''not wiki'''
10434 <nowiki>'''not wiki'''
10438 pre-save transform: mixed tag case
10442 <NOwiki>'''not wiki'''</noWIKI>
10444 <NOwiki>'''not wiki'''</noWIKI>
10448 pre-save transform: unclosed comment in <nowiki>
10452 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10454 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10457 # Leading @ in this template definition works around a limitation
10458 # in parsoid's parserTests which otherwise strips the <span> from the
10459 # result (confusing it for a template wrapper)
10463 @<span onmouseover="alert('crap')">Oh no</span>
10467 (confirming safety of fix for subst bug 1936)
10469 {{Template:dangerous}}
10471 <p>@<span>Oh no</span>
10476 pre-save transform: comment containing gallery (bug 5024)
10480 <!-- <gallery>data</gallery> -->
10482 <!-- <gallery>data</gallery> -->
10486 pre-save transform: comment containing extension
10490 <!-- <tag>data</tag> -->
10492 <!-- <tag>data</tag> -->
10496 pre-save transform: comment containing nowiki
10500 <!-- <nowiki>data</nowiki> -->
10502 <!-- <nowiki>data</nowiki> -->
10506 pre-save transform: <noinclude> in subst (bug 3298)
10516 pre-save transform: <onlyinclude> in subst (bug 3298)
10520 {{subst:Includes2}}
10528 {{<includeonly>subst:</includeonly>Includes}}
10532 Template:SafeSubstTest
10534 {{<includeonly>safesubst:</includeonly>Includes}}
10538 bug 22297: safesubst: works during PST
10542 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10548 bug 22297: safesubst: works during normal parse
10557 subst: does not work during normal parse
10561 <p>{{subst:Includes}}
10566 pre-save transform: context links ("pipe trick")
10570 [[Article (context)|]]
10573 [[Bar:Article (context)|]]
10574 [[:Bar:Article (context)|]]
10576 [[|Article (context)]]
10580 [[Article (context)|Article]]
10581 [[Bar:Article|Article]]
10582 [[:Bar:Article|Article]]
10583 [[Bar:Article (context)|Article]]
10584 [[:Bar:Article (context)|Article]]
10586 [[Article (context)]]
10587 [[Bar:X (Y) Z|X (Y) Z]]
10588 [[:Bar:X (Y) Z|X (Y) Z]]
10592 pre-save transform: context links ("pipe trick") with interwiki prefix
10596 [[interwiki:Article|]]
10597 [[:interwiki:Article|]]
10598 [[interwiki:Bar:Article|]]
10599 [[:interwiki:Bar:Article|]]
10601 [[interwiki:Article|Article]]
10602 [[:interwiki:Article|Article]]
10603 [[interwiki:Bar:Article|Bar:Article]]
10604 [[:interwiki:Bar:Article|Bar:Article]]
10608 pre-save transform: context links ("pipe trick") with parens in title
10610 pst title=[[Somearticle (context)]]
10614 [[Article (context)|Article]]
10618 pre-save transform: context links ("pipe trick") with comma in title
10620 pst title=[[Someplace, Somewhere]]
10623 [[Otherplace, Elsewhere|]]
10624 [[Otherplace, Elsewhere, Anywhere|]]
10626 [[Otherplace, Somewhere|Otherplace]]
10627 [[Otherplace, Elsewhere|Otherplace]]
10628 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
10632 pre-save transform: context links ("pipe trick") with parens and comma
10634 pst title=[[Someplace (IGNORED), Somewhere]]
10637 [[Otherplace (place), Elsewhere|]]
10639 [[Otherplace, Somewhere|Otherplace]]
10640 [[Otherplace (place), Elsewhere|Otherplace]]
10644 pre-save transform: context links ("pipe trick") with comma and parens
10646 pst title=[[Who, me? (context)]]
10649 [[Me, Myself, and I (1937 song)|]]
10651 [[Yes, you. (context)|Yes, you.]]
10652 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
10656 pre-save transform: context links ("pipe trick") with namespace
10658 pst title=[[Ns:Somearticle]]
10662 [[Ns:Article|Article]]
10666 pre-save transform: context links ("pipe trick") with namespace and parens
10668 pst title=[[Ns:Somearticle (context)]]
10672 [[Ns:Article (context)|Article]]
10676 pre-save transform: context links ("pipe trick") with namespace and comma
10678 pst title=[[Ns:Somearticle, Context, Whatever]]
10682 [[Ns:Article, Context, Whatever|Article]]
10686 pre-save transform: context links ("pipe trick") with namespace, comma and parens
10688 pst title=[[Ns:Somearticle, Context (context)]]
10692 [[Ns:Article (context)|Article]]
10696 pre-save transform: context links ("pipe trick") with namespace, parens and comma
10698 pst title=[[Ns:Somearticle (IGNORED), Context]]
10702 [[Ns:Article, Context|Article]]
10706 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
10710 [[Article(context)|]]
10711 [[Bar:Article(context)|]]
10712 [[:Bar:Article(context)|]]
10713 [[|Article(context)]]
10717 [[Article(context)|Article]]
10718 [[Bar:Article(context)|Article]]
10719 [[:Bar:Article(context)|Article]]
10720 [[Article(context)]]
10721 [[Bar:X(Y)Z|X(Y)Z]]
10722 [[:Bar:X(Y)Z|X(Y)Z]]
10726 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
10730 [[Article (context)|]]
10731 [[Bar:Article (context)|]]
10732 [[:Bar:Article (context)|]]
10733 [[|Article (context)]]
10737 [[Article (context)|Article]]
10738 [[Bar:Article (context)|Article]]
10739 [[:Bar:Article (context)|Article]]
10740 [[Article (context)]]
10741 [[Bar:X (Y) Z|X (Y) Z]]
10742 [[:Bar:X (Y) Z|X (Y) Z]]
10746 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
10750 [[Article(context)|]]
10751 [[Bar:Article(context)|]]
10752 [[:Bar:Article(context)|]]
10753 [[|Article(context)]]
10757 [[Article(context)|Article]]
10758 [[Bar:Article(context)|Article]]
10759 [[:Bar:Article(context)|Article]]
10760 [[Article(context)]]
10761 [[Bar:X(Y)Z|X(Y)Z]]
10762 [[:Bar:X(Y)Z|X(Y)Z]]
10766 pre-save transform: context links ("pipe trick") with commas (bug 21660)
10770 [[Article (context), context|]]
10771 [[Article (context),context|]]
10772 [[Bar:Article (context), context|]]
10773 [[Bar:Article (context),context|]]
10774 [[:Bar:Article (context), context|]]
10775 [[:Bar:Article (context),context|]]
10777 [[Article (context), context|Article]]
10778 [[Article (context),context|Article]]
10779 [[Bar:Article (context), context|Article]]
10780 [[Bar:Article (context),context|Article]]
10781 [[:Bar:Article (context), context|Article]]
10782 [[:Bar:Article (context),context|Article]]
10786 pre-save transform: trim trailing empty lines
10790 Empty lines are trimmed
10796 Empty lines are trimmed
10800 pre-save transform: Signature expansion
10805 * <noinclude>~~~</noinclude>
10806 * <includeonly>~~~</includeonly>
10807 * <onlyinclude>~~~</onlyinclude>
10809 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
10810 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
10811 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
10812 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
10817 pre-save transform: Signature expansion in nowiki tags (bug 93)
10823 <nowiki>~~~~</nowiki>
10825 <includeonly><nowiki>~~~~</nowiki></includeonly>
10827 <noinclude><nowiki>~~~~</nowiki></noinclude>
10829 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10831 {{subst:Foo}} shall be converted to FOO
10833 As well as inside noinclude/onlyinclude
10834 <noinclude>{{subst:Foo}}</noinclude>
10835 <onlyinclude>{{subst:Foo}}</onlyinclude>
10837 But not inside includeonly
10838 <includeonly>{{subst:Foo}}</includeonly>
10842 <nowiki>~~~~</nowiki>
10844 <includeonly><nowiki>~~~~</nowiki></includeonly>
10846 <noinclude><nowiki>~~~~</nowiki></noinclude>
10848 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10850 FOO shall be converted to FOO
10852 As well as inside noinclude/onlyinclude
10853 <noinclude>FOO</noinclude>
10854 <onlyinclude>FOO</onlyinclude>
10856 But not inside includeonly
10857 <includeonly>{{subst:Foo}}</includeonly>
10861 Parsoid: Recognize nowiki with trailing space in tags
10865 <nowiki ><div>[[foo]]</nowiki >
10873 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10880 Parsoid: Recognize nowiki with odd capitalization
10884 <noWikI ><div>[[foo]]</Nowiki >
10886 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10891 Parsoid: Escape nowiki with trailing space in tags
10895 <nowiki > foo </nowiki >
10901 <p><nowiki > foo </nowiki ></p>
10902 <p>a<nowiki />b</p>
10903 <p>c<nowiki/ >d</p>
10907 Parsoid: Escape weird noWikI capitalizations
10911 <noWikI > foo </NoWikI >
10913 <p><noWikI > foo </NoWikI ></p>
10917 ### Message transform tests
10920 message transform: magic variables
10930 message transform: should not transform wiki markup
10940 message transform: <noinclude> in transcluded template (bug 4926)
10950 message transform: <onlyinclude> in transcluded template (bug 4926)
10960 {{#special:}} page name, known
10964 {{#special:Recentchanges}}
10966 Special:RecentChanges
10970 {{#special:}} page name with subpage, known
10974 {{#special:Recentchanges/param}}
10976 Special:RecentChanges/param
10980 {{#special:}} page name, unknown
10984 {{#special:foobar nonexistent}}
10986 Special:Foobar nonexistent
10990 {{#speciale:}} page name, known
10994 {{#speciale:Recentchanges}}
10996 Special:RecentChanges
11000 {{#speciale:}} page name with subpage, known
11004 {{#speciale:Recentchanges/param}}
11006 Special:RecentChanges/param
11010 {{#speciale:}} page name, unknown
11014 {{#speciale:foobar nonexistent}}
11016 Special:Foobar_nonexistent
11022 ### For Parsoid-specific tests, see
11023 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11028 parsoid=wt2html,wt2wt,html2html
11030 [[Image:foobar.jpg]]
11032 <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>
11035 <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>
11039 Simple image (using File: namespace, now canonical)
11041 [[File:Foobar.jpg]]
11043 <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>
11046 <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>
11050 Right-aligned image
11052 [[File:Foobar.jpg|right]]
11054 <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>
11057 <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>
11063 [[File:Foobar.jpg|right|Caption text]]
11065 <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>
11068 <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>
11072 Image with caption, bug 53312 #1
11074 [[File:Foobar.jpg|right|Caption page stuff]]
11076 <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>
11079 <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>
11083 Image with caption, bug 53312 #2
11085 [[File:Foobar.jpg|right|Caption page=]]
11087 <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>
11090 <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>
11094 Image with caption, bug 53312 #3
11096 [[File:Foobar.jpg|right|Caption page=stuff]]
11098 <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>
11101 <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>
11105 Allow empty links in image captions (Bug 60753)
11109 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11114 <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>
11117 <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>
11119 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11120 </figcaption></figure>
11124 Link with empty target
11133 Image with empty attribute
11135 parsoid=wt2html,wt2wt,html2html
11137 [[File:Foobar.jpg|right||Caption text]]
11139 <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>
11142 <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>
11146 1. Block image with individual attributes from templates
11148 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11150 <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>
11153 <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>
11157 2. Block Image with individual attributes from templates
11159 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11161 <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>
11164 <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>
11168 3. Inline image with individual attributes from templates
11170 [[File:Foobar.jpg|{{echo|50px}}]]
11172 <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>
11175 <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>
11178 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11179 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11181 Image with multiple attributes from the same template
11183 [[File:Foobar.jpg|{{image_attribs}}]]
11185 <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>
11188 <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>
11192 Image with link tails
11196 123[[File:Foobar.jpg]]456
11197 123[[File:Foobar.jpg|right]]456
11198 123[[File:Foobar.jpg|thumb]]456
11200 <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
11202 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
11203 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
11206 <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>
11208 <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>
11210 <div class="thumb tright">
11211 <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>
11212 <div class="thumbcaption">
11213 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11219 <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>
11220 <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>
11221 <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>
11225 Image with multiple captions -- only last one is accepted
11227 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11229 <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>
11232 <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>
11236 Image with multiple widths -- use last
11238 [[File:Foobar.jpg|200px|300px|caption]]
11240 <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>
11243 <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>
11247 Image with multiple alignments -- use first (bug 48664)
11251 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11253 [[File:Foobar.jpg|middle|text-top|caption]]
11255 <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>
11256 <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>
11259 <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>
11260 <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>
11264 Image with width attribute at different positions
11266 [[File:Foobar.jpg|200px|right|Caption]]
11267 [[File:Foobar.jpg|right|200px|Caption]]
11268 [[File:Foobar.jpg|right|Caption|200px]]
11270 <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>
11271 <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>
11272 <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>
11275 <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>
11276 <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>
11277 <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>
11280 # a sad bit of backward-compatibility
11282 Image with size specified with pxpx (bug 13500, 51628)
11284 parsoid=wt2html,wt2wt,html2html
11286 [[File:Foobar.jpg|20pxpx]]
11287 [[File:Foobar.jpg|200x20pxpx]]
11289 <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>
11290 <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>
11293 <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>
11297 Image with link parameter, wiki target
11299 [[File:Foobar.jpg|link=Main Page]]
11301 <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>
11304 <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>
11307 # parsoid bug 49293 (part 1)
11309 Image with link parameter, URL target
11311 [[File:Foobar.jpg|link=http://example.com/]]
11313 <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>
11316 <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>
11319 # parsoid bug 49293 (part 2)
11321 Image with link parameter, protocol-less URL target
11323 [[File:Foobar.jpg|link=//example.com/]]
11325 <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>
11328 <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>
11332 Image with link parameter, wgExternalLinkTarget
11334 [[Image:foobar.jpg|link=http://example.com/]]
11336 wgExternalLinkTarget='foobar'
11338 <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>
11343 Image with link parameter, wgNoFollowLinks set to false
11345 [[Image:foobar.jpg|link=http://example.com/]]
11347 wgNoFollowLinks=false
11349 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11354 Image with link parameter, wgNoFollowDomainExceptions
11356 [[Image:foobar.jpg|link=http://example.com/]]
11358 wgNoFollowDomainExceptions='example.com'
11360 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11365 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11367 [[Image:foobar.jpg|link=http://example.com/|Title]]
11369 wgExternalLinkTarget='foobar'
11371 <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>
11376 Image with empty link parameter
11378 [[File:Foobar.jpg|link=]]
11380 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11383 <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>
11387 Image with link parameter (wiki target) and unnamed parameter
11389 [[File:Foobar.jpg|link=Main_Page|Title]]
11391 <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>
11394 <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>
11398 Image with link parameter (URL target) and unnamed parameter
11400 [[File:Foobar.jpg|link=http://example.com/|Title]]
11402 <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>
11405 <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>
11409 Thumbnail image with link parameter
11412 parsoid=wt2html,wt2wt,html2html
11414 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11416 <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>
11419 <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>
11423 Manually-specified thumbnail image
11427 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11429 <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>
11432 <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>
11436 Manually-specified thumbnail image with explicit link to wiki page
11439 parsoid=wt2html,wt2wt,html2html
11441 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11443 <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>
11446 <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>
11450 Manually-specified thumbnail image with explicit link to url
11453 parsoid=wt2html,wt2wt,html2html
11455 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11457 <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>
11460 <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>
11464 Manually-specified thumbnail image with explicit no link
11467 parsoid=wt2html,wt2wt,html2html
11469 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11471 <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>
11474 <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>
11478 Manually-specified thumbnail image with explicit link and alt text
11481 parsoid=wt2html,wt2wt,html2html
11483 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11485 <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>
11488 <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>
11492 Image with frame and link
11494 parsoid=wt2html,wt2wt,html2html
11496 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11498 <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>
11501 <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>
11505 Image with frame and link and explicit alt
11507 parsoid=wt2html,wt2wt,html2html
11509 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11511 <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>
11514 <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>
11518 Image with wiki markup in implicit alt
11520 parsoid=wt2html,wt2wt,html2html
11522 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11524 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11526 <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>
11527 </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>
11530 <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>
11531 <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>
11534 ###################
11535 # Conflicting image format options.
11536 # First option specified should 'win'.
11537 # All three cases in each test should be identical.
11540 Image with 'frameless' first.
11542 parsoid=wt2html,wt2wt,html2html
11544 [[File:Foobar.jpg|frameless|caption]]
11546 [[File:Foobar.jpg|frameless|frame|caption]]
11548 [[File:Foobar.jpg|frameless|thumb|caption]]
11550 <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>
11551 </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>
11552 </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>
11555 <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>
11556 <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>
11557 <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>
11561 Image with 'frame' first.
11563 parsoid=wt2html,wt2wt,html2html
11565 [[File:Foobar.jpg|frame|caption]]
11566 [[File:Foobar.jpg|frame|frameless|caption]]
11567 [[File:Foobar.jpg|frame|thumb|caption]]
11569 <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>
11570 <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>
11571 <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>
11574 <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>
11575 <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>
11576 <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>
11580 Image with 'thumb' first.
11582 parsoid=wt2html,wt2wt,html2html
11584 [[File:Foobar.jpg|thumb|caption]]
11585 [[File:Foobar.jpg|thumb|frameless|caption]]
11586 [[File:Foobar.jpg|thumb|frame|caption]]
11588 <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>
11589 <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>
11590 <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>
11593 <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>
11594 <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>
11595 <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>
11598 ###################
11600 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
11601 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
11602 # Foobar has actual size of 1941x220
11603 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
11604 # a scalable format.
11605 # 2. Framed images always ignore size options; always render at default size.
11606 # 3. "Unspecified format" and border are the only types which can be
11610 Image: "unspecified format" and border enlarge
11612 parsoid=wt2html,wt2wt,html2html
11614 [[File:Foobar.jpg|2000px]]
11616 [[File:Foobar.jpg|border|2000px]]
11618 <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>
11619 </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>
11622 <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>
11623 <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>
11627 Image: "unspecified format" and border reduce
11629 parsoid=wt2html,wt2wt,html2html
11631 [[File:Foobar.jpg|1000px]]
11633 [[File:Foobar.jpg|border|1000px]]
11635 <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>
11636 </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>
11639 <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>
11640 <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>
11644 Image: thumbs reduce
11646 parsoid=wt2html,wt2wt,html2html
11648 [[File:Foobar.jpg|thumb|50px]]
11650 <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>
11653 <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>
11657 Image: bitmap thumbs can't be enlarged past original size, but vector can.
11659 parsoid=wt2html,wt2wt,html2html
11661 [[File:Foobar.jpg|thumb|2000px]]
11663 [[File:Foobar.svg|thumb|2000px]]
11665 <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>
11666 <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>
11669 <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>
11670 <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>
11674 Image: frameless can reduce in size
11676 parsoid=wt2html,wt2wt,html2html
11678 [[File:Foobar.jpg|frameless|50px]]
11680 <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>
11683 <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>
11687 Image: bitmap frameless can't be enlarged past original size, but vector can
11689 parsoid=wt2html,wt2wt,html2html
11691 [[File:Foobar.jpg|frameless|2000px]]
11693 [[File:Foobar.svg|frameless|2000px]]
11695 <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>
11696 </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>
11699 <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>
11700 <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>
11704 Image: framed images are always unscaled.
11706 parsoid=wt2html,wt2wt,html2html
11708 [[File:Foobar.jpg|frame]]
11710 [[File:Foobar.jpg|frame|50px]]
11712 [[File:Foobar.jpg|frame|50x50px]]
11714 [[File:Foobar.jpg|frame|2000px]]
11716 <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>
11717 <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>
11718 <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>
11719 <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>
11722 <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>
11723 <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>
11724 <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>
11725 <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>
11728 ###################
11731 Link to image page- image page normally doesn't exists, hence edit link
11732 Add test with existing image page
11733 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
11737 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
11742 bug 18784 Link to non-existent image page with caption should use caption as link text
11744 [[:Image:test|caption]]
11746 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
11751 Frameless image caption with a free URL
11753 [[File:Foobar.jpg|http://example.com]]
11755 <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>
11758 <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>
11762 Thumbnail image caption with a free URL
11766 [[File:Foobar.jpg|thumb|http://example.com]]
11768 <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>
11771 <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>
11775 Thumbnail image caption with a free URL and explicit alt
11778 parsoid=wt2html,wt2wt,html2html
11780 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
11782 <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>
11785 <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>
11789 SVG thumbnails with no language set
11792 [[File:Foobar.svg|thumb|caption]]
11794 <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>
11797 <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>
11801 SVG thumbnails with language de
11803 parsoid=wt2html,wt2wt,html2html
11805 [[File:Foobar.svg|thumb|caption|lang=de]]
11807 <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>
11810 <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>
11814 SVG thumbnails with invalid language code
11816 parsoid=wt2html,wt2wt,html2html
11818 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
11820 <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>
11823 <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>
11827 BUG 1887: A ISBN with a thumbnail
11829 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11831 <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>
11834 <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>
11838 BUG 1887: A RFC with a thumbnail
11840 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11842 <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>
11845 <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>
11849 BUG 1887: A mailto link with a thumbnail
11851 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11853 <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>
11856 <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>
11859 # Pending resolution to bug 368
11861 BUG 648: Frameless image caption with a link
11863 [[File:Foobar.jpg|text with a [[link]] in it]]
11865 <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>
11868 <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>
11872 BUG 648: Frameless image caption with a link (suffix)
11874 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11876 <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>
11879 <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>
11883 BUG 648: Frameless image caption with an interwiki link
11885 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11887 <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>
11890 <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>
11894 BUG 648: Frameless image caption with a piped interwiki link
11896 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11898 <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>
11901 <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>
11905 Escape HTML special chars in image alt text
11907 [[File:Foobar.jpg|& < > "]]
11909 <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>
11912 <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>
11916 BUG 499: Alt text should have Ӓ, not &1234;
11918 [[File:Foobar.jpg|♀]]
11920 <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>
11923 <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>
11927 Broken image caption with link
11929 parsoid=wt2html,wt2wt,html2html
11931 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11933 <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.
11936 <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>
11940 Image caption containing another image
11942 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
11944 <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>
11947 <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>
11951 Image: caption containing a newline
11953 [[File:Foobar.jpg|This
11956 <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>
11959 <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>
11963 Image: caption containing leading space
11964 (The leading space should not trigger nowiki escaping in wt2wt mode)
11966 [[File:Foobar.jpg|thumb| bar]]
11968 <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>
11971 <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>
11975 Image: caption containing a table
11977 parsoid=wt2html,wt2wt,html2html
11979 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11985 and some more text.]]
11987 <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>
11990 <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
11993 <tr><th>Foo </th><th>Bar</th></tr>
11996 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12000 Bug 3090: External links other than http: in image captions
12002 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12004 <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>
12007 <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>
12013 parsoid=wt2html,wt2wt,html2html
12015 [[Image:foobar.jpg|a|class=b]]
12017 <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>
12020 <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>
12024 Localized image handling (1).
12026 parsoid=wt2html,wt2wt,html2html
12029 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12031 <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>
12034 <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>
12038 Localized image handling (2).
12041 parsoid=wt2html,wt2wt,html2html
12044 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12046 <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>
12049 <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>
12053 "border", "frameless" and "class" attributes on an image.
12056 parsoid=wt2html,wt2wt,html2html
12058 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12060 <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>
12063 <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>
12066 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12068 Invalid image attributes (bug 62500)
12071 parsoid=wt2html,wt2wt,html2html
12073 [[File:Foobar.jpg|thumb|float|left|caption]]
12075 [[File:Foobar.jpg|thumb|righ|caption]]
12077 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12079 <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>
12080 <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>
12081 <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>
12084 <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>
12085 <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>
12086 <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>
12092 #REDIRECT [[File:Barfoo.jpg]]
12098 [[Image:Barfoo.jpg]]
12100 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12105 Missing image with uploads disabled
12109 [[Image:Foobaz.jpg]]
12111 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12115 # Parsoid-specific testing for images
12116 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12117 # Currently imperfect due to a flaw in the Parsoid testrunner
12119 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12123 Parsoid-specific image handling - simple image with size and middle alignment
12125 [[File:Foobar.jpg|middle|50px]]
12127 <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>
12131 Parsoid-specific image handling - simple image with size, middle alignment,
12132 non-standard namespace alias
12134 parsoid=wt2wt,wt2html,html2html
12136 [[Image:Foobar.jpg|middle|50px]]
12138 <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>
12142 Parsoid-specific image handling - simple image with size and middle alignment
12145 [[File:Foobar.jpg|50px|middle]]
12147 <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>
12151 Parsoid-specific image handling - simple image with size and middle alignment
12152 and non-standard namespace name
12154 parsoid=wt2html,wt2wt,html2html
12156 [[Image:Foobar.jpg|50px|middle]]
12158 <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>
12162 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12164 [[File:Foobar.jpg|500x10px|baseline|caption]]
12166 <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>
12170 Parsoid-specific image handling - simple image with border and size spec
12172 [[File:Foobar.jpg|50px|border|caption]]
12174 <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>
12178 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12180 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12182 <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>
12186 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12189 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12191 <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>
12195 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12197 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12199 <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>
12203 Parsoid-specific image handling - thumbnail with specific size, halign,
12204 valign, and caption (existing content)
12206 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12208 <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>
12212 Parsoid-specific image handling - framed image with specific size and caption
12215 parsoid=wt2html,wt2wt,html2html
12217 [[File:Foobar.jpg|frame|500x50px|caption]]
12219 <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>
12223 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12226 parsoid=wt2html,wt2wt,html2html
12228 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12230 <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>
12234 Parsoid-specific image handling - frameless image with specific size, border, and caption
12236 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12238 <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>
12242 Parsoid-specific image handling - simple image with a formatted caption
12244 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12246 <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>
12250 Parsoid-specific image handling - caption with a template in it
12252 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12254 <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>
12258 Parsoid-specific image handling - caption with unbalanced tags in it
12260 parsoid=wt2html,wt2wt,html2html
12263 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12267 <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>
12272 Parsoid-specific image handling - empty caption (1)
12274 parsoid=wt2html,wt2wt
12276 [[File:Foobar.jpg|thumb|]]
12278 <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>
12281 # empty captions don't get serialized unless we're in the "round trip" case
12283 Parsoid-specific image handling - empty caption (2)
12287 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12288 <a href="File:Foobar.jpg">
12289 <img resource="./File:Foobar.jpg"
12290 src="//example.com/images/3/3a/Foobar.jpg"
12291 height="25" width="220"/>
12293 <figcaption></figcaption>
12296 [[File:Foobar.jpg|thumb]]
12300 Parsoid-specific image handling - whitespace caption
12302 [[File:Foobar.jpg|thumb| ]]
12304 <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>
12308 Parsoid-specific image handling - lang option
12311 [[File:Foobar.svg|lang=de|caption]]
12315 <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>
12324 Subpage test/subpage
12332 subpage title=[[Subpage test]]
12336 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12341 Subpage noslash link
12343 subpage title=[[Subpage test]]
12347 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12351 # TODO: make this PHP-parser compatible!
12353 Relative subpage noslash link
12355 parsoid=wt2wt,wt2html,html2html
12356 subpage title=[[Subpage test/1/2/3/4]]
12362 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/" title="Subpage test/1/2/subpage/">subpage</a></p>
12363 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12367 Parsoid: dot-slash prefixed wikilinks
12377 </p><p>[[././baz/]]
12382 </p><p>[[././baz/]]
12387 Render invalid page names as plain text (bug 51090)
12400 [[{{echo|./../foo}}|bar]]
12401 [[{{echo|foo/.}}|bar]]
12402 [[{{echo|foo/..}}|bar]]
12403 [[{{echo|foo~~~~bar}}]]
12404 [[{{echo|foo>bar}}]]
12405 [[{{echo|foo././bar}}]]
12406 [[{{echo|foo{bar}}]]
12407 [[{{echo|foo}bar}}]]
12408 [[{{echo|foo[bar}}]]
12409 [[{{echo|foo]bar}}]]
12410 [[{{echo|foo<bar}}]]
12412 <p>[[./../foo|bar]]
12422 </p><p>[[./../foo|bar]]
12435 <p>[[./../foo|bar]]
12446 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12447 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12448 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12449 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12450 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12451 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12452 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12453 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12454 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12455 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12456 [[<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>
12464 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12469 BUG 561: {{/Subpage}}
12471 subpage title=[[Page]]
12475 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12483 Category:MediaWiki User's Guide
12491 [[:Category:MediaWiki User's Guide]]
12493 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12502 [[Category:MediaWiki User's Guide]]
12504 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12508 PAGESINCATEGORY invalid title fatal (r33546 fix)
12510 {{PAGESINCATEGORY:<bogus>}}
12517 Category with different sort key
12521 [[Category:MediaWiki User's Guide|Foo]]
12523 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12527 Category with identical sort key
12531 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12533 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12537 Category with empty sort key
12542 [[Category:MediaWiki User's Guide|]]
12544 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12548 Category with empty sort key and parentheses
12553 [[Category:Foo (bar)|]]
12555 [[Category:Foo (bar)|Foo]]
12559 Category with link tail
12564 123[[Category:Foo]]456
12566 123[[Category:Foo]]456
12570 Category with template
12575 [[Category:{{echo|Foo}}]]
12577 [[Category:{{echo|Foo}}]]
12581 Category with template in sort key
12586 [[Category:Foo|{{echo|Bar}}]]
12588 [[Category:Foo|{{echo|Bar}}]]
12592 Category with template in sort key and title
12597 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12599 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12603 Category / paragraph interactions
12605 Foo [[Category:Baz]] Bar
12607 Foo [[Category:Baz]]
12615 [[Category:Baz]] Bar
12628 {{echo|[[Category:Baz]]}}
12643 Parsoid: Serialize link to category page with colon escape
12649 [[:Category:Foo|Bar]]
12652 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
12653 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
12658 Parsoid: Link prefix/suffixes aren't applied to category links
12660 parsoid=wt2html,wt2wt,html2html
12665 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
12669 Parsoid: Serialize link to file page with colon escape
12675 [[:File:Foo.png|Bar]]
12678 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
12679 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
12684 Parsoid: Serialize a genuine category link without colon escape
12689 [[Category:Foo|Bar]]
12691 <link rel="mw:PageProp/Category" href="Category:Foo">
12692 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
12696 Normalize hrefs properly before testing for invalid link targets (bug 70894)
12700 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
12702 [[Category:Toxine bactérienne]]
12706 Parsoid: Defaultsort
12710 {{DEFAULTSORT:Foo}}
12712 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
12716 ### Inter-language links
12719 Interlanguage links
12727 es:Alimento fr:Nourriture zh:食品
12729 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
12730 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
12731 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
12735 Duplicate interlanguage links (bug 24502)
12746 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
12747 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
12748 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
12749 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
12756 Basic section headings
12763 ===Smaller headline===
12766 <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>
12769 <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>
12772 <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>
12778 Section headings with TOC
12781 === Subheadline 1 ===
12782 ===== Skipping a level =====
12783 ====== Skipping a level ======
12787 ===Another headline===
12789 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12791 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
12793 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
12795 <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>
12797 <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>
12804 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
12806 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
12812 <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>
12813 <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>
12814 <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>
12815 <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>
12816 <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>
12819 <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>
12823 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
12825 Handling of sections up to level 6 and beyond
12828 == Level 2 Heading==
12829 === Level 3 Heading===
12830 ==== Level 4 Heading====
12831 ===== Level 5 Heading=====
12832 ====== Level 6 Heading======
12833 ======= Level 7 Heading=======
12834 ======== Level 8 Heading========
12835 ========= Level 9 Heading=========
12836 ========== Level 10 Heading==========
12838 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12840 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12842 <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>
12844 <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>
12846 <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>
12848 <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>
12850 <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>
12851 <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>
12852 <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>
12853 <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>
12854 <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>
12868 <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>
12869 <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>
12870 <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>
12871 <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>
12872 <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>
12873 <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>
12874 <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>
12875 <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>
12876 <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>
12877 <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>
12882 TOC regression (bug 9764)
12886 ==== title 1.1.1 ====
12891 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12893 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12895 <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>
12897 <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>
12900 <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>
12903 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12905 <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>
12911 <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>
12912 <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>
12913 <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>
12914 <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>
12915 <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>
12916 <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>
12921 TOC with wgMaxTocLevel=3 (bug 6204)
12927 ==== title 1.1.1 ====
12932 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12934 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12936 <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>
12937 <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>
12940 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12942 <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>
12948 <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>
12949 <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>
12950 <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>
12951 <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>
12952 <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>
12953 <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>
12958 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
12964 ====Section 1.1.1====
12965 ====Section 1.1.1.1====
12968 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12970 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
12972 <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>
12975 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
12979 <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>
12980 <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>
12981 <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>
12982 <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>
12983 <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>
12989 Resolving duplicate section names
12994 <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>
12995 <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>
13000 Resolving duplicate section names with differing case (bug 10721)
13005 <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>
13006 <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>
13018 Template with sections, __NOTOC__
13025 <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>
13026 <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>
13027 <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>
13028 <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>
13033 __NOEDITSECTION__ keyword
13039 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13040 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13045 Link inside a section heading
13047 ==Section with a [[Main Page|link]] in it==
13049 <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>
13054 TOC regression (bug 12077)
13061 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13063 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13065 <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>
13068 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13072 <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>
13073 <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>
13074 <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>
13079 BUG 1219 URL next to image (good)
13081 http://example.com [[Image:foobar.jpg]]
13083 <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>
13088 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13091 The line above must have a trailing space!
13094 But just in case it doesn't...
13096 <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>
13097 <p>The line above must have a trailing space!
13099 <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>
13100 <p>But just in case it doesn't...
13105 Header with special characters (bug 25462)
13107 The tooltips shall not show entities to the user (ie. be double escaped)
13124 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13126 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13128 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13129 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13130 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13131 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13132 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13136 <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>
13139 <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>
13142 <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>
13145 <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>
13148 <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>
13154 Header with space, plus and underscore as entity
13156 Id should not contain + for spaces
13158 == Space between Text ==
13161 == Space-Entity between Text ==
13164 == Plus+between+Text ==
13167 == Plus-Entity+between+Text ==
13170 == Underscore_between_Text ==
13173 == Underscore-Entity_between_Text ==
13176 [[#Space between Text]]
13177 [[#Space-Entity between Text]]
13178 [[#Plus+between+Text]]
13179 [[#Plus-Entity+between+Text]]
13180 [[#Underscore_between_Text]]
13181 [[#Underscore-Entity_between_Text]]
13183 <p>Id should not contain + for spaces
13185 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13187 <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>
13188 <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>
13189 <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>
13190 <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>
13191 <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>
13192 <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>
13196 <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>
13199 <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>
13202 <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>
13205 <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>
13208 <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>
13211 <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>
13213 </p><p><a href="#Space_between_Text">#Space between Text</a>
13214 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13215 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13216 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13217 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13218 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13223 Headers with excess '=' characters
13224 (Are similar tests necessary beyond the 1st level?)
13228 =''italic'' heading==
13229 ==''italic'' heading=
13231 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13233 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13234 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13235 <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>
13236 <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>
13240 <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>
13241 <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>
13242 <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>
13243 <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>
13248 HTML headers vs TOC (bug 23393)
13249 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13261 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13263 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13265 <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>
13266 <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>
13269 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13271 <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>
13272 <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>
13278 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13279 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13280 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13281 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13282 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13283 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13288 Single-line or multiline-comments can follow headings
13290 parsoid=wt2html,wt2wt
13298 <h2><span class="mw-headline" id="foo">foo</span></h2>
13299 <h2><span class="mw-headline" id="bar">bar</span></h2>
13300 <h2><span class="mw-headline" id="baz">baz</span></h2>
13305 BUG 1219 URL next to image (broken)
13307 http://example.com[[Image:foobar.jpg]]
13309 <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>
13314 Bug 1186 news: in the middle of text
13316 http://en.wikinews.org/wiki/Wikinews:Workplace
13318 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13324 Namespaced link must have a title
13333 Namespaced link must have a title (bad fragment version)
13335 [[Project:#fragment]]
13337 <p>[[Project:#fragment]]
13343 ### HTML tags and HTML attributes
13347 div with no attributes
13349 <div>HTML rocks</div>
13351 <div>HTML rocks</div>
13356 div with double-quoted attribute
13358 <div id="rock">HTML rocks</div>
13360 <div id="rock">HTML rocks</div>
13365 div with single-quoted attribute
13367 <div id='rock'>HTML rocks</div>
13369 <div id="rock">HTML rocks</div>
13374 div with unquoted attribute
13376 <div id=rock>HTML rocks</div>
13378 <div id="rock">HTML rocks</div>
13383 div with illegal double attributes
13385 <div id="a" id="b">HTML rocks</div>
13387 <div id="b">HTML rocks</div>
13391 # FIXME: produce empty string instead of "class" in the PHP parser, following
13394 div with empty attribute value, space before equals
13398 <div class =>HTML rocks</div>
13400 <div class="">HTML rocks</div>
13405 div with multiple empty attribute values
13409 <div id= title=>HTML rocks</div>
13411 <div id="" title="">HTML rocks</div>
13416 table with multiple empty attribute values
13424 <table title="" id="">
13425 <tbody><tr><td> hi</td></tr>
13430 div with braces in attribute value
13432 <div title="{}">Foo</div>
13434 <div title="{}">Foo</div>
13437 <div title="{}">Foo</div>
13440 # This it very inconsistent in the PHP parser: it returns
13441 # class="class" if there is a space between the name and the equal sign (see
13442 # 'div with empty attribute value, space before equals'), but strips the
13443 # attribute completely if the space is missing. We hope that not much content
13444 # depends on this, so are implementing the behavior below in Parsoid for
13445 # consistencies' sake.
13446 # FIXME: fix this behavior in the PHP parser?
13448 div with empty attribute value, no space before equals
13450 parsoid=wt2html,html2html
13452 <div class=>HTML rocks</div>
13454 <div>HTML rocks</div>
13457 <div class="">HTML rocks</div>
13461 HTML multiple attributes correction
13463 <p class="error" class="awesome">Awesome!</p>
13465 <p class="awesome">Awesome!</p>
13470 Table multiple attributes correction
13473 !+ class="error" class="awesome"| status
13478 <th class="awesome"> status
13486 <DIV ID="x">HTML ROCKS</DIV>
13488 <div id="x">HTML ROCKS</div>
13493 Non-ASCII pseudo-tags are rendered as text
13502 Pseudo-tag with URL 'name' renders as url link
13504 <http://example.com/>
13506 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13511 text with amp in the middle of nowhere
13515 <p>Remember AT&T?
13520 text with character entity: eacute
13522 I always thought é was a cute letter.
13524 <p>I always thought é was a cute letter.
13527 <p>I always thought é was a cute letter.</p>
13531 text with entity-escaped character entity-like string: eacute
13533 I always thought &eacute; was a cute letter.
13535 <p>I always thought &eacute; was a cute letter.
13540 text with undefined character entity: xacute
13542 I always thought &xacute; was a cute letter.
13544 <p>I always thought &xacute; was a cute letter.
13548 # TODO: generalize to PHP parser?
13554 <data value="5">five</data>
13555 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13556 <mark>This highlighted text</mark>
13558 <p><data value="5">five</data>
13559 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13560 <mark>This highlighted text</mark></p>
13564 HTML tag with leading space is parsed as text
13568 <p>< div>foo< /div>
13573 ### Nesting tests (see bug 41545, 50604, 51081)
13576 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13577 # Note that html2wt is considerably more difficult if we use <b> in
13578 # the test case, instead of <big>
13580 Ensure that HTML adoption agency algorithm is properly implemented.
13582 <big>X<big>Y</big>Z</big>
13584 <p><big>X<big>Y</big>Z</big>
13588 # This was bug 41545 in the PHP parser.
13589 # Note that tidy doesn't handle this correctly.
13593 <kbd>X<kbd>Y</kbd>Z</kbd>
13595 <p><kbd>X<kbd>Y</kbd>Z</kbd>
13599 # The following cases were bug 51081 in the PHP parser.
13600 # Note that there are some other nestable tags (b, i, etc) which are
13601 # not covered; see bug 51081 for discussion.
13603 # Note that tidy doesn't handle this correctly.
13607 <em>X<em>Y</em>Z</em>
13609 <p><em>X<em>Y</em>Z</em>
13613 # Note that tidy doesn't handle this correctly.
13615 Nesting of <strong>
13617 <strong>X<strong>Y</strong>Z</strong>
13619 <p><strong>X<strong>Y</strong>Z</strong>
13628 <p><q>X<q>Y</q>Z</q></p>
13631 # Note that tidy doesn't handle this correctly.
13635 <ruby>X<ruby>Y</ruby>Z</ruby>
13637 <p><ruby>X<ruby>Y</ruby>Z</ruby>
13641 # Note that tidy doesn't handle this correctly.
13645 <bdo>X<bdo>Y</bdo>Z</bdo>
13647 <p><bdo>X<bdo>Y</bdo>Z</bdo>
13659 [[Media:Foobar.jpg]]
13661 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
13666 Media link with text
13668 [[Media:Foobar.jpg|A neat file to look at]]
13670 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
13674 # FIXME: this is still bad HTML tag nesting
13676 Media link with nasty text
13677 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
13679 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
13681 <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>
13684 <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>
13688 Media link to nonexistent file (bug 1702)
13690 [[Media:No such.jpg]]
13692 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
13697 Image link to nonexistent file (bug 1850 - good)
13699 [[Image:No such.jpg]]
13701 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
13706 :Image link to nonexistent file (bug 1850 - bad)
13708 [[:Image:No such.jpg]]
13710 <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>
13717 Character reference normalization in link text (bug 1938)
13719 [[Main Page|this&that]]
13721 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
13728 Test for unicode normalization
13730 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
13734 (bug 19451) Links should refer to the normalized form.
13742 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13743 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13744 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13745 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13746 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13751 Empty attribute crash test (bug 2067)
13753 <font color="">foo</font>
13755 <p><font color="">foo</font>
13760 Empty attribute crash test single-quotes (bug 2067)
13762 <font color=''>foo</font>
13764 <p><font color="">foo</font>
13769 Attribute test: equals, then nothing
13771 <font color=>foo</font>
13773 <p><font>foo</font>
13778 Attribute test: unquoted value
13780 <font color=x>foo</font>
13782 <p><font color="x">foo</font>
13787 Attribute test: unquoted but illegal value (hash)
13789 <font color=#x>foo</font>
13791 <p><font color="#x">foo</font>
13796 Attribute test: no value
13798 <font color>foo</font>
13800 <p><font color="color">foo</font>
13805 Bug 2095: link with three closing brackets
13809 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
13812 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
13816 Bug 2095: link with pipe and three closing brackets
13818 [[Main Page|link]]]
13820 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
13823 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
13827 Bug 2095: link with pipe and three closing brackets, version 2
13829 [[Main Page|[http://example.com/]]]
13831 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
13834 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
13843 Template:Dangerous attribute
13845 " onmouseover="alert(document.cookie)
13849 Template:Dangerous style attribute
13851 border-size: expression(alert(document.cookie))
13857 <div style="float: right; {{{1}}}">Magic div</div>
13861 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
13863 <div title="{{test}}"></div>
13865 <div title="This is a test template"></div>
13869 # Parsoid has enough context to handle this case
13871 Bug 2304: HTML attribute safety (dangerous template; 2309)
13873 <div title="{{dangerous attribute}}"></div>
13875 <div title=""></div>
13878 <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>
13882 Bug 2304: HTML attribute safety (dangerous style template; 2309)
13884 <div style="{{dangerous style attribute}}"></div>
13886 <div style="/* insecure input */"></div>
13891 Bug 2304: HTML attribute safety (safe parameter; 2309)
13893 {{div style|width: 200px}}
13895 <div style="float: right; width: 200px">Magic div</div>
13900 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
13902 {{div style|width: expression(alert(document.cookie))}}
13904 <div style="/* insecure input */">Magic div</div>
13909 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
13911 {{div style|"><script>alert(document.cookie)</script>}}
13913 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13918 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
13920 {{div style|" ><script>alert(document.cookie)</script>}}
13922 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13927 Bug 2304: HTML attribute safety (link)
13929 <div title="[[Main Page]]"></div>
13931 <div title="[[Main Page]]"></div>
13936 Bug 2304: HTML attribute safety (italics)
13938 <div title="''foobar''"></div>
13940 <div title="''foobar''"></div>
13945 Bug 2304: HTML attribute safety (bold)
13947 <div title="'''foobar'''"></div>
13949 <div title="'''foobar'''"></div>
13955 Bug 2304: HTML attribute safety (ISBN)
13957 <div title="ISBN 1234567890"></div>
13959 <div title="ISBN 1234567890"></div>
13964 Bug 2304: HTML attribute safety (RFC)
13966 <div title="RFC 1234"></div>
13968 <div title="RFC 1234"></div>
13973 Bug 2304: HTML attribute safety (PMID)
13975 <div title="PMID 1234567890"></div>
13977 <div title="PMID 1234567890"></div>
13982 Bug 2304: HTML attribute safety (web link)
13984 <div title="http://example.com/"></div>
13986 <div title="http://example.com/"></div>
13991 Bug 2304: HTML attribute safety (named web link)
13993 <div title="[http://example.com/ link]"></div>
13995 <div title="[http://example.com/ link]"></div>
14000 Bug 3244: HTML attribute safety (extension; safe)
14002 <div style="<nowiki>background:blue</nowiki>"></div>
14004 <div style="background:blue"></div>
14009 Bug 3244: HTML attribute safety (extension; unsafe)
14011 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14013 <div style="/* insecure input */"></div>
14017 # More MSIE fun discovered by Tom Gilder
14020 MSIE CSS safety test: spurious slash
14022 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14024 <div style="/* insecure input */">evil</div>
14029 MSIE CSS safety test: hex code
14031 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14033 <div style="/* insecure input */">evil</div>
14038 MSIE CSS safety test: comment in url
14040 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14042 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14047 MSIE CSS safety test: comment in expression
14049 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14051 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14056 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14058 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14060 <p style="/* invalid control char */">A</p>
14065 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14067 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14068 <div style="top:EXPRESSION(alert())">B</div>
14070 <p style="/* insecure input */">A</p>
14071 <div style="/* insecure input */">B</div>
14076 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14078 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14079 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14081 <div style="/* insecure input */">A</div>
14082 <p style="/* insecure input */">B</p>
14087 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14089 <div style="background-image:url⁽javascript:alert())">A</div>
14090 <div style="background-image:url₍javascript:alert())">B</div>
14091 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14093 <div style="/* insecure input */">A</div>
14094 <div style="/* insecure input */">B</div>
14095 <p style="/* insecure input */">C</p>
14103 title="data:text/html,<img src=1 onerror=alert(1)>"
14104 style="-o-link:attr(title);-o-link-source:current">X</div>
14106 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14111 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14113 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14114 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14115 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14116 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14117 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14118 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14119 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14121 <p style="/* insecure input */">A</p>
14122 <p style="/* insecure input */">B</p>
14123 <p style="/* insecure input */">C</p>
14124 <p style="/* insecure input */">D</p>
14125 <p style="/* insecure input */">E</p>
14126 <p style="/* insecure input */">F</p>
14127 <p style="/* insecure input */">G</p>
14132 Table attribute legitimate extension
14135 !+ style="<nowiki>color:blue</nowiki>"| status
14140 <th style="color:blue"> status
14146 Table attribute safety
14149 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14154 <th style="/* insecure input */"> status
14160 CSS line continuation 1
14162 <div style="background-image: u\ rl(test.jpg);"></div>
14164 <div style="/* insecure input */"></div>
14169 CSS line continuation 2
14171 <div style="background-image: u\ rl(test.jpg); "></div>
14173 <div style="/* insecure input */"></div>
14184 Expansion of multi-line templates in attribute values (bug 6255)
14186 <div style="background: {{identity|#00FF00}}">-</div>
14188 <div style="background: #00FF00">-</div>
14194 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14196 <div style="background:
14199 <div style="background: #00FF00">-</div>
14202 <div style="background:
14207 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14209 <div style="background: #00FF00">-</div>
14211 <div style="background: #00FF00">-</div>
14216 evil <math>-wiki-tags without Extension:Math enabled
14218 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14220 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14224 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14227 Parser hook: empty input
14240 Parser hook: empty input using terminated empty elements
14253 Parser hook: empty input using terminated empty elements (space before)
14266 Parser hook: basic input
14280 Parser hook: case insensitive
14294 Parser hook: case insensitive, redux
14307 Parser hook: nested tags
14311 <tag><tag></tag></tag>
14322 Parser hook: basic arguments
14324 <tag width=200 height = "100" depth = '50' square></tag>
14332 'square' => 'square',
14339 Parser hook: argument containing a forward slash (bug 5344)
14341 <tag filename='/tmp/bla'></tag>
14346 'filename' => '/tmp/bla',
14353 Parser hook: empty input using terminated empty elements (bug 2374)
14366 # </tag> should be output literally since there is no matching tag that begins it
14368 Parser hook: basic arguments using terminated empty elements (bug 2374)
14370 <tag width=200 height = "100" depth = '50' square/>
14380 'square' => 'square',
14389 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14393 Parser hook: static parser hook not inside a comment
14395 <statictag>hello, world</statictag>
14396 <statictag action=flush/>
14404 Parser hook: static parser hook inside a comment
14406 <!-- <statictag>hello, world</statictag> -->
14407 <statictag action=flush/>
14413 # Nested template calls; this case was broken by Parser.php rev 1.506,
14417 Template:One-parameter
14419 (My parameter is: {{{1}}})
14423 Template:Map-one-parameter
14425 {{{{{1}}}|{{{2}}}}}
14429 Nested template calls
14431 {{Map-one-parameter|One-parameter|param}}
14433 <p>(My parameter is: param)
14442 # HTML+Tidy effectively strips out the empty tags completely
14443 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14444 # which Tidy would have done for the PHP parser had there been content inside it.
14446 Sanitizer: Closing of open tags
14448 <s></s><table></table>
14450 <s></s><table></table>
14453 <p><s></s></p><table></table>
14457 Sanitizer: Closing of open but not closed tags
14466 Sanitizer: Closing of closed but not open tags
14475 Sanitizer: Closing of closed but not open table tags
14477 Table not started</td></tr></table>
14479 <p>Table not started</td></tr></table>
14484 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14486 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14488 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14492 # In HTML5, the restrictions are that id must contain at least one character,
14493 # and must not contain any space characters.
14495 Sanitizer: Validating the contents of the id attribute (bug 4515)
14499 <br id="" /><br id="a space" />
14504 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
14506 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14510 <br id="foo" /><br id="foo" />
14512 Something need to be done. foo-2 ?
14516 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14519 <meta itemprop="hello" content="world">
14520 <meta http-equiv="refresh" content="5">
14521 <meta itemprop="hello" http-equiv="refresh" content="5">
14522 <link itemprop="hello" href="{{SERVER}}">
14523 <link rel="stylesheet" href="{{SERVER}}">
14524 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14527 <div itemscope="itemscope">
14528 <p> <meta itemprop="hello" content="world" />
14529 <meta http-equiv="refresh" content="5">
14530 <meta itemprop="hello" content="5" />
14532 <link itemprop="hello" href="http://example.org" />
14533 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14534 <link itemprop="hello" href="http://example.org" />
14540 Language converter: output gets cut off unexpectedly (bug 5757)
14544 this bit is safe: }-
14546 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14548 then we get cut off here: }-
14550 all additional text is vanished
14552 <p>this bit is safe: }-
14553 </p><p>but if we add a conversion instance: xxx
14554 </p><p>then we get cut off here: }-
14555 </p><p>all additional text is vanished
14560 Self closed html pairs (bug 5487)
14563 <center><font id="bug" />Centered text</center>
14564 <div><font id="bug2" />In div text</div>
14566 <center><font id="bug" />Centered text</center>
14567 <div><font id="bug2" />In div text</div>
14576 Punctuation: nbsp before exclamation
14580 <p>C'est grave !
14585 Punctuation: CSS !important (bug 11874)
14587 <div style="width:50% !important">important</div>
14589 <div style="width:50% !important">important</div>
14594 Punctuation: CSS ! important (bug 11874; with space after)
14596 <div style="width:50% ! important">important</div>
14598 <div style="width:50% ! important">important</div>
14604 HTML bullet list, closed tags (bug 5497)
14617 <ul data-parsoid='{"stx":"html"}'>
14618 <li data-parsoid='{"stx":"html"}'>One</li>
14619 <li data-parsoid='{"stx":"html"}'>Two</li>
14625 HTML bullet list, unclosed tags (bug 5497)
14637 <ul data-parsoid='{"stx":"html"}'>
14638 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14639 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14645 HTML ordered list, closed tags (bug 5497)
14658 <ol data-parsoid='{"stx":"html"}'>
14659 <li data-parsoid='{"stx":"html"}'>One</li>
14660 <li data-parsoid='{"stx":"html"}'>Two</li>
14666 HTML ordered list, unclosed tags (bug 5497)
14679 <ol data-parsoid='{"stx":"html"}'>
14680 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14681 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14687 HTML nested bullet list, closed tags (bug 5497)
14712 HTML nested bullet list, open tags (bug 5497)
14749 HTML nested ordered list, closed tags (bug 5497)
14774 HTML nested ordered list, open tags (bug 5497)
14811 HTML ordered list item with parameters oddity
14813 <ol><li id="fragment">One</li>
14816 <ol><li id="fragment">One</li>
14821 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
14823 bug 5918: autonumbering
14825 [http://first/] [http://second] [ftp://ftp]
14829 [mailto:enclosed@mail.tld With target]
14831 [mailto:enclosed@mail.tld]
14833 mailto:inline@mail.tld
14835 <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>
14836 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
14837 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
14838 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
14839 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
14842 <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>
14843 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
14844 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
14845 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
14846 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
14851 # Security and HTML correctness
14852 # From Nick Jenkins' fuzz testing
14856 Fuzz testing: Parser13
14871 Fuzz testing: Parser14
14876 <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>
14877 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14879 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14885 <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>
14887 <div id="toc" class="toc">
14888 <div id="toctitle">
14892 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14898 Fuzz testing: Parser14-table
14903 <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>
14904 <table style="__TOC__">
14909 <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>
14910 <table style="__TOC__">
14917 # Known to produce bogus xml (extra </td>)
14919 Fuzz testing: Parser16
14948 Fuzz testing: Parser21
14951 ! irc://{{ftp://a" onmouseover="alert('hello world');"
14956 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
14966 Fuzz testing: Parser22
14968 http://===r:::https://b
14972 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
14980 # Known to produce bad XML for now
14982 Fuzz testing: Parser24
14989 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
14990 <br style="onmouseover='alert(document.cookie);' " />
14992 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14997 <u class="|">}}}} >
14998 <br style="onmouseover='alert(document.cookie);'" />
15000 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15009 # Note: the current result listed for this is not what the original one was,
15010 # but the original bug was JavaScript injection, which is fixed in any case.
15011 # It's not clear that the original result listed was any more correct than the
15012 # current one. Original result:
15015 # <li class="||">
15016 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15018 Fuzz testing: Parser25 (bug 6055)
15024 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15026 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15031 Fuzz testing: URL adjacent extension (with space, clean)
15033 http://example.com <nowiki>junk</nowiki>
15035 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15040 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15042 http://example.com<nowiki>junk</nowiki>
15044 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15049 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15051 http://example.com<pre>junk</pre>
15053 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15056 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15063 Fuzz testing: image with bogus manual thumbnail
15065 [[Image:foobar.jpg|thumbnail= ]]
15067 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15070 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}'/>
15074 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15076 <pre dir=" "></pre>
15078 <pre dir=" "></pre>
15083 Parsing optional HTML elements (Bug 6171)
15088 <td> Some tabular data</td>
15089 <td> More tabular data ...
15090 <td> And yet som tabular data</td>
15096 <td> Some tabular data</td>
15097 <td> More tabular data ...
15098 </td><td> And yet som tabular data</td>
15105 Correct handling of <td>, <tr> (Bug 6171)
15110 <td> Some tabular data</td>
15111 <td> More tabular data ...</td>
15112 <td> And yet som tabular data</td>
15118 <td> Some tabular data</td>
15119 <td> More tabular data ...</td>
15120 <td> And yet som tabular data</td>
15128 Parsing crashing regression (fr:JavaScript)
15132 <p></body></x>
15137 Inline wiki vs wiki block nesting
15143 <p><b>Bold paragraph</b>
15144 </p><p>New wiki paragraph
15148 # FIXME: The current php output is documented
15149 # and desired output is the parsoid target.
15151 Inline HTML vs wiki block nesting
15157 <p><b>Bold paragraph
15158 </p><p>New wiki paragraph</b>
15161 <p><b>Bold paragraph</b>
15162 </p><p>New wiki paragraph
15166 # Original result was this:
15167 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15169 # While that might be marginally more intuitive, maybe, the six-apostrophe
15170 # construct is clearly pathological and the result stated here (which is what
15171 # the parser actually does) is about as reasonable as anything.
15173 Mixing markup for italics and bold
15176 '''bold''''''bold''bolditalics'''''
15178 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15186 Article for special page transclusion test
15190 Special page transclusion
15193 {{Special:Prefixindex/Xyzzyx}}
15195 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15200 Special page transclusion twice (bug 5021)
15203 {{Special:Prefixindex/Xyzzyx}}
15204 {{Special:Prefixindex/Xyzzyx}}
15206 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15207 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15212 Transclusion of default MediaWiki message
15214 {{MediaWiki:Mainpage}}
15221 Transclusion of nonexistent MediaWiki message
15223 {{MediaWiki:Mainpagexxx}}
15225 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15230 Transclusion of MediaWiki message with underscore
15232 {{MediaWiki:history_short}}
15239 Transclusion of MediaWiki message with space
15241 {{MediaWiki:history short}}
15248 Invalid header with following text
15258 Section extraction test (section 0)
15278 Section extraction test (section 1)
15300 Section extraction test (section 2)
15321 Section extraction test (section 3)
15341 Section extraction test (section 4)
15365 Section extraction test (section 5)
15385 Section extraction test (section 6)
15406 Section extraction test (section 7)
15426 Section extraction test (section 8)
15446 Section extraction test (section 9)
15467 Section extraction test (section 10)
15487 Section extraction test (nonexistent section 11)
15506 Section extraction test with bogus heading (section 1)
15511 ==bogus== not a legal section
15515 ==bogus== not a legal section
15519 Section extraction test with bogus heading (section 2)
15524 ==bogus== not a legal section
15531 Section extraction test with comment after heading (section 1)
15543 Section extraction test with comment after heading (section 2)
15555 Section extraction test with bogus <nowiki> heading (section 1)
15560 ==bogus== <nowiki>not a legal section</nowiki>
15564 ==bogus== <nowiki>not a legal section</nowiki>
15568 Section extraction test with bogus <nowiki> heading (section 2)
15573 ==bogus== <nowiki>not a legal section</nowiki>
15580 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
15581 # instead of respecting commented sections
15583 Section extraction prefixed by comment (section 1)
15594 Section extraction prefixed by comment (section 2)
15605 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
15606 # instead of respecting HTML-style headings
15608 Section extraction, mixed wiki and html (section 1)
15624 Section extraction, mixed wiki and html (section 2)
15640 # Formerly testing for bug 3342
15642 Section extraction, heading surrounded by <noinclude>
15646 <noinclude>==unmarked==</noinclude>
15652 # Test behavior of bug 19910
15654 Sectiion with all-equals
15659 The line above must have a trailing space
15662 But just in case it doesn't...
15666 But just in case it doesn't...
15670 Section replacement test (section 0)
15701 Section replacement test (section 1)
15730 Section replacement test (section 2)
15760 Section replacement test (section 3)
15791 Section replacement test (section 4)
15818 Section replacement test (section 5)
15849 Section replacement test (section 6)
15879 Section replacement test (section 7)
15910 Section replacement test (section 8)
15941 Section replacement test (section 9)
15970 Section replacement test (section 10)
16000 Section replacement test with initial whitespace (bug 13728)
16004 Preformatted initial line
16008 Preformatted initial line
16015 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16027 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16040 Section extraction, <pre> around bogus header (bug 10309)
16057 Section replacement, <pre> around bogus header (bug 10309)
16059 noxml replace=2,"xxx"
16080 Handling of 
 in URLs
16084 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16087 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16089 a</a></li></ul></li></ul>
16093 Handling of %0A in URLs
16097 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16100 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16104 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16106 5 quotes, code coverage +1 line
16113 <p><b><i></i></b></p>
16116 # same html as previous, but wikitext adjusted to match parsoid html2wt
16117 # note that wt2html and html2html will put the <i> before the <b>
16119 5 quotes, code coverage +1 line w/ nowiki (1)
16121 parsoid=wt2wt,html2wt
16123 '''''<nowiki/>'''''
16128 <p><b><i></i></b></p>
16131 # same as previous, just swapping the <i> and <b>
16133 5 quotes, code coverage +1 line w/ nowiki (2)
16135 '''''<nowiki/>'''''
16140 <p><i><b></b></i></p>
16144 Special:Search page linking.
16148 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16153 {{!}} is a magic word
16155 {{!}} is a magic word there and {{!}} is still a magic word here
16157 <p>| is a magic word there and | is still a magic word here
16160 <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>
16166 title=[[Parser test]]
16171 * {{FULLPAGENAMEE}}
16173 * {{BASEPAGENAMEE}}
16177 * {{ROOTPAGENAMEE}}
16179 * {{TALKPAGENAMEE}}
16180 * {{SUBJECTPAGENAME}}
16181 * {{SUBJECTPAGENAMEE}}
16184 * {{NAMESPACENUMBER}}
16188 * {{SUBJECTSPACEE}}
16189 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16191 <ul><li> Parser test</li>
16192 <li> Parser_test</li>
16193 <li> Parser test</li>
16194 <li> Parser_test</li>
16195 <li> Parser test</li>
16196 <li> Parser_test</li>
16197 <li> Parser test</li>
16198 <li> Parser_test</li>
16199 <li> Parser test</li>
16200 <li> Parser_test</li>
16201 <li> Talk:Parser test</li>
16202 <li> Talk:Parser_test</li>
16203 <li> Parser test</li>
16204 <li> Parser_test</li>
16212 <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>
16215 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16225 image4 |300px| centre
16226 image5.svg| http://///////
16231 <ul class="gallery mw-gallery-traditional">
16232 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16233 <div class="thumb" style="height: 150px;">Image1.png</div>
16234 <div class="gallerytext">
16237 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16238 <div class="thumb" style="height: 150px;">Image2.gif</div>
16239 <div class="gallerytext">
16244 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16245 <div class="thumb" style="height: 150px;">Image3</div>
16246 <div class="gallerytext">
16249 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16250 <div class="thumb" style="height: 150px;">Image4</div>
16251 <div class="gallerytext">
16256 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16257 <div class="thumb" style="height: 150px;">Image5.svg</div>
16258 <div class="gallerytext">
16259 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16263 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16264 <div class="thumb" style="height: 150px;">* image6</div>
16265 <div class="gallerytext">
16273 Gallery (with options)
16275 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16276 File:Nonexistant.jpg|caption
16277 File:Nonexistant.jpg
16278 image:foobar.jpg|some '''caption''' [[Main Page]]
16280 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16283 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16284 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16285 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16286 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16287 <div class="gallerytext">
16292 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16293 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16294 <div class="gallerytext">
16297 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16298 <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>
16299 <div class="gallerytext">
16300 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16304 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16305 <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>
16306 <div class="gallerytext">
16309 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16310 <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>
16311 <div class="gallerytext">
16321 Gallery with link that has fragment
16324 image:foobar.jpg|link=Main_Page
16325 image:foobar.jpg|link=Main_Page#section
16326 image:foobar.jpg|link=Main Page#section|caption
16329 <ul class="gallery mw-gallery-traditional">
16330 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16331 <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>
16332 <div class="gallerytext">
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/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>
16337 <div class="gallerytext">
16340 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16341 <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>
16342 <div class="gallerytext">
16352 Gallery with wikitext inside caption
16355 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16356 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16359 <ul class="gallery mw-gallery-traditional">
16360 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16361 <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>
16362 <div class="gallerytext">
16363 <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>
16367 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16368 <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>
16369 <div class="gallerytext">
16370 <p>This is a test template
16379 gallery (with showfilename option)
16381 <gallery showfilename>
16382 File:Nonexistant.jpg|caption
16383 File:Nonexistant.jpg
16384 image:foobar.jpg|some '''caption''' [[Main Page]]
16388 <ul class="gallery mw-gallery-traditional">
16389 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16390 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16391 <div class="gallerytext">
16392 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16397 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16398 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16399 <div class="gallerytext">
16400 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16404 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16405 <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>
16406 <div class="gallerytext">
16407 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16408 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16412 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16413 <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>
16414 <div class="gallerytext">
16415 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16424 Gallery (with namespace-less filenames)
16427 File:Nonexistant.jpg
16433 <ul class="gallery mw-gallery-traditional">
16434 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16435 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16436 <div class="gallerytext">
16439 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16440 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16441 <div class="gallerytext">
16444 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16445 <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>
16446 <div class="gallerytext">
16449 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16450 <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>
16451 <div class="gallerytext">
16459 HTML Hex character encoding (spells the word "JavaScript")
16461 parsoid=wt2html,wt2wt,html2html
16463 JavaScript
16465 <p>JavaScript
16470 <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>
16474 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16478 <p>&#xsee;&#XSEE;
16481 <p>&#xsee;&#XSEE;</p>
16485 HTML Hex character encoding mixed case
16487 parsoid=wt2html,wt2wt,html2html
16496 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16500 __FORCETOC__ override
16512 ISBN 978-0-1234-56 789
16514 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16517 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16521 ISBN followed by 5 spaces
16532 ISBN ISBN 1234567890
16534 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16543 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16548 ISBN with empty prefix (parsoid test)
16552 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
16556 Bug 22905: <abbr> followed by ISBN followed by </a>
16558 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
16560 <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>
16569 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
16574 Double RFC with a wiki link
16578 <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>
16587 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
16590 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
16594 Centre-aligned image
16596 [[Image:foobar.jpg|centre]]
16598 <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>
16605 [[Image:foobar.jpg|none]]
16607 <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>
16612 Width + Height sized image (using px) (height is ignored)
16614 [[Image:foobar.jpg|640x480px]]
16616 <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>
16621 Width-sized image (using px, no following whitespace)
16623 [[Image:foobar.jpg|640px]]
16625 <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>
16630 Width-sized image (using px, with following whitespace - test regression from r39467)
16632 [[Image:foobar.jpg|640px ]]
16634 <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>
16639 Width-sized image (using px, with preceding whitespace - test regression from r39467)
16641 [[Image:foobar.jpg| 640px]]
16643 <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>
16648 Image with page parameter
16652 [[File:LoremIpsum.djvu|page=2]]
16654 <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>
16659 Another italics / bold test
16667 # FIXME: The php output seems broken. It's interleaving some open/close tags.
16673 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
16676 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
16681 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
16683 Images with the "|" character in the comment
16685 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
16687 <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>
16690 <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>
16694 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
16696 <html><script>alert(1);</script></html>
16698 <p><html><script>alert(1);</script></html>
16703 HTML with raw HTML ($wgRawHtml==true)
16707 <html><script>alert(1);</script></html>
16709 <p><script>alert(1);</script>
16714 Parents of subpages, one level up
16716 subpage title=[[Subpage test/L1/L2/L3]]
16720 <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>
16726 Parents of subpages, one level up, not named
16728 subpage title=[[Subpage test/L1/L2/L3]]
16732 <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>
16739 Parents of subpages, two levels up
16741 subpage title=[[Subpage test/L1/L2/L3]]
16747 <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
16748 </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>
16753 Parents of subpages, two levels up, without trailing slash or name.
16755 subpage title=[[Subpage test/L1/L2/L3]]
16764 Parents of subpages, two levels up, with lots of extra trailing slashes.
16766 subpage title=[[Subpage test/L1/L2/L3]]
16770 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">Subpage test/L1</a>
16775 Subpage test/L1/L2/L3Sibling
16781 Transclusion of a sibling page (one level up)
16783 subpage title=[[Subpage test/L1/L2/L3]]
16792 Transclusion of a child page
16794 subpage title=[[Subpage test/L1/L2]]
16803 Non-transclusion because of too many up levels
16805 subpage title=[[Subpage test/L1/L2/L3]]
16807 {{../../../../More than parent}}
16809 <p>{{../../../../More than parent}}
16814 Definition list code coverage
16820 <dl><dt> title  </dt>
16822 <dt> title </dt>
16828 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16829 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16830 <dt>title</dt><dd> def</dd></dl>
16834 Don't fall for the self-closing div
16836 <div>hello world</div/>
16838 <div>hello world</div>
16847 <p>[[:Template:Msg]]
16856 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
16860 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
16862 Always escape literal '>' in output, not just after '<'
16876 <p>This is a test template
16877 This is a test template
16889 Inclusion of !userCanEdit() content
16893 <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>
16899 Out-of-order TOC heading levels
16908 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16910 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
16912 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
16913 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
16916 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
16918 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
16919 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
16925 <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>
16926 <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>
16927 <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>
16928 <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>
16929 <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>
16930 <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>
16936 ISBN with a dummy number
16946 ISBN with space-delimited number
16950 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
16956 ISBN with multiple spaces, no number
16975 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16976 </p><p>ISBN 12345678901
16982 ISBN with trailing year (bug 8110)
16984 ISBN 1-234-56789-0 - 2006
16986 ISBN 1 234 56789 0 - 2006
16988 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
16989 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
16997 {{anchorencode:foo bar©#%n}}
16999 <p>foo_bar.C2.A9.23.25n
17004 anchorencode trims spaces
17006 {{anchorencode: __pretty__please__}}
17013 anchorencode deals with links
17015 {{anchorencode: [[hello|world]] [[hi]]}}
17022 anchorencode deals with templates
17024 {{anchorencode: {{Foo}} }}
17031 anchorencode encodes like the TOC generator: (bug 18431)
17033 === _ +:.3A%3A&&]] ===
17034 {{anchorencode: _ +:.3A%3A&&]] }}
17037 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17038 <p>.2B:.3A.253A.26.26.5D.5D
17043 Bug 6200: blockquotes and paragraph formatting
17064 Bug 8293: Use of center tag ruins paragraph formatting
17085 Parsing of overlapping (improperly nested) inline html tags
17087 <span><s>x</span></s>
17089 <p><span><s>x</span></s></span>
17092 <p><span><s>x</s></span>
17097 ### Language variants related tests
17100 Self-link in language variants
17102 title=[[Dunav]] language=sr
17104 Both [[Dunav]] and [[Дунав]] are names for this river.
17106 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17117 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17119 title=[[Duna]] language=sr
17121 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17123 <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.
17128 Link to a section of a variant of this title shouldn't be parsed as self-link
17130 title=[[Duna]] language=sr
17132 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17134 <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.
17139 Link to pages in language variants
17143 Main Page can be written as [[Маин Паге]]
17145 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17151 Multiple links to pages in language variants
17155 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17157 <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>.
17163 Simple template in language variants
17169 <p>This is a test template
17175 Template with explicit namespace in language variants
17181 <p>This is a test template
17187 Basic test for template parameter in language variants
17191 {{парамтест|param=foo}}
17193 <p>This is a test template with parameter foo
17199 Simple category in language variants
17203 [[Category:МедиаWики Усер'с Гуиде]]
17205 <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>
17222 Don't convert blue categorylinks to another variant (bug 33210)
17226 [[A]][[Category:分类]]
17228 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17233 Stripping -{}- tags (language variants)
17237 Latin proverb: -{Ne nuntium necare}-
17239 <p>Latin proverb: Ne nuntium necare
17245 Prevent conversion with -{}- tags (language variants)
17247 language=sr variant=sr-ec
17249 Latinski: -{Ne nuntium necare}-
17251 <p>Латински: Ne nuntium necare
17257 Prevent conversion of text with -{}- tags (language variants)
17259 language=sr variant=sr-ec
17261 Latinski: -{Ne nuntium necare}-
17263 <p>Латински: Ne nuntium necare
17269 Prevent conversion of links with -{}- tags (language variants)
17271 language=sr variant=sr-ec
17275 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17281 -{}- tags within headlines (within html for parserConvert())
17283 language=sr variant=sr-ec
17287 <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>
17293 Explicit definition of language variant alternatives
17295 language=zh variant=zh-tw
17297 -{zh:China;zh-tw:Taiwan}-, not China
17299 <p>Taiwan, not China
17305 Conversion around HTML tags
17307 language=sr variant=sr-ec
17309 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17310 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17313 <span title="ЛаCтин">ски</span>
17319 Explicit session-wise language variant mapping (A flag and - flag)
17321 language=zh variant=zh-tw
17323 Taiwan is not China.
17324 But -{A|zh:China;zh-tw:Taiwan}- is China,
17325 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17326 and -{China}- is China.
17328 <p>Taiwan is not China.
17329 But Taiwan is Taiwan,
17330 (This should be stripped!)
17331 and China is China.
17336 Explicit session-wise language variant mapping (H flag for hide)
17338 language=zh variant=zh-tw
17340 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17343 <p>(This should be stripped!)
17349 Adding explicit conversion rule for title (T flag)
17351 language=zh variant=zh-tw showtitle
17353 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17356 <p>Should be stripped!
17361 Testing that changing the language variant here in the tests actually works
17363 language=zh variant=zh showtitle
17365 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17368 <p>Should be stripped!
17373 Recursive conversion of alt and title attrs shouldn't clear converter state
17375 language=zh variant=zh-cn showtitle
17377 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17378 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17382 Should be stripped<span title="Exclamation">!</span>
17387 Bug 24072: more test on conversion rule for title
17389 language=zh variant=zh-tw showtitle
17391 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17392 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17395 <p>This should be stripped!
17396 This won't take interferes with the title rule.
17401 Partly disable title conversion if variant == main language code
17403 language=zh variant=zh title=[[ZH]] showtitle
17405 -{T|zh-cn:CN;zh-tw:TW}-
17413 Partly disable title conversion if variant == main language code, more
17415 language=zh variant=zh title=[[ZH]] showtitle
17425 Raw output of variant escape tags (R flag)
17427 language=zh variant=zh-tw
17429 Raw: -{R|zh:China;zh-tw:Taiwan}-
17431 <p>Raw: zh:China;zh-tw:Taiwan
17436 Nested using of manual convert syntax
17438 language=zh variant=zh-hk
17440 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17442 <p>Nested: Hello Hong Kong!
17447 Proper conversion of text in external links
17449 language=sr variant=sr-ec
17451 http://www.google.com
17452 gopher://www.google.com
17453 [http://www.google.com http://www.google.com]
17454 [gopher://www.google.com gopher://www.google.com]
17455 [https://www.google.com irc://www.google.com]
17456 [ftp://www.google.com www.google.com/ftp://dir]
17457 [//www.google.com www.google.com]
17459 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17460 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17461 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17462 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17463 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17464 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17465 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17470 Do not convert roman numbers to language variants
17472 language=sr variant=sr-ec
17476 <p>Фридрих IV је цар.
17481 Unclosed language converter markup "-{"
17492 Don't convert raw rule "-{R|=>}-" to "=>"
17503 Don't break link parsing if language converter markup is in the caption.
17505 language=sr variant=sr-ec
17507 [[Main Page|-{R|main page}-]]
17509 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17513 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17515 Don't break image parsing if language converter markup is in the caption.
17519 [[File:Foobar.jpg|-{R|caption}-]]
17521 <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>
17525 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17527 Don't break list handling if language converter markup is in the item.
17529 language=zh variant=zh-cn
17531 ;-{zh-cn:AAA;zh-tw:BBB}-
17533 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
17540 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17542 Don't break table handling if language converter markup is in the cell.
17544 language=sr variant=sr-ec
17567 Bug 529: Uncovered bullet
17576 # Plain MediaWiki does not remove empty lists, but tidy actually does.
17577 # Templates in Wikipedia rely on this behavior, as tidy has always been
17578 # enabled there. These tests are normally run *without* tidy, so specify the
17579 # full output here.
17580 # To test realistic parsing behavior, apply a tidy-like transformation to both
17581 # the expected output and your parser's output.
17583 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
17585 ******* Foo {{bullet}}
17587 <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>
17593 Bug 529: Uncovered table already at line-start
17616 Bug 529: Uncovered bullet in parser function result
17618 * Foo {{lc:{{bullet}} }}
17626 Bug 5678: Double-parsed template argument
17628 {{lc:{{{1}}}|hello}}
17635 Bug 5678: Double-parsed template invocation
17637 {{lc:{{paramtest {{!}} param = hello }} }}
17639 <p>{{paramtest | param = hello }}
17644 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
17647 title=[[Main Page]]
17649 {{PRVNÍVELKÉ:ěščř}}
17650 {{prvnívelké:ěščř}}
17670 Morwen/13: Unclosed link followed by heading
17677 <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>
17682 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
17689 <h1><span class="mw-headline" id="heading">heading</span></h1>
17694 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
17701 <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>
17716 Paragraphs inside divs (no extra line breaks)
17728 Paragraphs inside divs (extra line break on open)
17743 Paragraphs inside divs (extra line break on close)
17758 Paragraphs inside divs (extra line break on open and close)
17775 Nesting tags, paragraphs on lines which begin with <div>
17777 <div></div><strong>A
17780 <p><strong>A</strong></p>
17781 <p><strong>B</strong></p>
17789 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
17791 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
17793 <blockquote>Line one
17795 Line two</blockquote>
17797 <blockquote>Line one
17798 Line two</blockquote>
17802 <p>Line one Line two</p>
17807 Bug 6200: paragraphs inside blockquotes (extra line break on open)
17812 Line two</blockquote>
17817 Line two</blockquote>
17822 Line two</blockquote>
17826 Bug 6200: paragraphs inside blockquotes (extra line break on close)
17828 <blockquote>Line one
17833 <blockquote>Line one
17846 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
17868 Paragraphs inside blockquotes/divs (no extra line breaks)
17870 <blockquote><div>Line one
17872 Line two</div></blockquote>
17874 <blockquote><div>Line one
17875 Line two</div></blockquote>
17880 Paragraphs inside blockquotes/divs (extra line break on open)
17885 Line two</div></blockquote>
17890 Line two</div></blockquote>
17895 Paragraphs inside blockquotes/divs (extra line break on close)
17897 <blockquote><div>Line one
17900 </div></blockquote>
17902 <blockquote><div>Line one
17905 </div></blockquote>
17910 Paragraphs inside blockquotes/divs (extra line break on open and close)
17916 </div></blockquote>
17922 </div></blockquote>
17927 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
17929 wgLinkHolderBatchSize=0
17935 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
17936 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
17937 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
17942 Free external link invading image caption
17944 [[Image:Foobar.jpg|thumb|http://x|hello]]
17946 <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>
17951 Bug 15196: localised external link numbers
17955 [http://en.wikipedia.org/]
17957 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
17960 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
17964 Multibyte character in padleft
17966 {{padleft:-Hello|7|Æ}}
17973 Multibyte character in padright
17975 {{padright:Hello-|7|Æ}}
17982 formatdate parser function
17984 {{#formatdate:2009-03-24}}
17986 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
17991 formatdate parser function, with default format
17993 {{#formatdate:2009-03-24|mdy}}
17995 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18000 Spacing of numbers in formatted dates
18002 {{#formatdate:January 15}}
18004 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18009 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
18011 language=nl title=[[MediaWiki:Common.css]]
18013 {{#formatdate:2009-03-24|dmy}}
18015 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18028 Edit comment with link
18032 I like the [[Main Page]] a lot
18034 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18038 Edit comment with link and link text
18042 I like the [[Main Page|best pages]] a lot
18044 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18048 Edit comment with link and link text with suffix
18052 I like the [[Main Page|best page]]s a lot
18054 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18058 Edit comment with section link (non-local, eg in history list)
18060 comment title=[[Main Page]]
18062 /* External links */ removed bogus entries
18064 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18068 Edit comment with section link and text before it (non-local, eg in history list)
18070 comment title=[[Main Page]]
18072 pre-comment text /* External links */ removed bogus entries
18074 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>
18078 Edit comment with section link (local, eg in diff view)
18080 comment local title=[[Main Page]]
18082 /* External links */ removed bogus entries
18084 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18088 Edit comment with subpage link (bug 14080)
18092 title=[[Subpage test]]
18094 Poked at a [[/subpage]] here...
18096 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18100 Edit comment with subpage link and link text (bug 14080)
18104 title=[[Subpage test]]
18106 Poked at a [[/subpage|neat little page]] here...
18108 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18112 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18115 title=[[Subpage test]]
18117 Poked at a [[/subpage]] here...
18119 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18123 Edit comment with bare anchor link (local, as on diff)
18127 title=[[Main Page]]
18131 <a href="#section">#section</a>
18135 Edit comment with bare anchor link (non-local, as on history)
18138 title=[[Main Page]]
18142 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18146 Anchor starting with underscore
18150 <p><a href="#_ref">One</a>
18155 Id starting with underscore
18157 <div id="_ref"></div>
18159 <div id="_ref"></div>
18164 Space normalisation on autocomment (bug 22784)
18167 title=[[Main Page]]
18169 /* __hello__world__ */
18171 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18175 percent-encoding and + signs in comments (Bug 26410)
18179 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18181 <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>
18184 # FIXME: Omitting the php sections here because of differences in the local and
18185 # jenkins output. But, more importantly, the Bad.jpg isn't being stripped,
18186 # which seems to be a problem with the testing infrastructure.
18188 Bad images - basic functionality
18192 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[File:Bad.jpg]]","optList":[]}'/>
18195 # FIXME: Same reasoning as above. The expected php is:
18200 Bad images - bug 16039: text after bad image disappears
18207 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[File:Bad.jpg]]","optList":[]}'/>
18212 Verify that displaytitle works (bug #22501) no displaytitle
18216 wgAllowDisplayTitle=true
18217 wgRestrictDisplayTitle=false
18219 this is not the the title
18222 <p>this is not the the title
18227 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18232 wgAllowDisplayTitle=true
18233 wgRestrictDisplayTitle=false
18235 this is not the the title
18236 {{DISPLAYTITLE:whatever}}
18239 <p>this is not the the title
18244 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18249 wgAllowDisplayTitle=true
18250 wgRestrictDisplayTitle=true
18252 this is not the the title
18253 {{DISPLAYTITLE:whatever}}
18256 <p>this is not the the title
18261 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18266 wgAllowDisplayTitle=true
18267 wgRestrictDisplayTitle=true
18269 this is not the the title
18270 {{DISPLAYTITLE:screen}}
18273 <p>this is not the the title
18278 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18283 wgAllowDisplayTitle=false
18285 this is not the the title
18286 {{DISPLAYTITLE:screen}}
18289 <p>this is not the the title
18290 <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>
18295 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18300 wgAllowDisplayTitle=false
18302 this is not the the title
18305 <p>this is not the the title
18310 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18315 wgAllowDisplayTitle=true
18316 wgRestrictDisplayTitle=true
18318 this is not the the title
18319 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18321 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18322 <p>this is not the the title
18327 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18332 wgAllowDisplayTitle=true
18333 wgRestrictDisplayTitle=true
18335 this is not the the title
18336 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18338 <span style="color: red;">s</span>creen
18339 <p>this is not the the title
18344 preload: check <noinclude> and <includeonly>
18348 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18354 preload: check <onlyinclude>
18358 Goodbye <onlyinclude>Hello world</onlyinclude>
18364 preload: can pass tags through if we want to
18368 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18370 <includeonly>Hello world</includeonly>
18374 preload: check that it doesn't try to do tricks
18378 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18380 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18384 Play a bit with r67090 and bug 3158
18386 <div style="width:50% !important"> </div>
18387 <div style="width:50% !important"> </div>
18388 <div style="width:50% !important"> </div>
18389 <div style="border : solid;"> </div>
18391 <div style="width:50% !important"> </div>
18392 <div style="width:50% !important"> </div>
18393 <div style="width:50% !important"> </div>
18394 <div style="border : solid;"> </div>
18397 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18398 <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>
18399 <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>
18400 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18405 HTML5 data attributes
18407 <span data-foo="bar">Baz</span>
18408 <p data-abc-def_hij="">Quuz</p>
18410 <p><span data-foo="bar">Baz</span>
18412 <p data-abc-def_hij="">Quuz</p>
18417 percent-encoding and + signs in internal links (Bug 26410)
18419 [[User:+%]] [[Page+title%]]
18420 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18421 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
18422 [[%33%45]] [[%33%45+]]
18424 <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>
18425 <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>
18426 <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>
18427 <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>
18432 Special characters in embedded file links (bug 27679)
18434 [[File:Contains & ampersand.jpg]]
18435 [[File:Does not exist.jpg|Title with & ampersand]]
18437 <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>
18438 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18444 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18446 Text's been normalized?
18448 <p>Text's been normalized?
18453 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18455 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18457 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18462 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18464 [http://www.example.org/ ideograms]
18466 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18471 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18473 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18475 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18499 Bug 31098 Template which includes system messages which includes the template
18503 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18504 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18509 Bug31490 Turkish: ucfirst 'blah'
18520 Bug31490 Turkish: ucfirst 'ix'
18531 Bug31490 Turkish: lcfirst 'BLAH'
18542 Bug31490 Turkish: ucfırst (with a dotless i)
18548 <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>
18553 Bug31490 ucfırst (with a dotless i) with English language
18559 <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>
18564 Bug 26375: TOC with italics
18566 title=[[Main Page]]
18569 == ''Lost'' episodes ==
18571 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18573 <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>
18577 <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>
18582 Bug 26375: TOC with bold
18584 title=[[Main Page]]
18587 == '''should be bold''' then normal text ==
18589 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18591 <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>
18595 <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>
18600 Bug 33845: Headings become cursive in TOC when they contain an image
18602 title=[[Main Page]]
18605 == Image [[Image:foobar.jpg]] ==
18607 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18609 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
18613 <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>
18618 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
18620 title=[[Main Page]]
18623 == <blockquote>Quote</blockquote> ==
18625 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18627 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18631 <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>
18634 <div id="toc" class="toc">
18635 <div id="toctitle">
18639 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18642 <h2><span class="mw-headline" id="Quote"></span></h2>
18644 <p><span class="mw-headline" id="Quote">Quote</span></p>
18646 <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>
18650 Unclosed tags in TOC
18652 title=[[Main Page]]
18656 <small>Hanc marginis exiguitas non caperet.</small>
18659 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18661 <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>
18665 <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>
18666 <p><small>Hanc marginis exiguitas non caperet.</small>
18672 Multiple tags in TOC
18675 == <i>Foo</i> <b>Bar</b> ==
18677 == <i>Foo</i> <blockquote>Bar</blockquote> ==
18679 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18681 <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>
18682 <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>
18686 <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>
18687 <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>
18690 <div id="toc" class="toc">
18691 <div id="toctitle">
18695 <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>
18696 <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>
18699 <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>
18700 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
18702 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
18704 <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>
18708 Tags with parameters in TOC
18711 == <sup class="in-h2">Hello</sup> ==
18713 == <sup class="a > b">Evilbye</sup> ==
18715 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18717 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
18718 <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>
18722 <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>
18723 <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>
18728 span tags with directionality in TOC
18731 == <span dir="ltr">C++</span> ==
18733 == <span dir="rtl">זבנג!</span> ==
18735 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
18737 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
18739 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
18741 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18743 <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>
18744 <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>
18745 <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>
18746 <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>
18747 <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>
18751 <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>
18752 <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>
18753 <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>
18754 <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>
18755 <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>
18762 == {{int:headline_sample}} ==
18766 Bug 32057: Title needed when expanding <h> nodes.
18768 title=[[Main Page]]
18772 <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>
18777 Strip marker in urlencode
18779 {{urlencode:x<nowiki/>y}}
18780 {{urlencode:x<nowiki/>y|wiki}}
18781 {{urlencode:x<nowiki/>y|path}}
18808 Strip marker in formatNum
18810 {{formatnum:1<nowiki/>2}}
18811 {{formatnum:1<nowiki/>2|R}}
18819 Check noCommafy in formatNum
18823 {{formatnum:123456.78}}
18824 {{formatnum:123456.78|NOSEP}}
18832 Wrong option for formatNum (bug 56199)
18834 {{formatnum:1,234.56|Random}}
18835 {{formatnum:1,234.56|EVERYTHING}}
18836 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
18845 Strip marker in grammar
18849 {{grammar:elative|foo<nowiki/>bar}}
18856 Strip marker in padleft
18858 {{padleft:|2|x<nowiki/>y}}
18865 Strip marker in padright
18867 {{padright:|2|x<nowiki/>y}}
18874 Strip marker in anchorencode
18876 {{anchorencode:x<nowiki/>y}}
18883 nowiki inside link inside heading (bug 18295)
18885 ==[[foo|x<nowiki>y</nowiki>z]]==
18887 <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>
18892 new support for bdi element (bug 31817)
18894 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18896 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18901 Ignore pipe between table row attributes
18905 |- id=foo | style='color: red'
18913 <tr id="foo" style="color: red">
18920 Gallery override link with WikiLink (bug 34852)
18923 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
18926 <ul class="gallery mw-gallery-traditional">
18927 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18928 <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>
18929 <div class="gallerytext">
18939 Gallery override link with absolute external link (bug 34852)
18942 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
18945 <ul class="gallery mw-gallery-traditional">
18946 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18947 <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>
18948 <div class="gallerytext">
18958 Gallery override link with malicious javascript (bug 34852)
18961 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
18964 <ul class="gallery mw-gallery-traditional">
18965 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18966 <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>
18967 <div class="gallerytext">
18977 Gallery with invalid title as link (bug 43964)
18980 File:foobar.jpg|link=<
18983 <ul class="gallery mw-gallery-traditional">
18984 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18985 <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>
18986 <div class="gallerytext">
18994 Language parser function
19003 Padleft and padright as substr
19005 {{padleft:|3|abcde}}
19006 {{padright:|3|abcde}}
19014 Special parser function
19016 {{#special:RandomPage}}
19017 {{#special:BaDtItLe}}
19018 {{#special:Foobar}}
19027 Bug 34939 - Case insensitive link parsing ([HttP://])
19029 [HttP://MediaWiki.Org/]
19031 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19034 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19038 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19040 [HttP://MediaWiki.Org/ MediaWiki]
19042 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19047 Bug 34939 - Case insensitive link parsing (HttP://)
19049 HttP://MediaWiki.Org/
19051 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19054 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19072 <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>
19073 <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>
19074 <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>
19075 <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>
19076 <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>
19082 ### Parsoid-specific tests
19083 ### Parsoid-PHP parser incompatibilities
19086 1. SOL-sensitive wikitext tokens as template-args
19088 parsoid=wt2html,wt2wt
19094 <span about="#mwt1" typeof="mw:Transclusion">
19095 </span><ul about="#mwt1"><li>a</li>
19097 <span about="#mwt2" typeof="mw:Transclusion">
19098 </span><ol about="#mwt2"><li>a</li>
19100 <span about="#mwt3" typeof="mw:Transclusion">
19101 </span><dl about="#mwt3"><dd>a</dd>
19105 #### -----------------------------------------------------------------
19106 #### Parsoid-specific functionality tests
19107 #### -----------------------------------------------------------------
19109 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19110 # We know wt2wt will fail, but we expect selser to pass.
19111 # Due to the nature of our testing, wt2wt and selser tests will enter the
19112 # blacklist and we'll catch selser regressions based on changes to the
19113 # blacklist entries for selser tests.
19115 1. Bad treebuilder fixup of formatting elt is cleaned up
19117 parsoid=wt2html,wt2wt
19122 [[Image:Foobar.jpg|right|Test]]
19129 <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>
19136 2. Bad treebuilder fixup of formatting elt is cleaned up
19138 parsoid=wt2html,wt2wt
19140 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19142 <small>[[Image:Foobar.jpg|right|300px]]</small>
19145 <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>
19147 <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>
19150 #### ----------------------------------------------------------------
19151 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19152 #### tags. Parsoid's output for these tags differs from that of the
19154 #### ----------------------------------------------------------------
19157 Ref: 1. ref-location should be replaced with an index span
19162 B <ref name="x">foo</ref>
19165 <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>
19166 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>
19167 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>
19171 Ref: 2. ref-tags with identical names should all get the same index
19175 A <ref name="x">foo</ref>
19178 <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>
19179 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>
19183 Ref: 3. spaces in ref-names should be ignored
19187 A <ref name="x">foo</ref>
19188 B <ref name=" x " />
19191 <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>
19192 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>
19193 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>
19196 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19198 Ref: 4. 'constructor' should be accepted as a valid ref-name
19202 A <ref name="constructor">foo</ref>
19204 <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>
19208 Ref: 5. body should accept generic wikitext
19213 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19218 <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>
19220 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19221 <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>
19227 Ref: 6. indent-pres should not be output in ref-body
19239 <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>
19241 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19242 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19250 Ref: 7. No p-wrapping in ref-body
19269 <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>
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
19287 Ref: 8. transclusion wikitext has lower precedence
19291 A <ref> foo {{echo|</ref> B C}}
19295 <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>
19296 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19297 <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>
19302 Ref: 9. unclosed comments should not leak out of ref-body
19306 A <ref> foo <!--</ref> B C
19309 <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>
19310 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19311 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li>
19316 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19320 A <ref> <b> foo </ref> B C
19324 <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>
19327 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19328 <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>
19333 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19340 <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
19341 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>
19345 Ref: 12. ref-tags act as trailing newline migration barrier
19349 <!--the newline at the end of this line moves out of the p-tag-->a
19351 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19356 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19359 <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>
19360 <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>
19366 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19374 <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
19375 <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>
19379 Ref: 14. A nested ref-tag should be emitted as plain text
19383 <ref>foo <ref>bar</ref> baz</ref>
19387 <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>
19389 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19390 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <ref>bar</ref> baz</li>
19395 Ref: 15. ref-tags with identical names should get identical indexes
19399 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19400 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19404 <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>
19405 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>
19407 <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>
19411 ## We don't bother wt2wt-ing non-standard whitespace
19413 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19421 <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>
19423 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19424 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19428 References: 1. references tag without any refs should be handled properly
19434 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19438 References: 2. references tag with group only outputs references from that group
19442 A <ref group="a">foo</ref>
19443 B <ref group="b">bar</ref>
19445 <references group="a" />
19447 <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>
19448 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>
19450 <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>
19455 References: 3. ref list should be cleared after processing references
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":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19469 <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>
19472 <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>
19474 <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>
19479 References: 4. only referenced group should be cleared after processing references
19483 A <ref group="a">afoo</ref>
19486 <references group="a" />
19492 <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>
19493 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>
19495 <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>
19498 <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>
19500 <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>
19505 References: 5. ref tags in references should be processed while ignoring all other content
19510 B <ref name="b">bar</ref>
19513 <ref name="a">foo</ref>
19514 This should just get lost.
19517 <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>
19518 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>
19521 <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>
19526 References: 6. <references /> from a transclusion
19530 <ref>Foo</ref> {{echo|<references />}}
19532 <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>
19536 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
19540 A <ref>foo bar for a</ref>
19541 B <ref group="X" name="b" />
19545 <references group="X">
19546 <ref name="b">foo</ref>
19549 <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>
19550 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>
19552 <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>
19554 <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>
19558 Entities in ref name
19562 <ref name="test & me">hi</ref>
19564 <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>
19567 # This test is wt2html only because we're permitting the serializer to produce
19568 # dirty diffs, normalizing the unclosed references to the self-closed version.
19570 Generate references for unclosed references tag
19578 <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>
19581 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19582 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19586 New reference serializes on its own line
19588 parsoid=wt2wt,html2wt
19593 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
19596 #--------- Test stripping of empty nodes in template content ----------
19598 Empty LI and TR nodes should be stripped from template content
19603 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
19607 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
19620 Empty LI and TR nodes should not be stripped from top-level content
19647 Empty TR nodes should not be stripped if they have any attributes set
19649 {{EmptyTRWithHTMLAttrTest}}
19651 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
19652 <tr align="center"></tr>
19653 <tr><td>foo</td></tr>
19654 <tr align="center"></tr>
19655 <tr><td>bar</td></tr>
19659 #### ----------------------------------------------------------------
19660 #### The following section of tests are primarily to test
19661 #### wikitext escaping capabilities of Parsoid. Given that
19662 #### escaping can be done any number of ways, the wikitext (input)
19663 #### is always adjusted to reflect how Parsoid adds nowiki
19666 #### We are marking several tests as parsoid-only since the
19667 #### HTML in the result section is different from what the
19668 #### PHP parser generates for it.
19669 #### ----------------------------------------------------------------
19672 #### --------------- Headings ---------------
19674 #### 1. Nested inside html <h1>=foo=</h1>
19675 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
19676 #### 3. Nested inside html with wikitext split by html tags
19677 #### 4. No escape needed
19678 #### 5. Empty headings <h1></h1>
19679 #### 6. Heading chars in SOL context
19680 #### ----------------------------------------
19682 Headings: 0. Unnested
19686 <nowiki>=foo=</nowiki>
19688 <nowiki> =foo= </nowiki>
19690 <nowiki>=foo=</nowiki>
19692 =foo''a''<nowiki>=</nowiki>
19694 <p><span typeof="mw:Nowiki">=foo=</span></p>
19696 <p><span typeof="mw:Nowiki"> =foo= </span>
19698 <span typeof="mw:Nowiki">=foo=</span></p>
19700 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
19703 # New headings and existing headings are handled differently
19705 Headings: 1. Nested inside html
19715 =<nowiki>=foo=</nowiki>=
19716 ==<nowiki>=foo=</nowiki>==
19717 ===<nowiki>=foo=</nowiki>===
19718 ====<nowiki>=foo=</nowiki>====
19719 =====<nowiki>=foo=</nowiki>=====
19720 ======<nowiki>=foo=</nowiki>======
19727 <h1 data-parsoid=''>=foo=</h1>
19728 <h2 data-parsoid=''>=foo=</h2>
19729 <h3 data-parsoid=''>=foo=</h3>
19730 <h4 data-parsoid=''>=foo=</h4>
19731 <h5 data-parsoid=''>=foo=</h5>
19732 <h6 data-parsoid=''>=foo=</h6>
19736 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
19741 <nowiki>*</nowiki>bar
19747 <nowiki>=bar=</nowiki>
19755 Headings: 3. Nested inside html with wikitext split by html tags
19759 = ='''bold'''<nowiki>foo=</nowiki> =
19761 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
19765 Headings: 4a. No escaping needed (testing just h1 and h2)
19783 = <nowiki>=</nowiki> =
19791 <h1><i>=</i>foo=</h1>
19792 <h1><span typeof="mw:Nowiki">=</span></h1>
19796 Headings: 4b. No escaping needed (inside p-tags)
19811 Headings: 5. Empty headings
19823 =====<nowiki/>=====
19825 ======<nowiki/>======
19836 Headings: 6a. Heading chars in SOL context (with trailing spaces)
19840 <nowiki>=a=</nowiki>
19842 <nowiki>=a=</nowiki>
19844 <nowiki>=a=</nowiki>
19846 <nowiki>=a=</nowiki>
19855 Headings: 6b. Heading chars in SOL context (with trailing newlines)
19883 Headings: 6c. Heading chars in SOL context (leading newline break)
19888 <nowiki>=b=</nowiki>
19895 Headings: 6d. Heading chars in SOL context (with interspersed comments)
19899 <!--c0--><nowiki>=a=</nowiki>
19901 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
19903 <p><!--c0-->=a=</p>
19904 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
19908 Headings: 6d. Heading chars in SOL context (No escaping needed)
19917 #### --------------- Lists ---------------
19918 #### 0. Outside nests (*foo, etc.)
19919 #### 1. Nested inside html <ul><li>*foo</li></ul>
19920 #### 2. Inside definition lists
19921 #### 3. Only bullets at start should be escaped
19922 #### 4. No escapes needed
19923 #### 5. No unnecessary escapes
19924 #### 6. Escape bullets in SOL position
19925 #### 7. Escape bullets in a multi-line context
19926 #### ----------------------------------------
19929 Lists: 0. Outside nests
19931 <nowiki>*</nowiki>foo
19933 <nowiki>#</nowiki>foo
19935 <nowiki>;Foo:</nowiki>bar
19944 Lists: 1. Nested inside html
19946 *<nowiki>*foo</nowiki>
19948 *<nowiki>#foo</nowiki>
19950 *<nowiki>:foo</nowiki>
19952 *<nowiki>;foo</nowiki>
19954 #<nowiki>*foo</nowiki>
19956 #<nowiki>#foo</nowiki>
19958 #<nowiki>:foo</nowiki>
19960 #<nowiki>;foo</nowiki>
19962 <ul><li>*foo</li></ul>
19963 <ul><li>#foo</li></ul>
19964 <ul><li>:foo</li></ul>
19965 <ul><li>;foo</li></ul>
19966 <ol><li>*foo</li></ol>
19967 <ol><li>#foo</li></ol>
19968 <ol><li>:foo</li></ol>
19969 <ol><li>;foo</li></ol>
19974 Lists: 2. Inside definition lists
19976 ;<nowiki>;foo</nowiki>
19978 ;<nowiki>:foo</nowiki>
19980 ;<nowiki>:foo</nowiki>
19983 :<nowiki>:foo</nowiki>
19985 <dl><dt>;foo</dt></dl>
19986 <dl><dt>:foo</dt></dl>
19989 <dl><dd>:foo</dd></dl>
19994 Lists: 3. Only bullets at start of text should be escaped
19996 *<nowiki>*foo*bar</nowiki>
19998 *<nowiki>*foo</nowiki>''it''*bar
20000 <ul><li>*foo*bar</li></ul>
20001 <ul><li>*foo<i>it</i>*bar</li></ul>
20006 Lists: 4. No escapes needed
20027 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20031 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20037 Lists: 5. No unnecessary escapes
20039 * bar <span><nowiki>[[foo]]</nowiki></span>
20041 *=bar <span><nowiki>[[foo]]</nowiki></span>
20043 *[[bar <span><nowiki>[[foo]]</nowiki></span>
20045 *]]bar <span><nowiki>[[foo]]</nowiki></span>
20047 *=bar <span>foo]]</span>=
20051 <ul><li> bar <span>[[foo]]</span></li></ul>
20052 <ul><li>=bar <span>[[foo]]</span></li></ul>
20053 <ul><li>[[bar <span>[[foo]]</span></li></ul>
20054 <ul><li>]]bar <span>[[foo]]</span></li></ul>
20055 <ul><li>=bar <span>foo]]</span>=</li></ul>
20056 <ul><li> <s></s>: a</li></ul>
20061 Lists: 6. Escape bullets in SOL position
20065 <!--cmt--><nowiki>*foo</nowiki>
20067 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
20071 Lists: 7. Escape bullets in a multi-line context
20074 <nowiki>*</nowiki>b
20081 #### --------------- HRs ---------------
20082 #### 1. Single line
20083 #### -----------------------------------
20086 HRs: 1. Single line
20090 ----<nowiki>----</nowiki>
20094 <hr><p><span typeof="mw:Nowiki">----</span></p>
20099 #### --------------- Tables ---------------
20100 #### 1a. Simple example
20101 #### 1b. No escaping needed (!foo)
20102 #### 1c. No escaping needed (|foo)
20103 #### 1d. No escaping needed (|}foo)
20105 #### 2a. Nested in td (<td>foo|bar</td>)
20106 #### 2b. Nested in td (<td>foo||bar</td>)
20107 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20109 #### 3a. Nested in th (<th>foo!bar</th>)
20110 #### 3b. Nested in th (<th>foo!!bar</th>)
20111 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20115 #### 4c. No escaping needed
20116 #### --------------------------------------
20119 Tables: 1a. Simple example
20130 Tables: 1b. No escaping needed
20139 Tables: 1c. No escaping needed
20148 Tables: 1d. No escaping needed
20157 Tables: 2a. Nested in td
20162 |<nowiki>foo|bar</nowiki>
20164 |x<div><nowiki>a|b</nowiki></div>
20168 <td>foo|bar</td></tr>
20169 <tr><td>x<div>a|b</div></td>
20174 Tables: 2b. Nested in td
20179 |<nowiki>foo||bar</nowiki>
20180 |''it''<nowiki>foo||bar</nowiki>
20184 <td><span typeof="mw:Nowiki">foo||bar</span></td>
20185 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
20189 Tables: 2c. Nested in td -- no escaping needed
20197 <table><tbody><tr><td>foo!!bar
20198 </td></tr></tbody></table>
20203 Tables: 3a. Nested in th
20211 <table><tbody><tr><th>foo!bar
20212 </th></tr></tbody></table>
20217 Tables: 3b. Nested in th
20222 !<nowiki>foo!!bar</nowiki>
20226 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
20231 Tables: 3c. Nested in th -- no escaping needed
20236 !<nowiki>foo||bar</nowiki>
20240 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
20244 Tables: 4a. Escape -
20251 |<nowiki>-bar</nowiki>
20255 <tr><th>-bar</th></tr>
20257 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
20261 Tables: 4b. Escape +
20268 |<nowiki>+bar</nowiki>
20272 <tr><th>+bar</th></tr>
20274 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
20278 Tables: 4c. No escaping needed
20299 <tr><td>foo-bar</td><td>foo+bar</td></tr>
20300 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
20306 <div>a|b</div></td>
20311 Tables: 4d. No escaping needed
20322 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
20323 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20324 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
20329 Tables: Digest broken attributes on table and tr tag
20345 #### --------------- Links ----------------
20346 #### 1. Quote marks in link text
20347 #### 2. Wikilinks: Escapes needed
20348 #### 3. Wikilinks: No escapes needed
20349 #### 4. Extlinks: Escapes needed
20350 #### 5. Extlinks: No escapes needed
20351 #### --------------------------------------
20353 Links 1. Quote marks in link text
20357 [[Foo|Foo<nowiki>''boo''</nowiki>]]
20359 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
20363 Links 2. WikiLinks: Escapes needed
20368 [[Foo|<nowiki>Foobar]</nowiki>]]
20369 [[Foo|x [Foobar] x]]
20370 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
20371 [[Foo|<nowiki>[[Bar]]</nowiki>]]
20372 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
20373 [[Foo|<nowiki>|Bar</nowiki>]]
20374 [[Foo|<nowiki>]]bar</nowiki>]]
20375 [[Foo|<nowiki>[[bar</nowiki>]]
20376 [[Foo|<nowiki>x [[ y</nowiki>]]
20377 [[Foo|<nowiki>x ]] y</nowiki>]]
20378 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
20380 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
20381 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
20382 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
20383 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
20384 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
20385 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
20386 <a href="Foo" rel="mw:WikiLink">|Bar</a>
20387 <a href="Foo" rel="mw:WikiLink">]]bar</a>
20388 <a href="Foo" rel="mw:WikiLink">[[bar</a>
20389 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
20390 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
20391 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
20395 Links 3. WikiLinks: No escapes needed
20402 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
20403 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
20407 Links 4. ExtLinks: Escapes needed
20411 [http://google.com <nowiki>[google]</nowiki>]
20412 [http://google.com <nowiki>google]</nowiki>]
20414 <nowiki>[http://google.com]</nowiki>
20416 <nowiki>[http://google.com google]</nowiki>
20419 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
20420 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
20421 <p>[http://google.com]</p>
20422 <p>[http://google.com google]</p>
20426 Links 5. ExtLinks: No escapes needed
20430 [http://google.com [google]
20432 <a href="http://google.com" rel="mw:ExtLink">[google</a>
20436 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
20438 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
20439 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
20440 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
20441 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
20442 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
20443 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
20444 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20445 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
20446 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20447 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
20448 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
20449 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
20450 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
20453 x<nowiki/>http://example.com<nowiki/>y
20454 http://example.com<nowiki/>?x
20455 http://example.com<nowiki/>&x
20456 http://example.com<nowiki/>'x
20457 http://example.com<nowiki/>,x
20458 http://example.com<nowiki/>.x
20459 http://example.com<nowiki/>;x
20460 http://example.com<nowiki/>:x
20461 http://example.com<nowiki/>;x
20462 http://example.com<nowiki/>!x
20463 http://example.com<nowiki/>=x
20464 http://example.com<nowiki/>(x)
20465 http://example.com(x<nowiki/>)
20469 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20472 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
20474 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
20475 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
20476 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
20477 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
20478 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
20484 "http://example.com"
20485 (http://example.com)
20486 (http://example.com) foo
20487 http://example.com,
20488 http://example.com, foo
20491 ## Parsoid currently fails wt2html on this one!
20493 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20495 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
20497 http://example.com.,;:!?
20501 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
20503 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
20509 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
20511 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20512 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20513 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
20514 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
20524 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
20526 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
20532 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
20534 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20535 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20536 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
20537 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
20547 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
20549 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
20550 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
20551 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
20554 ISBN 1234567890<nowiki/>1
20555 ISBN 1234567890<nowiki/>x
20556 ISBN 1234567890<nowiki/>b
20560 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
20562 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
20567 #### --------------- Quotes ---------------
20568 #### 1. Quotes inside <b> and <i>
20569 #### 2. Link fragments separated by <i> and <b> tags
20570 #### 3. Link fragments inside <i> and <b>
20571 #### 4. No escaping needed
20572 #### --------------------------------------
20574 1. Quotes inside <b> and <i>
20576 parsoid=html2wt,wt2wt
20578 ''<nowiki>'foo'</nowiki>''
20579 ''<nowiki>''foo''</nowiki>''
20580 ''<nowiki>'''foo'''</nowiki>''
20582 '''<nowiki>'foo'</nowiki>'''
20583 '''<nowiki>''foo''</nowiki>'''
20584 '''<nowiki>'''foo'''</nowiki>'''
20585 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
20586 '''foo'''<nowiki/>'s
20589 '<nowiki/>''foo''<nowiki/>'
20591 '''foo'''<nowiki/>'
20592 '<nowiki/>'''foo'''<nowiki/>'
20593 ''fools'<span> errand</span>''
20594 ''<span>fool</span>'s errand''
20603 <b>foo'<i>bar'</i>baz</b>
20611 <i>fools'<span> errand</span></i>
20612 <i><span>fool</span>'s errand</i>
20616 2. Link fragments separated by <i> and <b> tags
20618 [[''foo''<nowiki>hello]]</nowiki>
20620 [['''foo'''<nowiki>hello]]</nowiki>
20622 <p>[[<i>foo</i>hello]]
20623 </p><p>[[<b>foo</b>hello]]
20627 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
20628 # this is one of the shortcomings of this format
20630 3. Link fragments inside <i> and <b>
20632 ''[[foo''<nowiki>]]</nowiki>
20634 '''[[foo'''<nowiki>]]</nowiki>
20637 </p><p><b>[[foo</b>]]
20642 4. No escaping needed
20644 '<span>''bar''</span>'
20645 '<span>'''bar'''</span>'
20647 <p>'<span><i>bar</i></span>'
20648 '<span><b>bar</b></span>'
20652 #### ----------- Paragraphs ---------------
20653 #### 1. No unnecessary escapes
20654 #### --------------------------------------
20657 1. No unnecessary escapes
20659 bar <span><nowiki>[[foo]]</nowiki></span>
20661 =bar <span><nowiki>[[foo]]</nowiki></span>
20663 [[bar <span><nowiki>[[foo]]</nowiki></span>
20665 ]]bar <span><nowiki>[[foo]]</nowiki></span>
20667 =bar <span>foo]]</span><nowiki>=</nowiki>
20669 <p>bar <span>[[foo]]</span>
20670 </p><p>=bar <span>[[foo]]</span>
20671 </p><p>[[bar <span>[[foo]]</span>
20672 </p><p>]]bar <span>[[foo]]</span>
20673 </p><p>=bar <span>foo]]</span>=
20677 #### ----------------------- PRE --------------------------
20678 #### 1. Leading whitespace in SOL context should be escaped
20679 #### ------------------------------------------------------
20681 1. Leading whitespace in SOL context should be escaped
20685 <nowiki> </nowiki>a
20687 <nowiki> </nowiki> a
20689 <nowiki> </nowiki>a(tab)
20691 <nowiki> </nowiki> a
20693 <nowiki> </nowiki> a
20696 <nowiki> </nowiki>b
20699 <nowiki> </nowiki>b
20702 <nowiki> </nowiki> b
20708 <p><!--cmt--> a</p>
20718 2. Leading whitespace in non-indent-pre contexts should not be escaped
20725 <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>
20729 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
20748 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
20752 [[File:Foobar.jpg|thumb|caption]]
20755 <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>
20759 5. Nowiki escaping should account for indent-pres
20768 #### --------------- Behavior Switches --------------------
20770 1. Valid behavior switches should be escaped
20774 <nowiki>__TOC__</nowiki>
20775 ''<nowiki>__TOC__</nowiki>''
20782 2. Invalid behavior switches should not be escaped
20793 #### --------------- HTML tags ---------------
20796 #### 3. multi-line html tag
20797 #### 4. extension tags
20798 #### -----------------------------------------
20804 <a href="http://google.com">google</a>
20806 <a href="http://google.com">google</a>
20812 <nowiki><div>foo</div>
20813 <div style="color:red">foo</div></nowiki>
20815 <p><div>foo</div>
20816 <div style="color:red">foo</div>
20821 3. multi-line html tag
20836 <nowiki><ref>foo</ref></nowiki>
20838 <nowiki><ref>bar</nowiki>
20840 baz<nowiki></ref></nowiki>
20842 <p><ref>foo</ref>
20843 </p><p><ref>bar
20844 </p><p>baz</ref>
20848 #### --------------- Others ---------------
20852 <nowiki>foo</nowiki>
20854 <p><nowiki>foo</nowiki>
20858 ## The quote-char in the input is necessary for triggering the bug
20860 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
20862 parsoid=wt2wt,html2wt
20871 Tag-like HTML structures are passed through as text
20893 </p><p>1<d e>f
20898 # This was a bug in the PHP parser (see bug 17663 and its dups,
20899 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
20901 Tag names followed by punctuation should not be recognized as tags
20905 <p><s.ome> text
20910 HTML tag with necessary entities in attributes
20912 <span title="&amp;">foo</span>
20914 <p><span title="&amp;">foo</span>
20919 HTML tag with 'unnecessary' entity encoding in attributes
20921 <span title="&">foo</span>
20923 <p><span title="&">foo</span>
20928 HTML tag with broken attribute value quoting
20930 <span title="Hello world>Foo</span>
20932 <p><span>Foo</span>
20935 <p><span title="Hello world">Foo</span>
20940 Parsoid-only: HTML tag with broken attribute value quoting
20944 <span title="Hello world>Foo</span>
20946 <p><span title="Hello world">Foo</span>
20951 Table with broken attribute value quoting
20954 | title="Hello world|Foo
20965 <td title="Hello world">Foo
20971 Table with broken attribute value quoting on consecutive lines
20974 | title="Hello world|Foo
20975 | style="color:red|Bar
20988 <td title="Hello world">Foo
20989 </td><td style="color: red">Bar
20990 </td></tr></tbody></table>
20995 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21005 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21015 Accept empty td cell attribute
21018 | align="center" | foo || |
21023 <td align="center"> foo </td>
21030 Non-empty attributes in th-cells
21033 ! Foo !! style="color: red" | Bar
21039 <th style="color: red"> Bar
21045 Accept empty attributes in th-cells
21060 Empty table rows go away
21081 ### Parsoid-centric tests for testing RTing of inter-element separators
21082 ### Edge cases not tested by existing parser tests and specific to
21083 ### Parsoid-specific serialization strategies.
21087 RT-ed inter-element separators should be valid separators
21099 # Parsoid-only since PHP parser relies on Tidy for correct output
21101 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
21115 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
21116 <p>bar</p></small></td></tr>
21120 <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>
21125 Empty TD followed by TD with tpl-generated attribute
21130 |{{echo|style='color:red'}}|foo
21144 Indented table with an empty td
21163 Indented block & table
21177 <div data-parsoid='{"stx":"html"}'>foo</div>
21179 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
21184 Indent and comment before table row
21199 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
21200 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
21204 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
21206 Empty TR followed by a template-generated TR
21212 {{echo|<tr><td>foo</td></tr>}}
21218 <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}}]}'>
21223 ## PHP and parsoid output differ for this, and since this is primarily
21224 ## for testing Parsoid's serializer, marking this Parsoid only
21226 Empty TR followed by mixed-ws-comment line should RT correctly
21242 <!--c--> </tr><!--d-->
21248 Multi-line image caption generated by templates with/without trailing newlines
21252 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
21253 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
21255 <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>
21256 <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>
21261 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
21265 <includeonly>foo</includeonly>
21272 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
21274 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
21277 ## PHP emits broken html for this, and since this is primarily
21278 ## a Parsoid serializer test, marking this Parsoid only
21280 Improperly nested inline or quotes tags with whitespace in between
21284 <span> <s>x</span> </s>
21287 <p><span> <s>x</s></span><s> </s>
21288 <b> <i>x</i></b><i> </i>
21293 Encapsulate protected attributes from wt
21297 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
21299 <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>
21303 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
21304 ## Having nested or stray pre tags results in the attempt to add duplicates,
21305 ## causing an assertion fail. This test tries to prevent that situation.
21307 Ensure ParagraphWrapper can deal with stray closing pre tags
21317 1. Ensure fostered text content is wrapped in element nodes
21321 <table>hi</table><table>ho</table>
21330 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
21332 parsoid=wt2html,wt2wt
21341 <tbody><tr><td> a</td></tr>
21346 Encapsulation properly handles null DSR information from foster box
21348 parsoid=wt2html,wt2wt
21350 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
21352 <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>
21356 1. Encapsulate foster-parented transclusion content
21358 parsoid=wt2wt,wt2html
21360 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
21362 <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>
21372 2. Encapsulate foster-parented transclusion content
21374 parsoid=wt2wt,wt2html
21376 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
21378 <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>
21389 3. Encapsulate foster-parented transclusion content
21391 parsoid=wt2wt,wt2html
21393 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21395 <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>"]}">
21408 4. Encapsulate foster-parented transclusion content
21410 parsoid=wt2wt,wt2html
21412 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21414 <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>"]}">
21427 5. Encapsulate foster-parented transclusion content
21429 parsoid=wt2wt,wt2html
21431 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
21433 <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>
21448 6. Encapsulate foster-parented transclusion content
21450 parsoid=wt2wt,wt2html
21452 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
21454 <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>
21470 7. Encapsulate foster-parented transclusion content
21472 parsoid=wt2wt,wt2html
21474 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
21476 <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>
21487 8. Encapsulate foster-parented transclusion content
21489 parsoid=wt2wt,wt2html
21492 }}{|{{echo|style='color:red'}}
21497 <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>
21507 9. Encapsulate foster-parented transclusion content
21509 parsoid=wt2wt,wt2html
21511 <table>{{echo|hi</table>hello}}
21513 <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>
21517 Table in fosterable position
21519 parsoid=wt2html,wt2wt
21528 <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">
21530 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
21536 # Parsoid only for bug 64747
21538 Properly encapsulate empty-content transclusions in fosterable positions
21546 <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>"}'>
21552 Support <object> element with .data attribute
21556 <object data="test.swf"></object>
21558 <object data="test.swf"></object>
21561 # -----------------------------------------------------------------
21562 # The following section of tests are primarily to spec requirements
21563 # around serialization of new/edited content.
21565 # All these tests are marked Parsoid html2wt and html2html only
21566 # ----------------------------------------------------------------
21568 # 'mi' is a localinterwiki prefix as well as a language
21570 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
21576 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
21580 Image: Modifying size of an image (1)
21583 "modes": ["wt2wt"],
21585 ["img[height]", "attr", "height", "22"],
21586 ["img[width]", "attr", "width", "200"]
21590 [[Image:Foobar.jpg|230x230px]]
21592 [[Image:Foobar.jpg|200x200px]]
21596 Image: Modifying size of an image (2)
21599 "modes": ["wt2wt"],
21601 ["img[height]", "attr", "height", "100"],
21602 ["img[width]", "attr", "width", "500"]
21606 [[Image:Foobar.jpg|230x230px]]
21608 [[Image:Foobar.jpg|500x500px]]
21611 # Change in size is ignored so long as class='mw-default-size'
21613 Image: Modifying size of an image (3)
21616 "modes": ["wt2wt"],
21618 ["figure[class]", "removeClass", "mw-default-size"],
21619 ["figure img", "attr", "height", "19"],
21620 ["figure img", "attr", "width", "170"]
21624 [[Image:Foobar.jpg|thumb]]
21626 [[Image:Foobar.jpg|thumb|170x170px]]
21630 Image: Modifying alignment of an image (bug 48665)
21633 "modes": ["wt2wt"],
21635 ["figure[class]", "removeClass", "mw-halign-right"],
21636 ["figure[class]", "addClass", "mw-halign-left"]
21640 [[Image:Foobar.jpg|thumb|caption|right]]
21642 [[Image:Foobar.jpg|thumb|caption|left]]
21646 Image: Modifying mw-default-size of an frameless image (bug 62805)
21649 "modes": ["wt2wt"],
21651 ["figure.mw-default-size", "removeClass", "mw-default-size"]
21655 [[Image:Foobar.jpg|frameless|right]]
21657 [[Image:Foobar.jpg|frameless|right|220x220px]]
21661 Image: Modifying valign of an image (bug 49221)
21664 "modes": ["wt2wt"],
21666 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
21667 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
21671 [[File:Foobar.jpg|20px|middle]]
21673 [[File:Foobar.jpg|20px|text-top]]
21677 Image: Modifying alt attribute of an image (bug 56400)
21680 "modes": ["wt2wt"],
21682 ["img[alt]", "attr", "alt", "some alternate edited text"]
21686 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
21688 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
21692 Image: Modifying caption of an image
21695 "modes": ["wt2wt"],
21697 ["figcaption", "text", "new caption"]
21701 [[Image:Foobar.jpg|thumb|original caption]]
21703 [[Image:Foobar.jpg|thumb|new caption]]
21707 Image: empty alt attribute (bug 48924)
21711 [[File:Foobar.jpg|thumb|alt=|bar]]
21713 <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>
21717 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
21722 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
21724 #<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>
21728 Image: Block level image should have \n before and after
21733 [[File:Foobar.jpg|right|thumb|150x150px]]
21736 <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>
21740 Image: New block level image should have \n before and after (existing content)
21745 [[File:Foobar.jpg|right|thumb|150x150px]]
21749 <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>
21754 Image: upright option (parsoid)
21758 [[File:Foobar.jpg|thumb|upright|caption]]
21759 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
21760 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
21762 <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>
21763 <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>
21764 <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>
21768 Image: upright option is ignored on inline and frame images (parsoid)
21772 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
21774 <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>
21778 Image: from basic HTML (1)
21782 <span typeof="mw:Image">
21783 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21786 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21790 Image: from basic HTML (2)
21794 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21796 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21800 Image: from basic HTML (3)
21804 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
21806 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
21810 Image: from basic HTML (4)
21814 <img src="File:Foobar.jpg">
21816 [[File:Foobar.jpg|link=]]
21820 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
21827 <li><p>foo</p></li>
21832 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
21838 <ul> <li>foo</li></ul>
21842 Don't strip leading whitespace when handling indent-pre suppressing tags
21850 '''This is very bold of you!'''
21854 indented cell (no pre-wrapping!)
21861 <tr><td> indented row</td></tr>
21864 <b>This is very bold of you!</b>
21867 indented cell (no pre-wrapping!)
21875 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
21880 <nowiki> </nowiki><span>bar</span>
21883 <nowiki> </nowiki></span>bar2
21886 <nowiki> </nowiki><span>bar</span>
21889 <nowiki> </nowiki><span>foo</span>
21907 Lists: Add space after bullets
21913 * <span> baz</span>
21918 <li><span> baz</span></li>
21923 Lists: Dont insert newlines in a serialized list item.
21930 <ul><li>a<br>b</li><li>c</li></ul>
21934 Headings: Add space before/after == (Bug 51744)
21944 == <span> baz</span> ==
21949 <h2><span> baz</span></h2>
21953 Parsoid: Serialize positional parameters with = in them as named parameter
21959 {{echo|1 = f=oo|2 = bar}}
21961 <!--Orig params with data-parsoid has heuristics for handling = chars-->
21962 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
21963 {{echo|<nowiki>f=oo</nowiki>|bar}}
21965 <p about="#mwt1" typeof="mw:Transclusion"
21966 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
21968 <p about="#mwt1" typeof="mw:Transclusion"
21969 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
21971 <!--Orig params with data-parsoid has heuristics for handling = chars-->
21972 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
21973 <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>
21977 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
21993 <div>a<p>b</p></div>
22002 Substrings resembling wikitext in hrefs should not get nowiki escapes
22008 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
22011 #-----------------------------
22012 # I/B quote minimization tests
22013 #-----------------------------
22016 1. I/B quote minimization: wikitext-only tags should be combined
22036 <p><i>A</i><i>B</i></p>
22037 <p><b>A</b><b>B</b></p>
22038 <p><i>A</i><b><i>B</i></b></p>
22039 <p><b>A</b><i><b>B</b></i></p>
22040 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
22041 <p><i><b>A</b></i><i><b>B</b></i></p>
22042 <p><i><b>A</b></i><b><i>B</i></b></p>
22043 <p><b><i>A</i></b><i><b>B</b></i></p>
22047 2. I/B quote minimization: wikitext and html tags should not be combined
22053 ''A'''''<i>B</i>'''
22055 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
22056 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
22060 3. I/B quote minimization: templated content stops minimization
22064 ''A''{{echo|''B''}}
22066 ''A''{{echo|'''''B'''''}}
22068 <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>
22069 <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>
22073 4. I/B quote minimization: new content should be mimimized with adjacent old content
22083 <p><i>A</i><i>B</i></p>
22084 <p><b>A</b><b>B</b></p>
22085 <p><i>A</i><b><i>B</i></b></p>
22088 #------------------------------------
22089 # End of I/B quote minimization tests
22090 #------------------------------------
22093 Bug 54262: New entities
22099 <span typeof="mw:Entity"> </span>
22102 ## Note that there is no wikitext output for 'unknownproperty' ##
22103 ## Unknown magic words are silently dropped ##
22118 __NOCONTENTCONVERT__
22120 <meta property='mw:PageProp/toc' />
22121 <meta property='mw:PageProp/notoc' />
22122 <meta property='mw:PageProp/forcetoc' />
22123 <meta property='mw:PageProp/index' />
22124 <meta property='mw:PageProp/noindex' />
22125 <meta property='mw:PageProp/nogallery' />
22126 <meta property='mw:PageProp/noeditsection' />
22127 <meta property='mw:PageProp/notitleconvert' />
22128 <meta property='mw:PageProp/nocontentconvert' />
22129 <meta property='mw:PageProp/unknownproperty' />
22133 Consecutive <pre>s should not get merged
22135 parsoid=html2wt,html2html
22151 <pre>a</pre><pre>b</pre>
22165 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
22169 [[Special:BookSources/1234567890|ISBN 1234567895]]
22171 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
22175 Edited RFC links not serializable as RFC links should serialize as extlinks
22179 [//tools.ietf.org/html/rfc123 New RFC]
22181 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
22185 Edited PMID links not serializable as PMID links should serialize as extlinks
22189 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
22191 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
22195 Edited Redirect link should emit a non-piped wikitext link
22201 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
22204 # -----------------------------------------------------------------
22205 # End of section for Parsoid-only html2wt tests for serialization
22207 # -----------------------------------------------------------------
22214 Try for 100% code coverage