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-formedness
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)
542 Italics and bold: 2-quote opening sequence: (2,3)
551 Italics and bold: 2-quote opening sequence: (2,4)
561 # same html as previous, but wikitext adjusted to match parsoid html2wt
563 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
565 ''foo<nowiki>''</nowiki>''
571 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
573 Italics and bold: 2-quote opening sequence: (2,5)
586 # same html as previous, but wikitext adjusted to match parsoid html2wt
588 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
590 ''foo'''''<nowiki/>'''
601 ### 3-quote opening sequence tests
605 Italics and bold: 3-quote opening sequence: (3,2)
614 Italics and bold: 3-quote opening sequence: (3,3)
623 Italics and bold: 3-quote opening sequence: (3,4)
631 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
633 Italics and bold: 3-quote opening sequence: (3,5)
646 # same html as previous, but wikitext adjusted to match parsoid html2wt
648 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
650 '''foo'''''<nowiki/>''
661 ### 4-quote opening sequence tests
665 Italics and bold: 4-quote opening sequence: (4,2)
675 # same html as previous, but wikitext adjusted to match parsoid html2wt
677 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
679 <nowiki>''</nowiki>''foo''
686 Italics and bold: 4-quote opening sequence: (4,3)
695 Italics and bold: 4-quote opening sequence: (4,4)
705 # same html as previous, but wikitext adjusted to match parsoid html2wt
707 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
709 '<nowiki/>'''foo'<nowiki/>'''
715 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
717 Italics and bold: 4-quote opening sequence: (4,5)
726 <p>'<b>foo</b><i></i>
730 # same html as previous, but wikitext adjusted to match parsoid html2wt
732 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
734 '<nowiki/>'''foo'''''<nowiki/>''
739 <p>'<b>foo</b><i></i>
745 ### 5-quote opening sequence tests
749 Italics and bold: 5-quote opening sequence: (5,2)
759 # same html as previous, but wikitext adjusted to match parsoid html2wt
760 # skipping wt2html and html2html because it wants to put <i> before <b>
762 Italics and bold: 5-quote opening sequence: (5,2+3)
764 parsoid=wt2wt,html2wt
773 Italics and bold: 5-quote opening sequence: (5,3)
783 # same html as previous, but wikitext adjusted to match parsoid html2wt
785 Italics and bold: 5-quote opening sequence: (5,3+2)
794 Italics and bold: 5-quote opening sequence: (5,4)
800 <p><i><b>foo'</b></i>
805 Italics and bold: 5-quote opening sequence: (5,5)
814 Italics and bold: 5-quote opening sequence: (5,6)
818 <p><i><b>foo'</b></i>
823 ### multiple quote sequences in a line
826 Italics and bold: multiple quote sequences: (2,4,2)
832 <p><i>foo'<b>bar</b></i>
837 # same html as previous, but wikitext adjusted to match parsoid html2wt
839 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
841 ''foo'<nowiki/>'''bar'''''
843 <p><i>foo'<b>bar</b></i>
849 Italics and bold: multiple quote sequences: (2,4,3)
855 <p><i>foo'<b>bar</b></i>
860 # same html as previous, but wikitext adjusted to match parsoid html2wt
862 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
864 ''foo'<nowiki/>'''bar'''''
866 <p><i>foo'<b>bar</b></i>
872 Italics and bold: multiple quote sequences: (2,4,4)
878 <p><i>foo'<b>bar'</b></i>
883 # same html as previous, but wikitext adjusted to match parsoid html2wt
885 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
887 ''foo'<nowiki/>'''bar'<nowiki/>'''''
889 <p><i>foo'<b>bar'</b></i>
894 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
896 Italics and bold: multiple quote sequences: (3,4,2)
905 <p><b>foo'</b>bar<i></i>
909 # same html as previous, but wikitext adjusted to match parsoid html2wt
911 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
915 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
920 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
925 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
927 Italics and bold: multiple quote sequences: (3,4,3)
936 <p><b>foo'</b>bar<b></b>
940 # same html as previous, but wikitext adjusted to match parsoid html2wt
942 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
944 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
949 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
954 ### other quote tests
957 Italics and bold: other quote tests: (2,3,5)
959 ''this is about '''foo's family'''''
961 <p><i>this is about <b>foo's family</b></i>
967 Italics and bold: other quote tests: (2,(3,3),2)
969 ''this is about '''foo's''' family''
971 <p><i>this is about <b>foo's</b> family</i>
977 Italics and bold: other quote tests: (3,2,3,2)
981 '''this is about ''foo'''s family''
983 <p><b>this is about <i>foo</i></b><i>s family</i>
988 # same html as previous, but wikitext adjusted to match parsoid html2wt
990 Italics and bold: other quote tests: (3,2,3+2+2,2)
992 '''this is about ''foo'''''<nowiki/>''s family''
994 <p><b>this is about <i>foo</i></b><i>s family</i>
1000 Italics and bold: other quote tests: (3,2,3,3)
1002 '''this is about ''foo'''s family'''
1004 <p>'<i>this is about </i>foo<b>s family</b>
1010 Italics and bold: other quote tests: (3,(2,2),3)
1012 '''this is about ''foo's'' family'''
1014 <p><b>this is about <i>foo's</i> family</b>
1020 Italicized possessive
1022 The ''[[Main Page]]'''s talk page.
1024 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1027 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1031 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1032 (Requires tidy for PHP parser output to be fixed up)
1034 parsoid=wt2html,wt2wt
1051 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1052 <td><i>a</i></td><td><i>b</i></td></tr>
1061 Non-html5 tags should be accepted
1063 <center>''foo''</center>
1065 <font>''foo''</font>
1066 <strike>''foo''</strike>
1069 <center><i>foo</i></center>
1070 <p><big><i>foo</i></big>
1071 <font><i>foo</i></font>
1072 <strike><i>foo</i></strike>
1078 <wbr> is valid wikitext (bug 52468)
1086 # <strike> is HTML4, <s> is HTML4/5.
1088 <s> or <strike> for strikethrough
1090 <strike>strike</strike>
1094 <p><strike>strike</strike>
1102 Text-level semantic html elements in wikitext
1105 <strong>text</strong>
1121 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1128 <strong>text</strong>
1144 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1152 # test cases taken from
1153 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1155 Ruby markup (W3C-style)
1157 ; Mono-ruby for individual base characters
1158 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1160 : <ruby>今日<rt>きょう</rt></ruby>
1162 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1164 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1166 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1168 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1169 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1170 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1173 <dl><dt> Mono-ruby for individual base characters</dt>
1174 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1175 <dt> Group ruby</dt>
1176 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1177 <dt> Jukugo ruby</dt>
1178 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1179 <dt> Inline ruby</dt>
1180 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1181 <dt> Double-sided ruby</dt>
1182 <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>
1184 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1185 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1186 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1191 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1193 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1195 <b→> doesn't work! </b→>
1197 <bä> doesn't work! </bä>
1199 <boo> works fine </boo>
1201 <s.foo>s.foo</s.foo>
1205 <p><b→> doesn't work! </b→>
1206 </p><p><bä> doesn't work! </bä>
1207 </p><p><boo> works fine </boo>
1208 </p><p><s.foo>s.foo</s.foo>
1209 </p><p><sub-ID#1>
1214 Isolated close tags should be treated as literal text (bug 52760)
1221 </p><p><s.foo>s</s>
1226 ### Special characters
1230 Bare pipe character (bug 52363)
1239 Bare pipe character from a template (bug 52363)
1248 ### <nowiki> test cases
1252 <nowiki> unordered list
1254 <nowiki>* This is not an unordered list item.</nowiki>
1256 <p>* This is not an unordered list item.
1263 <nowiki>Lorem ipsum dolor
1271 <p>Lorem ipsum dolor
1284 :There is not nowiki.
1285 :There is <nowiki>nowiki</nowiki>.
1287 #There is not nowiki.
1288 #There is <nowiki>nowiki</nowiki>.
1290 *There is not nowiki.
1291 *There is <nowiki>nowiki</nowiki>.
1293 <dl><dd>There is not nowiki.</dd>
1294 <dd>There is nowiki.</dd></dl>
1295 <ol><li>There is not nowiki.</li>
1296 <li>There is nowiki.</li></ol>
1297 <ul><li>There is not nowiki.</li>
1298 <li>There is nowiki.</li></ul>
1303 Entities inside <nowiki>
1305 <nowiki><</nowiki>
1312 Entities inside template parameters
1318 <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>
1322 Properly escape nowiki when combined with other wiki markup
1326 <nowiki>* </nowiki></nowiki> tag
1328 <p>* </nowiki> tag</p>
1335 Comments and Indent-Pre
1337 <!-- comment 1 --> asdf
1339 <!-- comment 1 --> asdf
1342 <!-- comment 1 --> asdf
1343 <!-- comment 2 -->xyz
1345 <!-- comment 1 --> asdf
1346 <!-- comment 2 --> xyz
1402 asdf<!-- comment 1 -->jkl
1412 <!-- foo --> b <!-- bar -->
1426 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1432 Comment semantics and delimiters
1434 <!-- --><!----><!-----><!------>
1440 Comment semantics and delimiters, redux
1442 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1443 -- foo -- funky huh? ... -->
1449 Comment semantics and delimiters: directors cut
1451 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1452 everything starting with < followed by !-- until the first -- and > we see,
1453 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1461 Comment semantics: nesting
1463 <!--<!-- no, we're not going to do anything fancy here -->-->
1470 Comment semantics: unclosed comment at end
1472 <!--This comment will run out to the end of the document
1477 # Bug 58184: document parsoid's behaviour
1479 Suppress comment closing tag in lenient browsers
1481 parsoid=wt2html,html2html
1483 <!-- Browsers--!> think this is closed -->
1487 <!-- Browsers--¡> think this is closed -->
1491 Comment in template title
1500 Comment on its own line post-expand
1512 Comment on its own line post-expand with non-significant whitespace
1524 Multiple comments should still parse as SOL-transparent
1526 parsoid=wt2html,wt2wt
1529 <!--c2--><!--c3--><!--c4-->*b
1540 ### paragraph wrapping tests
1555 Block tag on one line (<div>)
1571 Block tag on one line (<blockquote>)
1573 a <blockquote>foo</blockquote>
1577 a <blockquote>foo</blockquote>
1589 Block tag on both lines (<div>)
1606 Block tag on both lines (<blockquote>)
1608 a <blockquote>foo</blockquote>
1610 b <blockquote>foo</blockquote>
1612 a <blockquote>foo</blockquote>
1613 b <blockquote>foo</blockquote>
1627 Multiple lines without block tags
1651 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1652 # So, we have a separate section for Parsoid. We don't want
1653 # to mimic this stripping behavior in Parsoid. It affects
1654 # editing experience and also requires us to maintain additional
1657 Empty lines between lines with block tags
1695 <div data-parsoid='{"stx":"html"}'></div>
1698 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1701 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1703 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1706 <div data-parsoid='{"stx":"html"}'>e</div>
1709 ## PHP parser emits output which is broken
1710 ## XXX The parsoid output doesn't match the tidy output.
1712 Unclosed HTML p-tags should be handled properly
1720 <p>foo</div></p>
1724 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1729 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1730 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1733 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
1737 a [[Category:A1]] [[Category:A2]]
1742 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1746 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
1752 <link href="Category:A1"/><p>a</p>
1756 ### Preformatted text
1765 And a [[Main Page|link]]
1771 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1776 Tabs don't trigger preformatted text
1780 This is preformatted text.
1786 <pre>This is preformatted text.
1792 Ident preformatting with inline content
1803 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1820 Regression with preformatted in <center>
1834 Bug 52763: Preformatted in <blockquote>
1840 indented cell (no pre-wrapping!)
1850 <p> indented cell (no pre-wrapping!)
1858 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1875 Bug 15491: <ins>/<del> in blockquote
1878 Foo <del>bar</del> <ins>baz</ins> quux
1882 <p>Foo <del>bar</del> <ins>baz</ins> quux
1888 # Note that the p-wrapping is newline sensitive, which could be
1889 # considered a bug: tidy will wrap only the 'Foo' in the example
1890 # below in a <p> tag. (see comment 23-25 of bug #6200)
1892 Bug 15491: <ins>/<del> in blockquote (2)
1894 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1897 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1903 <del>bar</del> <ins>baz</ins> quux</blockquote>
1907 <pre> with attributes (bug 3202)
1909 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1911 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1916 <pre> with width attribute (bug 3202)
1918 <pre width="8">Narrow screen goodies</pre>
1920 <pre width="8">Narrow screen goodies</pre>
1925 <pre> with forbidden attribute (bug 3202)
1927 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1929 <pre width="8">Narrow screen goodies</pre>
1934 Entities inside <pre>
1943 <pre> with forbidden attribute values (bug 3202)
1945 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1947 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1952 <nowiki> inside <pre> (bug 13238)
1960 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1968 <pre><nowiki>Foo</nowiki></pre>
1973 <nowiki> and <pre> preference (first one wins)
2004 </pre> inside nowiki
2006 <nowiki></pre></nowiki>
2012 # Parsoid doesn't strip empty tags, like Tidy does.
2014 Empty pre; pre inside other HTML tags (bug 54946)
2016 parsoid=wt2html,wt2wt
2047 HTML pre followed by indent-pre
2062 <p><pre>foo</pre></p>
2064 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2068 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2076 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2086 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2098 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2119 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2123 {{echo| foo}}{{echo| bar}}
2128 {{echo|<!--cmt--> foo}}
2130 <!--cmt-->{{echo| foo}}
2132 {{echo|{{echo| }}bar}}
2150 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2187 Things that look like <pre> tags aren't treated as such
2189 Barack Obama <President> of the United States
2190 <President></President>
2192 <p>Barack Obama <President> of the United States
2193 <President></President>
2197 ## PHP parser discards the "<pre " string
2199 Handle broken pre-like tags (bug 64025)
2203 {{echo|<pre <pre>x</pre>}}
2205 <table><pre </table>
2208 <table><pre></pre></table>
2211 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2220 Parsoid: handle pre with space after attribute
2224 <pre style="width:50%;" >{{echo|foo}}</pre>
2226 <pre style="width:50%;">{{echo|foo}}</pre>
2229 # TODO / maybe: fix wt2wt for this
2231 Parsoid: Don't paragraph-wrap fosterable content
2257 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2285 #--------------------------------------------------------------------
2286 # Transclusion parameter whitespace stripping tests
2287 # Behavior is different for positional and named parameters
2288 #--------------------------------------------------------------------
2290 Templates: Strip leading and trailing whitespace from named-param values
2294 {{echo|1= {{echo|b}} }}
2307 <ul><li> d</li></ul>
2312 Templates: Don't strip whitespace from positional-param values
2316 {{echo|{{echo|b}} }}
2348 <ul><li> f</li></ul>
2356 Templates: Handle empty comment-and-ws-only lines correctly
2359 <!--should be ignored-->
2360 <!--should be ignored as well-->
2369 Templates: Handle comments in the target
2372 <!-- should be ignored -->
2375 {{echo<!-- should be ignored -->
2378 {{echo<!-- should be ignored -->|foo}}
2380 {{<!-- should be ignored -->echo|foo}}
2382 <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>
2384 <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>
2386 <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>
2388 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2392 Templates: Handle comments in parameter names (bug 67657)
2395 <!-- should be ignored -->
2399 <!-- should be ignored -->
2402 {{echo|1<!-- should be ignored --> = foo}}
2404 {{echo|<!-- should be ignored -->1 = foo}}
2406 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2408 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
2410 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2412 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
2416 Templates: Other wikitext in parameter names (bug 67657)
2420 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</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>
3910 Definition Lists: colons occurring in tags
3924 <dt><span>a:b</span></dt>
3925 <dt><div>a:b</div></dt>
3928 <dt><i>a:b</i></dt></dl>
3933 Definition Lists: colons and tables 1
3945 </td></tr></table></dd></dl>
3949 </td></tr></table></dd></dl>
3953 # Parsoid's output (as documented below) differs from php's in this case.
3954 # This is probably a bug. If we fixup parsoid to match php's output, the
3955 # above test should pass and the below test case can be removed. It is
3956 # unclear which output is more desirable.
3959 Definition Lists: colons and tables 2
3971 </td></tr></table></dd>
3975 </td></tr></table></dd></dl>
3983 External links: non-bracketed
3985 Non-bracketed: http://example.com
3987 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3991 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3993 External links: numbered
3995 Numbered: [http://example.com]
3996 Numbered: [http://example.net]
3997 Numbered: [http://example.com]
3999 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4000 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4001 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4004 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4005 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4006 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4010 External links: specified text
4012 Specified text: [http://example.com link]
4014 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4019 External links: trail
4021 Linktrails should not work for external links: [http://example.com link]s
4023 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4028 External links: dollar sign in URL
4030 http://example.com/1$2345
4032 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4036 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4038 External links: dollar sign in URL (autonumber)
4040 [http://example.com/1$2345]
4042 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4045 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4049 External links: open square bracket forbidden in URL (bug 4377)
4051 parsoid=wt2html,wt2wt,html2html
4053 http://example.com/1[2345
4055 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4058 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4062 External links: open square bracket forbidden in URL (named) (bug 4377)
4064 parsoid=wt2html,html2html
4066 [http://example.com/1[2345]
4068 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4071 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4074 # parsoid adds a space before the link name
4076 External links: open square bracket forbidden in URL (named) (bug 4377)
4079 [http://example.com/1 [2345]
4081 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4086 External links: nowiki in URL link text (bug 6230)
4088 [http://example.com/ <nowiki>''example site''</nowiki>]
4090 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4095 External links: newline forbidden in text (bug 6230 regression check)
4097 [http://example.com/ first
4100 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4106 External links: Pipe char between url and text
4108 [http://example.com | link]
4110 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4115 External links: protocol-relative URL in brackets
4117 [//example.com/ Test]
4119 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4123 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4125 External links: protocol-relative URL in brackets without text
4129 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4132 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4136 External links: protocol-relative URL in free text is left alone
4140 <p>//example.com/Foo
4145 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4147 foo//example.com/Foo
4149 <p>foo//example.com/Foo
4154 External links: with no contents
4156 [http://en.wikipedia.org/wiki/Foo]
4158 [[wikipedia:Foo|Bar]]
4160 [[wikipedia:Foo|<span>Bar</span>]]
4162 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4163 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4164 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4167 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4168 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4169 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4173 External links: Free with trailing punctuation
4183 http://example.com/url_with_(brackets)
4184 (http://example.com/url_without_brackets)
4185 http://example.com/url_with_entity
4186 http://example.com/url_with_entity 
4187 http://example.com/url_with_entity 
4188 http://example.com/url_with_entity<
4189 http://example.com/url_with_entity<
4190 http://example.com/url_with_entity<
4192 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4193 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4194 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4195 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4196 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4197 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4198 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4199 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4200 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4201 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4202 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4203 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4204 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4205 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4206 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4207 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4212 External links: No preceding word characters allowed (bug 65278)
4214 NOPEhttp://example.com
4215 N0http://example.com
4216 ok:http://example.com
4217 ok-http://example.com
4219 <p>NOPEhttp://example.com
4220 N0http://example.com
4221 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4222 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4229 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4231 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4236 External image from https
4238 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4240 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4245 External image (when not allowed)
4247 wgAllowExternalImages=0
4249 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4251 <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>
4256 Link to non-http image, no img tag
4258 Link to non-http image, no img tag: ftp://example.com/test.jpg
4260 <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>
4265 External links: terminating separator
4267 Terminating separator: http://example.com/thing,
4269 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4274 External links: intervening separator
4276 Intervening separator: http://example.com/1,2,3
4278 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4283 External links: old bug with URL in query
4285 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4287 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4292 External links: old URL-in-URL bug, mixed protocols
4294 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4296 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4301 External links: URL in text
4303 URL in text: [http://example.com http://example.com]
4305 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4310 External links: Clickable images
4312 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4314 <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>
4319 External links: raw ampersand
4321 Old & use: http://x&y
4323 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4328 External links: encoded ampersand
4330 Old & use: http://x&y
4332 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4335 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4339 External links: encoded equals (bug 6102)
4341 http://example.com/?foo=bar
4343 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4346 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4350 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4351 ## does it number them. As discussed in bug 53505, we can identify
4352 ## autonumbered links via CSS.
4356 External links: [raw ampersand]
4358 Old & use: [http://x&y]
4360 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4363 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4366 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4367 # mode will return the [raw ampersand] wikitext
4369 External links: [encoded ampersand]
4371 parsoid=wt2html,wt2wt,html2html
4373 Old & use: [http://x&y]
4375 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4378 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4382 External links: [raw equals]
4384 [http://example.com/?foo=bar]
4386 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4389 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4392 # note that parsoid html is identical to [raw equals] case; so html2wt
4393 # mode will return the [raw equals] wikitext
4395 External links: [encoded equals] (bug 6102)
4397 parsoid=wt2html,wt2wt,html2html
4399 [http://example.com/?foo=bar]
4401 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4404 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4407 # xxx parsoid strips the IDN character, so the round-trip tests will
4408 # obviously fail and are disabled. --cscott
4410 External links: [IDN ignored character reference in hostname; strip it right off]
4412 parsoid=wt2html,wt2wt,html2html
4414 [http://e‌xample.com/]
4416 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4419 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4422 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4423 # Where an external link could easily circumvent the sanitization of the text of
4424 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4425 # test demands a higher standard. That's a bit strange.
4429 # http://example.com -> [http://example.com|http://example.com]
4430 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4432 # The first example is sanitized, but the second is not. Any security benefits
4433 # from this production are trivial to circumvent. Either remove this test and
4434 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4435 # the test accordingly.
4439 # xxx parsoid strips the IDN character, so the round-trip tests will
4440 # obviously fail and are disabled. --cscott
4442 External links: IDN ignored character reference in hostname; strip it right off
4444 parsoid=wt2html,html2html
4446 http://e‌xample.com/
4448 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4451 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4455 External links: www.jpeg.org (bug 554)
4459 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4463 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4465 External links: URL within URL (original bug 2)
4467 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4469 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4472 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4476 BUG 361: URL inside bracketed URL
4478 [http://www.example.com/foo http://www.example.com/bar]
4480 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4485 BUG 361: URL within URL, not bracketed
4487 http://www.example.com/foo?=http://www.example.com/bar
4489 <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>
4494 BUG 289: ">"-token in URL-tail
4496 http://www.example.com/<hello>
4498 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4503 BUG 289: literal ">"-token in URL-tail
4505 http://www.example.com/<b>html</b>
4507 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4512 BUG 289: ">"-token in bracketed URL
4514 [http://www.example.com/<hello> stuff]
4516 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4521 BUG 289: literal ">"-token in bracketed URL
4523 [http://www.example.com/<b>html</b> stuff]
4525 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4530 BUG 289: literal double quote at end of URL
4532 http://www.example.com/"hello"
4534 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4539 BUG 289: literal double quote in bracketed URL
4541 [http://www.example.com/"hello" stuff]
4543 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4548 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4550 [http://www.example.com test]
4552 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4557 External links: link text with spaces
4559 [http://www.example.com a b c]
4560 [http://www.example.com ''a'' ''b'']
4562 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4563 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4568 External links: wiki links within external link (Bug 3695)
4570 [http://example.com [[wikilink]] embedded in ext link]
4572 <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>
4575 <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>
4579 BUG 787: Links with one slash after the url protocol are invalid
4583 [http:/example.com title]
4585 <p>http:/example.com
4586 </p><p>[http:/example.com title]
4591 Bracketed external links with template-generated invalid target
4593 [{{echo|http:/example.com}} title]
4595 <p>[http:/example.com title]
4600 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4602 ''[http://example.com text'']
4603 [http://example.com '''text]'''
4604 ''Something [http://example.com in italic'']
4605 ''Something [http://example.com mixed''''', even bold]'''
4606 '''''Now [http://example.com both''''']
4608 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4609 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4610 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4611 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4612 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4618 Bug 4781: %26 in URL
4620 http://www.example.com/?title=AT%26T
4622 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4625 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4628 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4629 # % is actually legal in HTML5. Any change in output would need testing though.
4631 Bug 4781, 5267: %25 in URL
4633 http://www.example.com/?title=100%25_Bran
4635 <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>
4638 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4642 Bug 4781, 5267: %28, %29 in URL
4644 http://www.example.com/?title=Ben-Hur_%281959_film%29
4646 <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>
4649 <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>
4654 Bug 4781: %26 in autonumber URL
4656 [http://www.example.com/?title=AT%26T]
4658 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4661 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4665 Bug 4781, 5267: %26 in autonumber URL
4667 [http://www.example.com/?title=100%25_Bran]
4669 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4672 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4676 Bug 4781, 5267: %28, %29 in autonumber URL
4678 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4680 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4683 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4688 Bug 4781: %26 in bracketed URL
4690 [http://www.example.com/?title=AT%26T link]
4692 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4695 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4699 Bug 4781, 5267: %25 in bracketed URL
4701 [http://www.example.com/?title=100%25_Bran link]
4703 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4708 Bug 4781, 5267: %28, %29 in bracketed URL
4710 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4712 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4715 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4719 External link containing a period in the anchor. (bug 63947)
4721 [//foo.org/bar#baz. bang]
4723 [//foo.org/bar. bang]
4725 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4726 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4729 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4730 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4734 External link containing a single quote. (bug 63947)
4738 [//foo.org/bar'baz bang]
4740 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4741 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4744 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4745 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4750 External link containing a period in the anchor. (bug 63947)
4752 [//foo.org/bar#baz. bang]
4754 [//foo.org/bar. bang]
4756 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4757 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4760 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4761 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4765 External link containing a single quote. (bug 63947)
4769 [//foo.org/bar'baz bang]
4771 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4772 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4775 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4776 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4781 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4783 Some [http://example.com/ pretty ''italics'' and stuff]!
4785 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4790 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4792 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4794 <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>
4799 External link containing double-single-quotes with no space separating the url from text in italics
4801 [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]].]
4803 <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>
4806 <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>
4808 <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>
4812 External link with comments in link text
4814 [http://www.google.com Google <!-- comment -->]
4816 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4821 URL-encoding in URL functions (single parameter)
4823 {{localurl:Some page|amp=&}}
4825 <p>/index.php?title=Some_page&amp=&
4830 URL-encoding in URL functions (multiple parameters)
4832 {{localurl:Some page|q=?&=&}}
4834 <p>/index.php?title=Some_page&q=?&amp=&
4841 http://example.com/index.php?foozoid%5B%5D=bar
4843 http://example.com/index.php?foozoid[]=bar
4845 <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>
4846 </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>
4849 <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>
4851 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4855 IPv6 urls (bug 21261)
4859 http://[2404:130:0:1000::187:2]/index.php
4861 <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>
4866 Non-extlinks in brackets
4875 [{{echo|foo}} ''bar'']
4876 [{{echo|foo}}l's] errand
4877 [{{echo|foo}}l's errand]
4879 [url=http://example.com]
4892 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4897 Percent encoding in external links
4899 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4901 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4904 <p><a rel="mw:ExtLink"
4905 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4909 Use url link syntax for links where the content is equal the link target
4913 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4916 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4920 Parenthesis in external links, especially URL links
4924 http://example.com/test)
4926 http://example.com/(test)
4928 http://example.com/((test)
4930 (http://example.com/(test))
4932 (http://example.com/(test)))))
4934 http://example.com/a)b
4936 [http://example.com) foo]
4938 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4939 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4940 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4941 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4942 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4943 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4944 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4945 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4948 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4949 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4950 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4951 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4952 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4953 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4954 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4955 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4959 Parenthesis in external links, w/ transclusion or comment
4961 (http://example.com/{{echo|hi}})
4963 (http://example.com<!-- hi -->)
4965 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4966 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4969 <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>
4971 <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>
4975 Replace invalid link targets when serializing
4979 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
4981 [[MediaWiki:Badtitletext|Manual]]
4991 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4993 Normal text. '''''Bold italic text.''''' Normal text.
4995 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4996 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5001 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5002 # parser strips. The wikitext contains just the first half of the bold
5005 Unclosed and unmatched quotes
5007 '''''Bold italic text '''with bold deactivated''' in between.'''''
5009 '''''Bold italic text ''with italic deactivated'' in between.'''''
5013 ..spanning two paragraphs (should not work).'''
5015 '''Bold tag left open
5017 ''Italic tag left open
5021 <!-- Unmatching number of opening, closing tags: -->
5022 '''This year''''s election ''should'' beat '''last year''''s.
5024 ''Tom'''s car is bigger than ''Susan'''s.
5026 Plain ''italic'''s plain
5028 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5029 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5030 </p><p><b>Bold text..</b>
5031 </p><p>..spanning two paragraphs (should not work).
5032 </p><p><b>Bold tag left open</b>
5033 </p><p><i>Italic tag left open</i>
5035 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5036 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5037 </p><p>Plain <i>italic'</i>s plain
5040 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5041 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5042 </p><p><b>Bold text..</b>
5043 </p><p>..spanning two paragraphs (should not work).<b></b>
5044 </p><p><b>Bold tag left open</b>
5045 </p><p><i>Italic tag left open</i>
5047 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5048 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5049 </p><p>Plain <i>italic'</i>s plain
5056 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5059 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5060 # is the bare minimum required by the spec, see:
5061 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5062 # Parsoid team replies: empty table tags are legal in HTML5
5064 A table with no data.
5077 A table with stray table end tags on start tag line (wt2html)
5081 {|style="color: red;"|}
5083 {|style="color: red;" |}
5087 {|style="color: red;"|} id="foo"
5091 {|style="color: red;" |} id="foo"
5095 <table style="color: red;"></table>
5097 <table style="color: red;">
5103 <table style="color: red;" id="foo">
5109 <table style="color: red;" id="foo">
5118 A table with no data (take 2)
5126 # A table with nothing but a caption is invalid XHTML, we might want to render
5127 # this as <p>caption</p>
5128 # Parsoid team replies: table with only a caption is legal in HTML5
5130 A table with nothing but a caption
5138 </caption><tr><td></td></tr></table>
5141 <table><caption> caption</caption></table>
5145 A table with caption with default-spaced attributes and a table row
5148 |+ style="color: red;" | caption1
5154 <caption style="color: red;"> caption1
5163 A table with captions with non-default spaced attributes and a table row
5166 |+style="color: red;"|caption2
5167 |+ style="color: red;"| caption3
5173 <caption style="color: red;">caption2
5175 <caption style="color: red;"> caption3
5184 Table td-cell syntax variations
5188 | foo bar foo || baz
5189 | style='color:red;' | baz
5190 | style='color:red;' || baz
5197 <td> foo bar foo </td>
5200 <td style="color:red;"> baz
5202 <td> style='color:red;' </td>
5230 Simple table but with multiple dashes for row wikitext
5248 Multiplication table
5250 {| border="1" cellpadding="2"
5251 |+Multiplication table
5253 ! × !! 1 !! 2 !! 3
5271 <table border="1" cellpadding="2">
5272 <caption>Multiplication table
5319 Accept "||" in table headings
5334 Accept "!!" in table data
5348 <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>
5353 Accept "||" in indented table headings
5363 </th></tr></table></dd></dl>
5368 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5385 Accept "| !" at start of line in tables (ignore !-attribute)
5389 | !style="color:red" | bar
5401 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 +/-
5405 |style='color:red;'|+1
5406 |style='color:blue;'|-1
5418 <td style="color:red;">+1
5420 <td style="color:blue;">-1
5444 |rowspan=2| Cell 2, row 1 (and 2)
5455 <td rowspan="2"> Cell 2, row 1 (and 2)
5473 {| bgcolor=#ABCDEF border=2
5478 |the original table again
5486 <table bgcolor="#ABCDEF" border="2">
5494 <td>the original table again
5500 Invalid attributes in table cell (bug 1830)
5514 # The "|}" to close the table is missing from the input, so parsoid's
5515 # *2wt modes will fail.
5517 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5519 parsoid=wt2html,html2html
5522 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5526 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5527 <td>]" onmouseover="alert(document.cookie)">test
5535 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5540 Indented table markup mixed with indented pre content (proposed in bug 6200)
5545 Text that should be rendered preformatted
5553 <pre>Text that should be rendered preformatted
5562 Template-generated table cell attributes and cell content
5567 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
5568 |align=center {{table_attribs}}
5569 | <!--foo--> align=center <!--bar--> {{table_attribs}}
5574 <td style="color: red"> Foo
5576 <td style="color: red"> Foo
5578 <td style="color: red"> Foo
5580 <td align="center" style="color: red"> Foo
5582 <td align="center" style="color: red"> Foo
5588 Template-generated table cell attributes and cell content (2)
5591 |align=center {{table_cells}}
5596 <td align="center" style="color: red"> Foo </td>
5604 Table with row followed by newlines and table heading
5622 Table with empty line following the start tag
5639 # FIXME: Preserve the attribute properly (with an empty string as value) in
5640 # the PHP parser. Parsoid implements the behavior below.
5642 Table attributes with empty value
5652 </td></tr></tbody></table>
5657 Wikitext table with a lot of comments
5680 Wikitext table with double-line table cell
5697 Table cell with a single comment
5714 Table-cell after a comment-only-empty-line
5731 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5733 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5739 Build table with {{!}}
5741 {{{!}} class="wikitable"
5744 {{!}}- style="color:red;"
5745 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5748 <table class="wikitable">
5754 <tr style="color:red;">
5756 <td style="color:red;"> second data
5762 Build table with pipe as data
5764 {| class="wikitable"
5767 |- style="color:red;"
5768 | data || style="color:red;" | second data
5770 | style="color:red;" | data with | || style="color:red;" | second data with |
5772 || data with | ||| second data with |
5775 <table class="wikitable">
5781 <tr style="color:red;">
5783 <td style="color:red;"> second data
5786 <td style="color:red;"> data with | </td>
5787 <td style="color:red;"> second data with |
5790 <td> data with | </td>
5791 <td> second data with |
5797 Build table with wikilink
5799 {| class="wikitable"
5800 ! header || second header
5801 |- style="color:red;"
5802 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
5804 | data || second data [[Main Page|link|text with pipe]]
5807 <table class="wikitable">
5812 <tr style="color:red;">
5813 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
5814 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
5818 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
5823 # The expected HTML structure in this test is debatable. The PHP parser does
5824 # not parse this kind of table at all. The main focus for Parsoid is on
5825 # round-tripping, so this output is ok for now. TODO: revisit!
5827 Wikitext table with html-syntax row
5837 <td>foo</td></tr></tbody></table>
5840 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5841 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5842 ## PHP parser, which tidy then compounds by fostering the content
5843 ## entirely out of the table. Parsoid recognizes the table context
5844 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5845 ## depends on PHP's treatment of broken table markup!
5847 Implicit <td> after a |-
5849 parsoid=wt2html,html2html
5869 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5871 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5873 parsoid=wt2html,html2html
5906 <tr><td><pre>a</pre></td></tr>
5907 <tr><td> b</td></tr>
5912 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5913 # Parsoid generates the missing <td>, so wt2wt won't succeed.
5915 Lists should be recognized in an implicit <td> context
5917 parsoid=wt2html,html2html
5944 Parsoid: Round-trip tables directly followed by content (bug 51219)
5946 parsoid=wt2html,wt2wt
5971 Parsoid: Default to a newline after tables in new content (bug 51219)
5978 <nowiki> </nowiki>bar
5985 <tr><td>foo</td></tr></tbody></table> bar
5987 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5991 Parsoid: newline inducing block nodes don't suppress <nowiki>
6003 Parsoid: Row-syntax table headings followed by comment & table cells
6005 parsoid=wt2html,wt2wt
6009 <!-- foo --> || baz || quux
6023 <tbody><tr><th> foo </th><th> bar
6024 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6029 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6032 Parsoid: Recover better from broken table attributes
6052 <p>foo</p></td></tr>
6057 Strip unsupported table tags
6108 Plain link, capitalized
6112 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6117 Plain link, uncapitalized
6121 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6128 [[Main Page|The Main Page]]
6130 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6135 Piped link with comment in link text
6137 [[Main Page|The Main<!--front--> Page]]
6139 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6144 Piped link with multiple pipe characters in link text
6146 [[Main Page||The|Main|Page|]]
6148 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6151 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6159 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6164 Broken link with fragment
6166 [[Zigzagzogzagzig#zug]]
6168 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6173 Special page link with fragment
6175 [[Special:Version#anchor]]
6177 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6182 Nonexistent special page link with fragment
6184 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6186 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6193 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6195 <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>
6202 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6204 <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>!!!
6215 Bug 43661: Piped links with identical prefixes
6217 [[prefixed article|prefixed articles with spaces]]
6219 [[prefixed article|prefixed articlesaoeu]]
6221 [[Main Page|Main Page test]]
6223 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6224 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6225 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6231 Link with HTML entity in suffix / tail
6233 [[Main Page]]", [[Main Page]]a
6235 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6240 Link with 3 brackets
6249 Link with 4 brackets
6253 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6258 Piped link with 3 brackets
6260 [[[main page|the main page]]]
6262 <p>[[[main page|the main page]]]
6267 Piped link with extlink-like text
6270 [[Main Page|This is a [bar]]]
6272 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6273 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6278 Link with multiple pipes
6280 [[Main Page|The|Main|Page]]
6282 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6286 # Note that parsoid does not munge anchor text; all non-space
6287 # characters are valid in HTML5 ids.
6289 Anchor containing a #. (bug 63430)
6291 [[Main Page#And#Link]]
6293 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6296 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6302 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6304 <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>
6309 Link with space in namespace
6311 [[User talk:Foo bar]]
6313 <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>
6318 MemoryAlpha:AlphaTest
6320 This is an article in the MemoryAlpha namespace
6321 (which shadows the memoryalpha interwiki link).
6325 Namespace takes precedence over interwiki link (bug 51680)
6327 [[MemoryAlpha:AlphaTest]]
6329 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6333 # The previous test doesn't work correctly in html2*, due to not recognizing the
6334 # link as an internal one. This one checks for the correct behavior.
6336 Link to namespace preferred over interwiki with correct rel attribute
6338 parsoid=html2wt,html2html
6340 [[MemoryAlpha:AlphaTest]]
6342 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6347 Piped link to namespace
6349 [[Meta:Disclaimers|The disclaimers]]
6351 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6358 [[Usually caused by a typo (oops}]]
6360 <p>[[Usually caused by a typo (oops}]]
6367 Just a test of an article title containing a percent.
6371 Link containing % (not as a hex sequence)
6375 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6378 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6381 # note that the parsoid HTML is identical to the previous test output,
6382 # so the previous test ensures that the html2wt mode will generate the
6383 # "not as a hex sequence" wikitext.
6385 Link containing % as a single hex sequence interpreted to char
6387 parsoid=wt2wt,wt2html,html2html
6391 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6394 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6398 Link containing % as a double hex sequence interpreted to hex sequence
6402 <p>[[7%2525 Solution]]
6406 # note that parsoid does not munge anchor text; all non-space
6407 # characters are valid in HTML5 anchors.
6409 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6410 Example for such a section: == < ==
6412 [[%23%3c]][[%23%3e]]
6414 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6417 <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>
6421 Link containing "<#" and ">#" as a hex sequences
6423 [[%3c%23]][[%3e%23]]
6425 <p>[[%3c%23]][[%3e%23]]
6430 Link containing an equals sign
6432 [[Special:BookSources/isbn=4-00-026157-6]]
6434 <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>
6437 <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>
6443 Just a test of an article title containing a tilde.
6446 # note that links containing signatures, like [[Foo~~~~]], are
6447 # massaged by the pre-save transform (PST) and so the tildes are never
6448 # seen by the parser.
6450 Link containing a tilde
6454 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6457 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6461 Link containing double-single-quotes '' (bug 4598)
6463 [[Lista d''e paise d''o munno]]
6465 <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>
6468 <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>
6472 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6474 Some [[Link|pretty ''italics'' and stuff]]!
6476 <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>!
6479 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6483 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6485 ''Some [[Link|pretty ''italics'' and stuff]]!''
6487 <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>
6492 Link with double quotes in title part (literal) and alternate part (interpreted)
6494 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
6498 [[''Pentecoste''|Pentecoste]]
6500 [[''Pentecoste''|''Pentecoste'']]
6502 <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>
6503 </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>
6504 </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>
6505 </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>
6508 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></span></p>
6509 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6510 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6511 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6515 Broken image links with HTML captions (bug 39700)
6517 [[File:Nonexistent|<script></script>]]
6518 [[File:Nonexistent|100x100px|<script></script>]]
6519 [[File:Nonexistent|<]]
6520 [[File:Nonexistent|a<i>b</i>c]]
6522 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6523 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6524 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6525 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6528 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
6529 <span typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100"/></a></span>
6530 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
6531 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i>b</i>c"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span></p>
6537 [[http://www.example.com]]
6539 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6542 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6546 Plain link to URL with link text
6548 [[http://www.example.com Link text]]
6550 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6555 Plain link to protocol-relative URL
6557 [[//www.example.com]]
6559 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6562 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6566 Plain link to protocol-relative URL with link text
6568 [[//www.example.com Link text]]
6570 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6575 Plain link to page with question mark in title
6581 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6582 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6587 # I'm fairly sure the expected result here is wrong.
6588 # We want these to be URL links, not pseudo-pages with URLs for titles....
6589 # However the current output is also pretty screwy.
6592 # I'm changing it to match the current output--it arguably makes more
6593 # sense in the light of the test above. Old expected result was:
6594 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6596 # But I think this test is bordering on "garbage in, garbage out" anyway.
6601 Piped link to URL: [[http://www.example.com|an example URL]]
6603 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6606 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6610 BUG 2: [[page|http://url/]] should link to page, not http://url/
6612 [[Main Page|http://url/]]
6614 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6617 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6620 # Parsoid does not mark self-links, by design.
6622 BUG 337: Escaped self-links should be bold
6626 [[Bug462]] [[Bug462]]
6628 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6631 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6633 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6637 Self-link to section should not be bold
6641 [[Main Page#section]]
6643 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6654 Self-link to numeric title
6660 <p><strong class="selflink">0</strong>
6665 Link to numeric-equivalent title
6671 <p><a href="/wiki/00" title="00">00</a>
6676 <nowiki> inside a link
6678 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6680 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6685 Non-breaking spaces in title
6687 [[ Main Page ]]
6689 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6694 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6700 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6705 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6711 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6716 Internal link with en linktrail: no apostrophes (bug 27473)
6722 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6727 Internal link with ca linktrail with apostrophes (bug 27473)
6733 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6738 Internal link with kaa linktrail with apostrophes (bug 27473)
6744 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6749 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6751 [[User:Foo/Test/63636:Bar|Test]]
6753 <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>
6756 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6760 Purely hash wikilink
6762 title=[[User:test/123]]
6766 <p><a href="#a">b</a>
6769 <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>
6773 1. Interaction of linktrail and template encapsulation
6779 <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>
6783 2. Interaction of linktrail and template encapsulation
6787 {{echo|Some [[Fool]]}}s
6789 <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>
6793 3. Interaction of linktrail and template encapsulation
6797 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6799 <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>
6809 Internal link with is link prefix
6813 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6815 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6826 Internal link with is link trail and link prefix
6830 [[mótmælendatrú|xxx]]ar
6832 mótmælenda[[söfnuður]]
6833 mótmælenda[[söfnuður|söfnuðir]]
6834 mótmælenda[[söfnuður|söfnuðir]]xxx
6836 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6837 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6838 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6839 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6840 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6845 Parsoid link trail escaping
6847 parsoid=html2wt,html2html
6851 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6855 Parsoid link prefix escaping
6858 parsoid=html2wt,html2html
6860 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6862 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6866 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6874 [http://wp.org ''foo'']
6876 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6877 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6878 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6879 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6884 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6888 [[Foo|{{echo|a}} b {{echo|c}}]]
6890 <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>
6894 Link with angle bracket after anchor
6898 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6901 <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>
6905 ### Interwiki links (see maintenance/interwiki.sql)
6909 Inline interwiki link
6911 parsoid=wt2html,wt2wt,html2html
6913 [[MeatBall:SoftSecurity]]
6915 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6918 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
6922 Inline interwiki link with empty title (bug 2372)
6924 parsoid=wt2html,wt2wt,html2html
6928 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6931 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
6935 Interwiki link encoding conversion (bug 1636)
6937 *[[Wikipedia:ro:Olteniţa]]
6938 *[[Wikipedia:ro:Olteniţa]]
6940 <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>
6941 <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>
6945 <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>
6946 <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>
6951 Interwiki link with fragment (bug 2130)
6953 [[MeatBall:SoftSecurity#foo]]
6955 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6959 # Ideally the wikipedia: prefix here should be proto-relative too
6960 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
6961 # define the 'en' prefix, and originally the test used 'wikipedia',
6962 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
6965 Different interwiki prefixes mapping to the same URL
6973 [[:wikipedia:Foo|Foo]]
6975 [[wikipedia:en:Foo]]
6977 [[:wikipedia:en:Foo]]
6981 <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>
6983 <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>
6985 <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>
6987 <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>
6989 <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>
6991 <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>
6993 <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>
6997 Interwiki links that cannot be represented in wiki syntax
7000 [[meatball:ok#foo|ok with fragment]]
7001 [[meatball:ok_as_well?|ok ending with ? mark]]
7002 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7003 [http://de.wikipedia.org/wiki/#foo is just fragment]
7006 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7007 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7008 <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>
7009 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7010 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7013 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7014 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7015 <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>
7016 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7017 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7021 Interwiki links: trail
7023 [[wikipedia:Foo|Ba]]r
7025 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7028 <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>
7032 Local interwiki link
7034 parsoid=wt2html,wt2wt,html2html
7036 [[local:Template:Foo]]
7038 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7041 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7044 # Parsoid does not mark self-links, by design.
7046 Local interwiki link: self-link to current page
7049 parsoid=wt2html,wt2wt,html2html
7053 <p><strong class="selflink">local:Main Page</strong>
7056 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7060 Local interwiki link: prefix only (bug 64167)
7062 parsoid=wt2html,wt2wt,html2html
7066 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7069 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7073 Local interwiki link: with additional interwiki prefix (bug 61357)
7075 parsoid=wt2html,wt2wt,html2html
7077 [[local:meatball:Hello]]
7079 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7082 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7086 Multiple local interwiki link prefixes
7088 [[local:local:local:local:mi:local:Foo]]
7090 parsoid=wt2html,wt2wt,html2html
7092 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7095 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7099 ### Interlanguage links
7100 ### Language links (so that searching for '### language' matches..)
7106 parsoid=wt2html,wt2wt,html2html
7114 <p>Blah blah blah</p>
7115 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7119 Interlanguage link with spacing
7121 parsoid=wt2html,wt2wt,html2html
7129 <p>Blah blah blah</p>
7130 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7134 Double interlanguage link
7136 parsoid=wt2html,wt2wt,html2html
7145 <p>Blah blah blah</p>
7146 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7147 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7151 Interlanguage link variations
7153 parsoid=wt2html,wt2wt,html2html
7164 <p>Blah blah blah</p>
7165 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7166 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7167 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7168 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7172 Interlanguage link, with prefix links
7182 <p>Blah blah blah</p>
7183 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7187 Double interlanguage link, with prefix links (bug 8897)
7198 <p>Blah blah blah</p>
7199 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7200 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7204 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7212 <p>Blah blah blah</p>
7213 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7217 Parsoid-specific test: Wikilinks with should RT properly
7223 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7228 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7232 He&nbsp;llo [[Foo|He&nbsp;llo]]
7234 He&nbsp;llo [[He&nbsp;llo]]
7236 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7237 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7241 Parsoid: handle constructor well
7247 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7248 </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>
7251 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7253 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7262 # Note that `ko` isn't a known interlanguage prefix
7264 Parsoid: recognize interlanguage links without a target page
7274 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7276 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7279 # Note that `ko` isn't a known interwiki prefix
7281 Parsoid: recognize interwiki links without a target page
7283 parsoid=wt2html,wt2wt,html2html
7289 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7290 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7293 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7294 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7298 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7302 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7305 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7309 Interlanguage link with preceding local interwiki link (bug 68085)
7311 parsoid=wt2html,wt2wt,html2html
7314 [[local:es:Spanish]]
7317 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7321 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7325 Looks like an interlanguage link, but is actually a local interwiki
7327 parsoid=wt2html,wt2wt,html2html
7333 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7337 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7341 ### Redirects, Parsoid-only
7344 1. Simple redirect to page
7348 #REDIRECT [[Main Page]]
7350 <link rel="mw:PageProp/redirect" href="./Main_Page">
7353 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7355 2. Other redirect variants
7357 parsoid=wt2html,wt2wt
7359 #REDIRECT [[Main_Page]]
7360 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7362 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7368 parsoid=wt2html,wt2wt
7373 <li>REDIRECT [[]]</li></ol>
7377 Optional colon in #REDIRECT
7379 # the colon is archaic syntax. we support it for wt2html, but we
7380 # don't care that it roundtrips back to the modern syntax.
7381 parsoid=wt2html,html2html
7383 #REDIRECT:[[Main Page]]
7385 <link rel="mw:PageProp/redirect" href="./Main_Page">
7389 Whitespace in #REDIRECT with optional colon
7391 # the colon and gratuitous whitespace is archaic syntax. we support
7392 # it for wt2html, but we don't care that it roundtrips back to the
7393 # modern syntax (without extra whitespace)
7394 parsoid=wt2html,html2html
7401 <link rel="mw:PageProp/redirect" href="./Main_Page">
7405 Piped link in #REDIRECT
7407 # content after piped link is ignored. we support this syntax,
7408 # but don't care that the piped link is lost when we roundtrip this.
7411 #REDIRECT [[Main Page|bar]]
7413 <link rel="mw:PageProp/redirect" href="./Main_Page">
7417 Redirect to category
7421 #REDIRECT [[Category:Foo]]
7423 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7427 Redirect to category with URL encoding
7431 #REDIRECT [[Category%3AFoo]]
7433 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7437 Redirect to category page
7439 parsoid=wt2html,html2html
7441 #REDIRECT [[:Category:Foo]]
7443 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7447 Redirect to image page (1)
7451 #REDIRECT [[File:Wiki.png]]
7453 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7457 Redirect to image page (2)
7461 #REDIRECT [[Image:Wiki.png]]
7463 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7467 Redirect to language
7471 #REDIRECT [[en:File:Wiki.png]]
7473 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7477 Redirect to interwiki
7481 #REDIRECT [[meatball:File:Wiki.png]]
7483 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7487 Non-English #REDIRECT
7492 #TILVÍSUN [[Main Page]]
7494 <link rel="mw:PageProp/redirect" href="./Main_Page">
7505 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7522 Broken br tag sanitization
7530 # TODO: Fix html2html mode (bug 51055)!
7531 # This </br> handling was added as part of bug 50831; but it
7532 # differs from how PHP+tidy handles this. We should investigate
7535 Parsoid: Broken br tag recognition
7551 Incorrecly removing closing slashes from correctly formed XHTML
7553 <br style="clear:both;" />
7555 <p><br style="clear:both;" />
7560 Failing to transform badly formed HTML into correct XHTML
7562 <br style="clear: left;">
7563 <br style="clear: right;">
7564 <br style="clear: both;">
7566 <p><br style="clear: left;" />
7567 <br style="clear: right;" />
7568 <br style="clear: both;" />
7572 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
7573 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
7575 Handling html with a div self-closing tag
7584 <p><div title />
7588 <p><div title=bar />
7589 <div title=bar/>
7591 <div title="bar/"></div>
7595 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7596 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7597 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
7598 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7599 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7600 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
7604 Handling html with a br self-closing tag
7613 <p><br title="title" />
7614 <br title="title" />
7631 Horizontal ruler (should it add that extra space?)
7646 Horizontal ruler -- 4+ dashes render hr
7655 Horizontal ruler -- eats additional dashes on the same line
7664 Horizontal ruler -- does not collapse dashes on consecutive lines
7675 Horizontal ruler -- <4 dashes render as plain text
7684 Horizontal ruler -- Supports content following dashes on same line
7696 ### Block-level elements
7705 <ul><li>Common list</li>
7707 <li>item 3</li></ul>
7718 <ol><li>Numbered list</li>
7720 <li> item 3</li></ol>
7734 ***#Number on level 4
7736 **#Number on level 3
7737 **#Number on level 3
7741 #** Level 3, but ordered
7744 <ol><li> with numbers</li></ol>
7745 <ul><li> and bullets</li></ul>
7746 <ol><li> and numbers</li></ol></li>
7748 <ul><li>bullet level 2
7749 <ul><li>bullet level 3
7750 <ol><li>Number on level 4</li></ol></li></ul></li>
7752 <ol><li>Number on level 3</li>
7753 <li>Number on level 3</li></ol></li></ul>
7754 <ol><li>number level 2</li></ol></li>
7756 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7757 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7768 <ul><li>bar</li></ul></li></ul>
7778 <ul><li><ul><li>foo</li></ul></li>
7784 Nested lists 3 (first element empty)
7790 <ul><li>bar</li></ul></li></ul>
7795 Nested lists 4 (first element empty)
7800 <ul><li><ul><li></li></ul></li>
7806 Nested lists 5 (both elements empty)
7811 <ul><li><ul><li></li></ul></li>
7817 Nested lists 6 (both elements empty)
7823 <ul><li></li></ul></li></ul>
7828 Nested lists 7 (skip initial nesting levels)
7832 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7837 Nested lists 8 (multiple nesting transitions)
7845 <ul><li><ul><li> bar</li></ul></li>
7846 <li> baz</li></ul></li>
7852 1. Lists with start-of-line-transparent tokens before bullets: Comments
7865 2. Lists with start-of-line-transparent tokens before bullets: Template close
7870 <ul><li>foo bar</li>
7876 List items are not parsed correctly following a <pre> block (bug 785)
7882 <ul><li> <pre>foo</pre></li>
7883 <li> <pre>bar</pre></li>
7889 List items from template
7900 * notSOL{{inner list}}
7903 <ul><li> item 1</li>
7904 <li> item 2</li></ul>
7905 <ul><li> item 0</li>
7907 <li> item 2</li></ul>
7908 <ul><li> item 0</li>
7911 <li> item 2</li></ul>
7916 List interrupted by empty line or heading
7924 <ul><li> foo</li></ul>
7925 <ul><li><ul><li> bar</li></ul></li></ul>
7926 <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>
7927 <ul><li> Another list item</li></ul>
7932 Multiple list tags generated by templates
7953 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7956 <!--This line will NOT split the list-->
7958 <!--This line will NOT split the list either-->
7960 <!--foo--> <!----> <!--This line NOT split the list either-->
7971 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7974 <!--This line will NOT split the list-->
7976 <!--This line will NOT split the list either-->
7978 <!--foo--> <!----> <!--This line NOT split the list
7991 (The PHP parser relies on Tidy for the hack)
7993 parsoid=wt2html,wt2wt
7997 * {{echo|<li>templated li-hack}}
7998 * <!--foo--> <li> unsupported li-hack with preceding comments
8001 <li><li>not a li-hack
8008 <li>templated li-hack</li>
8009 <li>unsupported li-hack with preceding comments</li>
8012 <li>not a li-hack</li>
8017 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8044 Parsoid: Test of whitespace serialization with Templated bullets
8051 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8055 # ------------------------------------------------------------------------
8056 # The next set of tests are about Parsoid's ability to handle badly nested
8057 # tags (parse, minimize scope of fixup, and roundtrip back)
8058 # ------------------------------------------------------------------------
8061 Unbalanced closing block tags break a list
8062 (php parser relies on Tidy to fix up)
8080 # Parsoid fails this test, but it might be tricky to support properly.
8083 Unbalanced closing non-block tags don't break a list
8084 (php parser relies on Tidy to fix up)
8091 <li><span>a</span></li>
8092 <li><span>b</span></li>
8106 Unclosed formatting tags that straddle lists are closed and reopened
8107 (php parser relies on Tidy to fix up)
8109 parsoid=wt2html,wt2wt,html2html
8119 <ol><li> <s> a</s></li>
8120 <li><s> b </s></li></ol>
8123 # Parsoid fails this test, but it might be tricky to support properly.
8126 List embedded in a non-block tag
8127 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
8134 <li><small>foo</small></li>
8144 # This is a bug in the PHP parser + tidy combination.
8145 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8146 # and then fostered out of the table by tidy.)
8147 # We believe the Parsoid output to be correct.
8149 Table with missing opening <tr> tag
8151 parsoid=wt2html,wt2wt
8176 # Note that the current date is hard-coded as
8177 # 1970-01-01T00:02:03Z (a Thursday)
8178 # when running parser tests. The timezone is also fixed to GMT, so
8179 # local date will be identical to current date.
8182 Magic Word: {{CURRENTDAY}}
8191 Magic Word: {{CURRENTDAY2}}
8200 Magic Word: {{CURRENTDAYNAME}}
8209 Magic Word: {{CURRENTDOW}}
8218 Magic Word: {{CURRENTMONTH}}
8227 Magic Word: {{CURRENTMONTH1}}
8236 Magic Word: {{CURRENTMONTHABBREV}}
8238 {{CURRENTMONTHABBREV}}
8245 Magic Word: {{CURRENTMONTHNAME}}
8247 {{CURRENTMONTHNAME}}
8254 Magic Word: {{CURRENTMONTHNAMEGEN}}
8256 {{CURRENTMONTHNAMEGEN}}
8263 Magic Word: {{CURRENTTIME}}
8272 Magic Word: {{CURRENTHOUR}}
8281 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8290 Magic Word: {{CURRENTYEAR}}
8299 Magic Word: {{CURRENTTIMESTAMP}}
8301 {{CURRENTTIMESTAMP}}
8308 Magic Words LOCAL (UTC)
8312 * {{LOCALMONTHNAME}}
8313 * {{LOCALMONTHNAMEGEN}}
8314 * {{LOCALMONTHABBREV}}
8323 * {{LOCALTIMESTAMP}}
8338 <li> 19700101000203</li></ul>
8343 Magic Word: {{FULLPAGENAME}}
8345 title=[[User:Ævar Arnfjörð Bjarmason]]
8349 <p>User:Ævar Arnfjörð Bjarmason
8354 Magic Word: {{FULLPAGENAMEE}}
8356 title=[[User:Ævar Arnfjörð Bjarmason]]
8360 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8365 Magic Word: {{TALKSPACE}}
8367 title=[[User:Ævar Arnfjörð Bjarmason]]
8376 Magic Word: {{TALKSPACE}}, same namespace
8378 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8387 Magic Word: {{TALKSPACE}}, main namespace
8389 title=[[Parser Test]]
8398 Magic Word: {{TALKSPACEE}}
8400 title=[[User:Ævar Arnfjörð Bjarmason]]
8409 Magic Word: {{SUBJECTSPACE}}
8411 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8420 Magic Word: {{SUBJECTSPACE}}, same namespace
8422 title=[[User:Ævar Arnfjörð Bjarmason]]
8431 Magic Word: {{SUBJECTSPACE}}, main namespace
8433 title=[[Parser Test]]
8441 Magic Word: {{SUBJECTSPACEE}}
8443 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8452 Magic Word: {{NAMESPACE}}
8454 title=[[User:Ævar Arnfjörð Bjarmason]]
8463 Magic Word: {{NAMESPACEE}}
8465 title=[[User:Ævar Arnfjörð Bjarmason]]
8474 Magic Word: {{NAMESPACENUMBER}}
8476 title=[[User:Ævar Arnfjörð Bjarmason]]
8485 Magic Word: {{SUBPAGENAME}}
8487 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8496 Magic Word: {{SUBPAGENAMEE}}
8498 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8507 Magic Word: {{ROOTPAGENAME}}
8509 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8513 <p>Ævar Arnfjörð Bjarmason
8518 Magic Word: {{ROOTPAGENAMEE}}
8520 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8524 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8529 Magic Word: {{BASEPAGENAME}}
8531 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8535 <p>Ævar Arnfjörð Bjarmason
8540 Magic Word: {{BASEPAGENAMEE}}
8542 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8546 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8551 Magic Word: {{TALKPAGENAME}}
8553 title=[[User:Ævar Arnfjörð Bjarmason]]
8557 <p>User talk:Ævar Arnfjörð Bjarmason
8562 Magic Word: {{TALKPAGENAMEE}}
8564 title=[[User:Ævar Arnfjörð Bjarmason]]
8568 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8573 Magic Word: {{SUBJECTPAGENAME}}
8575 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8579 <p>User:Ævar Arnfjörð Bjarmason
8584 Magic Word: {{SUBJECTPAGENAMEE}}
8586 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8588 {{SUBJECTPAGENAMEE}}
8590 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8595 Magic Word: {{NUMBEROFFILES}}
8604 Magic Word: {{PAGENAME}}
8606 title=[[User:Ævar Arnfjörð Bjarmason]]
8610 <p>Ævar Arnfjörð Bjarmason
8615 Magic Word: {{PAGENAME}} with metacharacters
8617 title=[['foo & bar = baz']]
8621 <p><i>'foo & bar = baz'</i>
8624 <p><i>'foo & bar = baz'</i></p>
8628 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8630 title=[[*RFC 1234 http://example.com/]]
8634 <p>*RFC 1234 http://example.com/
8637 <p>*RFC 1234 http://example.com/</p>
8641 Magic Word: {{PAGENAMEE}}
8643 title=[[User:Ævar Arnfjörð Bjarmason]]
8647 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8652 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8654 title=[[*RFC 1234 http://example.com/]]
8658 <p>*RFC_1234_http://example.com/
8661 <p>*RFC_1234_http://example.com/</p>
8665 Magic Word: {{REVISIONID}}
8674 Magic Word: {{SCRIPTPATH}}
8683 Magic Word: {{STYLEPATH}}
8692 Magic Word: {{SERVER}}
8696 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8701 Magic Word: {{SERVERNAME}}
8710 Magic Word: {{SITENAME}}
8719 Case-sensitive magic words, when cased differently, should just be template transclusions
8726 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8727 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8728 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8729 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8734 Case-insensitive magic words should still work with weird casing.
8744 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8749 Namespace 1 {{ns:1}}
8758 Namespace 1 {{ns:01}}
8767 Namespace 0 {{ns:0}} (bug 4783)
8775 Namespace 0 {{ns:00}} (bug 4783)
8783 Namespace -1 {{ns:-1}}
8792 Namespace User {{ns:User}}
8801 Namespace User talk {{ns:User_talk}}
8810 Namespace User talk {{ns:uSeR tAlK}}
8819 Namespace File {{ns:File}}
8828 Namespace File {{ns:Image}}
8837 Namespace (lang=de) Benutzer {{ns:User}}
8848 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8854 <p>Benutzer Diskussion
8862 {{urlencode:hi world?!}}
8863 {{urlencode:hi world?!|WIKI}}
8864 {{urlencode:hi world?!|PATH}}
8865 {{urlencode:hi world?!|QUERY}}
8875 Magic Word: prioritize type info over data-parsoid
8881 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8885 Magic Word: serialize on separate line (parsoid)
8887 parsoid=wt2wt,html2wt
8893 foo<meta property="mw:PageProp/notoc"/>bar
8897 Magic Word: rt non-english wikis
8904 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8911 Magic links: internal link to RFC (bug 479)
8915 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8920 Magic links: RFC (bug 479)
8924 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8929 Magic links: RFC (bug 65278)
8931 This is RFC 822 but thisRFC 822 is not RFC 822linked.
8933 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
8938 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
8940 RFC      822
8944 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8951 Magic links: ISBN (bug 1937)
8955 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8960 Magic links: ISBN (bug 65278)
8962 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
8964 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
8969 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
8971 ISBN      978 0 316 09811 3
8977 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
8986 Magic links: PMID incorrectly converts space to underscore
8990 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8995 Magic links: PMID (bug 65278)
8997 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
8999 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
9004 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9006 PMID      1234
9010 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9021 Nonexistent template
9023 {{thistemplatedoesnotexist}}
9025 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9030 Template with invalid target containing tags
9032 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9034 <p>{{a<b>b</b>|foo|a=b|a = b}}
9039 Template with invalid target containing unclosed tag
9041 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9043 <p>{{a<b>|foo|a=b|a = b}}</b>
9048 Template with invalid target containing wikilink
9052 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9055 <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>
9059 Template with just whitespace in it, bug #68421
9063 <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>
9069 This is a test template
9077 <p>This is a test template
9082 Template with explicit namespace
9086 <p>This is a test template
9094 This is a test template with parameter {{{param}}}
9100 {{paramtest|param=foo}}
9102 <p>This is a test template with parameter foo
9107 Template:paramtestnum
9113 Template unnamed parameter
9115 {{paramtestnum|Main Page|the main page}}
9117 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9122 Template:templatesimple
9128 Template:templateredirect
9130 #redirect [[Template:templatesimple]]
9134 Template:templateasargtestnum
9140 Template:templateasargtest
9142 {{template{{{templ}}}}}
9146 Template:templateasargtest2
9152 Template with template name as unnamed argument
9154 {{templateasargtestnum|templatesimple}}
9161 Template with template name as argument
9163 {{templateasargtest|templ=simple}}
9170 Template with template name as argument (2)
9172 {{templateasargtest2|templ=templatesimple}}
9179 Template:templateasargtestdefault
9181 {{{{{templ|templatesimple}}}}}
9191 Template with default value
9193 {{templateasargtestdefault}}
9200 Template with default value (value set)
9202 {{templateasargtestdefault|templ=templa}}
9211 {{templateredirect}}
9218 Template with argument in separate line
9220 {{ templateasargtest |
9228 Template with complex template as argument
9231 param ={{ templateasargtest |
9234 <p>This is a test template with parameter (test)
9239 Template with thumb image (with link in description)
9241 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9243 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>
9246 <p>This is a test template with parameter</p>
9247 <div class="thumb tright">
9248 <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>
9249 <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>
9253 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
9257 Template:complextemplate
9259 {{{1}}} {{paramtest|
9260 param ={{{param}}}}}
9264 Template with complex arguments
9267 param ={{ templateasargtest |
9268 templ = simple }}|[[Template:complextemplate|link]]}}
9270 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9275 BUG 553: link with two variables in a piped link
9278 |[[{{{1}}}|{{{2}}}]]
9283 <td>[[{{{1}}}|{{{2}}}]]
9289 Magic variable as template parameter
9291 {{paramtest|param={{SITENAME}}}}
9293 <p>This is a test template with parameter MediaWiki
9300 [[{{{param}}}|link]]
9304 Template parameter as link source
9306 {{linktest|param=Main Page}}
9308 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9313 Template-generated attribute string (k='v')
9315 <span {{attr_str|id|v1}}>bar</span>
9317 <p><span id="v1">bar</span>
9324 including another template, {{paramtest|param={{{arg}}}}}
9328 Template passing argument to another template
9330 {{paramtest2|arg='hmm'}}
9332 <p>including another template, This is a test template with parameter 'hmm'
9343 Template as link source
9347 [[{{linktest2}}|Main Page]]
9349 [[{{linktest2}}]]Page
9351 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9352 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9353 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9371 Template infinite loop
9375 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9380 Template from main namespace
9399 BUG 529: Template with table, not included at beginning of line
9418 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9438 BUG 41: Template parameters shown as broken links
9447 Template with targets containing wikilinks
9451 {{[[{{echo|foo}}]]}}
9453 {{{{echo|[[foo}}]]}}
9455 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9456 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9464 ''None'' of '''this''' should be
9466 but rather passed unmodified
9473 # hmm, fix this or just deprecate msgnw and document its behavior?
9477 {{msgnw:MSGNW test}}
9479 <p>''None'' of '''this''' should be
9481  but rather passed unmodified
9482 {{test}}
9492 {{int:youhavenewmessages|lots of money|not!}}
9494 <p>You have lots of money (not!).
9501 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9505 <includeonly> and <noinclude> being included
9516 <onlyinclude>Foo</onlyinclude>bar
9520 <onlyinclude> being included
9532 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9536 <onlyinclude> and <includeonly> being included
9545 <includeonly> and <noinclude> on a page
9547 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9554 Un-closed <noinclude>
9561 <onlyinclude> on a page
9563 <onlyinclude>Foo</onlyinclude>bar
9570 Un-closed <onlyinclude>
9577 Self-closed noinclude, includeonly, onlyinclude tags
9588 Unbalanced includeonly and noinclude tags
9592 |b</noinclude></noinclude>
9593 |c</noinclude></includeonly>
9594 |d</includeonly></includeonly>
9603 <td>c</includeonly>
9605 <td>d</includeonly></includeonly>
9611 Template:Includeonly section
9614 ==Includeonly section==
9620 Bug 6563: Edit link generation for section shown by <includeonly>
9622 {{includeonly section}}
9624 <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>
9625 <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>
9629 # Uses same input as the contents of [[Template:Includeonly section]]
9631 Bug 6563: Section extraction for section shown by <includeonly>
9636 ==Includeonly section==
9644 Bug 6563: Edit link generation for section suppressed by <includeonly>
9647 ==Includeonly section==
9651 <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>
9656 Bug 6563: Section extraction for section suppressed by <includeonly>
9661 ==Includeonly section==
9669 Un-closed <includeonly>
9676 Includes and comments at SOL
9678 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9685 <includeonly>can have stuff</includeonly>=== here ===
9688 <h2><span class="mw-headline" id="hu">hu</span></h2>
9693 <h3><span class="mw-headline" id="here">here</span></h3>
9696 <!-- 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>
9698 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9700 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9703 <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>
9707 # TODO: test with DOM fragment reuse!
9709 Parsoid: DOM fragment reuse
9711 parsoid=wt2wt,wt2html
9713 a{{echo|b<table></table>c}}d
9725 <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>
9727 <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">
9728 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9729 </span><p about="#mwt2">cd</p>
9731 <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">
9733 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9735 </span><p about="#mwt3">b</p>
9739 Parsoid: Merge double tds (bug 50603)
9748 <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>
9753 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9763 <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}}]}'>
9765 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9771 ### <includeonly> and <noinclude> in attributes
9774 0. includeonly around the entire attribute
9776 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9778 <p><span id="v2">bar</span>
9783 1. includeonly in html attr key
9785 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9787 <p><span id="foo">bar</span>
9792 2. includeonly in html attr value
9794 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9795 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9797 <p><span id="v1">bar</span>
9798 <span id="v1">bar</span>
9803 3. includeonly in part of an attr value
9805 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9807 <p><span style="color:red;">bar</span>
9812 4. includeonly in table attributes
9836 ### Token Stream Patcher tests
9838 ### These tests won't always pass wt2wt and other modes because
9839 ### on serialization, the table will be output on a new line.
9840 ### For now, we are blacklisting them, and using this to test selser.
9844 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9846 parsoid=wt2html,wt2wt
9848 {{echo|}}{| width = '100%'
9852 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
9853 <tbody><tr><td>foo</td></tr>
9858 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9860 parsoid=wt2html,wt2wt
9862 <includeonly>a</includeonly>{| {{{b}}}
9866 <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}}}":""}}'>
9867 <tbody><tr><td>c</td></tr>
9873 ### Testing parsing of templates where a template arg
9874 ### has the same name as the template itself.
9884 Templates: Template Name/Arg clash: 1. Use of positional param
9893 Templates: Template Name/Arg clash: 2. Use of named param
9902 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9911 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
9915 Templates: 1. Simple use
9924 Templates: 2. Inside a block tag
9926 <div>{{echo|Foo}}</div>
9927 <blockquote>{{echo|Foo}}</blockquote>
9930 <blockquote>Foo</blockquote>
9940 Templates: P-wrapping: 1a. Templates on consecutive lines
9951 Templates: P-wrapping: 1b. Templates on consecutive lines
9965 Templates: P-wrapping: 1c. Templates on consecutive lines
9968 {{echo|bar}} <div>baz</div>
9981 Templates: P-wrapping: 1d. Template preceded by comment-only line
9990 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
9994 Templates: Inline Text: 1. Multiple template uses
9996 {{echo|Foo}}bar{{echo|baz}}
10003 Templates: Inline Text: 2. Back-to-back template uses
10005 {{echo|Foo}}{{echo|bar}}
10012 Templates: Block Tags: 1. Multiple template uses
10014 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10016 <div>Foo</div><div>bar</div><div>baz</div>
10021 Templates: Block Tags: 2. Back-to-back template uses
10023 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10025 <div>Foo</div><div>bar</div>
10029 # This is an edge case relating to paragraph wrapping.
10031 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10036 <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
10041 Templates: Links: 1. Simple example
10043 {{echo|[[Foo|bar]]}}
10045 <p><a href="/wiki/Foo" title="Foo">bar</a>
10050 Templates: Links: 2. Generation of link href
10052 [[{{echo|Foo}}|bar]]
10054 <p><a href="/wiki/Foo" title="Foo">bar</a>
10059 Templates: Links: 3. Generation of part of a link href
10061 [[Fo{{echo|o}}|bar]]
10063 [[Foo{{echo|bar}}]]
10065 [[Foo{{echo|bar}}baz]]
10067 [[Foo{{echo|bar}}|bar]]
10069 [[:Foo{{echo|bar}}]]
10071 [[:Foo{{echo|bar}}|bar]]
10073 <p><a href="/wiki/Foo" title="Foo">bar</a>
10074 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10075 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10076 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10077 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10078 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10083 Templates: Links: 4. Multiple templates generating link href
10085 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10087 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10092 Templates: Links: 5. Generation of link text
10094 [[Foo|{{echo|bar}}]]
10096 <p><a href="/wiki/Foo" title="Foo">bar</a>
10101 Templates: Links: 5. Nested templates (only outermost template should be marked)
10103 {{echo|[[{{echo|Foo}}|bar]]}}
10105 <p><a href="/wiki/Foo" title="Foo">bar</a>
10110 Templates: HTML Tag: 1. Generation of HTML attr. key
10112 <div {{echo|style}}="color:red;">foo</div>
10114 <div style="color:red;">foo</div>
10119 Templates: HTML Tag: 2. Generation of HTML attr. value
10121 <div style={{echo|'color:red;'}}>foo</div>
10123 <div style="color:red;">foo</div>
10128 Templates: HTML Tag: 3. Generation of HTML attr key and value
10130 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10132 <div style="color:red;">foo</div>
10137 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10139 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10141 <div title="This is a long title with just one piece templated">foo</div>
10146 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10148 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10150 <div title="This is a long title with just one piece templated">foo</div>
10155 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10157 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10159 <div title="This is a long title with just one piece templated">foo</div>
10164 Templates: HTML Tag: 7. Generation of partial attribute key string
10166 <div st{{echo|yle}}="color:red;">foo</div>
10168 <div style="color:red;">foo</div>
10173 Templates: HTML Tables: 1. Generating start of a HTML table
10175 {{echo|<table><tr><td>foo</td>}}</tr></table>
10177 <table><tr><td>foo</td></tr></table>
10182 Templates: HTML Tables: 2a. Generating middle of a HTML table
10184 <table><tr>{{echo|<td>foo</td>}}</tr></table>
10186 <table><tr><td>foo</td></tr></table>
10191 Templates: HTML Tables: 2b. Generating middle of a HTML table
10193 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10195 <table><tr><td>foo</td></tr></table>
10200 Templates: HTML Tables: 3. Generating end of a HTML table
10202 <table><tr>{{echo|<td>foo</td></tr></table>}}
10204 <table><tr><td>foo</td></tr></table>
10209 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10211 {{echo|<table>}}<tr><td>foo</td></tr></table>
10213 <table><tr><td>foo</td></tr></table>
10218 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10220 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10222 <table><tr><td>foo</td></tr></table>
10227 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10229 <table><tr>{{echo|<td>}}foo</td></tr></table>
10231 <table><tr><td>foo</td></tr></table>
10236 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10238 <table><tr><td>foo{{echo|</td>}}</tr></table>
10240 <table><tr><td>foo</td></tr></table>
10245 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10247 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10249 <table><tr><td>foo</td></tr></table>
10254 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10256 <table><tr><td>foo</td></tr>{{echo|</table>}}
10258 <table><tr><td>foo</td></tr></table>
10263 Templates: HTML Tables: 5. Proper fostering of categories from inside
10265 parsoid=wt2html,wt2wt
10267 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10268 <!--Two categories (Bug 50330)-->
10269 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10271 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10272 <!--Two categories (Bug 50330)-->
10273 <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>
10277 Templates: Wiki Tables: 1a. Fostering of entire template content
10285 <tr><td></td></tr></table>
10297 Templates: Wiki Tables: 1b. Fostering of entire template content
10310 <tr><td></td></tr></table>
10324 Templates: Wiki Tables: 2. Fostering of partial template content
10334 <tr><td></td></tr></table>
10347 Templates: Wiki Tables: 3. td-content via multiple templates
10350 {{echo|{{pipe}}a}}{{echo|b}}
10361 Templates: Wiki Tables: 4. Templated tags, no content
10367 <tr><td></td></tr></table>
10372 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10386 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10400 Templates: Lists: Multi-line list-items via templates
10402 *{{echo|a {{nonexistent|
10404 *{{echo|b {{nonexistent|
10407 <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>
10408 <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>
10413 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10415 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10417 <p><i>ab</i>c<i>d</i>e
10422 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10423 (PHP parser generates misnested html)
10425 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10427 <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>
10431 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10432 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10434 parsoid=wt2html,wt2wt
10436 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10438 <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>
10439 <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>
10440 <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>
10444 Templates: Ugly nesting: 4. Divs opened/closed across templates
10446 a<div>b{{echo|c</div>d}}e
10457 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10463 |{{echo|foo</table>}}
10467 <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|}"]}'>
10471 <td>foo</td></tr></tbody></table><span about="#mwt1">
10472 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10477 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10487 <td>1. {{echo|foo </table>}}</td>
10489 <td>2. {{echo|baz </table>}}</td>
10502 <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>"]}'>
10507 <td>1. foo </td></tr></tbody></table></td>
10509 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10510 </span><span about="#mwt2">
10511 </span><span about="#mwt2">
10512 </span><span about="#mwt2">abc</span><span about="#mwt2">
10513 </span><span about="#mwt2">
10514 </span><span about="#mwt2">
10515 </span><span about="#mwt2">
10516 </span><span about="#mwt2">
10517 </span><span about="#mwt2">
10518 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10519 </span><span about="#mwt2">
10524 Templates: Ugly templates: 3. newline-only template parameter
10533 # This looks like a bug: a single newline triggers p/br for some reason.
10535 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10544 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10545 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10547 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10553 <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
10554 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10558 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10559 # that are "identical" and generate nesting cycles in the algorithm
10561 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10563 {{echo|<table><tr><td><table>}}
10567 <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"}'>
10568 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10569 </table></td></tr></tbody></table>
10573 Parser Functions: 1. Simple example
10582 Parser Functions: 2. Nested use (only outermost should be marked up)
10591 ### Pre-save transform tests
10594 pre-save transform: subst:
10600 This is a test template
10604 pre-save transform: normal template
10614 pre-save transform: nonexistent template
10618 {{thistemplatedoesnotexist}}
10620 {{thistemplatedoesnotexist}}
10625 pre-save transform: subst magic variables
10634 # This is bug 89, which I fixed. -- wtm
10636 pre-save transform: subst: templates with parameters
10640 {{subst:paramtest|param="something else"}}
10642 This is a test template with parameter "something else"
10646 Template:nowikitest
10648 <nowiki>'''not wiki'''</nowiki>
10652 pre-save transform: nowiki in subst (bug 1188)
10656 {{subst:nowikitest}}
10658 <nowiki>'''not wiki'''</nowiki>
10663 Template:commenttest
10665 This template has <!-- a comment --> in it.
10669 pre-save transform: comment in subst (bug 1936)
10673 {{subst:commenttest}}
10675 This template has <!-- a comment --> in it.
10679 pre-save transform: unclosed tag
10683 <nowiki>'''not wiki'''
10685 <nowiki>'''not wiki'''
10689 pre-save transform: mixed tag case
10693 <NOwiki>'''not wiki'''</noWIKI>
10695 <NOwiki>'''not wiki'''</noWIKI>
10699 pre-save transform: unclosed comment in <nowiki>
10703 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10705 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10708 # Leading @ in this template definition works around a limitation
10709 # in parsoid's parserTests which otherwise strips the <span> from the
10710 # result (confusing it for a template wrapper)
10714 @<span onmouseover="alert('crap')">Oh no</span>
10718 (confirming safety of fix for subst bug 1936)
10720 {{Template:dangerous}}
10722 <p>@<span>Oh no</span>
10727 pre-save transform: comment containing gallery (bug 5024)
10731 <!-- <gallery>data</gallery> -->
10733 <!-- <gallery>data</gallery> -->
10737 pre-save transform: comment containing extension
10741 <!-- <tag>data</tag> -->
10743 <!-- <tag>data</tag> -->
10747 pre-save transform: comment containing nowiki
10751 <!-- <nowiki>data</nowiki> -->
10753 <!-- <nowiki>data</nowiki> -->
10757 pre-save transform: <noinclude> in subst (bug 3298)
10767 pre-save transform: <onlyinclude> in subst (bug 3298)
10771 {{subst:Includes2}}
10779 {{<includeonly>subst:</includeonly>Includes}}
10783 Template:SafeSubstTest
10785 {{<includeonly>safesubst:</includeonly>Includes}}
10789 bug 22297: safesubst: works during PST
10793 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10799 bug 22297: safesubst: works during normal parse
10808 subst: does not work during normal parse
10812 <p>{{subst:Includes}}
10817 pre-save transform: context links ("pipe trick")
10821 [[Article (context)|]]
10824 [[Bar:Article (context)|]]
10825 [[:Bar:Article (context)|]]
10827 [[|Article (context)]]
10831 [[Article (context)|Article]]
10832 [[Bar:Article|Article]]
10833 [[:Bar:Article|Article]]
10834 [[Bar:Article (context)|Article]]
10835 [[:Bar:Article (context)|Article]]
10837 [[Article (context)]]
10838 [[Bar:X (Y) Z|X (Y) Z]]
10839 [[:Bar:X (Y) Z|X (Y) Z]]
10843 pre-save transform: context links ("pipe trick") with interwiki prefix
10847 [[interwiki:Article|]]
10848 [[:interwiki:Article|]]
10849 [[interwiki:Bar:Article|]]
10850 [[:interwiki:Bar:Article|]]
10852 [[interwiki:Article|Article]]
10853 [[:interwiki:Article|Article]]
10854 [[interwiki:Bar:Article|Bar:Article]]
10855 [[:interwiki:Bar:Article|Bar:Article]]
10859 pre-save transform: context links ("pipe trick") with parens in title
10861 pst title=[[Somearticle (context)]]
10865 [[Article (context)|Article]]
10869 pre-save transform: context links ("pipe trick") with comma in title
10871 pst title=[[Someplace, Somewhere]]
10874 [[Otherplace, Elsewhere|]]
10875 [[Otherplace, Elsewhere, Anywhere|]]
10877 [[Otherplace, Somewhere|Otherplace]]
10878 [[Otherplace, Elsewhere|Otherplace]]
10879 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
10883 pre-save transform: context links ("pipe trick") with parens and comma
10885 pst title=[[Someplace (IGNORED), Somewhere]]
10888 [[Otherplace (place), Elsewhere|]]
10890 [[Otherplace, Somewhere|Otherplace]]
10891 [[Otherplace (place), Elsewhere|Otherplace]]
10895 pre-save transform: context links ("pipe trick") with comma and parens
10897 pst title=[[Who, me? (context)]]
10900 [[Me, Myself, and I (1937 song)|]]
10902 [[Yes, you. (context)|Yes, you.]]
10903 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
10907 pre-save transform: context links ("pipe trick") with namespace
10909 pst title=[[Ns:Somearticle]]
10913 [[Ns:Article|Article]]
10917 pre-save transform: context links ("pipe trick") with namespace and parens
10919 pst title=[[Ns:Somearticle (context)]]
10923 [[Ns:Article (context)|Article]]
10927 pre-save transform: context links ("pipe trick") with namespace and comma
10929 pst title=[[Ns:Somearticle, Context, Whatever]]
10933 [[Ns:Article, Context, Whatever|Article]]
10937 pre-save transform: context links ("pipe trick") with namespace, comma and parens
10939 pst title=[[Ns:Somearticle, Context (context)]]
10943 [[Ns:Article (context)|Article]]
10947 pre-save transform: context links ("pipe trick") with namespace, parens and comma
10949 pst title=[[Ns:Somearticle (IGNORED), Context]]
10953 [[Ns:Article, Context|Article]]
10957 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
10961 [[Article(context)|]]
10962 [[Bar:Article(context)|]]
10963 [[:Bar:Article(context)|]]
10964 [[|Article(context)]]
10968 [[Article(context)|Article]]
10969 [[Bar:Article(context)|Article]]
10970 [[:Bar:Article(context)|Article]]
10971 [[Article(context)]]
10972 [[Bar:X(Y)Z|X(Y)Z]]
10973 [[:Bar:X(Y)Z|X(Y)Z]]
10977 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
10981 [[Article (context)|]]
10982 [[Bar:Article (context)|]]
10983 [[:Bar:Article (context)|]]
10984 [[|Article (context)]]
10988 [[Article (context)|Article]]
10989 [[Bar:Article (context)|Article]]
10990 [[:Bar:Article (context)|Article]]
10991 [[Article (context)]]
10992 [[Bar:X (Y) Z|X (Y) Z]]
10993 [[:Bar:X (Y) Z|X (Y) Z]]
10997 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11001 [[Article(context)|]]
11002 [[Bar:Article(context)|]]
11003 [[:Bar:Article(context)|]]
11004 [[|Article(context)]]
11008 [[Article(context)|Article]]
11009 [[Bar:Article(context)|Article]]
11010 [[:Bar:Article(context)|Article]]
11011 [[Article(context)]]
11012 [[Bar:X(Y)Z|X(Y)Z]]
11013 [[:Bar:X(Y)Z|X(Y)Z]]
11017 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11021 [[Article (context), context|]]
11022 [[Article (context),context|]]
11023 [[Bar:Article (context), context|]]
11024 [[Bar:Article (context),context|]]
11025 [[:Bar:Article (context), context|]]
11026 [[:Bar:Article (context),context|]]
11028 [[Article (context), context|Article]]
11029 [[Article (context),context|Article]]
11030 [[Bar:Article (context), context|Article]]
11031 [[Bar:Article (context),context|Article]]
11032 [[:Bar:Article (context), context|Article]]
11033 [[:Bar:Article (context),context|Article]]
11037 pre-save transform: trim trailing empty lines
11041 Empty lines are trimmed
11047 Empty lines are trimmed
11051 pre-save transform: Signature expansion
11056 * <noinclude>~~~</noinclude>
11057 * <includeonly>~~~</includeonly>
11058 * <onlyinclude>~~~</onlyinclude>
11060 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11061 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11062 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11063 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11068 pre-save transform: Signature expansion in nowiki tags (bug 93)
11074 <nowiki>~~~~</nowiki>
11076 <includeonly><nowiki>~~~~</nowiki></includeonly>
11078 <noinclude><nowiki>~~~~</nowiki></noinclude>
11080 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11082 {{subst:Foo}} shall be converted to FOO
11084 As well as inside noinclude/onlyinclude
11085 <noinclude>{{subst:Foo}}</noinclude>
11086 <onlyinclude>{{subst:Foo}}</onlyinclude>
11088 But not inside includeonly
11089 <includeonly>{{subst:Foo}}</includeonly>
11093 <nowiki>~~~~</nowiki>
11095 <includeonly><nowiki>~~~~</nowiki></includeonly>
11097 <noinclude><nowiki>~~~~</nowiki></noinclude>
11099 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11101 FOO shall be converted to FOO
11103 As well as inside noinclude/onlyinclude
11104 <noinclude>FOO</noinclude>
11105 <onlyinclude>FOO</onlyinclude>
11107 But not inside includeonly
11108 <includeonly>{{subst:Foo}}</includeonly>
11112 Parsoid: Recognize nowiki with trailing space in tags
11116 <nowiki ><div>[[foo]]</nowiki >
11124 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11131 Parsoid: Recognize nowiki with odd capitalization
11135 <noWikI ><div>[[foo]]</Nowiki >
11137 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11142 Parsoid: Escape nowiki with trailing space in tags
11146 <nowiki > foo </nowiki >
11152 <p><nowiki > foo </nowiki ></p>
11153 <p>a<nowiki />b</p>
11154 <p>c<nowiki/ >d</p>
11158 Parsoid: Escape weird noWikI capitalizations
11162 <noWikI > foo </NoWikI >
11164 <p><noWikI > foo </NoWikI ></p>
11168 ### Message transform tests
11171 message transform: magic variables
11181 message transform: should not transform wiki markup
11191 message transform: <noinclude> in transcluded template (bug 4926)
11201 message transform: <onlyinclude> in transcluded template (bug 4926)
11211 {{#special:}} page name, known
11215 {{#special:Recentchanges}}
11217 Special:RecentChanges
11221 {{#special:}} page name with subpage, known
11225 {{#special:Recentchanges/param}}
11227 Special:RecentChanges/param
11231 {{#special:}} page name, unknown
11235 {{#special:foobar nonexistent}}
11237 Special:Foobar nonexistent
11241 {{#speciale:}} page name, known
11245 {{#speciale:Recentchanges}}
11247 Special:RecentChanges
11251 {{#speciale:}} page name with subpage, known
11255 {{#speciale:Recentchanges/param}}
11257 Special:RecentChanges/param
11261 {{#speciale:}} page name, unknown
11265 {{#speciale:foobar nonexistent}}
11267 Special:Foobar_nonexistent
11273 ### For Parsoid-specific tests, see
11274 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11279 parsoid=wt2html,wt2wt,html2html
11281 [[Image:foobar.jpg]]
11283 <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>
11286 <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>
11290 Simple image (using File: namespace, now canonical)
11292 [[File:Foobar.jpg]]
11294 <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>
11297 <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>
11301 Right-aligned image
11303 [[File:Foobar.jpg|right]]
11305 <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>
11308 <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>
11314 [[File:Foobar.jpg|right|Caption text]]
11316 <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>
11319 <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>
11323 Image with caption, bug 53312 #1
11325 [[File:Foobar.jpg|right|Caption page stuff]]
11327 <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>
11330 <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>
11334 Image with caption, bug 53312 #2
11336 [[File:Foobar.jpg|right|Caption page=]]
11338 <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>
11341 <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>
11345 Image with caption, bug 53312 #3
11347 [[File:Foobar.jpg|right|Caption page=stuff]]
11349 <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>
11352 <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>
11356 Allow empty links in image captions (Bug 60753)
11360 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11365 <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>
11368 <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>
11370 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11371 </figcaption></figure>
11375 Titles in unlinked images (T23454)
11377 [[File:Foobar.jpg|link=|stuff]]
11379 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
11384 Link with empty target
11393 Image with empty attribute
11395 parsoid=wt2html,wt2wt,html2html
11397 [[File:Foobar.jpg|right||Caption text]]
11399 <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>
11402 <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>
11406 1. Block image with individual attributes from templates
11408 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11410 <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>
11413 <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>
11417 2. Block Image with individual attributes from templates
11419 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11421 <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>
11424 <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>
11428 3. Inline image with individual attributes from templates
11430 [[File:Foobar.jpg|{{echo|50px}}]]
11432 <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>
11435 <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>
11438 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11439 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11441 Image with multiple attributes from the same template
11443 [[File:Foobar.jpg|{{image_attribs}}]]
11445 <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>
11448 <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>
11452 Image with link tails
11456 123[[File:Foobar.jpg]]456
11457 123[[File:Foobar.jpg|right]]456
11458 123[[File:Foobar.jpg|thumb]]456
11460 <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
11462 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
11463 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
11466 <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>
11468 <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>
11470 <div class="thumb tright">
11471 <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>
11472 <div class="thumbcaption">
11473 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11479 <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>
11480 <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>
11481 <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>
11485 Image with multiple captions -- only last one is accepted
11487 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11489 <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>
11492 <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>
11496 Image with multiple widths -- use last
11498 [[File:Foobar.jpg|200px|300px|caption]]
11500 <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>
11503 <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>
11507 Image with multiple alignments -- use first (bug 48664)
11511 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11513 [[File:Foobar.jpg|middle|text-top|caption]]
11515 <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>
11516 <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>
11519 <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>
11520 <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>
11524 Image with width attribute at different positions
11526 [[File:Foobar.jpg|200px|right|Caption]]
11527 [[File:Foobar.jpg|right|200px|Caption]]
11528 [[File:Foobar.jpg|right|Caption|200px]]
11530 <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>
11531 <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>
11532 <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>
11535 <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>
11536 <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>
11537 <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>
11540 # a sad bit of backward-compatibility
11542 Image with size specified with pxpx (bug 13500, 51628)
11544 parsoid=wt2html,wt2wt,html2html
11546 [[File:Foobar.jpg|20pxpx]]
11547 [[File:Foobar.jpg|200x20pxpx]]
11549 <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>
11550 <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>
11553 <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>
11557 Image with link parameter, wiki target
11559 [[File:Foobar.jpg|link=Main Page]]
11561 <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>
11564 <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>
11567 # parsoid bug 49293 (part 1)
11569 Image with link parameter, URL target
11571 [[File:Foobar.jpg|link=http://example.com/]]
11573 <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>
11576 <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>
11579 # parsoid bug 49293 (part 2)
11581 Image with link parameter, protocol-less URL target
11583 [[File:Foobar.jpg|link=//example.com/]]
11585 <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>
11588 <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>
11592 Image with link parameter, wgExternalLinkTarget
11594 [[Image:foobar.jpg|link=http://example.com/]]
11596 wgExternalLinkTarget='foobar'
11598 <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>
11603 Image with link parameter, wgNoFollowLinks set to false
11605 [[Image:foobar.jpg|link=http://example.com/]]
11607 wgNoFollowLinks=false
11609 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11614 Image with link parameter, wgNoFollowDomainExceptions
11616 [[Image:foobar.jpg|link=http://example.com/]]
11618 wgNoFollowDomainExceptions='example.com'
11620 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11625 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11627 [[Image:foobar.jpg|link=http://example.com/|Title]]
11629 wgExternalLinkTarget='foobar'
11631 <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>
11636 Image with empty link parameter
11638 [[File:Foobar.jpg|link=]]
11640 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11643 <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>
11647 Image with link parameter (wiki target) and unnamed parameter
11649 [[File:Foobar.jpg|link=Main_Page|Title]]
11651 <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>
11654 <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>
11658 Image with link parameter (URL target) and unnamed parameter
11660 [[File:Foobar.jpg|link=http://example.com/|Title]]
11662 <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>
11665 <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>
11669 Thumbnail image with link parameter
11672 parsoid=wt2html,wt2wt,html2html
11674 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11676 <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>
11679 <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>
11683 Manually-specified thumbnail image
11687 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11689 <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>
11692 <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>
11696 Manually-specified thumbnail image with explicit link to wiki page
11699 parsoid=wt2html,wt2wt,html2html
11701 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11703 <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>
11706 <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>
11710 Manually-specified thumbnail image with explicit link to url
11713 parsoid=wt2html,wt2wt,html2html
11715 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11717 <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>
11720 <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>
11724 Manually-specified thumbnail image with explicit no link
11727 parsoid=wt2html,wt2wt,html2html
11729 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11731 <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>
11734 <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>
11738 Manually-specified thumbnail image with explicit link and alt text
11741 parsoid=wt2html,wt2wt,html2html
11743 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11745 <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>
11748 <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>
11752 Image with frame and link
11754 parsoid=wt2html,wt2wt,html2html
11756 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11758 <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>
11761 <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>
11765 Image with frame and link and explicit alt
11767 parsoid=wt2html,wt2wt,html2html
11769 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11771 <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>
11774 <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>
11778 Image with wiki markup in implicit alt
11780 parsoid=wt2html,wt2wt,html2html
11782 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11784 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11786 <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>
11787 </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>
11790 <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>
11791 <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>
11794 ###################
11795 # Conflicting image format options.
11796 # First option specified should 'win'.
11797 # All three cases in each test should be identical.
11800 Image with 'frameless' first.
11802 parsoid=wt2html,wt2wt,html2html
11804 [[File:Foobar.jpg|frameless|caption]]
11806 [[File:Foobar.jpg|frameless|frame|caption]]
11808 [[File:Foobar.jpg|frameless|thumb|caption]]
11810 <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>
11811 </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>
11812 </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>
11815 <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>
11816 <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>
11817 <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>
11821 Image with 'frame' first.
11823 parsoid=wt2html,wt2wt,html2html
11825 [[File:Foobar.jpg|frame|caption]]
11826 [[File:Foobar.jpg|frame|frameless|caption]]
11827 [[File:Foobar.jpg|frame|thumb|caption]]
11829 <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>
11830 <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>
11831 <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>
11834 <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>
11835 <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>
11836 <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>
11840 Image with 'thumb' first.
11842 parsoid=wt2html,wt2wt,html2html
11844 [[File:Foobar.jpg|thumb|caption]]
11845 [[File:Foobar.jpg|thumb|frameless|caption]]
11846 [[File:Foobar.jpg|thumb|frame|caption]]
11848 <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>
11849 <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>
11850 <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>
11853 <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>
11854 <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>
11855 <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>
11858 ###################
11860 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
11861 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
11862 # Foobar has actual size of 1941x220
11863 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
11864 # a scalable format.
11865 # 2. Framed images always ignore size options; always render at default size.
11866 # 3. "Unspecified format" and border are the only types which can be
11870 Image: "unspecified format" and border enlarge
11872 parsoid=wt2html,wt2wt,html2html
11874 [[File:Foobar.jpg|2000px]]
11876 [[File:Foobar.jpg|border|2000px]]
11878 <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>
11879 </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>
11882 <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>
11883 <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>
11887 Image: "unspecified format" and border reduce
11889 parsoid=wt2html,wt2wt,html2html
11891 [[File:Foobar.jpg|1000px]]
11893 [[File:Foobar.jpg|border|1000px]]
11895 <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>
11896 </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>
11899 <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>
11900 <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>
11904 Image: thumbs reduce
11906 parsoid=wt2html,wt2wt,html2html
11908 [[File:Foobar.jpg|thumb|50px]]
11910 <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>
11913 <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>
11917 Image: bitmap thumbs can't be enlarged past original size, but vector can.
11919 parsoid=wt2html,wt2wt,html2html
11921 [[File:Foobar.jpg|thumb|2000px]]
11923 [[File:Foobar.svg|thumb|2000px]]
11925 <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>
11926 <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>
11929 <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>
11930 <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>
11934 Image: frameless can reduce in size
11936 parsoid=wt2html,wt2wt,html2html
11938 [[File:Foobar.jpg|frameless|50px]]
11940 <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>
11943 <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>
11947 Image: bitmap frameless can't be enlarged past original size, but vector can
11949 parsoid=wt2html,wt2wt,html2html
11951 [[File:Foobar.jpg|frameless|2000px]]
11953 [[File:Foobar.svg|frameless|2000px]]
11955 <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>
11956 </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>
11959 <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>
11960 <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>
11964 Image: framed images are always unscaled.
11966 parsoid=wt2html,wt2wt,html2html
11968 [[File:Foobar.jpg|frame]]
11970 [[File:Foobar.jpg|frame|50px]]
11972 [[File:Foobar.jpg|frame|50x50px]]
11974 [[File:Foobar.jpg|frame|2000px]]
11976 <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>
11977 <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>
11978 <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>
11979 <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>
11982 <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>
11983 <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>
11984 <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>
11985 <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>
11988 ###################
11991 Link to image page- image page normally doesn't exists, hence edit link
11992 Add test with existing image page
11993 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
11997 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12002 bug 18784 Link to non-existent image page with caption should use caption as link text
12004 [[:Image:test|caption]]
12006 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12011 Frameless image caption with a free URL
12013 [[File:Foobar.jpg|http://example.com]]
12015 <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>
12018 <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>
12022 Thumbnail image caption with a free URL
12026 [[File:Foobar.jpg|thumb|http://example.com]]
12028 <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>
12031 <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>
12035 Thumbnail image caption with a free URL and explicit alt
12038 parsoid=wt2html,wt2wt,html2html
12040 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12042 <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>
12045 <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>
12049 SVG thumbnails with no language set
12052 [[File:Foobar.svg|thumb|caption]]
12054 <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>
12057 <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>
12061 SVG thumbnails with language de
12063 parsoid=wt2html,wt2wt,html2html
12065 [[File:Foobar.svg|thumb|caption|lang=de]]
12067 <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>
12070 <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>
12074 SVG thumbnails with invalid language code
12076 parsoid=wt2html,wt2wt,html2html
12078 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12080 <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>
12083 <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>
12087 BUG 1887: A ISBN with a thumbnail
12089 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12091 <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>
12094 <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>
12098 BUG 1887: A RFC with a thumbnail
12100 [[File:Foobar.jpg|thumb|This is RFC 12354]]
12102 <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>
12105 <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>
12109 BUG 1887: A mailto link with a thumbnail
12111 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
12113 <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>
12116 <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>
12119 # Pending resolution to bug 368
12121 BUG 648: Frameless image caption with a link
12123 [[File:Foobar.jpg|text with a [[link]] in it]]
12125 <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>
12128 <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>
12132 BUG 648: Frameless image caption with a link (suffix)
12134 [[File:Foobar.jpg|text with a [[link]]foo in it]]
12136 <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>
12139 <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>
12143 BUG 648: Frameless image caption with an interwiki link
12145 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
12147 <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>
12150 <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>
12154 BUG 648: Frameless image caption with a piped interwiki link
12156 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
12158 <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>
12161 <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>
12165 Escape HTML special chars in image alt text
12167 [[File:Foobar.jpg|& < > "]]
12169 <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>
12172 <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>
12176 BUG 499: Alt text should have Ӓ, not &1234;
12178 [[File:Foobar.jpg|♀]]
12180 <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>
12183 <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>
12187 Broken image caption with link
12189 parsoid=wt2html,wt2wt,html2html
12191 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
12193 <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.
12196 <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>
12200 Image caption containing another image
12202 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12204 <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>
12207 <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>
12211 Image: caption containing a newline
12213 [[File:Foobar.jpg|This
12216 <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>
12219 <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>
12223 Image: caption containing leading space
12224 (The leading space should not trigger nowiki escaping in wt2wt mode)
12226 [[File:Foobar.jpg|thumb| bar]]
12228 <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>
12231 <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>
12235 Image: caption containing a table
12237 parsoid=wt2html,wt2wt,html2html
12239 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12245 and some more text.]]
12247 <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>
12250 <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
12253 <tr><th>Foo </th><th>Bar</th></tr>
12256 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12260 Bug 3090: External links other than http: in image captions
12262 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12264 <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>
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 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>
12273 parsoid=wt2html,wt2wt,html2html
12275 [[Image:foobar.jpg|a|class=b]]
12277 <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>
12280 <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>
12284 Localized image handling (1).
12286 parsoid=wt2html,wt2wt,html2html
12289 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12291 <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>
12294 <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>
12298 Localized image handling (2).
12301 parsoid=wt2html,wt2wt,html2html
12304 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12306 <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>
12309 <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>
12313 "border", "frameless" and "class" attributes on an image.
12316 parsoid=wt2html,wt2wt,html2html
12318 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12320 <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>
12323 <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>
12326 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12328 Invalid image attributes (bug 62500)
12331 parsoid=wt2html,wt2wt,html2html
12333 [[File:Foobar.jpg|thumb|float|left|caption]]
12335 [[File:Foobar.jpg|thumb|righ|caption]]
12337 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12339 <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>
12340 <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>
12341 <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>
12344 <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>
12345 <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>
12346 <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>
12352 #REDIRECT [[File:Barfoo.jpg]]
12355 # FIXME: Parsoid should run this test -- but we'd need to teach the
12356 # mockAPI about the redirected Barfoo.jpg image.
12360 [[Image:Barfoo.jpg]]
12362 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12367 Missing image with uploads disabled
12371 [[File:Foobaz.jpg]]
12373 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12376 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="File:Foobaz.jpg"><img resource="./File:Foobaz.jpg" src="./Special:FilePath/Foobaz.jpg" height="220" width="220"/></a></span></p>
12379 # Parsoid-specific testing for images
12380 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12381 # Currently imperfect due to a flaw in the Parsoid testrunner
12383 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12387 Parsoid-specific image handling - simple image with size and middle alignment
12389 [[File:Foobar.jpg|middle|50px]]
12391 <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>
12395 Parsoid-specific image handling - simple image with size, middle alignment,
12396 non-standard namespace alias
12398 parsoid=wt2wt,wt2html,html2html
12400 [[Image:Foobar.jpg|middle|50px]]
12402 <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>
12406 Parsoid-specific image handling - simple image with size and middle alignment
12409 [[File:Foobar.jpg|50px|middle]]
12411 <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>
12415 Parsoid-specific image handling - simple image with size and middle alignment
12416 and non-standard namespace name
12418 parsoid=wt2html,wt2wt,html2html
12420 [[Image:Foobar.jpg|50px|middle]]
12422 <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>
12426 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12428 [[File:Foobar.jpg|500x10px|baseline|caption]]
12430 <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>
12434 Parsoid-specific image handling - simple image with border and size spec
12436 [[File:Foobar.jpg|50px|border|caption]]
12438 <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>
12442 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12444 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12446 <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>
12450 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12453 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12455 <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>
12459 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12461 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12463 <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>
12467 Parsoid-specific image handling - thumbnail with specific size, halign,
12468 valign, and caption (existing content)
12470 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12472 <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>
12476 Parsoid-specific image handling - framed image with specific size and caption
12479 parsoid=wt2html,wt2wt,html2html
12481 [[File:Foobar.jpg|frame|500x50px|caption]]
12483 <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>
12487 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12490 parsoid=wt2html,wt2wt,html2html
12492 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12494 <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>
12498 Parsoid-specific image handling - frameless image with specific size, border, and caption
12500 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12502 <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>
12506 Parsoid-specific image handling - simple image with a formatted caption
12508 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12510 <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>
12514 Parsoid-specific image handling - caption with a template in it
12516 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12518 <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>
12522 Parsoid-specific image handling - caption with unbalanced tags in it
12524 parsoid=wt2html,wt2wt,html2html
12527 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12531 <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>
12536 Parsoid-specific image handling - empty caption (1)
12538 parsoid=wt2html,wt2wt
12540 [[File:Foobar.jpg|thumb|]]
12542 <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>
12545 # empty captions don't get serialized unless we're in the "round trip" case
12547 Parsoid-specific image handling - empty caption (2)
12551 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12552 <a href="File:Foobar.jpg">
12553 <img resource="./File:Foobar.jpg"
12554 src="//example.com/images/3/3a/Foobar.jpg"
12555 height="25" width="220"/>
12557 <figcaption></figcaption>
12560 [[File:Foobar.jpg|thumb]]
12564 Parsoid-specific image handling - whitespace caption
12566 [[File:Foobar.jpg|thumb| ]]
12568 <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>
12572 Parsoid-specific image handling - lang option
12575 [[File:Foobar.svg|lang=de|caption]]
12579 <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>
12588 Subpage test/subpage
12596 subpage title=[[Subpage test]]
12600 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12605 Subpage noslash link
12607 subpage title=[[Subpage test]]
12611 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12616 Subpage test/1/2/subpage
12622 Relative subpage noslash link
12624 parsoid=wt2wt,wt2html,html2html
12625 subpage title=[[Subpage test/1/2/3/4]]
12631 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
12632 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
12635 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
12636 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12640 Parsoid: dot-slash prefixed wikilinks
12650 </p><p>[[././baz/]]
12655 </p><p>[[././baz/]]
12660 Render invalid page names as plain text (bug 51090)
12673 [[{{echo|./../foo}}|bar]]
12674 [[{{echo|foo/.}}|bar]]
12675 [[{{echo|foo/..}}|bar]]
12676 [[{{echo|foo~~~~bar}}]]
12677 [[{{echo|foo>bar}}]]
12678 [[{{echo|foo././bar}}]]
12679 [[{{echo|foo{bar}}]]
12680 [[{{echo|foo}bar}}]]
12681 [[{{echo|foo[bar}}]]
12682 [[{{echo|foo]bar}}]]
12683 [[{{echo|foo<bar}}]]
12685 <p>[[./../foo|bar]]
12695 </p><p>[[./../foo|bar]]
12708 <p>[[./../foo|bar]]
12719 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12720 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12721 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12722 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12723 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12724 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12725 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12726 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12727 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12728 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12729 [[<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>
12737 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12742 BUG 561: {{/Subpage}}
12744 subpage title=[[Page]]
12748 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12756 Category:MediaWiki User's Guide
12764 [[:Category:MediaWiki User's Guide]]
12766 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12775 [[Category:MediaWiki User's Guide]]
12777 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12781 PAGESINCATEGORY invalid title fatal (r33546 fix)
12783 {{PAGESINCATEGORY:<bogus>}}
12790 Category with different sort key
12794 [[Category:MediaWiki User's Guide|Foo]]
12796 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12800 Category with identical sort key
12804 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12806 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12810 Category with empty sort key
12815 [[Category:MediaWiki User's Guide|]]
12817 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12821 Category with empty sort key and parentheses
12826 [[Category:Foo (bar)|]]
12828 [[Category:Foo (bar)|Foo]]
12832 Category with link tail
12837 123[[Category:Foo]]456
12839 123[[Category:Foo]]456
12843 Category with template
12848 [[Category:{{echo|Foo}}]]
12850 [[Category:{{echo|Foo}}]]
12854 Category with template in sort key
12859 [[Category:Foo|{{echo|Bar}}]]
12861 [[Category:Foo|{{echo|Bar}}]]
12865 Category with template in sort key and title
12870 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12872 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12876 Category / paragraph interactions
12878 Foo [[Category:Baz]] Bar
12880 Foo [[Category:Baz]]
12888 [[Category:Baz]] Bar
12901 {{echo|[[Category:Baz]]}}
12916 Parsoid: Serialize link to category page with colon escape
12922 [[:Category:Foo|Bar]]
12925 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
12926 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
12931 Parsoid: Link prefix/suffixes aren't applied to category links
12933 parsoid=wt2html,wt2wt,html2html
12938 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
12942 Parsoid: Serialize link to file page with colon escape
12948 [[:File:Foo.png|Bar]]
12951 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
12952 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
12957 Parsoid: Serialize a genuine category link without colon escape
12962 [[Category:Foo|Bar]]
12964 <link rel="mw:PageProp/Category" href="Category:Foo">
12965 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
12969 Normalize hrefs properly before testing for invalid link targets (bug 70894)
12973 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
12975 [[Category:Toxine bactérienne]]
12979 Parsoid: Defaultsort
12983 {{DEFAULTSORT:Foo}}
12985 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
12989 ### Inter-language links
12992 Interlanguage links
13000 es:Alimento fr:Nourriture zh:食品
13002 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
13003 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
13004 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
13008 Duplicate interlanguage links (bug 24502)
13019 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
13020 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
13021 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
13022 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
13029 Basic section headings
13036 ===Smaller headline===
13039 <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>
13042 <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>
13045 <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>
13051 Section headings with TOC
13054 === Subheadline 1 ===
13055 ===== Skipping a level =====
13056 ====== Skipping a level ======
13060 ===Another headline===
13062 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13064 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
13066 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
13068 <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>
13070 <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>
13077 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
13079 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
13085 <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>
13086 <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>
13087 <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>
13088 <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>
13089 <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>
13092 <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>
13096 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
13098 Handling of sections up to level 6 and beyond
13101 == Level 2 Heading==
13102 === Level 3 Heading===
13103 ==== Level 4 Heading====
13104 ===== Level 5 Heading=====
13105 ====== Level 6 Heading======
13106 ======= Level 7 Heading=======
13107 ======== Level 8 Heading========
13108 ========= Level 9 Heading=========
13109 ========== Level 10 Heading==========
13111 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13113 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
13115 <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>
13117 <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>
13119 <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>
13121 <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>
13123 <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>
13124 <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>
13125 <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>
13126 <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>
13127 <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>
13141 <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>
13142 <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>
13143 <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>
13144 <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>
13145 <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>
13146 <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>
13147 <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>
13148 <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>
13149 <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>
13150 <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>
13155 TOC regression (bug 9764)
13159 ==== title 1.1.1 ====
13164 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13166 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13168 <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>
13170 <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>
13173 <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>
13176 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13178 <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>
13184 <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>
13185 <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>
13186 <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>
13187 <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>
13188 <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>
13189 <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>
13194 TOC with wgMaxTocLevel=3 (bug 6204)
13200 ==== title 1.1.1 ====
13205 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13207 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13209 <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>
13210 <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>
13213 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13215 <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>
13221 <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>
13222 <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>
13223 <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>
13224 <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>
13225 <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>
13226 <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>
13231 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13237 ====Section 1.1.1====
13238 ====Section 1.1.1.1====
13241 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13243 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13245 <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>
13248 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13252 <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>
13253 <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>
13254 <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>
13255 <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>
13256 <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>
13262 Resolving duplicate section names
13267 <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>
13268 <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>
13273 Resolving duplicate section names with differing case (bug 10721)
13278 <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>
13279 <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>
13291 Template with sections, __NOTOC__
13298 <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>
13299 <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>
13300 <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>
13301 <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>
13306 __NOEDITSECTION__ keyword
13312 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13313 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13318 Link inside a section heading
13320 ==Section with a [[Main Page|link]] in it==
13322 <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>
13327 TOC regression (bug 12077)
13334 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13336 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13338 <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>
13341 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13345 <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>
13346 <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>
13347 <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>
13352 BUG 1219 URL next to image (good)
13354 http://example.com [[Image:foobar.jpg]]
13356 <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>
13361 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13364 The line above must have a trailing space!
13367 But just in case it doesn't...
13369 <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>
13370 <p>The line above must have a trailing space!
13372 <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>
13373 <p>But just in case it doesn't...
13378 Header with special characters (bug 25462)
13380 The tooltips shall not show entities to the user (ie. be double escaped)
13397 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13399 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13401 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13402 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13403 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13404 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13405 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13409 <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>
13412 <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>
13415 <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>
13418 <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>
13421 <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>
13427 Header with space, plus and underscore as entity
13429 Id should not contain + for spaces
13431 == Space between Text ==
13434 == Space-Entity between Text ==
13437 == Plus+between+Text ==
13440 == Plus-Entity+between+Text ==
13443 == Underscore_between_Text ==
13446 == Underscore-Entity_between_Text ==
13449 [[#Space between Text]]
13450 [[#Space-Entity between Text]]
13451 [[#Plus+between+Text]]
13452 [[#Plus-Entity+between+Text]]
13453 [[#Underscore_between_Text]]
13454 [[#Underscore-Entity_between_Text]]
13456 <p>Id should not contain + for spaces
13458 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13460 <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>
13461 <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>
13462 <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>
13463 <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>
13464 <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>
13465 <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>
13469 <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>
13472 <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>
13475 <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>
13478 <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>
13481 <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>
13484 <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>
13486 </p><p><a href="#Space_between_Text">#Space between Text</a>
13487 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13488 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13489 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13490 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13491 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13496 Headers with excess '=' characters
13497 (Are similar tests necessary beyond the 1st level?)
13501 =''italic'' heading==
13502 ==''italic'' heading=
13504 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13506 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13507 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13508 <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>
13509 <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>
13513 <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>
13514 <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>
13515 <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>
13516 <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>
13521 HTML headers vs TOC (bug 23393)
13522 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13534 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13536 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13538 <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>
13539 <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>
13542 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13544 <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>
13545 <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>
13551 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13552 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13553 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13554 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13555 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13556 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13561 Single-line or multiline-comments can follow headings
13563 parsoid=wt2html,wt2wt
13571 <h2><span class="mw-headline" id="foo">foo</span></h2>
13572 <h2><span class="mw-headline" id="bar">bar</span></h2>
13573 <h2><span class="mw-headline" id="baz">baz</span></h2>
13578 BUG 1219 URL next to image (broken)
13580 http://example.com[[Image:foobar.jpg]]
13582 <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>
13587 Bug 1186 news: in the middle of text
13589 http://en.wikinews.org/wiki/Wikinews:Workplace
13591 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13597 Namespaced link must have a title
13606 Namespaced link must have a title (bad fragment version)
13608 [[Project:#fragment]]
13610 <p>[[Project:#fragment]]
13616 ### HTML tags and HTML attributes
13620 div with no attributes
13622 <div>HTML rocks</div>
13624 <div>HTML rocks</div>
13629 div with double-quoted attribute
13631 <div id="rock">HTML rocks</div>
13633 <div id="rock">HTML rocks</div>
13638 div with single-quoted attribute
13640 <div id='rock'>HTML rocks</div>
13642 <div id="rock">HTML rocks</div>
13647 div with unquoted attribute
13649 <div id=rock>HTML rocks</div>
13651 <div id="rock">HTML rocks</div>
13656 div with illegal double attributes
13658 <div id="a" id="b">HTML rocks</div>
13660 <div id="b">HTML rocks</div>
13664 # FIXME: produce empty string instead of "class" in the PHP parser, following
13667 div with empty attribute value, space before equals
13671 <div class =>HTML rocks</div>
13673 <div class="">HTML rocks</div>
13678 div with multiple empty attribute values
13682 <div id= title=>HTML rocks</div>
13684 <div id="" title="">HTML rocks</div>
13689 table with multiple empty attribute values
13697 <table title="" id="">
13698 <tbody><tr><td> hi</td></tr>
13703 div with braces in attribute value
13705 <div title="{}">Foo</div>
13707 <div title="{}">Foo</div>
13710 <div title="{}">Foo</div>
13713 # This it very inconsistent in the PHP parser: it returns
13714 # class="class" if there is a space between the name and the equal sign (see
13715 # 'div with empty attribute value, space before equals'), but strips the
13716 # attribute completely if the space is missing. We hope that not much content
13717 # depends on this, so are implementing the behavior below in Parsoid for
13718 # consistencies' sake.
13719 # FIXME: fix this behavior in the PHP parser?
13721 div with empty attribute value, no space before equals
13723 parsoid=wt2html,html2html
13725 <div class=>HTML rocks</div>
13727 <div>HTML rocks</div>
13730 <div class="">HTML rocks</div>
13734 HTML multiple attributes correction
13736 <p class="error" class="awesome">Awesome!</p>
13738 <p class="awesome">Awesome!</p>
13743 Table multiple attributes correction
13746 !+ class="error" class="awesome"| status
13751 <th class="awesome"> status
13759 <DIV ID="x">HTML ROCKS</DIV>
13761 <div id="x">HTML ROCKS</div>
13766 Non-ASCII pseudo-tags are rendered as text
13775 Pseudo-tag with URL 'name' renders as url link
13777 <http://example.com/>
13779 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13784 text with amp in the middle of nowhere
13788 <p>Remember AT&T?
13793 text with character entity: eacute
13795 I always thought é was a cute letter.
13797 <p>I always thought é was a cute letter.
13800 <p>I always thought é was a cute letter.</p>
13804 text with entity-escaped character entity-like string: eacute
13806 I always thought &eacute; was a cute letter.
13808 <p>I always thought &eacute; was a cute letter.
13813 text with undefined character entity: xacute
13815 I always thought &xacute; was a cute letter.
13817 <p>I always thought &xacute; was a cute letter.
13821 # TODO: generalize to PHP parser?
13827 <data value="5">five</data>
13828 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13829 <mark>This highlighted text</mark>
13831 <p><data value="5">five</data>
13832 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13833 <mark>This highlighted text</mark></p>
13837 HTML tag with leading space is parsed as text
13841 <p>< div>foo< /div>
13846 ### Nesting tests (see bug 41545, 50604, 51081)
13849 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13850 # Note that html2wt is considerably more difficult if we use <b> in
13851 # the test case, instead of <big>
13853 Ensure that HTML adoption agency algorithm is properly implemented.
13855 <big>X<big>Y</big>Z</big>
13857 <p><big>X<big>Y</big>Z</big>
13861 # This was bug 41545 in the PHP parser.
13862 # Note that tidy doesn't handle this correctly.
13866 <kbd>X<kbd>Y</kbd>Z</kbd>
13868 <p><kbd>X<kbd>Y</kbd>Z</kbd>
13872 # The following cases were bug 51081 in the PHP parser.
13873 # Note that there are some other nestable tags (b, i, etc) which are
13874 # not covered; see bug 51081 for discussion.
13876 # Note that tidy doesn't handle this correctly.
13880 <em>X<em>Y</em>Z</em>
13882 <p><em>X<em>Y</em>Z</em>
13886 # Note that tidy doesn't handle this correctly.
13888 Nesting of <strong>
13890 <strong>X<strong>Y</strong>Z</strong>
13892 <p><strong>X<strong>Y</strong>Z</strong>
13901 <p><q>X<q>Y</q>Z</q></p>
13904 # Note that tidy doesn't handle this correctly.
13908 <ruby>X<ruby>Y</ruby>Z</ruby>
13910 <p><ruby>X<ruby>Y</ruby>Z</ruby>
13914 # Note that tidy doesn't handle this correctly.
13918 <bdo>X<bdo>Y</bdo>Z</bdo>
13920 <p><bdo>X<bdo>Y</bdo>Z</bdo>
13932 [[Media:Foobar.jpg]]
13934 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
13939 Media link with text
13941 [[Media:Foobar.jpg|A neat file to look at]]
13943 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
13947 # FIXME: this is still bad HTML tag nesting
13949 Media link with nasty text
13950 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
13952 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
13954 <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>
13957 <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>
13961 Media link to nonexistent file (bug 1702)
13963 [[Media:No such.jpg]]
13965 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
13970 Image link to nonexistent file (bug 1850 - good)
13972 [[File:No_such.jpg]]
13974 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
13977 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="File:No_such.jpg"><img resource="./File:No_such.jpg" src="./Special:FilePath/No_such.jpg" height="220" width="220"/></a></span></p>
13981 :Image link to nonexistent file (bug 1850 - bad)
13983 [[:Image:No such.jpg]]
13985 <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>
13988 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
13994 Character reference normalization in link text (bug 1938)
13996 [[Main Page|this&that]]
13998 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
14005 Test for unicode normalization
14007 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
14011 (bug 19451) Links should refer to the normalized form.
14019 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14020 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14021 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14022 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14023 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14028 Empty attribute crash test (bug 2067)
14030 <font color="">foo</font>
14032 <p><font color="">foo</font>
14037 Empty attribute crash test single-quotes (bug 2067)
14039 <font color=''>foo</font>
14041 <p><font color="">foo</font>
14046 Attribute test: equals, then nothing
14048 <font color=>foo</font>
14050 <p><font>foo</font>
14055 Attribute test: unquoted value
14057 <font color=x>foo</font>
14059 <p><font color="x">foo</font>
14064 Attribute test: unquoted but illegal value (hash)
14066 <font color=#x>foo</font>
14068 <p><font color="#x">foo</font>
14073 Attribute test: no value
14075 <font color>foo</font>
14077 <p><font color="color">foo</font>
14082 Bug 2095: link with three closing brackets
14086 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
14089 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
14093 Bug 2095: link with pipe and three closing brackets
14095 [[Main Page|link]]]
14097 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
14100 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
14104 Bug 2095: link with pipe and three closing brackets, version 2
14106 [[Main Page|[http://example.com/]]]
14108 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
14111 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
14120 Template:Dangerous attribute
14122 " onmouseover="alert(document.cookie)
14126 Template:Dangerous style attribute
14128 border-size: expression(alert(document.cookie))
14134 <div style="float: right; {{{1}}}">Magic div</div>
14138 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
14140 <div title="{{test}}"></div>
14142 <div title="This is a test template"></div>
14146 # Parsoid has enough context to handle this case
14148 Bug 2304: HTML attribute safety (dangerous template; 2309)
14150 <div title="{{dangerous attribute}}"></div>
14152 <div title=""></div>
14155 <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>
14159 Bug 2304: HTML attribute safety (dangerous style template; 2309)
14161 <div style="{{dangerous style attribute}}"></div>
14163 <div style="/* insecure input */"></div>
14168 Bug 2304: HTML attribute safety (safe parameter; 2309)
14170 {{div style|width: 200px}}
14172 <div style="float: right; width: 200px">Magic div</div>
14177 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
14179 {{div style|width: expression(alert(document.cookie))}}
14181 <div style="/* insecure input */">Magic div</div>
14186 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14188 {{div style|"><script>alert(document.cookie)</script>}}
14190 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14195 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14197 {{div style|" ><script>alert(document.cookie)</script>}}
14199 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14204 Bug 2304: HTML attribute safety (link)
14206 <div title="[[Main Page]]"></div>
14208 <div title="[[Main Page]]"></div>
14213 Bug 2304: HTML attribute safety (italics)
14215 <div title="''foobar''"></div>
14217 <div title="''foobar''"></div>
14222 Bug 2304: HTML attribute safety (bold)
14224 <div title="'''foobar'''"></div>
14226 <div title="'''foobar'''"></div>
14232 Bug 2304: HTML attribute safety (ISBN)
14234 <div title="ISBN 1234567890"></div>
14236 <div title="ISBN 1234567890"></div>
14241 Bug 2304: HTML attribute safety (RFC)
14243 <div title="RFC 1234"></div>
14245 <div title="RFC 1234"></div>
14250 Bug 2304: HTML attribute safety (PMID)
14252 <div title="PMID 1234567890"></div>
14254 <div title="PMID 1234567890"></div>
14259 Bug 2304: HTML attribute safety (web link)
14261 <div title="http://example.com/"></div>
14263 <div title="http://example.com/"></div>
14268 Bug 2304: HTML attribute safety (named web link)
14270 <div title="[http://example.com/ link]"></div>
14272 <div title="[http://example.com/ link]"></div>
14277 Bug 3244: HTML attribute safety (extension; safe)
14279 <div style="<nowiki>background:blue</nowiki>"></div>
14281 <div style="background:blue"></div>
14286 Bug 3244: HTML attribute safety (extension; unsafe)
14288 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14290 <div style="/* insecure input */"></div>
14294 # More MSIE fun discovered by Tom Gilder
14297 MSIE CSS safety test: spurious slash
14299 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14301 <div style="/* insecure input */">evil</div>
14306 MSIE CSS safety test: hex code
14308 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14310 <div style="/* insecure input */">evil</div>
14315 MSIE CSS safety test: comment in url
14317 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14319 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14324 MSIE CSS safety test: comment in expression
14326 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14328 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14333 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14335 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14337 <p style="/* invalid control char */">A</p>
14342 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14344 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14345 <div style="top:EXPRESSION(alert())">B</div>
14347 <p style="/* insecure input */">A</p>
14348 <div style="/* insecure input */">B</div>
14353 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14355 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14356 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14358 <div style="/* insecure input */">A</div>
14359 <p style="/* insecure input */">B</p>
14364 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14366 <div style="background-image:url⁽javascript:alert())">A</div>
14367 <div style="background-image:url₍javascript:alert())">B</div>
14368 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14370 <div style="/* insecure input */">A</div>
14371 <div style="/* insecure input */">B</div>
14372 <p style="/* insecure input */">C</p>
14380 title="data:text/html,<img src=1 onerror=alert(1)>"
14381 style="-o-link:attr(title);-o-link-source:current">X</div>
14383 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14388 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14390 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14391 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14392 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14393 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14394 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14395 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14396 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14398 <p style="/* insecure input */">A</p>
14399 <p style="/* insecure input */">B</p>
14400 <p style="/* insecure input */">C</p>
14401 <p style="/* insecure input */">D</p>
14402 <p style="/* insecure input */">E</p>
14403 <p style="/* insecure input */">F</p>
14404 <p style="/* insecure input */">G</p>
14409 Table attribute legitimate extension
14412 !+ style="<nowiki>color:blue</nowiki>"| status
14417 <th style="color:blue"> status
14423 Table attribute safety
14426 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14431 <th style="/* insecure input */"> status
14437 CSS line continuation 1
14439 <div style="background-image: u\ rl(test.jpg);"></div>
14441 <div style="/* insecure input */"></div>
14446 CSS line continuation 2
14448 <div style="background-image: u\ rl(test.jpg); "></div>
14450 <div style="/* insecure input */"></div>
14461 Expansion of multi-line templates in attribute values (bug 6255)
14463 <div style="background: {{identity|#00FF00}}">-</div>
14465 <div style="background: #00FF00">-</div>
14471 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14473 <div style="background:
14476 <div style="background: #00FF00">-</div>
14479 <div style="background:
14484 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14486 <div style="background: #00FF00">-</div>
14488 <div style="background: #00FF00">-</div>
14493 evil <math>-wiki-tags without Extension:Math enabled
14495 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14497 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14501 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14504 Parser hook: empty input
14517 Parser hook: empty input using terminated empty elements
14530 Parser hook: empty input using terminated empty elements (space before)
14543 Parser hook: basic input
14557 Parser hook: case insensitive
14571 Parser hook: case insensitive, redux
14584 Parser hook: nested tags
14588 <tag><tag></tag></tag>
14599 Parser hook: basic arguments
14601 <tag width=200 height = "100" depth = '50' square></tag>
14609 'square' => 'square',
14616 Parser hook: argument containing a forward slash (bug 5344)
14618 <tag filename='/tmp/bla'></tag>
14623 'filename' => '/tmp/bla',
14630 Parser hook: empty input using terminated empty elements (bug 2374)
14643 # </tag> should be output literally since there is no matching tag that begins it
14645 Parser hook: basic arguments using terminated empty elements (bug 2374)
14647 <tag width=200 height = "100" depth = '50' square/>
14657 'square' => 'square',
14666 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14670 Parser hook: static parser hook not inside a comment
14672 <statictag>hello, world</statictag>
14673 <statictag action=flush/>
14681 Parser hook: static parser hook inside a comment
14683 <!-- <statictag>hello, world</statictag> -->
14684 <statictag action=flush/>
14690 # Nested template calls; this case was broken by Parser.php rev 1.506,
14694 Template:One-parameter
14696 (My parameter is: {{{1}}})
14700 Template:Map-one-parameter
14702 {{{{{1}}}|{{{2}}}}}
14706 Nested template calls
14708 {{Map-one-parameter|One-parameter|param}}
14710 <p>(My parameter is: param)
14719 # HTML+Tidy effectively strips out the empty tags completely
14720 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14721 # which Tidy would have done for the PHP parser had there been content inside it.
14723 Sanitizer: Closing of open tags
14725 <s></s><table></table>
14727 <s></s><table></table>
14730 <p><s></s></p><table></table>
14734 Sanitizer: Closing of open but not closed tags
14743 Sanitizer: Closing of closed but not open tags
14752 Sanitizer: Closing of closed but not open table tags
14754 Table not started</td></tr></table>
14756 <p>Table not started</td></tr></table>
14761 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14763 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14765 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14769 # In HTML5, the restrictions are that id must contain at least one character,
14770 # and must not contain any space characters.
14772 Sanitizer: Validating the contents of the id attribute (bug 4515)
14776 <br id="" /><br id="a space" />
14781 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
14783 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14787 <br id="foo" /><br id="foo" />
14789 Something need to be done. foo-2 ?
14793 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14796 <meta itemprop="hello" content="world">
14797 <meta http-equiv="refresh" content="5">
14798 <meta itemprop="hello" http-equiv="refresh" content="5">
14799 <link itemprop="hello" href="{{SERVER}}">
14800 <link rel="stylesheet" href="{{SERVER}}">
14801 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14804 <div itemscope="itemscope">
14805 <p> <meta itemprop="hello" content="world" />
14806 <meta http-equiv="refresh" content="5">
14807 <meta itemprop="hello" content="5" />
14809 <link itemprop="hello" href="http://example.org" />
14810 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14811 <link itemprop="hello" href="http://example.org" />
14817 Language converter: output gets cut off unexpectedly (bug 5757)
14821 this bit is safe: }-
14823 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14825 then we get cut off here: }-
14827 all additional text is vanished
14829 <p>this bit is safe: }-
14830 </p><p>but if we add a conversion instance: xxx
14831 </p><p>then we get cut off here: }-
14832 </p><p>all additional text is vanished
14837 Self closed html pairs (bug 5487)
14840 <center><font id="bug" />Centered text</center>
14841 <div><font id="bug2" />In div text</div>
14843 <center><font id="bug" />Centered text</center>
14844 <div><font id="bug2" />In div text</div>
14853 Punctuation: nbsp before exclamation
14857 <p>C'est grave !
14862 Punctuation: CSS !important (bug 11874)
14864 <div style="width:50% !important">important</div>
14866 <div style="width:50% !important">important</div>
14871 Punctuation: CSS ! important (bug 11874; with space after)
14873 <div style="width:50% ! important">important</div>
14875 <div style="width:50% ! important">important</div>
14881 HTML bullet list, closed tags (bug 5497)
14894 <ul data-parsoid='{"stx":"html"}'>
14895 <li data-parsoid='{"stx":"html"}'>One</li>
14896 <li data-parsoid='{"stx":"html"}'>Two</li>
14902 HTML bullet list, unclosed tags (bug 5497)
14914 <ul data-parsoid='{"stx":"html"}'>
14915 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14916 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14922 HTML ordered list, closed tags (bug 5497)
14935 <ol data-parsoid='{"stx":"html"}'>
14936 <li data-parsoid='{"stx":"html"}'>One</li>
14937 <li data-parsoid='{"stx":"html"}'>Two</li>
14943 HTML ordered list, unclosed tags (bug 5497)
14956 <ol data-parsoid='{"stx":"html"}'>
14957 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14958 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14964 HTML nested bullet list, closed tags (bug 5497)
14989 HTML nested bullet list, open tags (bug 5497)
15026 HTML nested ordered list, closed tags (bug 5497)
15051 HTML nested ordered list, open tags (bug 5497)
15088 HTML ordered list item with parameters oddity
15090 <ol><li id="fragment">One</li>
15093 <ol><li id="fragment">One</li>
15098 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
15100 bug 5918: autonumbering
15102 [http://first/] [http://second] [ftp://ftp]
15106 [mailto:enclosed@mail.tld With target]
15108 [mailto:enclosed@mail.tld]
15110 mailto:inline@mail.tld
15112 <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>
15113 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
15114 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
15115 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
15116 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
15119 <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>
15120 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
15121 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
15122 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
15123 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
15128 # Security and HTML correctness
15129 # From Nick Jenkins' fuzz testing
15133 Fuzz testing: Parser13
15148 Fuzz testing: Parser14
15153 <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>
15154 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15156 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15162 <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>
15164 <div id="toc" class="toc">
15165 <div id="toctitle">
15169 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15175 Fuzz testing: Parser14-table
15180 <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>
15181 <table style="__TOC__">
15186 <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>
15187 <table style="__TOC__">
15194 # Known to produce bogus xml (extra </td>)
15196 Fuzz testing: Parser16
15225 Fuzz testing: Parser21
15228 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15233 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15243 Fuzz testing: Parser22
15245 http://===r:::https://b
15249 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15257 # Known to produce bad XML for now
15259 Fuzz testing: Parser24
15266 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15267 <br style="onmouseover='alert(document.cookie);' " />
15269 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15274 <u class="|">}}}} >
15275 <br style="onmouseover='alert(document.cookie);'" />
15277 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15286 # Note: the current result listed for this is not what the original one was,
15287 # but the original bug was JavaScript injection, which is fixed in any case.
15288 # It's not clear that the original result listed was any more correct than the
15289 # current one. Original result:
15292 # <li class="||">
15293 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15295 Fuzz testing: Parser25 (bug 6055)
15301 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15303 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15308 Fuzz testing: URL adjacent extension (with space, clean)
15310 http://example.com <nowiki>junk</nowiki>
15312 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15317 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15319 http://example.com<nowiki>junk</nowiki>
15321 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15326 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15328 http://example.com<pre>junk</pre>
15330 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15333 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15340 Fuzz testing: image with bogus manual thumbnail
15342 [[Image:foobar.jpg|thumbnail= ]]
15344 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15347 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,2,2]}' data-mw='{"errors":[{"key":"missing-thumbnail","message":"This thumbnail does not exist.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{},"dsr":[2,30,null,null]}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
15351 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15353 <pre dir=" "></pre>
15355 <pre dir=" "></pre>
15360 Parsing optional HTML elements (Bug 6171)
15365 <td> Some tabular data</td>
15366 <td> More tabular data ...
15367 <td> And yet som tabular data</td>
15373 <td> Some tabular data</td>
15374 <td> More tabular data ...
15375 </td><td> And yet som tabular data</td>
15382 Correct handling of <td>, <tr> (Bug 6171)
15387 <td> Some tabular data</td>
15388 <td> More tabular data ...</td>
15389 <td> And yet som tabular data</td>
15395 <td> Some tabular data</td>
15396 <td> More tabular data ...</td>
15397 <td> And yet som tabular data</td>
15405 Parsing crashing regression (fr:JavaScript)
15409 <p></body></x>
15414 Inline wiki vs wiki block nesting
15420 <p><b>Bold paragraph</b>
15421 </p><p>New wiki paragraph
15425 # FIXME: The current php output is documented
15426 # and desired output is the parsoid target.
15428 Inline HTML vs wiki block nesting
15434 <p><b>Bold paragraph
15435 </p><p>New wiki paragraph</b>
15438 <p><b>Bold paragraph</b>
15439 </p><p>New wiki paragraph
15443 # Original result was this:
15444 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15446 # While that might be marginally more intuitive, maybe, the six-apostrophe
15447 # construct is clearly pathological and the result stated here (which is what
15448 # the parser actually does) is about as reasonable as anything.
15450 Mixing markup for italics and bold
15453 '''bold''''''bold''bolditalics'''''
15455 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15463 Article for special page transclusion test
15467 Special page transclusion
15470 {{Special:Prefixindex/Xyzzyx}}
15472 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15477 Special page transclusion twice (bug 5021)
15480 {{Special:Prefixindex/Xyzzyx}}
15481 {{Special:Prefixindex/Xyzzyx}}
15483 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15484 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15489 Transclusion of default MediaWiki message
15491 {{MediaWiki:Mainpage}}
15498 Transclusion of nonexistent MediaWiki message
15500 {{MediaWiki:Mainpagexxx}}
15502 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15507 Transclusion of MediaWiki message with underscore
15509 {{MediaWiki:history_short}}
15516 Transclusion of MediaWiki message with space
15518 {{MediaWiki:history short}}
15525 Invalid header with following text
15535 Section extraction test (section 0)
15555 Section extraction test (section 1)
15577 Section extraction test (section 2)
15598 Section extraction test (section 3)
15618 Section extraction test (section 4)
15642 Section extraction test (section 5)
15662 Section extraction test (section 6)
15683 Section extraction test (section 7)
15703 Section extraction test (section 8)
15723 Section extraction test (section 9)
15744 Section extraction test (section 10)
15764 Section extraction test (nonexistent section 11)
15783 Section extraction test with bogus heading (section 1)
15788 ==bogus== not a legal section
15792 ==bogus== not a legal section
15796 Section extraction test with bogus heading (section 2)
15801 ==bogus== not a legal section
15808 Section extraction test with comment after heading (section 1)
15820 Section extraction test with comment after heading (section 2)
15832 Section extraction test with bogus <nowiki> heading (section 1)
15837 ==bogus== <nowiki>not a legal section</nowiki>
15841 ==bogus== <nowiki>not a legal section</nowiki>
15845 Section extraction test with bogus <nowiki> heading (section 2)
15850 ==bogus== <nowiki>not a legal section</nowiki>
15857 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
15858 # instead of respecting commented sections
15860 Section extraction prefixed by comment (section 1)
15871 Section extraction prefixed by comment (section 2)
15882 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
15883 # instead of respecting HTML-style headings
15885 Section extraction, mixed wiki and html (section 1)
15901 Section extraction, mixed wiki and html (section 2)
15917 # Formerly testing for bug 3342
15919 Section extraction, heading surrounded by <noinclude>
15923 <noinclude>==unmarked==</noinclude>
15929 # Test behavior of bug 19910
15931 Sectiion with all-equals
15936 The line above must have a trailing space
15939 But just in case it doesn't...
15943 But just in case it doesn't...
15947 Section replacement test (section 0)
15978 Section replacement test (section 1)
16007 Section replacement test (section 2)
16037 Section replacement test (section 3)
16068 Section replacement test (section 4)
16095 Section replacement test (section 5)
16126 Section replacement test (section 6)
16156 Section replacement test (section 7)
16187 Section replacement test (section 8)
16218 Section replacement test (section 9)
16247 Section replacement test (section 10)
16277 Section replacement test with initial whitespace (bug 13728)
16281 Preformatted initial line
16285 Preformatted initial line
16292 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16304 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16317 Section extraction, <pre> around bogus header (bug 10309)
16334 Section replacement, <pre> around bogus header (bug 10309)
16336 noxml replace=2,"xxx"
16357 Handling of 
 in URLs
16361 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16364 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16366 a</a></li></ul></li></ul>
16370 Handling of %0A in URLs
16374 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16377 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16381 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16383 5 quotes, code coverage +1 line
16390 <p><b><i></i></b></p>
16393 # same html as previous, but wikitext adjusted to match parsoid html2wt
16394 # note that wt2html and html2html will put the <i> before the <b>
16396 5 quotes, code coverage +1 line w/ nowiki (1)
16398 parsoid=wt2wt,html2wt
16400 '''''<nowiki/>'''''
16405 <p><b><i></i></b></p>
16408 # same as previous, just swapping the <i> and <b>
16410 5 quotes, code coverage +1 line w/ nowiki (2)
16412 '''''<nowiki/>'''''
16417 <p><i><b></b></i></p>
16421 Special:Search page linking.
16425 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16430 {{!}} is a magic word
16432 {{!}} is a magic word there and {{!}} is still a magic word here
16434 <p>| is a magic word there and | is still a magic word here
16437 <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>
16443 title=[[Parser test]]
16448 * {{FULLPAGENAMEE}}
16450 * {{BASEPAGENAMEE}}
16454 * {{ROOTPAGENAMEE}}
16456 * {{TALKPAGENAMEE}}
16457 * {{SUBJECTPAGENAME}}
16458 * {{SUBJECTPAGENAMEE}}
16461 * {{NAMESPACENUMBER}}
16465 * {{SUBJECTSPACEE}}
16466 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16468 <ul><li> Parser test</li>
16469 <li> Parser_test</li>
16470 <li> Parser test</li>
16471 <li> Parser_test</li>
16472 <li> Parser test</li>
16473 <li> Parser_test</li>
16474 <li> Parser test</li>
16475 <li> Parser_test</li>
16476 <li> Parser test</li>
16477 <li> Parser_test</li>
16478 <li> Talk:Parser test</li>
16479 <li> Talk:Parser_test</li>
16480 <li> Parser test</li>
16481 <li> Parser_test</li>
16489 <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>
16492 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16502 image4 |300px| centre
16503 image5.svg| http://///////
16508 <ul class="gallery mw-gallery-traditional">
16509 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16510 <div class="thumb" style="height: 150px;">Image1.png</div>
16511 <div class="gallerytext">
16514 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16515 <div class="thumb" style="height: 150px;">Image2.gif</div>
16516 <div class="gallerytext">
16521 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16522 <div class="thumb" style="height: 150px;">Image3</div>
16523 <div class="gallerytext">
16526 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16527 <div class="thumb" style="height: 150px;">Image4</div>
16528 <div class="gallerytext">
16533 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16534 <div class="thumb" style="height: 150px;">Image5.svg</div>
16535 <div class="gallerytext">
16536 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16540 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16541 <div class="thumb" style="height: 150px;">* image6</div>
16542 <div class="gallerytext">
16550 Gallery (with options)
16552 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16553 File:Nonexistent.jpg|caption
16554 File:Nonexistent.jpg
16555 image:foobar.jpg|some '''caption''' [[Main Page]]
16557 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16560 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16561 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16562 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16563 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16564 <div class="gallerytext">
16569 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16570 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16571 <div class="gallerytext">
16574 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16575 <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>
16576 <div class="gallerytext">
16577 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16581 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16582 <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>
16583 <div class="gallerytext">
16586 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16587 <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>
16588 <div class="gallerytext">
16598 Gallery with link that has fragment
16601 image:foobar.jpg|link=Main_Page
16602 image:foobar.jpg|link=Main_Page#section
16603 image:foobar.jpg|link=Main Page#section|caption
16606 <ul class="gallery mw-gallery-traditional">
16607 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16608 <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>
16609 <div class="gallerytext">
16612 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16613 <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>
16614 <div class="gallerytext">
16617 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16618 <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>
16619 <div class="gallerytext">
16629 Gallery with wikitext inside caption
16632 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16633 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16636 <ul class="gallery mw-gallery-traditional">
16637 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16638 <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>
16639 <div class="gallerytext">
16640 <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>
16644 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16645 <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>
16646 <div class="gallerytext">
16647 <p>This is a test template
16656 gallery (with showfilename option)
16658 <gallery showfilename>
16659 File:Nonexistent.jpg|caption
16660 File:Nonexistent.jpg
16661 image:foobar.jpg|some '''caption''' [[Main Page]]
16665 <ul class="gallery mw-gallery-traditional">
16666 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16667 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16668 <div class="gallerytext">
16669 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16674 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16675 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16676 <div class="gallerytext">
16677 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16681 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16682 <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>
16683 <div class="gallerytext">
16684 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16685 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16689 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16690 <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>
16691 <div class="gallerytext">
16692 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16701 Gallery (with namespace-less filenames)
16704 File:Nonexistent.jpg
16710 <ul class="gallery mw-gallery-traditional">
16711 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16712 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16713 <div class="gallerytext">
16716 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16717 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16718 <div class="gallerytext">
16721 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16722 <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>
16723 <div class="gallerytext">
16726 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16727 <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>
16728 <div class="gallerytext">
16736 HTML Hex character encoding (spells the word "JavaScript")
16738 parsoid=wt2html,wt2wt,html2html
16740 JavaScript
16742 <p>JavaScript
16747 <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>
16751 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16755 <p>&#xsee;&#XSEE;
16758 <p>&#xsee;&#XSEE;</p>
16762 HTML Hex character encoding mixed case
16764 parsoid=wt2html,wt2wt,html2html
16773 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16777 __FORCETOC__ override
16789 ISBN 978-0-1234-56 789
16791 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16794 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16798 ISBN followed by 5 spaces
16809 ISBN ISBN 1234567890
16811 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16820 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16825 ISBN with empty prefix (parsoid test)
16829 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
16833 Bug 22905: <abbr> followed by ISBN followed by </a>
16835 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
16837 <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>
16846 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
16851 Double RFC with a wiki link
16855 <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>
16864 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
16867 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
16871 Centre-aligned image
16873 [[Image:foobar.jpg|centre]]
16875 <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>
16882 [[Image:foobar.jpg|none]]
16884 <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>
16889 Width + Height sized image (using px) (height is ignored)
16891 [[Image:foobar.jpg|640x480px]]
16893 <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>
16898 Width-sized image (using px, no following whitespace)
16900 [[Image:foobar.jpg|640px]]
16902 <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>
16907 Width-sized image (using px, with following whitespace - test regression from r39467)
16909 [[Image:foobar.jpg|640px ]]
16911 <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>
16916 Width-sized image (using px, with preceding whitespace - test regression from r39467)
16918 [[Image:foobar.jpg| 640px]]
16920 <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>
16925 Image with page parameter
16929 [[File:LoremIpsum.djvu|page=2]]
16931 <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>
16934 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{}}'><img resource="./File:LoremIpsum.djvu" src="//example.com/images/5/5f/LoremIpsum.djvu" height="3508" width="2480" data-parsoid='{"a":{"resource":"./File:LoremIpsum.djvu","height":"3508","width":"2480"},"sa":{"resource":"File:LoremIpsum.djvu"}}'/></a></span></p>
16938 Another italics / bold test
16946 # FIXME: The php output seems broken. It's interleaving some open/close tags.
16952 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
16955 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
16960 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
16962 Images with the "|" character in the comment
16964 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
16966 <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>
16969 <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>
16973 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
16975 <html><script>alert(1);</script></html>
16977 <p><html><script>alert(1);</script></html>
16982 HTML with raw HTML ($wgRawHtml==true)
16986 <html><script>alert(1);</script></html>
16988 <p><script>alert(1);</script>
16993 Parents of subpages, one level up
16995 subpage title=[[Subpage test/L1/L2/L3]]
16999 <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>
17005 Parents of subpages, one level up, not named
17007 subpage title=[[Subpage test/L1/L2/L3]]
17011 <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>
17018 Parents of subpages, two levels up
17020 subpage title=[[Subpage test/L1/L2/L3]]
17026 <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
17027 </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>
17032 Parents of subpages, two levels up, without trailing slash or name.
17034 subpage title=[[Subpage test/L1/L2/L3]]
17043 Parents of subpages, two levels up, with lots of extra trailing slashes.
17045 subpage title=[[Subpage test/L1/L2/L3]]
17049 <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>
17054 Subpage test/L1/L2/L3Sibling
17060 Transclusion of a sibling page (one level up)
17062 subpage title=[[Subpage test/L1/L2/L3]]
17071 Transclusion of a child page
17073 subpage title=[[Subpage test/L1/L2]]
17082 Non-transclusion because of too many up levels
17084 subpage title=[[Subpage test/L1/L2/L3]]
17086 {{../../../../More than parent}}
17088 <p>{{../../../../More than parent}}
17093 Definition list code coverage
17099 <dl><dt> title  </dt>
17101 <dt> title </dt>
17107 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17108 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17109 <dt>title</dt><dd> def</dd></dl>
17113 Don't fall for the self-closing div
17115 <div>hello world</div/>
17117 <div>hello world</div>
17126 <p>[[:Template:Msg]]
17135 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
17139 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
17141 Always escape literal '>' in output, not just after '<'
17155 <p>This is a test template
17156 This is a test template
17168 Inclusion of !userCanEdit() content
17172 <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>
17178 Out-of-order TOC heading levels
17187 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17189 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17191 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17192 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17195 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17197 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17198 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17204 <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>
17205 <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>
17206 <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>
17207 <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>
17208 <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>
17209 <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>
17215 ISBN with a dummy number
17225 ISBN with space-delimited number
17229 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17235 ISBN with multiple spaces, no number
17254 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17255 </p><p>ISBN 12345678901
17261 ISBN with trailing year (bug 8110)
17263 ISBN 1-234-56789-0 - 2006
17265 ISBN 1 234 56789 0 - 2006
17267 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17268 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17276 {{anchorencode:foo bar©#%n}}
17278 <p>foo_bar.C2.A9.23.25n
17283 anchorencode trims spaces
17285 {{anchorencode: __pretty__please__}}
17292 anchorencode deals with links
17294 {{anchorencode: [[hello|world]] [[hi]]}}
17301 anchorencode deals with templates
17303 {{anchorencode: {{Foo}} }}
17310 anchorencode encodes like the TOC generator: (bug 18431)
17312 === _ +:.3A%3A&&]] ===
17313 {{anchorencode: _ +:.3A%3A&&]] }}
17316 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17317 <p>.2B:.3A.253A.26.26.5D.5D
17322 Bug 6200: blockquotes and paragraph formatting
17343 Bug 8293: Use of center tag ruins paragraph formatting
17364 Parsing of overlapping (improperly nested) inline html tags
17366 <span><s>x</span></s>
17368 <p><span><s>x</span></s></span>
17371 <p><span><s>x</s></span>
17376 ### Language variants related tests
17379 Self-link in language variants
17381 title=[[Dunav]] language=sr
17383 Both [[Dunav]] and [[Дунав]] are names for this river.
17385 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17396 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17398 title=[[Duna]] language=sr
17400 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17402 <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.
17407 Link to a section of a variant of this title shouldn't be parsed as self-link
17409 title=[[Duna]] language=sr
17411 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17413 <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.
17418 Link to pages in language variants
17422 Main Page can be written as [[Маин Паге]]
17424 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17430 Multiple links to pages in language variants
17434 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17436 <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>.
17442 Simple template in language variants
17448 <p>This is a test template
17454 Template with explicit namespace in language variants
17460 <p>This is a test template
17466 Basic test for template parameter in language variants
17470 {{парамтест|param=foo}}
17472 <p>This is a test template with parameter foo
17478 Simple category in language variants
17482 [[Category:МедиаWики Усер'с Гуиде]]
17484 <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>
17501 Don't convert blue categorylinks to another variant (bug 33210)
17505 [[A]][[Category:分类]]
17507 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17512 Stripping -{}- tags (language variants)
17516 Latin proverb: -{Ne nuntium necare}-
17518 <p>Latin proverb: Ne nuntium necare
17524 Prevent conversion with -{}- tags (language variants)
17526 language=sr variant=sr-ec
17528 Latinski: -{Ne nuntium necare}-
17530 <p>Латински: Ne nuntium necare
17536 Prevent conversion of text with -{}- tags (language variants)
17538 language=sr variant=sr-ec
17540 Latinski: -{Ne nuntium necare}-
17542 <p>Латински: Ne nuntium necare
17548 Prevent conversion of links with -{}- tags (language variants)
17550 language=sr variant=sr-ec
17554 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17560 -{}- tags within headlines (within html for parserConvert())
17562 language=sr variant=sr-ec
17566 <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>
17572 Explicit definition of language variant alternatives
17574 language=zh variant=zh-tw
17576 -{zh:China;zh-tw:Taiwan}-, not China
17578 <p>Taiwan, not China
17584 Conversion around HTML tags
17586 language=sr variant=sr-ec
17588 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17589 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17592 <span title="ЛаCтин">ски</span>
17598 Explicit session-wise language variant mapping (A flag and - flag)
17600 language=zh variant=zh-tw
17602 Taiwan is not China.
17603 But -{A|zh:China;zh-tw:Taiwan}- is China,
17604 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17605 and -{China}- is China.
17607 <p>Taiwan is not China.
17608 But Taiwan is Taiwan,
17609 (This should be stripped!)
17610 and China is China.
17615 Explicit session-wise language variant mapping (H flag for hide)
17617 language=zh variant=zh-tw
17619 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17622 <p>(This should be stripped!)
17628 Adding explicit conversion rule for title (T flag)
17630 language=zh variant=zh-tw showtitle
17632 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17635 <p>Should be stripped!
17640 Testing that changing the language variant here in the tests actually works
17642 language=zh variant=zh showtitle
17644 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17647 <p>Should be stripped!
17652 Recursive conversion of alt and title attrs shouldn't clear converter state
17654 language=zh variant=zh-cn showtitle
17656 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17657 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17661 Should be stripped<span title="Exclamation">!</span>
17666 Bug 24072: more test on conversion rule for title
17668 language=zh variant=zh-tw showtitle
17670 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17671 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17674 <p>This should be stripped!
17675 This won't take interferes with the title rule.
17680 Partly disable title conversion if variant == main language code
17682 language=zh variant=zh title=[[ZH]] showtitle
17684 -{T|zh-cn:CN;zh-tw:TW}-
17692 Partly disable title conversion if variant == main language code, more
17694 language=zh variant=zh title=[[ZH]] showtitle
17704 Raw output of variant escape tags (R flag)
17706 language=zh variant=zh-tw
17708 Raw: -{R|zh:China;zh-tw:Taiwan}-
17710 <p>Raw: zh:China;zh-tw:Taiwan
17715 Nested using of manual convert syntax
17717 language=zh variant=zh-hk
17719 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17721 <p>Nested: Hello Hong Kong!
17726 Proper conversion of text in external links
17728 language=sr variant=sr-ec
17730 http://www.google.com
17731 gopher://www.google.com
17732 [http://www.google.com http://www.google.com]
17733 [gopher://www.google.com gopher://www.google.com]
17734 [https://www.google.com irc://www.google.com]
17735 [ftp://www.google.com www.google.com/ftp://dir]
17736 [//www.google.com www.google.com]
17738 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17739 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17740 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17741 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17742 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17743 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17744 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17749 Do not convert roman numbers to language variants
17751 language=sr variant=sr-ec
17755 <p>Фридрих IV је цар.
17760 Unclosed language converter markup "-{"
17771 Don't convert raw rule "-{R|=>}-" to "=>"
17782 Don't break link parsing if language converter markup is in the caption.
17784 language=sr variant=sr-ec
17786 [[Main Page|-{R|main page}-]]
17788 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17792 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17794 Don't break image parsing if language converter markup is in the caption.
17798 [[File:Foobar.jpg|-{R|caption}-]]
17800 <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>
17804 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17806 Don't break list handling if language converter markup is in the item.
17808 language=zh variant=zh-cn
17810 ;-{zh-cn:AAA;zh-tw:BBB}-
17812 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
17819 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17821 Don't break table handling if language converter markup is in the cell.
17823 language=sr variant=sr-ec
17846 Bug 529: Uncovered bullet
17855 # Plain MediaWiki does not remove empty lists, but tidy actually does.
17856 # Templates in Wikipedia rely on this behavior, as tidy has always been
17857 # enabled there. These tests are normally run *without* tidy, so specify the
17858 # full output here.
17859 # To test realistic parsing behavior, apply a tidy-like transformation to both
17860 # the expected output and your parser's output.
17862 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
17864 ******* Foo {{bullet}}
17866 <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>
17872 Bug 529: Uncovered table already at line-start
17895 Bug 529: Uncovered bullet in parser function result
17897 * Foo {{lc:{{bullet}} }}
17905 Bug 5678: Double-parsed template argument
17907 {{lc:{{{1}}}|hello}}
17914 Bug 5678: Double-parsed template invocation
17916 {{lc:{{paramtest {{!}} param = hello }} }}
17918 <p>{{paramtest | param = hello }}
17923 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
17926 title=[[Main Page]]
17928 {{PRVNÍVELKÉ:ěščř}}
17929 {{prvnívelké:ěščř}}
17949 Morwen/13: Unclosed link followed by heading
17956 <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>
17961 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
17968 <h1><span class="mw-headline" id="heading">heading</span></h1>
17973 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
17980 <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>
17995 Paragraphs inside divs (no extra line breaks)
18007 Paragraphs inside divs (extra line break on open)
18022 Paragraphs inside divs (extra line break on close)
18037 Paragraphs inside divs (extra line break on open and close)
18054 Nesting tags, paragraphs on lines which begin with <div>
18056 <div></div><strong>A
18059 <p><strong>A</strong></p>
18060 <p><strong>B</strong></p>
18068 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
18070 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
18072 <blockquote>Line one
18074 Line two</blockquote>
18076 <blockquote>Line one
18077 Line two</blockquote>
18081 <p>Line one Line two</p>
18086 Bug 6200: paragraphs inside blockquotes (extra line break on open)
18091 Line two</blockquote>
18096 Line two</blockquote>
18101 Line two</blockquote>
18105 Bug 6200: paragraphs inside blockquotes (extra line break on close)
18107 <blockquote>Line one
18112 <blockquote>Line one
18125 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
18147 Paragraphs inside blockquotes/divs (no extra line breaks)
18149 <blockquote><div>Line one
18151 Line two</div></blockquote>
18153 <blockquote><div>Line one
18154 Line two</div></blockquote>
18159 Paragraphs inside blockquotes/divs (extra line break on open)
18164 Line two</div></blockquote>
18169 Line two</div></blockquote>
18174 Paragraphs inside blockquotes/divs (extra line break on close)
18176 <blockquote><div>Line one
18179 </div></blockquote>
18181 <blockquote><div>Line one
18184 </div></blockquote>
18189 Paragraphs inside blockquotes/divs (extra line break on open and close)
18195 </div></blockquote>
18201 </div></blockquote>
18206 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18208 wgLinkHolderBatchSize=0
18214 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18215 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18216 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18221 Free external link invading image caption
18223 [[Image:Foobar.jpg|thumb|http://x|hello]]
18225 <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>
18230 Bug 15196: localised external link numbers
18234 [http://en.wikipedia.org/]
18236 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18239 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18243 Multibyte character in padleft
18245 {{padleft:-Hello|7|Æ}}
18252 Multibyte character in padright
18254 {{padright:Hello-|7|Æ}}
18261 formatdate parser function
18263 {{#formatdate:2009-03-24}}
18265 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18270 formatdate parser function, with default format
18272 {{#formatdate:2009-03-24|mdy}}
18274 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18279 Spacing of numbers in formatted dates
18281 {{#formatdate:January 15}}
18283 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18288 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
18290 language=nl title=[[MediaWiki:Common.css]]
18292 {{#formatdate:2009-03-24|dmy}}
18294 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18307 Edit comment with link
18311 I like the [[Main Page]] a lot
18313 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18317 Edit comment with link and link text
18321 I like the [[Main Page|best pages]] a lot
18323 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18327 Edit comment with link and link text with suffix
18331 I like the [[Main Page|best page]]s a lot
18333 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18337 Edit comment with section link (non-local, eg in history list)
18339 comment title=[[Main Page]]
18341 /* External links */ removed bogus entries
18343 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18347 Edit comment with section link and text before it (non-local, eg in history list)
18349 comment title=[[Main Page]]
18351 pre-comment text /* External links */ removed bogus entries
18353 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>
18357 Edit comment with section link (local, eg in diff view)
18359 comment local title=[[Main Page]]
18361 /* External links */ removed bogus entries
18363 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18367 Edit comment with subpage link (bug 14080)
18371 title=[[Subpage test]]
18373 Poked at a [[/subpage]] here...
18375 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18379 Edit comment with subpage link and link text (bug 14080)
18383 title=[[Subpage test]]
18385 Poked at a [[/subpage|neat little page]] here...
18387 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18391 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18394 title=[[Subpage test]]
18396 Poked at a [[/subpage]] here...
18398 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18402 Edit comment with bare anchor link (local, as on diff)
18406 title=[[Main Page]]
18410 <a href="#section">#section</a>
18414 Edit comment with bare anchor link (non-local, as on history)
18417 title=[[Main Page]]
18421 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18425 Anchor starting with underscore
18429 <p><a href="#_ref">One</a>
18434 Id starting with underscore
18436 <div id="_ref"></div>
18438 <div id="_ref"></div>
18443 Space normalisation on autocomment (bug 22784)
18446 title=[[Main Page]]
18448 /* __hello__world__ */
18450 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18454 percent-encoding and + signs in comments (Bug 26410)
18458 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18460 <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>
18463 # Parsoid doesn't support this yet: see bug 73581
18464 # but it *should* omit the 'src' attribute if the image is bad.
18465 # PHP side of tests was disabled in
18466 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
18467 # because of issues in the PHP parserTests infrastructure
18468 # (but the output below is indeed what the PHP side emits)
18470 Bad images - basic functionality
18473 !! DISABLED/html/php
18475 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span></p>
18479 Bad images - bug 16039: text after bad image disappears
18484 !! DISABLED/html/php
18490 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span>
18495 Verify that displaytitle works (bug #22501) no displaytitle
18499 wgAllowDisplayTitle=true
18500 wgRestrictDisplayTitle=false
18502 this is not the the title
18505 <p>this is not the the title
18510 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18515 wgAllowDisplayTitle=true
18516 wgRestrictDisplayTitle=false
18518 this is not the the title
18519 {{DISPLAYTITLE:whatever}}
18522 <p>this is not the the title
18527 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18532 wgAllowDisplayTitle=true
18533 wgRestrictDisplayTitle=true
18535 this is not the the title
18536 {{DISPLAYTITLE:whatever}}
18539 <p>this is not the the title
18544 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18549 wgAllowDisplayTitle=true
18550 wgRestrictDisplayTitle=true
18552 this is not the the title
18553 {{DISPLAYTITLE:screen}}
18556 <p>this is not the the title
18561 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18566 wgAllowDisplayTitle=false
18568 this is not the the title
18569 {{DISPLAYTITLE:screen}}
18572 <p>this is not the the title
18573 <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>
18578 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18583 wgAllowDisplayTitle=false
18585 this is not the the title
18588 <p>this is not the the title
18593 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18598 wgAllowDisplayTitle=true
18599 wgRestrictDisplayTitle=true
18601 this is not the the title
18602 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18604 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18605 <p>this is not the the title
18610 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18615 wgAllowDisplayTitle=true
18616 wgRestrictDisplayTitle=true
18618 this is not the the title
18619 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18621 <span style="color: red;">s</span>creen
18622 <p>this is not the the title
18627 preload: check <noinclude> and <includeonly>
18631 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18637 preload: check <onlyinclude>
18641 Goodbye <onlyinclude>Hello world</onlyinclude>
18647 preload: can pass tags through if we want to
18651 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18653 <includeonly>Hello world</includeonly>
18657 preload: check that it doesn't try to do tricks
18661 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18663 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18667 Play a bit with r67090 and bug 3158
18669 <div style="width:50% !important"> </div>
18670 <div style="width:50% !important"> </div>
18671 <div style="width:50% !important"> </div>
18672 <div style="border : solid;"> </div>
18674 <div style="width:50% !important"> </div>
18675 <div style="width:50% !important"> </div>
18676 <div style="width:50% !important"> </div>
18677 <div style="border : solid;"> </div>
18680 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18681 <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>
18682 <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>
18683 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18688 HTML5 data attributes
18690 <span data-foo="bar">Baz</span>
18691 <p data-abc-def_hij="">Quuz</p>
18693 <p><span data-foo="bar">Baz</span>
18695 <p data-abc-def_hij="">Quuz</p>
18700 percent-encoding and + signs in internal links (Bug 26410)
18702 [[User:+%]] [[Page+title%]]
18703 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18704 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
18705 [[%33%45]] [[%33%45+]]
18707 <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>
18708 <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>
18709 <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>
18710 <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>
18713 <p><a rel="mw:WikiLink" href="User:+%" title="User:+%">User:+%</a> <a rel="mw:WikiLink" href="Page+title%" title="Page+title%">Page+title%</a> <a rel="mw:WikiLink" href="%+" title="%+">%+</a> <a rel="mw:WikiLink" href="%+" title="%+">%20</a> <a rel="mw:WikiLink" href="%+" title="%+">%+ </a> <a rel="mw:WikiLink" href="%+r" title="%+r">%+r</a> <a rel="mw:WikiLink" href="%" title="%">%</a> <a rel="mw:WikiLink" href="+" title="+">+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"[[bar]]"}'><a href="File:%+abc9"><img resource="./File:%25+abc9" src="./Special:FilePath/%+abc9" height="220" width="220"/></a></span> <a rel="mw:WikiLink" href="3E" title="3E">3E</a> <a rel="mw:WikiLink" href="3E+" title="3E+">3E+</a></p>
18717 Special characters in embedded file links (bug 27679)
18719 [[File:Contains & ampersand.jpg]]
18720 [[File:Does not exist.jpg|Title with & ampersand]]
18722 <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>
18723 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18726 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="File:Contains_&_ampersand.jpg"><img resource="./File:Contains_&_ampersand.jpg" src="./Special:FilePath/Contains_&_ampersand.jpg" height="220" width="220"/></a></span>
18727 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"Title with & ampersand"}'><a href="File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></span></p>
18731 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18733 Text's been normalized?
18735 <p>Text's been normalized?
18740 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18742 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18744 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18749 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18751 [http://www.example.org/ ideograms]
18753 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18758 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18760 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18762 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18786 Bug 31098 Template which includes system messages which includes the template
18790 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18791 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18796 Bug31490 Turkish: ucfirst 'blah'
18807 Bug31490 Turkish: ucfirst 'ix'
18818 Bug31490 Turkish: lcfirst 'BLAH'
18829 Bug31490 Turkish: ucfırst (with a dotless i)
18835 <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>
18840 Bug31490 ucfırst (with a dotless i) with English language
18846 <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>
18851 Bug 26375: TOC with italics
18853 title=[[Main Page]]
18856 == ''Lost'' episodes ==
18858 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18860 <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>
18864 <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>
18869 Bug 26375: TOC with bold
18871 title=[[Main Page]]
18874 == '''should be bold''' then normal text ==
18876 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18878 <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>
18882 <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>
18887 Bug 33845: Headings become cursive in TOC when they contain an image
18889 title=[[Main Page]]
18892 == Image [[Image:foobar.jpg]] ==
18894 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18896 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
18900 <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>
18905 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
18907 title=[[Main Page]]
18910 == <blockquote>Quote</blockquote> ==
18912 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18914 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18918 <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>
18921 <div id="toc" class="toc">
18922 <div id="toctitle">
18926 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18929 <h2><span class="mw-headline" id="Quote"></span></h2>
18931 <p><span class="mw-headline" id="Quote">Quote</span></p>
18933 <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>
18937 Unclosed tags in TOC
18939 title=[[Main Page]]
18943 <small>Hanc marginis exiguitas non caperet.</small>
18946 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18948 <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>
18952 <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>
18953 <p><small>Hanc marginis exiguitas non caperet.</small>
18959 Multiple tags in TOC
18962 == <i>Foo</i> <b>Bar</b> ==
18964 == <i>Foo</i> <blockquote>Bar</blockquote> ==
18966 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18968 <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>
18969 <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>
18973 <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>
18974 <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>
18977 <div id="toc" class="toc">
18978 <div id="toctitle">
18982 <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>
18983 <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>
18986 <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>
18987 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
18989 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
18991 <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>
18995 Tags with parameters in TOC
18998 == <sup class="in-h2">Hello</sup> ==
19000 == <sup class="a > b">Evilbye</sup> ==
19002 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19004 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
19005 <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>
19009 <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>
19010 <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>
19015 span tags with directionality in TOC
19018 == <span dir="ltr">C++</span> ==
19020 == <span dir="rtl">זבנג!</span> ==
19022 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
19024 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
19026 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
19028 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19030 <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>
19031 <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>
19032 <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>
19033 <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>
19034 <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>
19038 <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>
19039 <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>
19040 <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>
19041 <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>
19042 <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>
19047 Bug 72884: bdi element in ToC
19050 == <bdi>test</bdi> ==
19052 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19054 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
19058 <h2><span class="mw-headline" id="test"><bdi>test</bdi></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: test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19065 == {{int:headline_sample}} ==
19069 Bug 32057: Title needed when expanding <h> nodes.
19071 title=[[Main Page]]
19075 <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>
19080 Strip marker in urlencode
19082 {{urlencode:x<nowiki/>y}}
19083 {{urlencode:x<nowiki/>y|wiki}}
19084 {{urlencode:x<nowiki/>y|path}}
19111 Strip marker in formatNum
19113 {{formatnum:1<nowiki/>2}}
19114 {{formatnum:1<nowiki/>2|R}}
19122 Check noCommafy in formatNum
19126 {{formatnum:123456.78}}
19127 {{formatnum:123456.78|NOSEP}}
19135 Wrong option for formatNum (bug 56199)
19137 {{formatnum:1,234.56|Random}}
19138 {{formatnum:1,234.56|EVERYTHING}}
19139 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
19148 Strip marker in grammar
19152 {{grammar:elative|foo<nowiki/>bar}}
19159 Strip marker in padleft
19161 {{padleft:|2|x<nowiki/>y}}
19168 Strip marker in padright
19170 {{padright:|2|x<nowiki/>y}}
19177 Strip marker in anchorencode
19179 {{anchorencode:x<nowiki/>y}}
19186 nowiki inside link inside heading (bug 18295)
19188 ==[[foo|x<nowiki>y</nowiki>z]]==
19190 <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>
19195 new support for bdi element (bug 31817)
19197 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19199 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19204 Ignore pipe between table row attributes
19208 |- id=foo | style='color: red'
19216 <tr id="foo" style="color: red">
19223 Gallery override link with WikiLink (bug 34852)
19226 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19229 <ul class="gallery mw-gallery-traditional">
19230 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19231 <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>
19232 <div class="gallerytext">
19242 Gallery override link with absolute external link (bug 34852)
19245 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19248 <ul class="gallery mw-gallery-traditional">
19249 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19250 <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>
19251 <div class="gallerytext">
19261 Gallery override link with malicious javascript (bug 34852)
19264 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19267 <ul class="gallery mw-gallery-traditional">
19268 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19269 <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>
19270 <div class="gallerytext">
19280 Gallery with invalid title as link (bug 43964)
19283 File:foobar.jpg|link=<
19286 <ul class="gallery mw-gallery-traditional">
19287 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19288 <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>
19289 <div class="gallerytext">
19297 Language parser function
19306 Padleft and padright as substr
19308 {{padleft:|3|abcde}}
19309 {{padright:|3|abcde}}
19317 Special parser function
19319 {{#special:RandomPage}}
19320 {{#special:BaDtItLe}}
19321 {{#special:Foobar}}
19330 Bug 34939 - Case insensitive link parsing ([HttP://])
19332 [HttP://MediaWiki.Org/]
19334 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19337 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19341 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19343 [HttP://MediaWiki.Org/ MediaWiki]
19345 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19350 Bug 34939 - Case insensitive link parsing (HttP://)
19352 HttP://MediaWiki.Org/
19354 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19357 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19375 <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>
19376 <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>
19377 <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>
19378 <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>
19379 <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>
19385 ### Parsoid-specific tests
19386 ### Parsoid-PHP parser incompatibilities
19389 1. SOL-sensitive wikitext tokens as template-args
19391 parsoid=wt2html,wt2wt
19397 <span about="#mwt1" typeof="mw:Transclusion">
19398 </span><ul about="#mwt1"><li>a</li>
19400 <span about="#mwt2" typeof="mw:Transclusion">
19401 </span><ol about="#mwt2"><li>a</li>
19403 <span about="#mwt3" typeof="mw:Transclusion">
19404 </span><dl about="#mwt3"><dd>a</dd>
19408 #### -----------------------------------------------------------------
19409 #### Parsoid-specific functionality tests
19410 #### -----------------------------------------------------------------
19412 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19413 # We know wt2wt will fail, but we expect selser to pass.
19414 # Due to the nature of our testing, wt2wt and selser tests will enter the
19415 # blacklist and we'll catch selser regressions based on changes to the
19416 # blacklist entries for selser tests.
19418 1. Bad treebuilder fixup of formatting elt is cleaned up
19420 parsoid=wt2html,wt2wt
19425 [[Image:Foobar.jpg|right|Test]]
19432 <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>
19439 2. Bad treebuilder fixup of formatting elt is cleaned up
19441 parsoid=wt2html,wt2wt
19443 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19445 <small>[[Image:Foobar.jpg|right|300px]]</small>
19448 <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>
19450 <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>
19453 #### ----------------------------------------------------------------
19454 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19455 #### tags. Parsoid's output for these tags differs from that of the
19457 #### ----------------------------------------------------------------
19460 Ref: 1. ref-location should be replaced with an index span
19465 B <ref name="x">foo</ref>
19468 <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>
19469 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>
19470 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>
19474 Ref: 2. ref-tags with identical names should all get the same index
19478 A <ref name="x">foo</ref>
19481 <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>
19482 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>
19486 Ref: 3. spaces in ref-names should be ignored
19490 A <ref name="x">foo</ref>
19491 B <ref name=" x " />
19494 <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>
19495 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>
19496 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>
19499 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19501 Ref: 4. 'constructor' should be accepted as a valid ref-name
19505 A <ref name="constructor">foo</ref>
19507 <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>
19511 Ref: 5. body should accept generic wikitext
19516 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19521 <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>
19523 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19524 <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>
19530 Ref: 6. indent-pres should not be output in ref-body
19542 <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>
19544 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19545 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19553 Ref: 7. No p-wrapping in ref-body
19572 <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>
19574 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19575 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19590 Ref: 8. transclusion wikitext has lower precedence
19594 A <ref> foo {{echo|</ref> B C}}
19598 <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>
19599 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19600 <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>
19605 Ref: 9. unclosed comments should not leak out of ref-body
19609 A <ref> foo <!--</ref> B C
19612 <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>
19613 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19614 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li>
19619 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19623 A <ref> <b> foo </ref> B C
19627 <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>
19630 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19631 <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>
19636 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19643 <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
19644 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>
19648 Ref: 12. ref-tags act as trailing newline migration barrier
19652 <!--the newline at the end of this line moves out of the p-tag-->a
19654 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19659 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19662 <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>
19663 <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>
19669 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19677 <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
19678 <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>
19682 Ref: 14. A nested ref-tag should be emitted as plain text
19686 <ref>foo <ref>bar</ref> baz</ref>
19690 <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>
19692 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19693 <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>
19698 Ref: 15. ref-tags with identical names should get identical indexes
19702 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19703 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19707 <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>
19708 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>
19710 <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>
19714 ## We don't bother wt2wt-ing non-standard whitespace
19716 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19724 <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>
19726 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19727 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19731 Ref: 17. Generate valid HTML5 id/about attributes
19735 <ref name="a b">foo</ref>
19739 <p><span class="reference" id="cite_ref-a_b-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a b"}}'><a href="#cite_note-a_b-1">[1]</a></span>
19742 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19743 <li id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b-1-0">↑</a></span> foo</li>
19747 References: 1. references tag without any refs should be handled properly
19753 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19757 References: 2. references tag with group only outputs references from that group
19761 A <ref group="a">foo</ref>
19762 B <ref group="b">bar</ref>
19764 <references group="a" />
19766 <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>
19767 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>
19769 <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>
19774 References: 3. ref list should be cleared after processing references
19786 <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>
19788 <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>
19791 <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>
19793 <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>
19798 References: 4. only referenced group should be cleared after processing references
19802 A <ref group="a">afoo</ref>
19805 <references group="a" />
19811 <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>
19812 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>
19814 <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>
19817 <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>
19819 <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>
19824 References: 5. ref tags in references should be processed while ignoring all other content
19829 B <ref name="b">bar</ref>
19832 <ref name="a">foo</ref>
19833 This should just get lost.
19836 <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>
19837 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>
19840 <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>
19845 References: 6. <references /> from a transclusion
19849 <ref>Foo</ref> {{echo|<references />}}
19851 <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>
19855 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
19859 A <ref>foo bar for a</ref>
19860 B <ref group="X" name="b" />
19864 <references group="X">
19865 <ref name="b">foo</ref>
19868 <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>
19869 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>
19871 <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>
19873 <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>
19877 Entities in ref name
19881 <ref name="test & me">hi</ref>
19883 <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>
19886 # This test is wt2html only because we're permitting the serializer to produce
19887 # dirty diffs, normalizing the unclosed references to the self-closed version.
19889 Generate references for unclosed references tag
19897 <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>
19900 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19901 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19905 New reference serializes on its own line
19907 parsoid=wt2wt,html2wt
19912 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
19915 #--------- Test stripping of empty nodes in template content ----------
19917 Empty LI and TR nodes should be stripped from template content
19922 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
19926 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
19939 Empty LI and TR nodes should not be stripped from top-level content
19966 Empty TR nodes should not be stripped if they have any attributes set
19968 {{EmptyTRWithHTMLAttrTest}}
19970 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
19971 <tr align="center"></tr>
19972 <tr><td>foo</td></tr>
19973 <tr align="center"></tr>
19974 <tr><td>bar</td></tr>
19978 #### ----------------------------------------------------------------
19979 #### The following section of tests are primarily to test
19980 #### wikitext escaping capabilities of Parsoid. Given that
19981 #### escaping can be done any number of ways, the wikitext (input)
19982 #### is always adjusted to reflect how Parsoid adds nowiki
19985 #### We are marking several tests as parsoid-only since the
19986 #### HTML in the result section is different from what the
19987 #### PHP parser generates for it.
19988 #### ----------------------------------------------------------------
19991 #### --------------- Headings ---------------
19993 #### 1. Nested inside html <h1>=foo=</h1>
19994 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
19995 #### 3. Nested inside html with wikitext split by html tags
19996 #### 4. No escape needed
19997 #### 5. Empty headings <h1></h1>
19998 #### 6. Heading chars in SOL context
19999 #### ----------------------------------------
20001 Headings: 0. Unnested
20005 <nowiki>=foo=</nowiki>
20007 <nowiki> =foo= </nowiki>
20009 <nowiki>=foo=</nowiki>
20011 =foo''a''<nowiki>=</nowiki>
20013 <p><span typeof="mw:Nowiki">=foo=</span></p>
20015 <p><span typeof="mw:Nowiki"> =foo= </span>
20017 <span typeof="mw:Nowiki">=foo=</span></p>
20019 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
20022 # New headings and existing headings are handled differently
20024 Headings: 1. Nested inside html
20034 =<nowiki>=foo=</nowiki>=
20035 ==<nowiki>=foo=</nowiki>==
20036 ===<nowiki>=foo=</nowiki>===
20037 ====<nowiki>=foo=</nowiki>====
20038 =====<nowiki>=foo=</nowiki>=====
20039 ======<nowiki>=foo=</nowiki>======
20046 <h1 data-parsoid=''>=foo=</h1>
20047 <h2 data-parsoid=''>=foo=</h2>
20048 <h3 data-parsoid=''>=foo=</h3>
20049 <h4 data-parsoid=''>=foo=</h4>
20050 <h5 data-parsoid=''>=foo=</h5>
20051 <h6 data-parsoid=''>=foo=</h6>
20055 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
20060 <nowiki>*</nowiki>bar
20066 <nowiki>=bar=</nowiki>
20074 Headings: 3. Nested inside html with wikitext split by html tags
20076 parsoid=html2wt,wt2wt
20078 = ='''bold'''<nowiki>foo=</nowiki> =
20080 <h1>=<b>bold</b>foo=</h1>
20084 Headings: 4a. No escaping needed (testing just h1 and h2)
20110 Headings: 4a'. No escaping needed (Parsoid bug T84903)
20114 <h1><span class="mw-headline" id=".3Dfoo.3D"><i>=</i>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>
20117 <h1><i>=</i>foo=</h1>
20121 Headings: 4b. No escaping needed (inside p-tags)
20136 Headings: 5. Empty headings
20148 =====<nowiki/>=====
20150 ======<nowiki/>======
20161 Headings: 6a. Heading chars in SOL context (with trailing spaces)
20165 <nowiki>=a=</nowiki>
20167 <nowiki>=a=</nowiki>
20169 <nowiki>=a=</nowiki>
20171 <nowiki>=a=</nowiki>
20180 Headings: 6b. Heading chars in SOL context (with trailing newlines)
20208 Headings: 6c. Heading chars in SOL context (leading newline break)
20213 <nowiki>=b=</nowiki>
20220 Headings: 6d. Heading chars in SOL context (with interspersed comments)
20224 <!--c0--><nowiki>=a=</nowiki>
20226 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
20228 <p><!--c0-->=a=</p>
20229 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
20233 Headings: 6d. Heading chars in SOL context (No escaping needed)
20242 #### --------------- Lists ---------------
20243 #### 0. Outside nests (*foo, etc.)
20244 #### 1. Nested inside html <ul><li>*foo</li></ul>
20245 #### 2. Inside definition lists
20246 #### 3. Only bullets at start should be escaped
20247 #### 4. No escapes needed
20248 #### 5. No unnecessary escapes
20249 #### 6. Escape bullets in SOL position
20250 #### 7. Escape bullets in a multi-line context
20251 #### ----------------------------------------
20254 Lists: 0. Outside nests
20256 <nowiki>*</nowiki>foo
20258 <nowiki>#</nowiki>foo
20260 <nowiki>;Foo:</nowiki>bar
20269 Lists: 1. Nested inside html
20271 *<nowiki>*foo</nowiki>
20273 *<nowiki>#foo</nowiki>
20275 *<nowiki>:foo</nowiki>
20277 *<nowiki>;foo</nowiki>
20279 #<nowiki>*foo</nowiki>
20281 #<nowiki>#foo</nowiki>
20283 #<nowiki>:foo</nowiki>
20285 #<nowiki>;foo</nowiki>
20287 <ul><li>*foo</li></ul>
20288 <ul><li>#foo</li></ul>
20289 <ul><li>:foo</li></ul>
20290 <ul><li>;foo</li></ul>
20291 <ol><li>*foo</li></ol>
20292 <ol><li>#foo</li></ol>
20293 <ol><li>:foo</li></ol>
20294 <ol><li>;foo</li></ol>
20299 Lists: 2. Inside definition lists
20301 ;<nowiki>;foo</nowiki>
20303 ;<nowiki>:foo</nowiki>
20305 ;<nowiki>:foo</nowiki>
20308 :<nowiki>:foo</nowiki>
20310 <dl><dt>;foo</dt></dl>
20311 <dl><dt>:foo</dt></dl>
20314 <dl><dd>:foo</dd></dl>
20319 Lists: 3. Only bullets at start of text should be escaped
20321 *<nowiki>*foo*bar</nowiki>
20323 *<nowiki>*foo</nowiki>''it''*bar
20325 <ul><li>*foo*bar</li></ul>
20326 <ul><li>*foo<i>it</i>*bar</li></ul>
20331 Lists: 4. No escapes needed
20352 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20356 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20362 Lists: 5. No unnecessary escapes
20364 * bar <span><nowiki>[[foo]]</nowiki></span>
20366 * =bar <span><nowiki>[[foo]]</nowiki></span>
20368 * [[bar <span><nowiki>[[foo]]</nowiki></span>
20370 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
20372 * =bar <span>foo]]</span>=
20378 <ul><li> bar <span>[[foo]]</span></li></ul>
20379 <ul><li> =bar <span>[[foo]]</span></li></ul>
20380 <ul><li> [[bar <span>[[foo]]</span></li></ul>
20381 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
20382 <ul><li> =bar <span>foo]]</span>=</li></ul>
20383 <ul><li> <s></s>: a</li></ul>
20384 <ul><li> <i>* foo</i></li></ul>
20389 Lists: 6. Escape bullets in SOL position
20393 <!--cmt--><nowiki>*</nowiki>foo
20395 <p><!--cmt-->*foo</p>
20399 Lists: 7. Escape bullets in a multi-line context
20402 <nowiki>*</nowiki>b
20410 Lists: 8. Escape colons only if not present in tags
20414 ; <nowiki>a:b</nowiki>''c:d''
20416 <dl><dt>a:b<i>c:d</i></dt></dl>
20419 #### --------------- HRs ---------------
20420 #### 1. Single line
20421 #### -----------------------------------
20424 HRs: 1. Single line
20426 ----<nowiki>----</nowiki>
20438 #### --------------- Tables ---------------
20439 #### 1a. Simple example
20440 #### 1b. No escaping needed (!foo)
20441 #### 1c. No escaping needed (|foo)
20442 #### 1d. No escaping needed (|}foo)
20444 #### 2a. Nested in td (<td>foo|bar</td>)
20445 #### 2b. Nested in td (<td>foo||bar</td>)
20446 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20448 #### 3a. Nested in th (<th>foo!bar</th>)
20449 #### 3b. Nested in th (<th>foo!!bar</th>)
20450 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20454 #### 4c. No escaping needed
20455 #### --------------------------------------
20458 Tables: 1a. Simple example
20469 Tables: 1b. No escaping needed
20478 Tables: 1c. No escaping needed
20487 Tables: 1d. No escaping needed
20496 Tables: 2a. Nested in td
20501 <td>foo|bar</td></tr>
20502 <tr><td>x<div>a|b</div></td>
20506 |<nowiki>foo|bar</nowiki>
20508 |x<div><nowiki>a|b</nowiki></div>
20524 Tables: 2b. Nested in td
20530 <td>a<i>b||c</i></td>
20531 <td>a<i><div>b||c</div></i></td>
20532 </tr></tbody></table>
20535 |<nowiki>foo||bar</nowiki>
20536 |a''<nowiki>b||c</nowiki>''
20537 |a''<div><nowiki>b||c</nowiki></div>''
20546 <td>a<i><div>b||c</div></i>
20552 Tables: 2c. Nested in td -- no escaping needed
20568 Tables: 3a. Nested in th
20584 Tables: 3b. Nested in th
20589 <tr><th>foo!!bar</th>
20590 <th><i>foo|bar</i></th>
20591 <th><i>foo!!bar</i></th>
20592 <th><i><span>foo!!bar</span></i></th>
20593 </tr></tbody></table>
20596 !<nowiki>foo!!bar</nowiki>
20597 !''<nowiki>foo|bar</nowiki>''
20598 !''<nowiki>foo!!bar</nowiki>''
20599 !''<span><nowiki>foo!!bar</nowiki></span>''
20608 <th><i>foo!!bar</i>
20610 <th><i><span>foo!!bar</span></i>
20616 Tables: 3c. Nested in th
20621 <tr><th>foo||bar</th>
20622 <th><span typeof="mw:Nowiki">foo||bar</span></th>
20623 </tr></tbody></table>
20626 !<nowiki>foo||bar</nowiki>
20627 !<nowiki>foo||bar</nowiki>
20640 Tables: 4a. Escape -
20649 |<nowiki>-bar</nowiki>
20664 Tables: 4b. Escape +
20673 |<nowiki>+bar</nowiki>
20688 Tables: 4c. No escaping needed
20731 <tr><td>foo-bar</td><td>foo+bar</td></tr>
20732 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
20738 <div>a|b</div></td>
20743 Tables: 4d. No escaping needed
20753 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
20762 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
20763 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20764 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
20769 Tables: Digest broken attributes on table and tr tag
20785 #### --------------- Links ----------------
20786 #### 1. Quote marks in link text
20787 #### 2. Wikilinks: Escapes needed
20788 #### 3. Wikilinks: No escapes needed
20789 #### 4. Extlinks: Escapes needed
20790 #### 5. Extlinks: No escapes needed
20791 #### --------------------------------------
20793 Links 1. Quote marks in link text
20797 [[Foo|Foo<nowiki>''boo''</nowiki>]]
20799 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
20803 Links 2. WikiLinks: Escapes needed
20808 [[Foo|<nowiki>Foobar]</nowiki>]]
20809 [[Foo|x [Foobar] x]]
20810 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
20811 [[Foo|<nowiki>[[Bar]]</nowiki>]]
20812 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
20813 [[Foo|<nowiki>|Bar</nowiki>]]
20814 [[Foo|<nowiki>]]bar</nowiki>]]
20815 [[Foo|<nowiki>[[bar</nowiki>]]
20816 [[Foo|<nowiki>x [[ y</nowiki>]]
20817 [[Foo|<nowiki>x ]] y</nowiki>]]
20818 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
20820 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
20821 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
20822 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
20823 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
20824 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
20825 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
20826 <a href="Foo" rel="mw:WikiLink">|Bar</a>
20827 <a href="Foo" rel="mw:WikiLink">]]bar</a>
20828 <a href="Foo" rel="mw:WikiLink">[[bar</a>
20829 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
20830 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
20831 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
20835 Links 3. WikiLinks: No escapes needed
20842 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
20843 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
20847 Links 4. ExtLinks: Escapes needed
20851 [http://google.com <nowiki>[google]</nowiki>]
20852 [http://google.com <nowiki>google]</nowiki>]
20854 <nowiki>[http://google.com]</nowiki>
20856 <nowiki>[http://google.com google]</nowiki>
20859 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
20860 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
20861 <p>[http://google.com]</p>
20862 <p>[http://google.com google]</p>
20866 Links 5. ExtLinks: No escapes needed
20870 [http://google.com [google]
20872 <a href="http://google.com" rel="mw:ExtLink">[google</a>
20876 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
20878 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
20879 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
20880 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
20881 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
20882 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
20883 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
20884 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20885 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
20886 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20887 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
20888 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
20889 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
20890 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
20893 x<nowiki/>http://example.com<nowiki/>y
20894 http://example.com<nowiki/>?x
20895 http://example.com<nowiki/>&x
20896 http://example.com<nowiki/>'x
20897 http://example.com<nowiki/>,x
20898 http://example.com<nowiki/>.x
20899 http://example.com<nowiki/>;x
20900 http://example.com<nowiki/>:x
20901 http://example.com<nowiki/>;x
20902 http://example.com<nowiki/>!x
20903 http://example.com<nowiki/>=x
20904 http://example.com<nowiki/>(x)
20905 http://example.com(x<nowiki/>)
20909 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20912 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
20914 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
20915 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
20916 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
20917 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
20918 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
20924 "http://example.com"
20925 (http://example.com)
20926 (http://example.com) foo
20927 http://example.com,
20928 http://example.com, foo
20931 ## Parsoid currently fails wt2html on this one!
20933 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20935 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
20937 http://example.com.,;:!?
20941 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
20943 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
20949 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
20951 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20952 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20953 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
20954 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
20964 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
20966 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
20972 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
20974 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20975 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20976 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
20977 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
20987 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
20989 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
20990 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
20991 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
20994 ISBN 1234567890<nowiki/>1
20995 ISBN 1234567890<nowiki/>x
20996 ISBN 1234567890<nowiki/>b
21000 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
21002 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
21008 Links 13: Protect link-like plain text. (Parsoid bug T78425)
21012 <p>this is not a link: http://example.com
21015 this is not a link: <nowiki>http://example.com</nowiki>
21019 #### --------------- Quotes ---------------
21020 #### 1. Quotes inside <b> and <i>
21021 #### 2. Link fragments separated by <i> and <b> tags
21022 #### 3. Link fragments inside <i> and <b>
21023 #### 4. No escaping needed
21024 #### --------------------------------------
21026 1a. Quotes inside <b> and <i>
21028 parsoid=html2wt,wt2wt
21030 ''<nowiki/>'foo'<nowiki/>''
21031 ''<nowiki>''foo''</nowiki>''
21032 ''<nowiki>'''foo'''</nowiki>''
21034 '''<nowiki/>'foo'<nowiki/>'''
21035 '''<nowiki>''foo''</nowiki>'''
21036 '''<nowiki>'''foo'''</nowiki>'''
21037 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
21038 '''foo'''<nowiki/>'s
21041 ''foo'<nowiki/>''<nowiki/>'
21042 '<nowiki/>''foo''<nowiki/>'
21044 '''foo'''<nowiki/>'
21045 '<nowiki/>'''foo'''<nowiki/>'
21046 ''fools'<span> errand</span>''
21047 ''<span>fool</span>'s errand''
21048 a|!*#-:;+-~[]{}b'''x''
21057 <b>foo'<i>bar'</i>baz</b>
21066 <i>fools'<span> errand</span></i>
21067 <i><span>fool</span>'s errand</i>
21068 a|!*#-:;+-~[]{}b'<i>x</i>
21073 1b. Quotes inside <b> and <i> with other chars
21075 parsoid=html2wt,wt2wt
21077 '''a'' foo ''[[bar]]''
21078 ''a''' foo ''[[bar]]''
21079 ''a''' foo '''{{echo|[[bar]]}}'''
21080 [[foo]] x'''[[bar]]''
21082 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21083 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21084 <i>a'</i> foo <b><a rel="mw:WikiLink" href="Bar" title="Bar" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[bar]]"}},"i":0}}]}'>bar</a></b>
21085 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
21089 2. Link fragments separated by <i> and <b> tags
21091 [[''foo''<nowiki>hello]]</nowiki>
21093 [['''foo'''<nowiki>hello]]</nowiki>
21095 <p>[[<i>foo</i>hello]]
21096 </p><p>[[<b>foo</b>hello]]
21100 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
21101 # this is one of the shortcomings of this format
21103 3. Link fragments inside <i> and <b>
21105 ''[[foo''<nowiki>]]</nowiki>
21107 '''[[foo'''<nowiki>]]</nowiki>
21110 </p><p><b>[[foo</b>]]
21115 4. No escaping needed
21117 '<span>''bar''</span>'
21118 '<span>'''bar'''</span>'
21121 <p>'<span><i>bar</i></span>'
21122 '<span><b>bar</b></span>'
21127 #### ----------- Paragraphs ---------------
21128 #### 1. No unnecessary escapes
21129 #### --------------------------------------
21132 1. No unnecessary escapes
21134 bar <span><nowiki>[[foo]]</nowiki></span>
21136 =bar <span><nowiki>[[foo]]</nowiki></span>
21138 [[bar <span><nowiki>[[foo]]</nowiki></span>
21140 ]]bar <span><nowiki>[[foo]]</nowiki></span>
21142 =bar <span>foo]]</span><nowiki>=</nowiki>
21144 <p>bar <span>[[foo]]</span>
21145 </p><p>=bar <span>[[foo]]</span>
21146 </p><p>[[bar <span>[[foo]]</span>
21147 </p><p>]]bar <span>[[foo]]</span>
21148 </p><p>=bar <span>foo]]</span>=
21152 #### ----------------------- PRE --------------------------
21153 #### 1. Leading whitespace in SOL context should be escaped
21154 #### ------------------------------------------------------
21156 1. Leading whitespace in SOL context should be escaped
21160 <nowiki> </nowiki>a
21162 <nowiki> </nowiki> a
21164 <nowiki> </nowiki>a(tab)
21166 <nowiki> </nowiki> a
21168 <nowiki> </nowiki> a
21171 <nowiki> </nowiki>b
21174 <nowiki> </nowiki>b
21177 <nowiki> </nowiki> b
21183 <p><!--cmt--> a</p>
21193 2. Leading whitespace in non-indent-pre contexts should not be escaped
21200 <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>
21204 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
21223 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
21227 [[File:Foobar.jpg|thumb|caption]]
21230 <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>
21234 5. Nowiki escaping should account for indent-pres
21243 #### --------------- Behavior Switches --------------------
21245 1. Valid behavior switches should be escaped
21249 <nowiki>__TOC__</nowiki>
21250 ''<nowiki>__TOC__</nowiki>''
21257 2. Invalid behavior switches should not be escaped
21268 #### --------------- HTML tags ---------------
21271 #### 3. multi-line html tag
21272 #### 4. extension tags
21273 #### -----------------------------------------
21279 <a href="http://google.com">google</a>
21281 <a href="http://google.com">google</a>
21287 <nowiki><div>foo</div>
21288 <div style="color:red">foo</div></nowiki>
21290 <p><div>foo</div>
21291 <div style="color:red">foo</div>
21296 3. multi-line html tag
21311 <nowiki><ref>foo</ref></nowiki>
21313 <nowiki><ref>bar</nowiki>
21315 baz<nowiki></ref></nowiki>
21317 <p><ref>foo</ref>
21318 </p><p><ref>bar
21319 </p><p>baz</ref>
21323 #### --------------- Others ---------------
21327 <nowiki>foo</nowiki>
21329 <p><nowiki>foo</nowiki>
21333 ## The quote-char in the input is necessary for triggering the bug
21335 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
21337 parsoid=wt2wt,html2wt
21346 Tag-like HTML structures are passed through as text
21368 </p><p>1<d e>f
21373 # This was a bug in the PHP parser (see bug 17663 and its dups,
21374 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
21376 Tag names followed by punctuation should not be recognized as tags
21380 <p><s.ome> text
21385 HTML tag with necessary entities in attributes
21387 <span title="&amp;">foo</span>
21389 <p><span title="&amp;">foo</span>
21394 HTML tag with 'unnecessary' entity encoding in attributes
21396 <span title="&">foo</span>
21398 <p><span title="&">foo</span>
21403 HTML tag with broken attribute value quoting
21405 <span title="Hello world>Foo</span>
21407 <p><span>Foo</span>
21410 <p><span title="Hello world">Foo</span>
21415 Parsoid-only: HTML tag with broken attribute value quoting
21419 <span title="Hello world>Foo</span>
21421 <p><span title="Hello world">Foo</span>
21426 Table with broken attribute value quoting
21429 | title="Hello world|Foo
21440 <td title="Hello world">Foo
21446 Table with broken attribute value quoting on consecutive lines
21449 | title="Hello world|Foo
21450 | style="color:red|Bar
21463 <td title="Hello world">Foo
21464 </td><td style="color: red">Bar
21465 </td></tr></tbody></table>
21470 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21480 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21490 Accept empty td cell attribute
21493 | align="center" | foo || |
21498 <td align="center"> foo </td>
21505 Non-empty attributes in th-cells
21508 ! Foo !! style="color: red" | Bar
21514 <th style="color: red"> Bar
21520 Accept empty attributes in th-cells
21535 Empty table rows go away
21556 ### Parsoid-centric tests for testing RTing of inter-element separators
21557 ### Edge cases not tested by existing parser tests and specific to
21558 ### Parsoid-specific serialization strategies.
21562 RT-ed inter-element separators should be valid separators
21574 # Parsoid-only since PHP parser relies on Tidy for correct output
21576 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
21590 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
21591 <p>bar</p></small></td></tr>
21595 <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>
21600 Empty TD followed by TD with tpl-generated attribute
21605 |{{echo|style='color:red'}}|foo
21619 Indented table with an empty td
21638 Indented block & table
21652 <div data-parsoid='{"stx":"html"}'>foo</div>
21654 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
21659 Indent and comment before table row
21674 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
21675 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
21679 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
21681 Empty TR followed by a template-generated TR
21687 {{echo|<tr><td>foo</td></tr>}}
21693 <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}}]}'>
21698 ## PHP and parsoid output differ for this, and since this is primarily
21699 ## for testing Parsoid's serializer, marking this Parsoid only
21701 Empty TR followed by mixed-ws-comment line should RT correctly
21717 <!--c--> </tr><!--d-->
21723 Multi-line image caption generated by templates with/without trailing newlines
21725 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
21726 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
21728 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt9" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt10" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt11" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span></figcaption></figure>
21729 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt12" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt14" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span>\n\n</figcaption></figure>
21733 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
21737 <includeonly>foo</includeonly>
21744 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
21746 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
21749 ## PHP emits broken html for this, and since this is primarily
21750 ## a Parsoid serializer test, marking this Parsoid only
21752 Improperly nested inline or quotes tags with whitespace in between
21756 <span> <s>x</span> </s>
21759 <p><span> <s>x</s></span><s> </s>
21760 <b> <i>x</i></b><i> </i>
21765 Encapsulate protected attributes from wt
21769 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
21771 <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>
21775 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
21776 ## Having nested or stray pre tags results in the attempt to add duplicates,
21777 ## causing an assertion fail. This test tries to prevent that situation.
21779 Ensure ParagraphWrapper can deal with stray closing pre tags
21789 1. Ensure fostered text content is wrapped in element nodes
21793 <table>hi</table><table>ho</table>
21802 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
21804 parsoid=wt2html,wt2wt
21813 <tbody><tr><td> a</td></tr>
21818 Encapsulation properly handles null DSR information from foster box
21820 parsoid=wt2html,wt2wt
21822 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
21824 <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>
21828 1. Encapsulate foster-parented transclusion content
21830 parsoid=wt2wt,wt2html
21832 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
21834 <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>
21844 2. Encapsulate foster-parented transclusion content
21846 parsoid=wt2wt,wt2html
21848 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
21850 <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>
21861 3. Encapsulate foster-parented transclusion content
21863 parsoid=wt2wt,wt2html
21865 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21867 <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>"]}">
21880 4. Encapsulate foster-parented transclusion content
21882 parsoid=wt2wt,wt2html
21884 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21886 <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>"]}">
21899 5. Encapsulate foster-parented transclusion content
21901 parsoid=wt2wt,wt2html
21903 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
21905 <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>
21920 6. Encapsulate foster-parented transclusion content
21922 parsoid=wt2wt,wt2html
21924 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
21926 <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>
21942 7. Encapsulate foster-parented transclusion content
21944 parsoid=wt2wt,wt2html
21946 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
21948 <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>
21959 8. Encapsulate foster-parented transclusion content
21961 parsoid=wt2wt,wt2html
21964 }}{|{{echo|style='color:red'}}
21969 <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>
21979 9. Encapsulate foster-parented transclusion content
21981 parsoid=wt2wt,wt2html
21983 <table>{{echo|hi</table>hello}}
21985 <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>
21989 Table in fosterable position
21991 parsoid=wt2html,wt2wt
22000 <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">
22002 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
22008 # Parsoid only for bug 64747
22010 Properly encapsulate empty-content transclusions in fosterable positions
22018 <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>"}'>
22024 Support <object> element with .data attribute
22028 <object data="test.swf"></object>
22030 <object data="test.swf"></object>
22034 Don't block XML namespace declaration
22036 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
22038 <p><span>MediaWiki</span>
22041 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
22044 # -----------------------------------------------------------------
22045 # The following section of tests are primarily to spec requirements
22046 # around serialization of new/edited content.
22048 # All these tests are marked Parsoid html2wt and html2html only
22049 # ----------------------------------------------------------------
22051 # 'mi' is a localinterwiki prefix as well as a language
22053 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
22059 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
22063 New wiki links (href variations)
22067 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22068 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
22069 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
22070 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
22075 [[Toxine bactérienne]]
22079 New wiki links (content string variations)
22083 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22084 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
22085 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
22089 [[Foo_bar|./Foo_bar]]
22093 New category links (href variations)
22097 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
22098 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
22099 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
22101 [[Category:Toxine bactérienne]]
22102 [[Category:Toxine bactérienne]]
22103 [[Category:Toxine bactérienne]]
22107 New interlanguage links (href variations)
22111 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
22112 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
22113 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
22115 [[es:Toxine bactérienne]]
22116 [[es:Toxine_bactérienne]]
22117 [[es:Toxine_bactérienne]]
22121 Image: Modifying size of an image (1)
22124 "modes": ["wt2wt"],
22126 ["img[height]", "attr", "height", "22"],
22127 ["img[width]", "attr", "width", "200"]
22131 [[Image:Foobar.jpg|230x230px]]
22133 [[Image:Foobar.jpg|200x200px]]
22137 Image: Modifying size of an image (2)
22140 "modes": ["wt2wt"],
22142 ["img[height]", "attr", "height", "100"],
22143 ["img[width]", "attr", "width", "500"]
22147 [[Image:Foobar.jpg|230x230px]]
22149 [[Image:Foobar.jpg|500x500px]]
22152 # Change in size is ignored so long as class='mw-default-size'
22154 Image: Modifying size of an image (3)
22157 "modes": ["wt2wt"],
22159 ["figure[class]", "removeClass", "mw-default-size"],
22160 ["figure img", "attr", "height", "19"],
22161 ["figure img", "attr", "width", "170"]
22165 [[Image:Foobar.jpg|thumb]]
22167 [[Image:Foobar.jpg|thumb|170x170px]]
22171 Image: Modifying alignment of an image (bug 48665)
22174 "modes": ["wt2wt"],
22176 ["figure[class]", "removeClass", "mw-halign-right"],
22177 ["figure[class]", "addClass", "mw-halign-left"]
22181 [[Image:Foobar.jpg|thumb|caption|right]]
22183 [[Image:Foobar.jpg|thumb|caption|left]]
22187 Image: Modifying mw-default-size of an frameless image (bug 62805)
22190 "modes": ["wt2wt"],
22192 ["figure.mw-default-size", "removeClass", "mw-default-size"]
22196 [[Image:Foobar.jpg|frameless|right]]
22198 [[Image:Foobar.jpg|frameless|right|220x220px]]
22202 Image: Modifying valign of an image (bug 49221)
22205 "modes": ["wt2wt"],
22207 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
22208 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
22212 [[File:Foobar.jpg|20px|middle]]
22214 [[File:Foobar.jpg|20px|text-top]]
22218 Image: Modifying alt attribute of an image (bug 56400)
22221 "modes": ["wt2wt"],
22223 ["img[alt]", "attr", "alt", "some alternate edited text"]
22227 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
22229 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
22233 Image: Modifying caption of an image
22236 "modes": ["wt2wt"],
22238 ["figcaption", "text", "new caption"]
22242 [[Image:Foobar.jpg|thumb|original caption]]
22244 [[Image:Foobar.jpg|thumb|new caption]]
22248 Image: empty alt attribute (bug 48924)
22252 [[File:Foobar.jpg|thumb|alt=|bar]]
22254 <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>
22258 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
22263 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
22265 #<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>
22269 Image: Block level image should have \n before and after
22272 [[File:Foobar.jpg|right|thumb|150x150px]]
22276 <figure class="mw-halign-right" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="17" width="150"/></a></figure>
22281 Image: New block level image should have \n before and after (existing content)
22284 [[File:Foobar.jpg|right|thumb|150x150px]]
22288 <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>
22293 Image: upright option (parsoid)
22297 [[File:Foobar.jpg|thumb|upright|caption]]
22298 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
22299 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
22301 <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>
22302 <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>
22303 <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>
22307 Image: upright option is ignored on inline and frame images (parsoid)
22311 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
22313 <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>
22317 Image: from basic HTML (1)
22321 <span typeof="mw:Image">
22322 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22325 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22329 Image: from basic HTML (2)
22333 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22335 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22339 Image: from basic HTML (3)
22343 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
22345 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
22349 Image: from basic HTML (4)
22353 <img src="File:Foobar.jpg">
22355 [[File:Foobar.jpg|link=]]
22359 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
22366 <li><p>foo</p></li>
22371 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
22377 <ul> <li>foo</li></ul>
22381 Don't strip leading whitespace when handling indent-pre suppressing tags
22389 '''This is very bold of you!'''
22393 indented cell (no pre-wrapping!)
22400 <tr><td> indented row</td></tr>
22403 <b>This is very bold of you!</b>
22406 indented cell (no pre-wrapping!)
22414 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
22419 <nowiki> </nowiki><span>bar</span>
22422 <nowiki> </nowiki></span>bar2
22425 <nowiki> </nowiki><span>bar</span>
22428 <nowiki> </nowiki><span>foo</span>
22446 Lists: Add space after bullets
22452 * <span> baz</span>
22457 <li><span> baz</span></li>
22462 Lists: Dont insert newlines in a serialized list item.
22469 <ul><li>a<br>b</li><li>c</li></ul>
22473 Headings: Add space before/after == (Bug 51744)
22483 == <span> baz</span> ==
22488 <h2><span> baz</span></h2>
22492 Parsoid: Serialize positional parameters with = in them as named parameter
22498 {{echo|1 = f=oo|2 = bar}}
22500 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22501 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22502 {{echo|<nowiki>f=oo</nowiki>|bar}}
22504 <p about="#mwt1" typeof="mw:Transclusion"
22505 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
22507 <p about="#mwt1" typeof="mw:Transclusion"
22508 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
22510 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22511 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22512 <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>
22516 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
22532 <div>a<p>b</p></div>
22541 Substrings resembling wikitext in hrefs should not get nowiki escapes
22547 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
22550 #-----------------------------
22551 # I/B quote minimization tests
22552 #-----------------------------
22555 1. I/B quote minimization: wikitext-only tags should be combined
22575 <p><i>A</i><i>B</i></p>
22576 <p><b>A</b><b>B</b></p>
22577 <p><i>A</i><b><i>B</i></b></p>
22578 <p><b>A</b><i><b>B</b></i></p>
22579 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
22580 <p><i><b>A</b></i><i><b>B</b></i></p>
22581 <p><i><b>A</b></i><b><i>B</i></b></p>
22582 <p><b><i>A</i></b><i><b>B</b></i></p>
22586 2. I/B quote minimization: wikitext and html tags should not be combined
22592 ''A''<nowiki/>'''<i>B</i>'''
22594 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
22595 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
22599 3. I/B quote minimization: templated content stops minimization
22603 ''A''{{echo|''B''}}
22605 ''A''{{echo|'''''B'''''}}
22607 <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>
22608 <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>
22612 4. I/B quote minimization: new content should be mimimized with adjacent old content
22622 <p><i>A</i><i>B</i></p>
22623 <p><b>A</b><b>B</b></p>
22624 <p><i>A</i><b><i>B</i></b></p>
22628 5a. Merge adjacent quote nodes if they've been edited
22631 "modes": ["wt2wt"],
22633 ["p", "contents", "remove", ":contains('b')"]
22643 5b. Merge adjacent quote nodes if they've been edited
22646 "modes": ["wt2wt"],
22652 ''a''<span id="x">b</span>''c''
22657 #------------------------------------
22658 # End of I/B quote minimization tests
22659 #------------------------------------
22662 Bug 54262: New entities
22668 <span typeof="mw:Entity"> </span>
22671 ## Note that there is no wikitext output for 'unknownproperty' ##
22672 ## Unknown magic words are silently dropped ##
22687 __NOCONTENTCONVERT__
22689 <meta property='mw:PageProp/toc' />
22690 <meta property='mw:PageProp/notoc' />
22691 <meta property='mw:PageProp/forcetoc' />
22692 <meta property='mw:PageProp/index' />
22693 <meta property='mw:PageProp/noindex' />
22694 <meta property='mw:PageProp/nogallery' />
22695 <meta property='mw:PageProp/noeditsection' />
22696 <meta property='mw:PageProp/notitleconvert' />
22697 <meta property='mw:PageProp/nocontentconvert' />
22698 <meta property='mw:PageProp/unknownproperty' />
22702 Consecutive <pre>s should not get merged
22704 parsoid=html2wt,html2html
22720 <pre>a</pre><pre>b</pre>
22734 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
22738 [[Special:BookSources/1234567890|ISBN 1234567895]]
22740 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
22744 Edited RFC links not serializable as RFC links should serialize as extlinks
22748 [//tools.ietf.org/html/rfc123 New RFC]
22750 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
22754 Edited PMID links not serializable as PMID links should serialize as extlinks
22758 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
22760 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
22764 Edited Redirect link should emit a non-piped wikitext link
22770 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
22774 T75121: Infer extension name from typeOf if data-mw is not present
22780 <div typeOf="mw:Extension/foo"></div>
22783 # -----------------------------------------------------------------
22784 # End of section for Parsoid-only html2wt tests for serialization
22786 # -----------------------------------------------------------------
22793 Try for 100% code coverage