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)
552 # same html as previous, but wikitext adjusted to match parsoid html2wt
554 Italics and bold: 2-quote opening sequence: (2,3) w/ nowiki
563 Italics and bold: 2-quote opening sequence: (2,4)
573 # same html as previous, but wikitext adjusted to match parsoid html2wt
575 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
577 ''foo<nowiki>''</nowiki>''
583 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
585 Italics and bold: 2-quote opening sequence: (2,5)
598 # same html as previous, but wikitext adjusted to match parsoid html2wt
600 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
602 ''foo'''''<nowiki/>'''
613 ### 3-quote opening sequence tests
617 Italics and bold: 3-quote opening sequence: (3,2)
627 # same html as previous, but wikitext adjusted to match parsoid html2wt
629 Italics and bold: 3-quote opening sequence: (3,2) w/ nowiki
638 Italics and bold: 3-quote opening sequence: (3,3)
647 Italics and bold: 3-quote opening sequence: (3,4)
657 # same html as previous, but wikitext adjusted to match parsoid html2wt
659 Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki
667 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
669 Italics and bold: 3-quote opening sequence: (3,5)
682 # same html as previous, but wikitext adjusted to match parsoid html2wt
684 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
686 '''foo'''''<nowiki/>''
697 ### 4-quote opening sequence tests
701 Italics and bold: 4-quote opening sequence: (4,2)
711 # same html as previous, but wikitext adjusted to match parsoid html2wt
713 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
715 <nowiki>''</nowiki>''foo''
722 Italics and bold: 4-quote opening sequence: (4,3)
732 # same html as previous, but wikitext adjusted to match parsoid html2wt
734 Italics and bold: 4-quote opening sequence: (4,3) w/ nowiki
743 Italics and bold: 4-quote opening sequence: (4,4)
753 # same html as previous, but wikitext adjusted to match parsoid html2wt
755 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
757 '<nowiki/>'''foo'<nowiki/>'''
763 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
765 Italics and bold: 4-quote opening sequence: (4,5)
774 <p>'<b>foo</b><i></i>
778 # same html as previous, but wikitext adjusted to match parsoid html2wt
780 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
782 '<nowiki/>'''foo'''''<nowiki/>''
787 <p>'<b>foo</b><i></i>
793 ### 5-quote opening sequence tests
797 Italics and bold: 5-quote opening sequence: (5,2)
807 # same html as previous, but wikitext adjusted to match parsoid html2wt
808 # skipping wt2html and html2html because it wants to put <i> before <b>
810 Italics and bold: 5-quote opening sequence: (5,2+3)
812 parsoid=wt2wt,html2wt
821 Italics and bold: 5-quote opening sequence: (5,3)
831 # same html as previous, but wikitext adjusted to match parsoid html2wt
833 Italics and bold: 5-quote opening sequence: (5,3+2)
842 Italics and bold: 5-quote opening sequence: (5,4)
848 <p><i><b>foo'</b></i>
852 # same html as previous, but wikitext adjusted to match parsoid html2wt
854 Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki
856 '''''foo'<nowiki/>'''''
858 <p><i><b>foo'</b></i>
863 Italics and bold: 5-quote opening sequence: (5,5)
872 ### multiple quote sequences in a line
875 Italics and bold: multiple quote sequences: (2,4,2)
881 <p><i>foo'<b>bar</b></i>
886 # same html as previous, but wikitext adjusted to match parsoid html2wt
888 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
890 ''foo'<nowiki/>'''bar'''''
892 <p><i>foo'<b>bar</b></i>
898 Italics and bold: multiple quote sequences: (2,4,3)
904 <p><i>foo'<b>bar</b></i>
909 # same html as previous, but wikitext adjusted to match parsoid html2wt
911 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
913 ''foo'<nowiki/>'''bar'''''
915 <p><i>foo'<b>bar</b></i>
921 Italics and bold: multiple quote sequences: (2,4,4)
927 <p><i>foo'<b>bar'</b></i>
932 # same html as previous, but wikitext adjusted to match parsoid html2wt
934 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
936 ''foo'<nowiki/>'''bar'<nowiki/>'''''
938 <p><i>foo'<b>bar'</b></i>
943 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
945 Italics and bold: multiple quote sequences: (3,4,2)
954 <p><b>foo'</b>bar<i></i>
958 # same html as previous, but wikitext adjusted to match parsoid html2wt
960 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
964 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
969 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
974 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
976 Italics and bold: multiple quote sequences: (3,4,3)
985 <p><b>foo'</b>bar<b></b>
989 # same html as previous, but wikitext adjusted to match parsoid html2wt
991 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
993 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
998 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1003 ### other quote tests
1006 Italics and bold: other quote tests: (2,3,5)
1008 ''this is about '''foo's family'''''
1010 <p><i>this is about <b>foo's family</b></i>
1016 Italics and bold: other quote tests: (2,(3,3),2)
1018 ''this is about '''foo's''' family''
1020 <p><i>this is about <b>foo's</b> family</i>
1026 Italics and bold: other quote tests: (3,2,3,2)
1030 '''this is about ''foo'''s family''
1032 <p><b>this is about <i>foo</i></b><i>s family</i>
1037 # same html as previous, but wikitext adjusted to match parsoid html2wt
1039 Italics and bold: other quote tests: (3,2,3+2+2,2)
1041 '''this is about ''foo'''''<nowiki/>''s family''
1043 <p><b>this is about <i>foo</i></b><i>s family</i>
1049 Italics and bold: other quote tests: (3,2,3,3)
1053 '''this is about ''foo'''s family'''
1055 <p>'<i>this is about </i>foo<b>s family</b>
1060 # same html as previous, but wikitext adjusted to match parsoid html2wt
1062 Italics and bold: other quote tests: (3,2,3,3) w/ nowiki
1064 '<nowiki/>''this is about ''foo'''s family'''
1066 <p>'<i>this is about </i>foo<b>s family</b>
1072 Italics and bold: other quote tests: (3,(2,2),3)
1074 '''this is about ''foo's'' family'''
1076 <p><b>this is about <i>foo's</i> family</b>
1082 Italicized possessive
1084 The ''[[Main Page]]'''s talk page.
1086 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1091 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1092 (Requires tidy for PHP parser output to be fixed up)
1094 parsoid=wt2html,wt2wt
1111 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1112 <td><i>a</i></td><td><i>b</i></td></tr>
1121 Non-html5 tags should be accepted
1123 <center>''foo''</center>
1125 <font>''foo''</font>
1126 <strike>''foo''</strike>
1129 <center><i>foo</i></center>
1130 <p><big><i>foo</i></big>
1131 <font><i>foo</i></font>
1132 <strike><i>foo</i></strike>
1138 <wbr> is valid wikitext (bug 52468)
1146 # <strike> is HTML4, <s> is HTML4/5.
1148 <s> or <strike> for strikethrough
1150 <strike>strike</strike>
1154 <p><strike>strike</strike>
1162 Text-level semantic html elements in wikitext
1165 <strong>text</strong>
1181 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1188 <strong>text</strong>
1204 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1212 # test cases taken from
1213 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1215 Ruby markup (W3C-style)
1217 ; Mono-ruby for individual base characters
1218 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1220 : <ruby>今日<rt>きょう</rt></ruby>
1222 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1224 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1226 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1228 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1229 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1230 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1233 <dl><dt> Mono-ruby for individual base characters</dt>
1234 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1235 <dt> Group ruby</dt>
1236 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1237 <dt> Jukugo ruby</dt>
1238 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1239 <dt> Inline ruby</dt>
1240 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1241 <dt> Double-sided ruby</dt>
1242 <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>
1244 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1245 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1246 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1251 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1253 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1255 <b→> doesn't work! </b→>
1257 <bä> doesn't work! </bä>
1259 <boo> works fine </boo>
1261 <s.foo>s.foo</s.foo>
1265 <p><b→> doesn't work! </b→>
1266 </p><p><bä> doesn't work! </bä>
1267 </p><p><boo> works fine </boo>
1268 </p><p><s.foo>s.foo</s.foo>
1269 </p><p><sub-ID#1>
1274 Isolated close tags should be treated as literal text (bug 52760)
1281 </p><p><s.foo>s</s>
1286 ### Special characters
1290 Bare pipe character (bug 52363)
1299 Bare pipe character from a template (bug 52363)
1308 ### <nowiki> test cases
1312 <nowiki> unordered list
1314 <nowiki>* This is not an unordered list item.</nowiki>
1316 <p>* This is not an unordered list item.
1323 <nowiki>Lorem ipsum dolor
1331 <p>Lorem ipsum dolor
1344 :There is not nowiki.
1345 :There is <nowiki>nowiki</nowiki>.
1347 #There is not nowiki.
1348 #There is <nowiki>nowiki</nowiki>.
1350 *There is not nowiki.
1351 *There is <nowiki>nowiki</nowiki>.
1353 <dl><dd>There is not nowiki.</dd>
1354 <dd>There is nowiki.</dd></dl>
1355 <ol><li>There is not nowiki.</li>
1356 <li>There is nowiki.</li></ol>
1357 <ul><li>There is not nowiki.</li>
1358 <li>There is nowiki.</li></ul>
1363 Entities inside <nowiki>
1365 <nowiki><</nowiki>
1372 Entities inside template parameters
1378 <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>
1382 Properly escape nowiki when combined with other wiki markup
1386 <nowiki>* </nowiki></nowiki> tag
1388 <p>* </nowiki> tag</p>
1395 Comments and Indent-Pre
1397 <!-- comment 1 --> asdf
1399 <!-- comment 1 --> asdf
1402 <!-- comment 1 --> asdf
1403 <!-- comment 2 -->xyz
1405 <!-- comment 1 --> asdf
1406 <!-- comment 2 --> xyz
1462 asdf<!-- comment 1 -->jkl
1472 <!-- foo --> b <!-- bar -->
1486 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1492 Comment semantics and delimiters
1494 <!-- --><!----><!-----><!------>
1500 Comment semantics and delimiters, redux
1502 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1503 -- foo -- funky huh? ... -->
1509 Comment semantics and delimiters: directors cut
1511 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1512 everything starting with < followed by !-- until the first -- and > we see,
1513 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1521 Comment semantics: nesting
1523 <!--<!-- no, we're not going to do anything fancy here -->-->
1530 Comment semantics: unclosed comment at end
1532 <!--This comment will run out to the end of the document
1537 # Bug 58184: document parsoid's behaviour
1539 Suppress comment closing tag in lenient browsers
1541 parsoid=wt2html,html2html
1543 <!-- Browsers--!> think this is closed -->
1547 <!-- Browsers--¡> think this is closed -->
1551 Comment in template title
1560 Comment on its own line post-expand
1572 Comment on its own line post-expand with non-significant whitespace
1584 Multiple comments should still parse as SOL-transparent
1586 parsoid=wt2html,wt2wt
1589 <!--c2--><!--c3--><!--c4-->*b
1600 ### paragraph wrapping tests
1615 Block tag on one line (<div>)
1631 Block tag on one line (<blockquote>)
1633 a <blockquote>foo</blockquote>
1637 a <blockquote>foo</blockquote>
1649 Block tag on both lines (<div>)
1666 Block tag on both lines (<blockquote>)
1668 a <blockquote>foo</blockquote>
1670 b <blockquote>foo</blockquote>
1672 a <blockquote>foo</blockquote>
1673 b <blockquote>foo</blockquote>
1687 Multiple lines without block tags
1711 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1712 # So, we have a separate section for Parsoid. We don't want
1713 # to mimic this stripping behavior in Parsoid. It affects
1714 # editing experience and also requires us to maintain additional
1717 Empty lines between lines with block tags
1755 <div data-parsoid='{"stx":"html"}'></div>
1758 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1761 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1763 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1766 <div data-parsoid='{"stx":"html"}'>e</div>
1769 ## PHP parser emits output which is broken
1770 ## XXX The parsoid output doesn't match the tidy output.
1772 Unclosed HTML p-tags should be handled properly
1780 <p>foo</div></p>
1784 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1789 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1790 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1793 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
1797 a [[Category:A1]] [[Category:A2]]
1802 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1806 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
1812 <link href="Category:A1"/><p>a</p>
1816 ### Preformatted text
1825 And a [[Main Page|link]]
1831 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1836 Tabs don't trigger preformatted text
1840 This is preformatted text.
1846 <pre>This is preformatted text.
1852 Ident preformatting with inline content
1863 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1880 Regression with preformatted in <center>
1894 Bug 52763: Preformatted in <blockquote>
1900 indented cell (no pre-wrapping!)
1910 <p> indented cell (no pre-wrapping!)
1918 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1935 Bug 15491: <ins>/<del> in blockquote
1938 Foo <del>bar</del> <ins>baz</ins> quux
1942 <p>Foo <del>bar</del> <ins>baz</ins> quux
1948 # Note that the p-wrapping is newline sensitive, which could be
1949 # considered a bug: tidy will wrap only the 'Foo' in the example
1950 # below in a <p> tag. (see comment 23-25 of bug #6200)
1952 Bug 15491: <ins>/<del> in blockquote (2)
1954 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1957 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1963 <del>bar</del> <ins>baz</ins> quux</blockquote>
1967 <pre> with attributes (bug 3202)
1969 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1971 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1976 <pre> with width attribute (bug 3202)
1978 <pre width="8">Narrow screen goodies</pre>
1980 <pre width="8">Narrow screen goodies</pre>
1985 <pre> with forbidden attribute (bug 3202)
1987 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1989 <pre width="8">Narrow screen goodies</pre>
1994 Entities inside <pre>
2003 <pre> with forbidden attribute values (bug 3202)
2005 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2007 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2012 <nowiki> inside <pre> (bug 13238)
2020 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2028 <pre><nowiki>Foo</nowiki></pre>
2033 <nowiki> and <pre> preference (first one wins)
2064 </pre> inside nowiki
2066 <nowiki></pre></nowiki>
2072 # Parsoid doesn't strip empty tags, like Tidy does.
2074 Empty pre; pre inside other HTML tags (bug 54946)
2076 parsoid=wt2html,wt2wt
2107 HTML pre followed by indent-pre
2122 <p><pre>foo</pre></p>
2124 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2128 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2136 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2146 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2158 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2179 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2183 {{echo| foo}}{{echo| bar}}
2188 {{echo|<!--cmt--> foo}}
2190 <!--cmt-->{{echo| foo}}
2192 {{echo|{{echo| }}bar}}
2210 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2247 Things that look like <pre> tags aren't treated as such
2249 Barack Obama <President> of the United States
2250 <President></President>
2252 <p>Barack Obama <President> of the United States
2253 <President></President>
2257 ## PHP parser discards the "<pre " string
2259 Handle broken pre-like tags (bug 64025)
2263 {{echo|<pre <pre>x</pre>}}
2265 <table><pre </table>
2268 <table><pre></pre></table>
2271 <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>
2280 Parsoid: handle pre with space after attribute
2284 <pre style="width:50%;" >{{echo|foo}}</pre>
2286 <pre style="width:50%;">{{echo|foo}}</pre>
2289 # TODO / maybe: fix wt2wt for this
2291 Parsoid: Don't paragraph-wrap fosterable content
2317 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2345 #--------------------------------------------------------------------
2346 # Transclusion parameter whitespace stripping tests
2347 # Behavior is different for positional and named parameters
2348 #--------------------------------------------------------------------
2350 Templates: Strip leading and trailing whitespace from named-param values
2354 {{echo|1= {{echo|b}} }}
2367 <ul><li> d</li></ul>
2372 Templates: Don't strip whitespace from positional-param values
2376 {{echo|{{echo|b}} }}
2408 <ul><li> f</li></ul>
2416 Templates: Handle empty comment-and-ws-only lines correctly
2419 <!--should be ignored-->
2420 <!--should be ignored as well-->
2429 Templates: Handle comments in the target
2432 <!-- should be ignored -->
2435 {{echo<!-- should be ignored -->
2438 {{echo<!-- should be ignored -->|foo}}
2440 {{<!-- should be ignored -->echo|foo}}
2442 <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>
2444 <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>
2446 <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>
2448 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2452 Templates: Handle comments in parameter names (bug 67657)
2455 <!-- should be ignored -->
2459 <!-- should be ignored -->
2462 {{echo|1<!-- should be ignored --> = foo}}
2464 {{echo|<!-- should be ignored -->1 = foo}}
2466 <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>
2468 <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>
2470 <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>
2472 <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>
2476 Templates: Other wikitext in parameter names (bug 67657)
2480 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2486 #--------------------------------------------------------------------
2487 # Transclusion parameter escaping tests
2488 #--------------------------------------------------------------------
2490 Templates: Parsoid parameter escaping test 1
2494 {{echo|[foo]|{{echo|[bar]}}}}
2496 <p about="#mwt1" typeof="mw:Transclusion"
2497 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2501 Parsoid: Pipes in external links in template parameter
2505 {{echo|[{{echo|http://example.com}} link]}}
2507 <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>
2511 Parsoid: pipe in transclusion parameter
2515 {{echo|http://foo.com/a|b}}
2517 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2518 typeof="mw:Transclusion"
2519 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>
2523 Parsoid: Pipe in external link target and content in template parameter
2525 parsoid=html2wt,wt2wt
2527 {{echo|[http://foo.com/a|b a|b]}}
2529 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2530 typeof="mw:Transclusion"
2531 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2532 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2536 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2540 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2542 <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>
2546 Templates: Don't escape already nowiki-escaped text in template parameters
2548 parsoid=html2wt,wt2wt
2550 {{echo|foo<nowiki>|</nowiki>bar}}
2551 {{echo|<nowiki><div></nowiki>}}
2552 {{echo|<nowiki></nowiki>}}
2554 <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>
2555 <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>
2556 <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>
2562 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2564 parsoid=html2wt,wt2wt
2566 {{echo|{{echo|1=bar}}}}
2568 <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>
2573 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2579 <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>
2583 ### Parsoid-centric tests for testing RT edge cases for pre
2587 1a. Indent-Pre and Comments
2600 1b. Indent-Pre and Comments
2613 1c. Indent-Pre and Comments
2626 1d. Indent-Pre and Comments
2627 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2640 2a. Indent-Pre and tables
2661 2b. Indent-Pre and tables
2677 2c. Indent-Pre and tables (bug 42252)
2694 2d. Indent-Pre and tables
2711 <tbody><tr><td> b</td></tr>
2716 2e. Indent-Pre and table-line syntax
2729 2f. Indent-pre started by table-line syntax
2748 3a. Indent-Pre and block tags (single-line html)
2752 c <blockquote> foo </blockquote>
2757 c <blockquote> foo </blockquote>
2758 <pre><span> foo </span>
2761 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2762 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2763 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2764 <pre><span> foo </span>
2781 3b. Indent-Pre and block tags (multi-line html)
2786 <pre>a <span>foo</span>
2791 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2792 b <div data-parsoid='{"stx":"html"}'> foo </div>
2802 3c. Indent-Pre and block tags (pre-content on separate line)
2866 4. Indent-Pre and extension tags
2872 a <ul class="gallery mw-gallery-traditional">
2873 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2874 <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>
2875 <div class="gallerytext">
2882 <ul class="gallery mw-gallery-traditional">
2883 <li class="gallerybox" style="width: 155px">
2884 <div style="width: 155px">
2885 <div class="thumb" style="width: 150px;">
2886 <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>
2888 <div class="gallerytext"></div>
2895 Table wikitext syntax outside wiki-tables
2898 ! not a table heading
2901 | class="foo bar" | baz
2908 ! not a table heading
2911 | class="foo bar" | baz
2920 Render paragraphs when indent-pre is suppressed in blocklevels
2937 4. Multiple spaces at start-of-line
2955 ## NOTE: the leading white-space chars on empty line are significant
2957 5a. White-space in indent-pre
2969 ## NOTE: the leading white-space chars on empty line are significant
2971 5b. White-space in indent-pre
2990 5c. White-space in indent-pre
3003 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3026 7a. Indent-pre and category links
3028 parsoid=wt2html,wt2wt
3030 [[Category:foo]] <!-- No pre-wrapping -->
3031 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3033 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3034 <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 -->
3038 7b. Indent-pre and category links
3040 parsoid=wt2html,wt2wt
3043 [[Category:foo]] {{echo|b}}
3046 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
3047 <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>
3051 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3055 HTML-pre: 1. embedded newlines
3089 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3091 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3095 <pre data-parsoid='{"stx":"html"}'>
3100 <pre data-parsoid='{"stx":"html"}'>
3108 HTML-pre: big spaces
3145 <pre data-parsoid='{"stx":"html"}'>
3164 HTML-pre: 2: indented text
3177 HTML-pre: 3: other wikitext
3198 ### Definition lists
3205 <dl><dt> name </dt>
3206 <dd> Definition</dd></dl>
3211 Definition list for indentation only
3215 <dl><dd> Indented text</dd></dl>
3220 Definition list with no space
3225 <dd>Definition</dd></dl>
3230 Definition list with URL link
3232 ; http://example.com/ : definition
3234 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3235 <dd> definition</dd></dl>
3240 Definition list with bracketed URL link
3242 ;[http://www.example.com/ Example]:Something about it
3244 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3245 <dd>Something about it</dd></dl>
3250 Definition list with wikilink containing colon
3252 ; [[Help:FAQ]]: The least-read page on Wikipedia
3254 <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>
3255 <dd> The least-read page on Wikipedia</dd></dl>
3259 # At Brion's and JeLuF's insistence... :)
3261 Definition list with news link containing colon
3263 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3265 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3266 <dd> This isn't even a real newsgroup!</dd></dl>
3271 Malformed definition list with colon
3273 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3275 <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>
3280 Definition lists: colon in external link text
3282 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3284 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3285 <dd> OK, I made that up</dd></dl>
3290 Definition lists: colon in HTML attribute
3292 ;<b style="display: inline">bold</b>
3294 <dl><dt><b style="display: inline">bold</b></dt></dl>
3299 Definition lists: self-closed tag
3301 ;one<br/>two : two-line fun
3303 <dl><dt>one<br />two </dt>
3304 <dd> two-line fun</dd></dl>
3309 Bug 11748: Literal closing tags
3313 <dd>test test test test test</dd>
3315 <dd>test test test test test</dd>
3320 <dd>test test test test test</dd>
3322 <dd>test test test test test</dd>
3328 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3331 ; term : description
3336 <dl><dt> term </dt>
3337 <dd> description</dd></dl>
3338 <ul><li> unordered</li></ul>
3345 Definition list with empty definition and following paragraph
3357 Nested definition lists using html syntax
3366 Definition Lists: No nesting: Multiple dd's
3379 Definition Lists: Indentation: Regular
3387 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3392 Definition Lists: Indentation: Missing 1st level
3398 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3403 Definition Lists: Indentation: Multi-level indent
3407 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3412 Definition Lists: Hacky use to indent tables
3419 should be left alone
3421 <dl><dd><dl><dd><table>
3426 </td></tr></table></dd></dl></dd></dl>
3428 should be left alone
3433 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3441 should be left alone
3444 <dl><dd><dl><dd><table><tr>
3447 </tr></table><!-- bar --></dd></dl></dd></dl>
3449 should be left alone</p>
3453 Definition Lists: Hacky use to indent tables, with comment before table
3459 <dl><dd><dl><dd><!-- foo --><table><tr>
3461 </tr></table></dd></dl></dd></dl>
3466 Definition Lists: Hacky use to indent tables (WS-insensitive)
3475 <dd> <table><tr><td>a</td></tr></table> </dd>
3478 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3479 ## as an empty dt item. It also ignores all but the last ";" when followed
3480 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3481 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3484 ## Ex: ";;t2 ::d2" is transformed into:
3496 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3497 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3508 ## All Parsoid only definition list tests have this difference.
3510 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3511 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3514 Table / list interaction: indented table with lists in table contents
3529 <ul><li> b</li></ul>
3533 <ul><li> d</li></ul>
3534 </td></tr></table></dd></dl>
3539 Table / list interaction: lists nested in tables nested in indented lists
3562 </td></tr></table></dd></dl>
3569 Definition Lists: Nesting: Multi-level (Parsoid only)
3599 Definition Lists: Nesting: Test 2 (Parsoid only)
3619 Definition Lists: Nesting: Test 3 (Parsoid only)
3647 Definition Lists: Nesting: Test 4
3652 <dl><dd><dl><dd><dl><dt>t3</dt>
3653 <dd>d3</dd></dl></dd></dl></dd></dl>
3658 ## The Parsoid team believes the following three test exposes a
3659 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3660 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3661 ## It also exposes a "misfeature" in tidy, which doesn't like
3662 ## <dl> tags with a single <dt> child; it converts the <dt> into
3663 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3665 Definition Lists: Mixed Lists: Test 1
3671 <dl><dd><dl><dt><ul><li> foo</li>
3672 <li> bar</li></ul></dt></dl>
3673 <dl><dt> baz</dt></dl></dd></dl>
3708 Definition Lists: Mixed Lists: Test 2
3713 <ul><li><dl><dd> d1</dd>
3714 <dd> d2</dd></dl></li></ul>
3720 Definition Lists: Mixed Lists: Test 3
3725 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3726 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3732 Definition Lists: Mixed Lists: Test 4
3737 <ul><li><dl><dt>d1 </dt>
3740 <dd>d4</dd></dl></li></ul>
3746 Definition Lists: Mixed Lists: Test 5
3752 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3758 Definition Lists: Mixed Lists: Test 6
3763 <ol><li><ul><li><dl><dd>d1
3764 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3770 Definition Lists: Mixed Lists: Test 7
3775 <dl><dd><ul><li> d1</li>
3776 <li> d2</li></ul></dd></dl>
3782 Definition Lists: Mixed Lists: Test 8
3787 <dl><dd><ul><li> d1</li></ul>
3788 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3794 Definition Lists: Mixed Lists: Test 9
3798 <ul><li><dl><dt>foo </dt>
3799 <dd>bar</dd></dl></li></ul>
3805 Definition Lists: Mixed Lists: Test 10
3809 <ul><li><ol><li><dl><dt>foo </dt>
3810 <dd>bar</dd></dl></li></ol></li></ul>
3814 # The Parsoid team disagrees with the PHP parser's seemingly-random
3815 # rules regarding dd/dt on the next two tests. Parsoid is more
3816 # consistent, and recognizes the shared nesting and keeps the
3817 # still-open tags around until the nesting is complete.
3818 # (And tidy again converts <dt> to <dd> before 'bar'.)
3821 Definition Lists: Mixed Lists: Test 11
3826 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3827 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3828 <dl><dt>boo </dt>
3829 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3884 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3885 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3889 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3890 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3899 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
3901 Definition Lists: Weird Ones: Test 1
3903 *#;*::;; foo : bar (who uses this?)
3905 <ul><li><ol><li><dl><dt> foo </dt>
3906 <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>
3925 <dt>bar (who uses this?)</dt>
3957 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3958 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3973 External links: non-bracketed
3975 Non-bracketed: http://example.com
3977 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3981 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3983 External links: numbered
3985 Numbered: [http://example.com]
3986 Numbered: [http://example.net]
3987 Numbered: [http://example.com]
3989 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
3990 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
3991 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
3994 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
3995 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
3996 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4000 External links: specified text
4002 Specified text: [http://example.com link]
4004 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4009 External links: trail
4011 Linktrails should not work for external links: [http://example.com link]s
4013 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4018 External links: dollar sign in URL
4020 http://example.com/1$2345
4022 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4026 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4028 External links: dollar sign in URL (autonumber)
4030 [http://example.com/1$2345]
4032 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4035 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4039 External links: open square bracket forbidden in URL (bug 4377)
4041 parsoid=wt2html,wt2wt,html2html
4043 http://example.com/1[2345
4045 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4048 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4052 External links: open square bracket forbidden in URL (named) (bug 4377)
4054 parsoid=wt2html,html2html
4056 [http://example.com/1[2345]
4058 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4061 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4064 # parsoid adds a space before the link name
4066 External links: open square bracket forbidden in URL (named) (bug 4377)
4069 [http://example.com/1 [2345]
4071 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4076 External links: nowiki in URL link text (bug 6230)
4078 [http://example.com/ <nowiki>''example site''</nowiki>]
4080 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4085 External links: newline forbidden in text (bug 6230 regression check)
4087 [http://example.com/ first
4090 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4096 External links: Pipe char between url and text
4098 [http://example.com | link]
4100 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4105 External links: protocol-relative URL in brackets
4107 [//example.com/ Test]
4109 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4113 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4115 External links: protocol-relative URL in brackets without text
4119 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4122 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4126 External links: protocol-relative URL in free text is left alone
4130 <p>//example.com/Foo
4135 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4137 foo//example.com/Foo
4139 <p>foo//example.com/Foo
4144 External links: with no contents
4146 [http://en.wikipedia.org/wiki/Foo]
4148 [[wikipedia:Foo|Bar]]
4150 [[wikipedia:Foo|<span>Bar</span>]]
4152 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4153 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4154 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4157 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4158 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4159 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4163 External links: Free with trailing punctuation
4173 http://example.com/url_with_(brackets)
4175 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4176 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4177 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4178 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4179 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4180 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4181 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4182 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4183 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4190 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4192 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4197 External image from https
4199 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4201 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4206 External image (when not allowed)
4208 wgAllowExternalImages=0
4210 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4212 <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>
4217 Link to non-http image, no img tag
4219 Link to non-http image, no img tag: ftp://example.com/test.jpg
4221 <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>
4226 External links: terminating separator
4228 Terminating separator: http://example.com/thing,
4230 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4235 External links: intervening separator
4237 Intervening separator: http://example.com/1,2,3
4239 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4244 External links: old bug with URL in query
4246 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4248 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4253 External links: old URL-in-URL bug, mixed protocols
4255 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4257 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4262 External links: URL in text
4264 URL in text: [http://example.com http://example.com]
4266 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4271 External links: Clickable images
4273 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4275 <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>
4280 External links: raw ampersand
4282 Old & use: http://x&y
4284 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4289 External links: encoded ampersand
4291 Old & use: http://x&y
4293 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4296 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4300 External links: encoded equals (bug 6102)
4302 http://example.com/?foo=bar
4304 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4307 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4311 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4312 ## does it number them. As discussed in bug 53505, we can identify
4313 ## autonumbered links via CSS.
4317 External links: [raw ampersand]
4319 Old & use: [http://x&y]
4321 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4324 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4327 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4328 # mode will return the [raw ampersand] wikitext
4330 External links: [encoded ampersand]
4332 parsoid=wt2html,wt2wt,html2html
4334 Old & use: [http://x&y]
4336 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4339 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4343 External links: [raw equals]
4345 [http://example.com/?foo=bar]
4347 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4350 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4353 # note that parsoid html is identical to [raw equals] case; so html2wt
4354 # mode will return the [raw equals] wikitext
4356 External links: [encoded equals] (bug 6102)
4358 parsoid=wt2html,wt2wt,html2html
4360 [http://example.com/?foo=bar]
4362 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4365 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4368 # xxx parsoid strips the IDN character, so the round-trip tests will
4369 # obviously fail and are disabled. --cscott
4371 External links: [IDN ignored character reference in hostname; strip it right off]
4373 parsoid=wt2html,wt2wt,html2html
4375 [http://e‌xample.com/]
4377 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4380 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4383 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4384 # Where an external link could easily circumvent the sanitization of the text of
4385 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4386 # test demands a higher standard. That's a bit strange.
4390 # http://example.com -> [http://example.com|http://example.com]
4391 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4393 # The first example is sanitized, but the second is not. Any security benefits
4394 # from this production are trivial to circumvent. Either remove this test and
4395 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4396 # the test accordingly.
4400 # xxx parsoid strips the IDN character, so the round-trip tests will
4401 # obviously fail and are disabled. --cscott
4403 External links: IDN ignored character reference in hostname; strip it right off
4405 parsoid=wt2html,html2html
4407 http://e‌xample.com/
4409 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4412 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4416 External links: www.jpeg.org (bug 554)
4420 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4424 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4426 External links: URL within URL (original bug 2)
4428 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4430 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4433 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4437 BUG 361: URL inside bracketed URL
4439 [http://www.example.com/foo http://www.example.com/bar]
4441 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4446 BUG 361: URL within URL, not bracketed
4448 http://www.example.com/foo?=http://www.example.com/bar
4450 <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>
4455 BUG 289: ">"-token in URL-tail
4457 http://www.example.com/<hello>
4459 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4464 BUG 289: literal ">"-token in URL-tail
4466 http://www.example.com/<b>html</b>
4468 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4473 BUG 289: ">"-token in bracketed URL
4475 [http://www.example.com/<hello> stuff]
4477 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4482 BUG 289: literal ">"-token in bracketed URL
4484 [http://www.example.com/<b>html</b> stuff]
4486 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4491 BUG 289: literal double quote at end of URL
4493 http://www.example.com/"hello"
4495 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4500 BUG 289: literal double quote in bracketed URL
4502 [http://www.example.com/"hello" stuff]
4504 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4509 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4511 [http://www.example.com test]
4513 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4518 External links: link text with spaces
4520 [http://www.example.com a b c]
4521 [http://www.example.com ''a'' ''b'']
4523 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4524 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4529 External links: wiki links within external link (Bug 3695)
4531 [http://example.com [[wikilink]] embedded in ext link]
4533 <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>
4536 <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>
4540 BUG 787: Links with one slash after the url protocol are invalid
4544 [http:/example.com title]
4546 <p>http:/example.com
4547 </p><p>[http:/example.com title]
4552 Bracketed external links with template-generated invalid target
4554 [{{echo|http:/example.com}} title]
4556 <p>[http:/example.com title]
4561 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4563 ''[http://example.com text'']
4564 [http://example.com '''text]'''
4565 ''Something [http://example.com in italic'']
4566 ''Something [http://example.com mixed''''', even bold]'''
4567 '''''Now [http://example.com both''''']
4569 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4570 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4571 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4572 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4573 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4579 Bug 4781: %26 in URL
4581 http://www.example.com/?title=AT%26T
4583 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4586 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4589 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4590 # % is actually legal in HTML5. Any change in output would need testing though.
4592 Bug 4781, 5267: %25 in URL
4594 http://www.example.com/?title=100%25_Bran
4596 <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>
4599 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4603 Bug 4781, 5267: %28, %29 in URL
4605 http://www.example.com/?title=Ben-Hur_%281959_film%29
4607 <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>
4610 <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>
4615 Bug 4781: %26 in autonumber URL
4617 [http://www.example.com/?title=AT%26T]
4619 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4622 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4626 Bug 4781, 5267: %26 in autonumber URL
4628 [http://www.example.com/?title=100%25_Bran]
4630 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4633 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4637 Bug 4781, 5267: %28, %29 in autonumber URL
4639 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4641 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4644 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4649 Bug 4781: %26 in bracketed URL
4651 [http://www.example.com/?title=AT%26T link]
4653 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4656 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4660 Bug 4781, 5267: %25 in bracketed URL
4662 [http://www.example.com/?title=100%25_Bran link]
4664 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4669 Bug 4781, 5267: %28, %29 in bracketed URL
4671 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4673 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4676 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4680 External link containing a period in the anchor. (bug 63947)
4682 [//foo.org/bar#baz. bang]
4684 [//foo.org/bar. bang]
4686 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4687 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4690 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4691 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4695 External link containing a single quote. (bug 63947)
4699 [//foo.org/bar'baz bang]
4701 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4702 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4705 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4706 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4711 External link containing a period in the anchor. (bug 63947)
4713 [//foo.org/bar#baz. bang]
4715 [//foo.org/bar. bang]
4717 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4718 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4721 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4722 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4726 External link containing a single quote. (bug 63947)
4730 [//foo.org/bar'baz bang]
4732 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4733 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4736 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4737 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4742 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4744 Some [http://example.com/ pretty ''italics'' and stuff]!
4746 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4751 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4753 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4755 <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>
4760 External link containing double-single-quotes with no space separating the url from text in italics
4762 [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]].]
4764 <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>
4767 <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>
4769 <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>
4773 External link with comments in link text
4775 [http://www.google.com Google <!-- comment -->]
4777 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4782 URL-encoding in URL functions (single parameter)
4784 {{localurl:Some page|amp=&}}
4786 <p>/index.php?title=Some_page&amp=&
4791 URL-encoding in URL functions (multiple parameters)
4793 {{localurl:Some page|q=?&=&}}
4795 <p>/index.php?title=Some_page&q=?&amp=&
4802 http://example.com/index.php?foozoid%5B%5D=bar
4804 http://example.com/index.php?foozoid[]=bar
4806 <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>
4807 </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>
4810 <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>
4812 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4816 IPv6 urls (bug 21261)
4820 http://[2404:130:0:1000::187:2]/index.php
4822 <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>
4827 Non-extlinks in brackets
4836 [{{echo|foo}} ''bar'']
4837 [{{echo|foo}}l's] errand
4838 [{{echo|foo}}l's errand]
4840 [url=http://example.com]
4853 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4858 Percent encoding in external links
4860 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4862 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4865 <p><a rel="mw:ExtLink"
4866 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4870 Use url link syntax for links where the content is equal the link target
4874 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4877 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4881 Parenthesis in external links, especially URL links
4885 http://example.com/test)
4887 http://example.com/(test)
4889 http://example.com/((test)
4891 (http://example.com/(test))
4893 (http://example.com/(test)))))
4895 http://example.com/a)b
4897 [http://example.com) foo]
4899 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4900 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4901 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4902 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4903 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4904 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4905 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4906 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4909 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4910 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4911 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4912 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4913 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4914 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4915 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4916 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4920 Parenthesis in external links, w/ transclusion or comment
4922 (http://example.com/{{echo|hi}})
4924 (http://example.com<!-- hi -->)
4926 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4927 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4930 <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>
4932 <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>
4936 Replace invalid link targets when serializing
4940 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
4942 [[MediaWiki:Badtitletext|Manual]]
4952 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4954 Normal text. '''''Bold italic text.''''' Normal text.
4956 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4957 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4962 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4963 # parser strips. The wikitext contains just the first half of the bold
4966 Unclosed and unmatched quotes
4968 '''''Bold italic text '''with bold deactivated''' in between.'''''
4970 '''''Bold italic text ''with italic deactivated'' in between.'''''
4974 ..spanning two paragraphs (should not work).'''
4976 '''Bold tag left open
4978 ''Italic tag left open
4982 <!-- Unmatching number of opening, closing tags: -->
4983 '''This year''''s election ''should'' beat '''last year''''s.
4985 ''Tom'''s car is bigger than ''Susan'''s.
4987 Plain ''italic'''s plain
4989 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4990 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4991 </p><p><b>Bold text..</b>
4992 </p><p>..spanning two paragraphs (should not work).
4993 </p><p><b>Bold tag left open</b>
4994 </p><p><i>Italic tag left open</i>
4996 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4997 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4998 </p><p>Plain <i>italic'</i>s plain
5001 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5002 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5003 </p><p><b>Bold text..</b>
5004 </p><p>..spanning two paragraphs (should not work).<b></b>
5005 </p><p><b>Bold tag left open</b>
5006 </p><p><i>Italic tag left open</i>
5008 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5009 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5010 </p><p>Plain <i>italic'</i>s plain
5017 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5020 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5021 # is the bare minimum required by the spec, see:
5022 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5023 # Parsoid team replies: empty table tags are legal in HTML5
5025 A table with no data.
5038 A table with stray table end tags on start tag line (wt2html)
5042 {|style="color: red;"|}
5044 {|style="color: red;" |}
5048 {|style="color: red;"|} id="foo"
5052 {|style="color: red;" |} id="foo"
5056 <table style="color: red;"></table>
5058 <table style="color: red;">
5064 <table style="color: red;" id="foo">
5070 <table style="color: red;" id="foo">
5079 A table with no data (take 2)
5087 # A table with nothing but a caption is invalid XHTML, we might want to render
5088 # this as <p>caption</p>
5089 # Parsoid team replies: table with only a caption is legal in HTML5
5091 A table with nothing but a caption
5099 </caption><tr><td></td></tr></table>
5102 <table><caption> caption</caption></table>
5106 A table with caption with default-spaced attributes and a table row
5109 |+ style="color: red;" | caption1
5115 <caption style="color: red;"> caption1
5124 A table with captions with non-default spaced attributes and a table row
5127 |+style="color: red;"|caption2
5128 |+ style="color: red;"| caption3
5134 <caption style="color: red;">caption2
5136 <caption style="color: red;"> caption3
5145 Table td-cell syntax variations
5149 | foo bar foo || baz
5150 | style='color:red;' | baz
5151 | style='color:red;' || baz
5158 <td> foo bar foo </td>
5161 <td style="color:red;"> baz
5163 <td> style='color:red;' </td>
5191 Simple table but with multiple dashes for row wikitext
5209 Multiplication table
5211 {| border="1" cellpadding="2"
5212 |+Multiplication table
5214 ! × !! 1 !! 2 !! 3
5232 <table border="1" cellpadding="2">
5233 <caption>Multiplication table
5280 Accept "||" in table headings
5295 Accept "!!" in table data
5309 <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>
5314 Accept "||" in indented table headings
5324 </th></tr></table></dd></dl>
5329 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5346 Accept "| !" at start of line in tables (ignore !-attribute)
5350 | !style="color:red" | bar
5362 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 +/-
5366 |style='color:red;'|+1
5367 |style='color:blue;'|-1
5379 <td style="color:red;">+1
5381 <td style="color:blue;">-1
5405 |rowspan=2| Cell 2, row 1 (and 2)
5416 <td rowspan="2"> Cell 2, row 1 (and 2)
5434 {| bgcolor=#ABCDEF border=2
5439 |the original table again
5447 <table bgcolor="#ABCDEF" border="2">
5455 <td>the original table again
5461 Invalid attributes in table cell (bug 1830)
5475 # The "|}" to close the table is missing from the input, so parsoid's
5476 # *2wt modes will fail.
5478 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5480 parsoid=wt2html,html2html
5483 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5487 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5488 <td>]" onmouseover="alert(document.cookie)">test
5496 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5501 Indented table markup mixed with indented pre content (proposed in bug 6200)
5506 Text that should be rendered preformatted
5514 <pre>Text that should be rendered preformatted
5523 Template-generated table cell attributes and cell content
5528 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
5529 |align=center {{table_attribs}}
5530 | <!--foo--> align=center <!--bar--> {{table_attribs}}
5535 <td style="color: red"> Foo
5537 <td style="color: red"> Foo
5539 <td style="color: red"> Foo
5541 <td align="center" style="color: red"> Foo
5543 <td align="center" style="color: red"> Foo
5549 Template-generated table cell attributes and cell content (2)
5552 |align=center {{table_cells}}
5557 <td align="center" style="color: red"> Foo </td>
5565 Table with row followed by newlines and table heading
5583 Table with empty line following the start tag
5600 # FIXME: Preserve the attribute properly (with an empty string as value) in
5601 # the PHP parser. Parsoid implements the behavior below.
5603 Table attributes with empty value
5613 </td></tr></tbody></table>
5618 Wikitext table with a lot of comments
5641 Wikitext table with double-line table cell
5658 Table cell with a single comment
5675 Table-cell after a comment-only-empty-line
5692 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5694 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5700 Build table with {{!}}
5702 {{{!}} class="wikitable"
5705 {{!}}- style="color:red;"
5706 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5709 <table class="wikitable">
5715 <tr style="color:red;">
5717 <td style="color:red;"> second data
5722 # The expected HTML structure in this test is debatable. The PHP parser does
5723 # not parse this kind of table at all. The main focus for Parsoid is on
5724 # round-tripping, so this output is ok for now. TODO: revisit!
5726 Wikitext table with html-syntax row
5736 <td>foo</td></tr></tbody></table>
5739 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5740 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5741 ## PHP parser, which tidy then compounds by fostering the content
5742 ## entirely out of the table. Parsoid recognizes the table context
5743 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5744 ## depends on PHP's treatment of broken table markup!
5746 Implicit <td> after a |-
5748 parsoid=wt2html,html2html
5768 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5770 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5772 parsoid=wt2html,html2html
5805 <tr><td><pre>a</pre></td></tr>
5806 <tr><td> b</td></tr>
5811 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5812 # Parsoid generates the missing <td>, so wt2wt won't succeed.
5814 Lists should be recognized in an implicit <td> context
5816 parsoid=wt2html,html2html
5843 Parsoid: Round-trip tables directly followed by content (bug 51219)
5845 parsoid=wt2html,wt2wt
5870 Parsoid: Default to a newline after tables in new content (bug 51219)
5877 <nowiki> </nowiki>bar
5884 <tr><td>foo</td></tr></tbody></table> bar
5886 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5890 Parsoid: newline inducing block nodes don't suppress <nowiki>
5902 Parsoid: Row-syntax table headings followed by comment & table cells
5904 parsoid=wt2html,wt2wt
5908 <!-- foo --> || baz || quux
5922 <tbody><tr><th> foo </th><th> bar
5923 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
5928 # PHP throws away the (semi-broken) "foo" class here; Parsoid
5931 Parsoid: Recover better from broken table attributes
5951 <p>foo</p></td></tr>
5956 Strip unsupported table tags
6007 Plain link, capitalized
6011 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6016 Plain link, uncapitalized
6020 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6027 [[Main Page|The Main Page]]
6029 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6034 Piped link with comment in link text
6036 [[Main Page|The Main<!--front--> Page]]
6038 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6043 Piped link with multiple pipe characters in link text
6045 [[Main Page||The|Main|Page|]]
6047 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6050 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6058 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6063 Broken link with fragment
6065 [[Zigzagzogzagzig#zug]]
6067 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6072 Special page link with fragment
6074 [[Special:Version#anchor]]
6076 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6081 Nonexistent special page link with fragment
6083 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6085 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6092 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6094 <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>
6101 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6103 <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>!!!
6114 Bug 43661: Piped links with identical prefixes
6116 [[prefixed article|prefixed articles with spaces]]
6118 [[prefixed article|prefixed articlesaoeu]]
6120 [[Main Page|Main Page test]]
6122 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6123 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6124 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6130 Link with HTML entity in suffix / tail
6132 [[Main Page]]", [[Main Page]]a
6134 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6139 Link with 3 brackets
6148 Link with 4 brackets
6152 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6157 Piped link with 3 brackets
6159 [[[main page|the main page]]]
6161 <p>[[[main page|the main page]]]
6166 Piped link with extlink-like text
6169 [[Main Page|This is a [bar]]]
6171 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6172 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6177 Link with multiple pipes
6179 [[Main Page|The|Main|Page]]
6181 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6185 # Note that parsoid does not munge anchor text; all non-space
6186 # characters are valid in HTML5 ids.
6188 Anchor containing a #. (bug 63430)
6190 [[Main Page#And#Link]]
6192 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6195 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6201 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6203 <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>
6208 Link with space in namespace
6210 [[User talk:Foo bar]]
6212 <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>
6217 MemoryAlpha:AlphaTest
6219 This is an article in the MemoryAlpha namespace
6220 (which shadows the memoryalpha interwiki link).
6224 Namespace takes precedence over interwiki link (bug 51680)
6226 [[MemoryAlpha:AlphaTest]]
6228 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6232 # The previous test doesn't work correctly in html2*, due to not recognizing the
6233 # link as an internal one. This one checks for the correct behavior.
6235 Link to namespace preferred over interwiki with correct rel attribute
6237 parsoid=html2wt,html2html
6239 [[MemoryAlpha:AlphaTest]]
6241 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6246 Piped link to namespace
6248 [[Meta:Disclaimers|The disclaimers]]
6250 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6257 [[Usually caused by a typo (oops}]]
6259 <p>[[Usually caused by a typo (oops}]]
6266 Just a test of an article title containing a percent.
6270 Link containing % (not as a hex sequence)
6274 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6277 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6280 # note that the parsoid HTML is identical to the previous test output,
6281 # so the previous test ensures that the html2wt mode will generate the
6282 # "not as a hex sequence" wikitext.
6284 Link containing % as a single hex sequence interpreted to char
6286 parsoid=wt2wt,wt2html,html2html
6290 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6293 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6297 Link containing % as a double hex sequence interpreted to hex sequence
6301 <p>[[7%2525 Solution]]
6305 # note that parsoid does not munge anchor text; all non-space
6306 # characters are valid in HTML5 anchors.
6308 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6309 Example for such a section: == < ==
6311 [[%23%3c]][[%23%3e]]
6313 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6316 <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>
6320 Link containing "<#" and ">#" as a hex sequences
6322 [[%3c%23]][[%3e%23]]
6324 <p>[[%3c%23]][[%3e%23]]
6329 Link containing an equals sign
6331 [[Special:BookSources/isbn=4-00-026157-6]]
6333 <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>
6336 <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>
6342 Just a test of an article title containing a tilde.
6345 # note that links containing signatures, like [[Foo~~~~]], are
6346 # massaged by the pre-save transform (PST) and so the tildes are never
6347 # seen by the parser.
6349 Link containing a tilde
6353 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6356 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6360 Link containing double-single-quotes '' (bug 4598)
6362 [[Lista d''e paise d''o munno]]
6364 <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>
6367 <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>
6371 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6373 Some [[Link|pretty ''italics'' and stuff]]!
6375 <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>!
6378 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6382 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6384 ''Some [[Link|pretty ''italics'' and stuff]]!''
6386 <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>
6391 Link with double quotes in title part (literal) and alternate part (interpreted)
6393 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
6397 [[''Pentecoste''|Pentecoste]]
6399 [[''Pentecoste''|''Pentecoste'']]
6401 <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>
6402 </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>
6403 </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>
6404 </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>
6407 <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>
6408 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6409 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6410 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6414 Broken image links with HTML captions (bug 39700)
6416 [[File:Nonexistent|<script></script>]]
6417 [[File:Nonexistent|100x100px|<script></script>]]
6418 [[File:Nonexistent|<]]
6419 [[File:Nonexistent|a<i>b</i>c]]
6421 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6422 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6423 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6424 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6427 <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>
6428 <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>
6429 <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>
6430 <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>
6436 [[http://www.example.com]]
6438 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6441 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6445 Plain link to URL with link text
6447 [[http://www.example.com Link text]]
6449 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6454 Plain link to protocol-relative URL
6456 [[//www.example.com]]
6458 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6461 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6465 Plain link to protocol-relative URL with link text
6467 [[//www.example.com Link text]]
6469 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6474 Plain link to page with question mark in title
6480 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6481 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6486 # I'm fairly sure the expected result here is wrong.
6487 # We want these to be URL links, not pseudo-pages with URLs for titles....
6488 # However the current output is also pretty screwy.
6491 # I'm changing it to match the current output--it arguably makes more
6492 # sense in the light of the test above. Old expected result was:
6493 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6495 # But I think this test is bordering on "garbage in, garbage out" anyway.
6500 Piped link to URL: [[http://www.example.com|an example URL]]
6502 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6505 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6509 BUG 2: [[page|http://url/]] should link to page, not http://url/
6511 [[Main Page|http://url/]]
6513 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6516 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6519 # Parsoid does not mark self-links, by design.
6521 BUG 337: Escaped self-links should be bold
6525 [[Bug462]] [[Bug462]]
6527 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6530 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6532 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6536 Self-link to section should not be bold
6540 [[Main Page#section]]
6542 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6553 Self-link to numeric title
6559 <p><strong class="selflink">0</strong>
6564 Link to numeric-equivalent title
6570 <p><a href="/wiki/00" title="00">00</a>
6575 <nowiki> inside a link
6577 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6579 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6584 Non-breaking spaces in title
6586 [[ Main Page ]]
6588 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6593 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6599 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6604 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6610 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6615 Internal link with en linktrail: no apostrophes (bug 27473)
6621 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6626 Internal link with ca linktrail with apostrophes (bug 27473)
6632 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6637 Internal link with kaa linktrail with apostrophes (bug 27473)
6643 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6648 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6650 [[User:Foo/Test/63636:Bar|Test]]
6652 <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>
6655 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6659 Purely hash wikilink
6661 title=[[User:test/123]]
6665 <p><a href="#a">b</a>
6668 <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>
6672 1. Interaction of linktrail and template encapsulation
6678 <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>
6682 2. Interaction of linktrail and template encapsulation
6686 {{echo|Some [[Fool]]}}s
6688 <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>
6692 3. Interaction of linktrail and template encapsulation
6696 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6698 <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>
6708 Internal link with is link prefix
6712 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6714 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6725 Internal link with is link trail and link prefix
6729 [[mótmælendatrú|xxx]]ar
6731 mótmælenda[[söfnuður]]
6732 mótmælenda[[söfnuður|söfnuðir]]
6733 mótmælenda[[söfnuður|söfnuðir]]xxx
6735 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6736 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6737 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6738 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6739 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6744 Parsoid link trail escaping
6746 parsoid=html2wt,html2html
6750 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6754 Parsoid link prefix escaping
6757 parsoid=html2wt,html2html
6759 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6761 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6765 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6773 [http://wp.org ''foo'']
6775 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6776 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6777 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6778 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6783 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6787 [[Foo|{{echo|a}} b {{echo|c}}]]
6789 <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>
6793 Link with angle bracket after anchor
6797 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6800 <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>
6804 ### Interwiki links (see maintenance/interwiki.sql)
6808 Inline interwiki link
6810 parsoid=wt2html,wt2wt,html2html
6812 [[MeatBall:SoftSecurity]]
6814 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6817 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
6821 Inline interwiki link with empty title (bug 2372)
6823 parsoid=wt2html,wt2wt,html2html
6827 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6830 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
6834 Interwiki link encoding conversion (bug 1636)
6836 *[[Wikipedia:ro:Olteniţa]]
6837 *[[Wikipedia:ro:Olteniţa]]
6839 <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>
6840 <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>
6844 <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>
6845 <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>
6850 Interwiki link with fragment (bug 2130)
6852 [[MeatBall:SoftSecurity#foo]]
6854 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6858 # Ideally the wikipedia: prefix here should be proto-relative too
6859 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
6860 # define the 'en' prefix, and originally the test used 'wikipedia',
6861 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
6864 Different interwiki prefixes mapping to the same URL
6872 [[:wikipedia:Foo|Foo]]
6874 [[wikipedia:en:Foo]]
6876 [[:wikipedia:en:Foo]]
6880 <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>
6882 <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>
6884 <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>
6886 <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>
6888 <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>
6890 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
6892 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/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>
6896 Interwiki links that cannot be represented in wiki syntax
6899 [[meatball:ok#foo|ok with fragment]]
6900 [[meatball:ok_as_well?|ok ending with ? mark]]
6901 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6902 [http://de.wikipedia.org/wiki/#foo is just fragment]
6905 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
6906 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
6907 <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>
6908 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6909 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
6912 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
6913 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
6914 <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>
6915 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6916 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6920 Interwiki links: trail
6922 [[wikipedia:Foo|Ba]]r
6924 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
6927 <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>
6931 Local interwiki link
6933 parsoid=wt2html,wt2wt,html2html
6935 [[local:Template:Foo]]
6937 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
6940 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
6943 # Parsoid does not mark self-links, by design.
6945 Local interwiki link: self-link to current page
6948 parsoid=wt2html,wt2wt,html2html
6952 <p><strong class="selflink">local:Main Page</strong>
6955 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
6959 Local interwiki link: prefix only (bug 64167)
6961 parsoid=wt2html,wt2wt,html2html
6965 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
6968 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
6972 Local interwiki link: with additional interwiki prefix (bug 61357)
6974 parsoid=wt2html,wt2wt,html2html
6976 [[local:meatball:Hello]]
6978 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
6981 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
6985 Multiple local interwiki link prefixes
6987 [[local:local:local:local:mi:local:Foo]]
6989 parsoid=wt2html,wt2wt,html2html
6991 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
6994 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
6998 ### Interlanguage links
6999 ### Language links (so that searching for '### language' matches..)
7005 parsoid=wt2html,wt2wt,html2html
7013 <p>Blah blah blah</p>
7014 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7018 Interlanguage link with spacing
7020 parsoid=wt2html,wt2wt,html2html
7028 <p>Blah blah blah</p>
7029 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7033 Double interlanguage link
7035 parsoid=wt2html,wt2wt,html2html
7044 <p>Blah blah blah</p>
7045 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7046 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7050 Interlanguage link variations
7052 parsoid=wt2html,wt2wt,html2html
7063 <p>Blah blah blah</p>
7064 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7065 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7066 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7067 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7071 Interlanguage link, with prefix links
7081 <p>Blah blah blah</p>
7082 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7086 Double interlanguage link, with prefix links (bug 8897)
7097 <p>Blah blah blah</p>
7098 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7099 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7103 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7111 <p>Blah blah blah</p>
7112 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7116 Parsoid-specific test: Wikilinks with should RT properly
7122 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7127 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7131 He&nbsp;llo [[Foo|He&nbsp;llo]]
7133 He&nbsp;llo [[He&nbsp;llo]]
7135 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7136 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7140 Parsoid: handle constructor well
7146 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7147 </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>
7150 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7152 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7161 # Note that `ko` isn't a known interlanguage prefix
7163 Parsoid: recognize interlanguage links without a target page
7173 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7175 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7178 # Note that `ko` isn't a known interwiki prefix
7180 Parsoid: recognize interwiki links without a target page
7182 parsoid=wt2html,wt2wt,html2html
7188 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7189 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7192 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7193 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7197 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7201 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7204 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7208 Interlanguage link with preceding local interwiki link (bug 68085)
7210 parsoid=wt2html,wt2wt,html2html
7213 [[local:es:Spanish]]
7216 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7220 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7224 Looks like an interlanguage link, but is actually a local interwiki
7226 parsoid=wt2html,wt2wt,html2html
7232 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7236 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7240 ### Redirects, Parsoid-only
7243 1. Simple redirect to page
7247 #REDIRECT [[Main Page]]
7249 <link rel="mw:PageProp/redirect" href="./Main_Page">
7252 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7254 2. Other redirect variants
7256 parsoid=wt2html,wt2wt
7258 #REDIRECT [[Main_Page]]
7259 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7261 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7267 parsoid=wt2html,wt2wt
7272 <li>REDIRECT [[]]</li></ol>
7276 Optional colon in #REDIRECT
7278 # the colon is archaic syntax. we support it for wt2html, but we
7279 # don't care that it roundtrips back to the modern syntax.
7280 parsoid=wt2html,html2html
7282 #REDIRECT:[[Main Page]]
7284 <link rel="mw:PageProp/redirect" href="./Main_Page">
7288 Whitespace in #REDIRECT with optional colon
7290 # the colon and gratuitous whitespace is archaic syntax. we support
7291 # it for wt2html, but we don't care that it roundtrips back to the
7292 # modern syntax (without extra whitespace)
7293 parsoid=wt2html,html2html
7300 <link rel="mw:PageProp/redirect" href="./Main_Page">
7304 Piped link in #REDIRECT
7306 # content after piped link is ignored. we support this syntax,
7307 # but don't care that the piped link is lost when we roundtrip this.
7310 #REDIRECT [[Main Page|bar]]
7312 <link rel="mw:PageProp/redirect" href="./Main_Page">
7316 Redirect to category
7320 #REDIRECT [[Category:Foo]]
7322 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7326 Redirect to category with URL encoding
7330 #REDIRECT [[Category%3AFoo]]
7332 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7336 Redirect to category page
7338 parsoid=wt2html,html2html
7340 #REDIRECT [[:Category:Foo]]
7342 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7346 Redirect to image page (1)
7350 #REDIRECT [[File:Wiki.png]]
7352 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7356 Redirect to image page (2)
7360 #REDIRECT [[Image:Wiki.png]]
7362 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7366 Redirect to language
7370 #REDIRECT [[en:File:Wiki.png]]
7372 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7376 Redirect to interwiki
7380 #REDIRECT [[meatball:File:Wiki.png]]
7382 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7386 Non-English #REDIRECT
7391 #TILVÍSUN [[Main Page]]
7393 <link rel="mw:PageProp/redirect" href="./Main_Page">
7404 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7421 Broken br tag sanitization
7429 # TODO: Fix html2html mode (bug 51055)!
7430 # This </br> handling was added as part of bug 50831; but it
7431 # differs from how PHP+tidy handles this. We should investigate
7434 Parsoid: Broken br tag recognition
7450 Incorrecly removing closing slashes from correctly formed XHTML
7452 <br style="clear:both;" />
7454 <p><br style="clear:both;" />
7459 Failing to transform badly formed HTML into correct XHTML
7461 <br style="clear: left;">
7462 <br style="clear: right;">
7463 <br style="clear: both;">
7465 <p><br style="clear: left;" />
7466 <br style="clear: right;" />
7467 <br style="clear: both;" />
7471 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
7472 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
7474 Handling html with a div self-closing tag
7483 <p><div title />
7487 <p><div title=bar />
7488 <div title=bar/>
7490 <div title="bar/"></div>
7494 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7495 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7496 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
7497 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7498 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7499 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
7503 Handling html with a br self-closing tag
7512 <p><br title="title" />
7513 <br title="title" />
7530 Horizontal ruler (should it add that extra space?)
7545 Horizontal ruler -- 4+ dashes render hr
7554 Horizontal ruler -- eats additional dashes on the same line
7563 Horizontal ruler -- does not collapse dashes on consecutive lines
7574 Horizontal ruler -- <4 dashes render as plain text
7583 Horizontal ruler -- Supports content following dashes on same line
7595 ### Block-level elements
7604 <ul><li>Common list</li>
7606 <li>item 3</li></ul>
7617 <ol><li>Numbered list</li>
7619 <li> item 3</li></ol>
7633 ***#Number on level 4
7635 **#Number on level 3
7636 **#Number on level 3
7640 #** Level 3, but ordered
7643 <ol><li> with numbers</li></ol>
7644 <ul><li> and bullets</li></ul>
7645 <ol><li> and numbers</li></ol></li>
7647 <ul><li>bullet level 2
7648 <ul><li>bullet level 3
7649 <ol><li>Number on level 4</li></ol></li></ul></li>
7651 <ol><li>Number on level 3</li>
7652 <li>Number on level 3</li></ol></li></ul>
7653 <ol><li>number level 2</li></ol></li>
7655 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7656 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7667 <ul><li>bar</li></ul></li></ul>
7677 <ul><li><ul><li>foo</li></ul></li>
7683 Nested lists 3 (first element empty)
7689 <ul><li>bar</li></ul></li></ul>
7694 Nested lists 4 (first element empty)
7699 <ul><li><ul><li></li></ul></li>
7705 Nested lists 5 (both elements empty)
7710 <ul><li><ul><li></li></ul></li>
7716 Nested lists 6 (both elements empty)
7722 <ul><li></li></ul></li></ul>
7727 Nested lists 7 (skip initial nesting levels)
7731 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7736 Nested lists 8 (multiple nesting transitions)
7744 <ul><li><ul><li> bar</li></ul></li>
7745 <li> baz</li></ul></li>
7751 1. Lists with start-of-line-transparent tokens before bullets: Comments
7764 2. Lists with start-of-line-transparent tokens before bullets: Template close
7769 <ul><li>foo bar</li>
7775 List items are not parsed correctly following a <pre> block (bug 785)
7781 <ul><li> <pre>foo</pre></li>
7782 <li> <pre>bar</pre></li>
7788 List items from template
7799 * notSOL{{inner list}}
7802 <ul><li> item 1</li>
7803 <li> item 2</li></ul>
7804 <ul><li> item 0</li>
7806 <li> item 2</li></ul>
7807 <ul><li> item 0</li>
7810 <li> item 2</li></ul>
7815 List interrupted by empty line or heading
7823 <ul><li> foo</li></ul>
7824 <ul><li><ul><li> bar</li></ul></li></ul>
7825 <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>
7826 <ul><li> Another list item</li></ul>
7831 Multiple list tags generated by templates
7852 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7855 <!--This line will NOT split the list-->
7857 <!--This line will NOT split the list either-->
7859 <!--foo--> <!----> <!--This line NOT split the list either-->
7870 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7873 <!--This line will NOT split the list-->
7875 <!--This line will NOT split the list either-->
7877 <!--foo--> <!----> <!--This line NOT split the list
7890 (The PHP parser relies on Tidy for the hack)
7892 parsoid=wt2html,wt2wt
7896 * {{echo|<li>templated li-hack}}
7897 * <!--foo--> <li> unsupported li-hack with preceding comments
7900 <li><li>not a li-hack
7907 <li>templated li-hack</li>
7908 <li>unsupported li-hack with preceding comments</li>
7911 <li>not a li-hack</li>
7916 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7943 Parsoid: Test of whitespace serialization with Templated bullets
7950 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7954 # ------------------------------------------------------------------------
7955 # The next set of tests are about Parsoid's ability to handle badly nested
7956 # tags (parse, minimize scope of fixup, and roundtrip back)
7957 # ------------------------------------------------------------------------
7960 Unbalanced closing block tags break a list
7961 (php parser relies on Tidy to fix up)
7979 # Parsoid fails this test, but it might be tricky to support properly.
7982 Unbalanced closing non-block tags don't break a list
7983 (php parser relies on Tidy to fix up)
7990 <li><span>a</span></li>
7991 <li><span>b</span></li>
8005 Unclosed formatting tags that straddle lists are closed and reopened
8006 (php parser relies on Tidy to fix up)
8008 parsoid=wt2html,wt2wt,html2html
8018 <ol><li> <s> a</s></li>
8019 <li><s> b </s></li></ol>
8022 # Parsoid fails this test, but it might be tricky to support properly.
8025 List embedded in a non-block tag
8026 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
8033 <li><small>foo</small></li>
8043 # This is a bug in the PHP parser + tidy combination.
8044 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8045 # and then fostered out of the table by tidy.)
8046 # We believe the Parsoid output to be correct.
8048 Table with missing opening <tr> tag
8050 parsoid=wt2html,wt2wt
8075 # Note that the current date is hard-coded as
8076 # 1970-01-01T00:02:03Z (a Thursday)
8077 # when running parser tests. The timezone is also fixed to GMT, so
8078 # local date will be identical to current date.
8081 Magic Word: {{CURRENTDAY}}
8090 Magic Word: {{CURRENTDAY2}}
8099 Magic Word: {{CURRENTDAYNAME}}
8108 Magic Word: {{CURRENTDOW}}
8117 Magic Word: {{CURRENTMONTH}}
8126 Magic Word: {{CURRENTMONTH1}}
8135 Magic Word: {{CURRENTMONTHABBREV}}
8137 {{CURRENTMONTHABBREV}}
8144 Magic Word: {{CURRENTMONTHNAME}}
8146 {{CURRENTMONTHNAME}}
8153 Magic Word: {{CURRENTMONTHNAMEGEN}}
8155 {{CURRENTMONTHNAMEGEN}}
8162 Magic Word: {{CURRENTTIME}}
8171 Magic Word: {{CURRENTHOUR}}
8180 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8189 Magic Word: {{CURRENTYEAR}}
8198 Magic Word: {{CURRENTTIMESTAMP}}
8200 {{CURRENTTIMESTAMP}}
8207 Magic Words LOCAL (UTC)
8211 * {{LOCALMONTHNAME}}
8212 * {{LOCALMONTHNAMEGEN}}
8213 * {{LOCALMONTHABBREV}}
8222 * {{LOCALTIMESTAMP}}
8237 <li> 19700101000203</li></ul>
8242 Magic Word: {{FULLPAGENAME}}
8244 title=[[User:Ævar Arnfjörð Bjarmason]]
8248 <p>User:Ævar Arnfjörð Bjarmason
8253 Magic Word: {{FULLPAGENAMEE}}
8255 title=[[User:Ævar Arnfjörð Bjarmason]]
8259 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8264 Magic Word: {{TALKSPACE}}
8266 title=[[User:Ævar Arnfjörð Bjarmason]]
8275 Magic Word: {{TALKSPACE}}, same namespace
8277 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8286 Magic Word: {{TALKSPACE}}, main namespace
8288 title=[[Parser Test]]
8297 Magic Word: {{TALKSPACEE}}
8299 title=[[User:Ævar Arnfjörð Bjarmason]]
8308 Magic Word: {{SUBJECTSPACE}}
8310 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8319 Magic Word: {{SUBJECTSPACE}}, same namespace
8321 title=[[User:Ævar Arnfjörð Bjarmason]]
8330 Magic Word: {{SUBJECTSPACE}}, main namespace
8332 title=[[Parser Test]]
8340 Magic Word: {{SUBJECTSPACEE}}
8342 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8351 Magic Word: {{NAMESPACE}}
8353 title=[[User:Ævar Arnfjörð Bjarmason]]
8362 Magic Word: {{NAMESPACEE}}
8364 title=[[User:Ævar Arnfjörð Bjarmason]]
8373 Magic Word: {{NAMESPACENUMBER}}
8375 title=[[User:Ævar Arnfjörð Bjarmason]]
8384 Magic Word: {{SUBPAGENAME}}
8386 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8395 Magic Word: {{SUBPAGENAMEE}}
8397 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8406 Magic Word: {{ROOTPAGENAME}}
8408 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8412 <p>Ævar Arnfjörð Bjarmason
8417 Magic Word: {{ROOTPAGENAMEE}}
8419 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8423 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8428 Magic Word: {{BASEPAGENAME}}
8430 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8434 <p>Ævar Arnfjörð Bjarmason
8439 Magic Word: {{BASEPAGENAMEE}}
8441 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8445 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8450 Magic Word: {{TALKPAGENAME}}
8452 title=[[User:Ævar Arnfjörð Bjarmason]]
8456 <p>User talk:Ævar Arnfjörð Bjarmason
8461 Magic Word: {{TALKPAGENAMEE}}
8463 title=[[User:Ævar Arnfjörð Bjarmason]]
8467 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8472 Magic Word: {{SUBJECTPAGENAME}}
8474 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8478 <p>User:Ævar Arnfjörð Bjarmason
8483 Magic Word: {{SUBJECTPAGENAMEE}}
8485 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8487 {{SUBJECTPAGENAMEE}}
8489 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8494 Magic Word: {{NUMBEROFFILES}}
8503 Magic Word: {{PAGENAME}}
8505 title=[[User:Ævar Arnfjörð Bjarmason]]
8509 <p>Ævar Arnfjörð Bjarmason
8514 Magic Word: {{PAGENAME}} with metacharacters
8516 title=[['foo & bar = baz']]
8520 <p><i>'foo & bar = baz'</i>
8523 <p><i>'foo & bar = baz'</i></p>
8527 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8529 title=[[*RFC 1234 http://example.com/]]
8533 <p>*RFC 1234 http://example.com/
8536 <p>*RFC 1234 http://example.com/</p>
8540 Magic Word: {{PAGENAMEE}}
8542 title=[[User:Ævar Arnfjörð Bjarmason]]
8546 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8551 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8553 title=[[*RFC 1234 http://example.com/]]
8557 <p>*RFC_1234_http://example.com/
8560 <p>*RFC_1234_http://example.com/</p>
8564 Magic Word: {{REVISIONID}}
8573 Magic Word: {{SCRIPTPATH}}
8582 Magic Word: {{STYLEPATH}}
8591 Magic Word: {{SERVER}}
8595 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8600 Magic Word: {{SERVERNAME}}
8609 Magic Word: {{SITENAME}}
8618 Case-sensitive magic words, when cased differently, should just be template transclusions
8625 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8626 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8627 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8628 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8633 Case-insensitive magic words should still work with weird casing.
8643 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8648 Namespace 1 {{ns:1}}
8657 Namespace 1 {{ns:01}}
8666 Namespace 0 {{ns:0}} (bug 4783)
8674 Namespace 0 {{ns:00}} (bug 4783)
8682 Namespace -1 {{ns:-1}}
8691 Namespace User {{ns:User}}
8700 Namespace User talk {{ns:User_talk}}
8709 Namespace User talk {{ns:uSeR tAlK}}
8718 Namespace File {{ns:File}}
8727 Namespace File {{ns:Image}}
8736 Namespace (lang=de) Benutzer {{ns:User}}
8747 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8753 <p>Benutzer Diskussion
8761 {{urlencode:hi world?!}}
8762 {{urlencode:hi world?!|WIKI}}
8763 {{urlencode:hi world?!|PATH}}
8764 {{urlencode:hi world?!|QUERY}}
8774 Magic Word: prioritize type info over data-parsoid
8780 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8784 Magic Word: serialize on separate line (parsoid)
8786 parsoid=wt2wt,html2wt
8792 foo<meta property="mw:PageProp/notoc"/>bar
8796 Magic Word: rt non-english wikis
8803 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8810 Magic links: internal link to RFC (bug 479)
8814 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8819 Magic links: RFC (bug 479)
8823 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8828 Magic links: ISBN (bug 1937)
8832 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8837 Magic links: PMID incorrectly converts space to underscore
8841 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8850 Nonexistent template
8852 {{thistemplatedoesnotexist}}
8854 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8859 Template with invalid target containing tags
8861 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8863 <p>{{a<b>b</b>|foo|a=b|a = b}}
8868 Template with invalid target containing unclosed tag
8870 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8872 <p>{{a<b>|foo|a=b|a = b}}</b>
8877 Template with invalid target containing wikilink
8881 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8884 <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>
8888 Template with just whitespace in it, bug #68421
8892 <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>
8898 This is a test template
8906 <p>This is a test template
8911 Template with explicit namespace
8915 <p>This is a test template
8923 This is a test template with parameter {{{param}}}
8929 {{paramtest|param=foo}}
8931 <p>This is a test template with parameter foo
8936 Template:paramtestnum
8942 Template unnamed parameter
8944 {{paramtestnum|Main Page|the main page}}
8946 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8951 Template:templatesimple
8957 Template:templateredirect
8959 #redirect [[Template:templatesimple]]
8963 Template:templateasargtestnum
8969 Template:templateasargtest
8971 {{template{{{templ}}}}}
8975 Template:templateasargtest2
8981 Template with template name as unnamed argument
8983 {{templateasargtestnum|templatesimple}}
8990 Template with template name as argument
8992 {{templateasargtest|templ=simple}}
8999 Template with template name as argument (2)
9001 {{templateasargtest2|templ=templatesimple}}
9008 Template:templateasargtestdefault
9010 {{{{{templ|templatesimple}}}}}
9020 Template with default value
9022 {{templateasargtestdefault}}
9029 Template with default value (value set)
9031 {{templateasargtestdefault|templ=templa}}
9040 {{templateredirect}}
9047 Template with argument in separate line
9049 {{ templateasargtest |
9057 Template with complex template as argument
9060 param ={{ templateasargtest |
9063 <p>This is a test template with parameter (test)
9068 Template with thumb image (with link in description)
9070 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9072 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>
9075 <p>This is a test template with parameter</p>
9076 <div class="thumb tright">
9077 <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>
9078 <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>
9082 <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>
9086 Template:complextemplate
9088 {{{1}}} {{paramtest|
9089 param ={{{param}}}}}
9093 Template with complex arguments
9096 param ={{ templateasargtest |
9097 templ = simple }}|[[Template:complextemplate|link]]}}
9099 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9104 BUG 553: link with two variables in a piped link
9107 |[[{{{1}}}|{{{2}}}]]
9112 <td>[[{{{1}}}|{{{2}}}]]
9118 Magic variable as template parameter
9120 {{paramtest|param={{SITENAME}}}}
9122 <p>This is a test template with parameter MediaWiki
9129 [[{{{param}}}|link]]
9133 Template parameter as link source
9135 {{linktest|param=Main Page}}
9137 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9142 Template-generated attribute string (k='v')
9144 <span {{attr_str|id|v1}}>bar</span>
9146 <p><span id="v1">bar</span>
9153 including another template, {{paramtest|param={{{arg}}}}}
9157 Template passing argument to another template
9159 {{paramtest2|arg='hmm'}}
9161 <p>including another template, This is a test template with parameter 'hmm'
9172 Template as link source
9176 [[{{linktest2}}|Main Page]]
9178 [[{{linktest2}}]]Page
9180 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9181 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9182 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9200 Template infinite loop
9204 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9209 Template from main namespace
9228 BUG 529: Template with table, not included at beginning of line
9247 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9267 BUG 41: Template parameters shown as broken links
9276 Template with targets containing wikilinks
9280 {{[[{{echo|foo}}]]}}
9282 {{{{echo|[[foo}}]]}}
9284 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9285 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9293 ''None'' of '''this''' should be
9295 but rather passed unmodified
9302 # hmm, fix this or just deprecate msgnw and document its behavior?
9306 {{msgnw:MSGNW test}}
9308 <p>''None'' of '''this''' should be
9310  but rather passed unmodified
9311 {{test}}
9321 {{int:youhavenewmessages|lots of money|not!}}
9323 <p>You have lots of money (not!).
9330 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9334 <includeonly> and <noinclude> being included
9345 <onlyinclude>Foo</onlyinclude>bar
9349 <onlyinclude> being included
9361 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9365 <onlyinclude> and <includeonly> being included
9374 <includeonly> and <noinclude> on a page
9376 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9383 Un-closed <noinclude>
9390 <onlyinclude> on a page
9392 <onlyinclude>Foo</onlyinclude>bar
9399 Un-closed <onlyinclude>
9406 Self-closed noinclude, includeonly, onlyinclude tags
9417 Unbalanced includeonly and noinclude tags
9421 |b</noinclude></noinclude>
9422 |c</noinclude></includeonly>
9423 |d</includeonly></includeonly>
9432 <td>c</includeonly>
9434 <td>d</includeonly></includeonly>
9440 Template:Includeonly section
9443 ==Includeonly section==
9449 Bug 6563: Edit link generation for section shown by <includeonly>
9451 {{includeonly section}}
9453 <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>
9454 <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>
9458 # Uses same input as the contents of [[Template:Includeonly section]]
9460 Bug 6563: Section extraction for section shown by <includeonly>
9465 ==Includeonly section==
9473 Bug 6563: Edit link generation for section suppressed by <includeonly>
9476 ==Includeonly section==
9480 <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>
9485 Bug 6563: Section extraction for section suppressed by <includeonly>
9490 ==Includeonly section==
9498 Un-closed <includeonly>
9505 Includes and comments at SOL
9507 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9514 <includeonly>can have stuff</includeonly>=== here ===
9517 <h2><span class="mw-headline" id="hu">hu</span></h2>
9522 <h3><span class="mw-headline" id="here">here</span></h3>
9525 <!-- 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>
9527 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9529 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9532 <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>
9536 # TODO: test with DOM fragment reuse!
9538 Parsoid: DOM fragment reuse
9540 parsoid=wt2wt,wt2html
9542 a{{echo|b<table></table>c}}d
9554 <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>
9556 <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">
9557 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9558 </span><p about="#mwt2">cd</p>
9560 <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">
9562 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9564 </span><p about="#mwt3">b</p>
9568 Parsoid: Merge double tds (bug 50603)
9577 <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>
9582 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9592 <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}}]}'>
9594 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9600 ### <includeonly> and <noinclude> in attributes
9603 0. includeonly around the entire attribute
9605 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9607 <p><span id="v2">bar</span>
9612 1. includeonly in html attr key
9614 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9616 <p><span id="foo">bar</span>
9621 2. includeonly in html attr value
9623 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9624 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9626 <p><span id="v1">bar</span>
9627 <span id="v1">bar</span>
9632 3. includeonly in part of an attr value
9634 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9636 <p><span style="color:red;">bar</span>
9641 4. includeonly in table attributes
9665 ### Token Stream Patcher tests
9667 ### These tests won't always pass wt2wt and other modes because
9668 ### on serialization, the table will be output on a new line.
9669 ### For now, we are blacklisting them, and using this to test selser.
9673 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9675 parsoid=wt2html,wt2wt
9677 {{echo|}}{| width = '100%'
9681 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
9682 <tbody><tr><td>foo</td></tr>
9687 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9689 parsoid=wt2html,wt2wt
9691 <includeonly>a</includeonly>{| {{{b}}}
9695 <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}}}":""}}'>
9696 <tbody><tr><td>c</td></tr>
9702 ### Testing parsing of templates where a template arg
9703 ### has the same name as the template itself.
9713 Templates: Template Name/Arg clash: 1. Use of positional param
9722 Templates: Template Name/Arg clash: 2. Use of named param
9731 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9740 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
9744 Templates: 1. Simple use
9753 Templates: 2. Inside a block tag
9755 <div>{{echo|Foo}}</div>
9756 <blockquote>{{echo|Foo}}</blockquote>
9759 <blockquote>Foo</blockquote>
9769 Templates: P-wrapping: 1a. Templates on consecutive lines
9780 Templates: P-wrapping: 1b. Templates on consecutive lines
9794 Templates: P-wrapping: 1c. Templates on consecutive lines
9797 {{echo|bar}} <div>baz</div>
9810 Templates: P-wrapping: 1d. Template preceded by comment-only line
9819 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
9823 Templates: Inline Text: 1. Multiple template uses
9825 {{echo|Foo}}bar{{echo|baz}}
9832 Templates: Inline Text: 2. Back-to-back template uses
9834 {{echo|Foo}}{{echo|bar}}
9841 Templates: Block Tags: 1. Multiple template uses
9843 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
9845 <div>Foo</div><div>bar</div><div>baz</div>
9850 Templates: Block Tags: 2. Back-to-back template uses
9852 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
9854 <div>Foo</div><div>bar</div>
9858 # This is an edge case relating to paragraph wrapping.
9860 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
9865 <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
9870 Templates: Links: 1. Simple example
9872 {{echo|[[Foo|bar]]}}
9874 <p><a href="/wiki/Foo" title="Foo">bar</a>
9879 Templates: Links: 2. Generation of link href
9881 [[{{echo|Foo}}|bar]]
9883 <p><a href="/wiki/Foo" title="Foo">bar</a>
9888 Templates: Links: 3. Generation of part of a link href
9890 [[Fo{{echo|o}}|bar]]
9894 [[Foo{{echo|bar}}baz]]
9896 [[Foo{{echo|bar}}|bar]]
9898 [[:Foo{{echo|bar}}]]
9900 [[:Foo{{echo|bar}}|bar]]
9902 <p><a href="/wiki/Foo" title="Foo">bar</a>
9903 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9904 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9905 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9906 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9907 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9912 Templates: Links: 4. Multiple templates generating link href
9914 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9916 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9921 Templates: Links: 5. Generation of link text
9923 [[Foo|{{echo|bar}}]]
9925 <p><a href="/wiki/Foo" title="Foo">bar</a>
9930 Templates: Links: 5. Nested templates (only outermost template should be marked)
9932 {{echo|[[{{echo|Foo}}|bar]]}}
9934 <p><a href="/wiki/Foo" title="Foo">bar</a>
9939 Templates: HTML Tag: 1. Generation of HTML attr. key
9941 <div {{echo|style}}="color:red;">foo</div>
9943 <div style="color:red;">foo</div>
9948 Templates: HTML Tag: 2. Generation of HTML attr. value
9950 <div style={{echo|'color:red;'}}>foo</div>
9952 <div style="color:red;">foo</div>
9957 Templates: HTML Tag: 3. Generation of HTML attr key and value
9959 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9961 <div style="color:red;">foo</div>
9966 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9968 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9970 <div title="This is a long title with just one piece templated">foo</div>
9975 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9977 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9979 <div title="This is a long title with just one piece templated">foo</div>
9984 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9986 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9988 <div title="This is a long title with just one piece templated">foo</div>
9993 Templates: HTML Tag: 7. Generation of partial attribute key string
9995 <div st{{echo|yle}}="color:red;">foo</div>
9997 <div style="color:red;">foo</div>
10002 Templates: HTML Tables: 1. Generating start of a HTML table
10004 {{echo|<table><tr><td>foo</td>}}</tr></table>
10006 <table><tr><td>foo</td></tr></table>
10011 Templates: HTML Tables: 2a. Generating middle of a HTML table
10013 <table><tr>{{echo|<td>foo</td>}}</tr></table>
10015 <table><tr><td>foo</td></tr></table>
10020 Templates: HTML Tables: 2b. Generating middle of a HTML table
10022 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10024 <table><tr><td>foo</td></tr></table>
10029 Templates: HTML Tables: 3. Generating end of a HTML table
10031 <table><tr>{{echo|<td>foo</td></tr></table>}}
10033 <table><tr><td>foo</td></tr></table>
10038 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10040 {{echo|<table>}}<tr><td>foo</td></tr></table>
10042 <table><tr><td>foo</td></tr></table>
10047 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10049 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10051 <table><tr><td>foo</td></tr></table>
10056 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10058 <table><tr>{{echo|<td>}}foo</td></tr></table>
10060 <table><tr><td>foo</td></tr></table>
10065 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10067 <table><tr><td>foo{{echo|</td>}}</tr></table>
10069 <table><tr><td>foo</td></tr></table>
10074 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10076 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10078 <table><tr><td>foo</td></tr></table>
10083 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10085 <table><tr><td>foo</td></tr>{{echo|</table>}}
10087 <table><tr><td>foo</td></tr></table>
10092 Templates: HTML Tables: 5. Proper fostering of categories from inside
10094 parsoid=wt2html,wt2wt
10096 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10097 <!--Two categories (Bug 50330)-->
10098 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10100 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10101 <!--Two categories (Bug 50330)-->
10102 <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>
10106 Templates: Wiki Tables: 1a. Fostering of entire template content
10114 <tr><td></td></tr></table>
10126 Templates: Wiki Tables: 1b. Fostering of entire template content
10139 <tr><td></td></tr></table>
10153 Templates: Wiki Tables: 2. Fostering of partial template content
10163 <tr><td></td></tr></table>
10176 Templates: Wiki Tables: 3. td-content via multiple templates
10179 {{echo|{{pipe}}a}}{{echo|b}}
10190 Templates: Wiki Tables: 4. Templated tags, no content
10196 <tr><td></td></tr></table>
10201 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10215 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10229 Templates: Lists: Multi-line list-items via templates
10231 *{{echo|a {{nonexistent|
10233 *{{echo|b {{nonexistent|
10236 <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>
10237 <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>
10242 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10244 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10246 <p><i>ab</i>c<i>d</i>e
10251 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10252 (PHP parser generates misnested html)
10254 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10256 <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>
10260 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10261 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10263 parsoid=wt2html,wt2wt
10265 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10267 <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>
10268 <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>
10269 <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>
10273 Templates: Ugly nesting: 4. Divs opened/closed across templates
10275 a<div>b{{echo|c</div>d}}e
10286 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10292 |{{echo|foo</table>}}
10296 <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|}"]}'>
10300 <td>foo</td></tr></tbody></table><span about="#mwt1">
10301 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10306 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10316 <td>1. {{echo|foo </table>}}</td>
10318 <td>2. {{echo|baz </table>}}</td>
10331 <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>"]}'>
10336 <td>1. foo </td></tr></tbody></table></td>
10338 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10339 </span><span about="#mwt2">
10340 </span><span about="#mwt2">
10341 </span><span about="#mwt2">abc</span><span about="#mwt2">
10342 </span><span about="#mwt2">
10343 </span><span about="#mwt2">
10344 </span><span about="#mwt2">
10345 </span><span about="#mwt2">
10346 </span><span about="#mwt2">
10347 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10348 </span><span about="#mwt2">
10353 Templates: Ugly templates: 3. newline-only template parameter
10362 # This looks like a bug: a single newline triggers p/br for some reason.
10364 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10373 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10374 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10376 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10382 <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
10383 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10387 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10388 # that are "identical" and generate nesting cycles in the algorithm
10390 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10392 {{echo|<table><tr><td><table>}}
10396 <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"}'>
10397 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10398 </table></td></tr></tbody></table>
10402 Parser Functions: 1. Simple example
10411 Parser Functions: 2. Nested use (only outermost should be marked up)
10420 ### Pre-save transform tests
10423 pre-save transform: subst:
10429 This is a test template
10433 pre-save transform: normal template
10443 pre-save transform: nonexistent template
10447 {{thistemplatedoesnotexist}}
10449 {{thistemplatedoesnotexist}}
10454 pre-save transform: subst magic variables
10463 # This is bug 89, which I fixed. -- wtm
10465 pre-save transform: subst: templates with parameters
10469 {{subst:paramtest|param="something else"}}
10471 This is a test template with parameter "something else"
10475 Template:nowikitest
10477 <nowiki>'''not wiki'''</nowiki>
10481 pre-save transform: nowiki in subst (bug 1188)
10485 {{subst:nowikitest}}
10487 <nowiki>'''not wiki'''</nowiki>
10492 Template:commenttest
10494 This template has <!-- a comment --> in it.
10498 pre-save transform: comment in subst (bug 1936)
10502 {{subst:commenttest}}
10504 This template has <!-- a comment --> in it.
10508 pre-save transform: unclosed tag
10512 <nowiki>'''not wiki'''
10514 <nowiki>'''not wiki'''
10518 pre-save transform: mixed tag case
10522 <NOwiki>'''not wiki'''</noWIKI>
10524 <NOwiki>'''not wiki'''</noWIKI>
10528 pre-save transform: unclosed comment in <nowiki>
10532 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10534 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10537 # Leading @ in this template definition works around a limitation
10538 # in parsoid's parserTests which otherwise strips the <span> from the
10539 # result (confusing it for a template wrapper)
10543 @<span onmouseover="alert('crap')">Oh no</span>
10547 (confirming safety of fix for subst bug 1936)
10549 {{Template:dangerous}}
10551 <p>@<span>Oh no</span>
10556 pre-save transform: comment containing gallery (bug 5024)
10560 <!-- <gallery>data</gallery> -->
10562 <!-- <gallery>data</gallery> -->
10566 pre-save transform: comment containing extension
10570 <!-- <tag>data</tag> -->
10572 <!-- <tag>data</tag> -->
10576 pre-save transform: comment containing nowiki
10580 <!-- <nowiki>data</nowiki> -->
10582 <!-- <nowiki>data</nowiki> -->
10586 pre-save transform: <noinclude> in subst (bug 3298)
10596 pre-save transform: <onlyinclude> in subst (bug 3298)
10600 {{subst:Includes2}}
10608 {{<includeonly>subst:</includeonly>Includes}}
10612 Template:SafeSubstTest
10614 {{<includeonly>safesubst:</includeonly>Includes}}
10618 bug 22297: safesubst: works during PST
10622 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10628 bug 22297: safesubst: works during normal parse
10637 subst: does not work during normal parse
10641 <p>{{subst:Includes}}
10646 pre-save transform: context links ("pipe trick")
10650 [[Article (context)|]]
10653 [[Bar:Article (context)|]]
10654 [[:Bar:Article (context)|]]
10656 [[|Article (context)]]
10660 [[Article (context)|Article]]
10661 [[Bar:Article|Article]]
10662 [[:Bar:Article|Article]]
10663 [[Bar:Article (context)|Article]]
10664 [[:Bar:Article (context)|Article]]
10666 [[Article (context)]]
10667 [[Bar:X (Y) Z|X (Y) Z]]
10668 [[:Bar:X (Y) Z|X (Y) Z]]
10672 pre-save transform: context links ("pipe trick") with interwiki prefix
10676 [[interwiki:Article|]]
10677 [[:interwiki:Article|]]
10678 [[interwiki:Bar:Article|]]
10679 [[:interwiki:Bar:Article|]]
10681 [[interwiki:Article|Article]]
10682 [[:interwiki:Article|Article]]
10683 [[interwiki:Bar:Article|Bar:Article]]
10684 [[:interwiki:Bar:Article|Bar:Article]]
10688 pre-save transform: context links ("pipe trick") with parens in title
10690 pst title=[[Somearticle (context)]]
10694 [[Article (context)|Article]]
10698 pre-save transform: context links ("pipe trick") with comma in title
10700 pst title=[[Someplace, Somewhere]]
10703 [[Otherplace, Elsewhere|]]
10704 [[Otherplace, Elsewhere, Anywhere|]]
10706 [[Otherplace, Somewhere|Otherplace]]
10707 [[Otherplace, Elsewhere|Otherplace]]
10708 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
10712 pre-save transform: context links ("pipe trick") with parens and comma
10714 pst title=[[Someplace (IGNORED), Somewhere]]
10717 [[Otherplace (place), Elsewhere|]]
10719 [[Otherplace, Somewhere|Otherplace]]
10720 [[Otherplace (place), Elsewhere|Otherplace]]
10724 pre-save transform: context links ("pipe trick") with comma and parens
10726 pst title=[[Who, me? (context)]]
10729 [[Me, Myself, and I (1937 song)|]]
10731 [[Yes, you. (context)|Yes, you.]]
10732 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
10736 pre-save transform: context links ("pipe trick") with namespace
10738 pst title=[[Ns:Somearticle]]
10742 [[Ns:Article|Article]]
10746 pre-save transform: context links ("pipe trick") with namespace and parens
10748 pst title=[[Ns:Somearticle (context)]]
10752 [[Ns:Article (context)|Article]]
10756 pre-save transform: context links ("pipe trick") with namespace and comma
10758 pst title=[[Ns:Somearticle, Context, Whatever]]
10762 [[Ns:Article, Context, Whatever|Article]]
10766 pre-save transform: context links ("pipe trick") with namespace, comma and parens
10768 pst title=[[Ns:Somearticle, Context (context)]]
10772 [[Ns:Article (context)|Article]]
10776 pre-save transform: context links ("pipe trick") with namespace, parens and comma
10778 pst title=[[Ns:Somearticle (IGNORED), Context]]
10782 [[Ns:Article, Context|Article]]
10786 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
10790 [[Article(context)|]]
10791 [[Bar:Article(context)|]]
10792 [[:Bar:Article(context)|]]
10793 [[|Article(context)]]
10797 [[Article(context)|Article]]
10798 [[Bar:Article(context)|Article]]
10799 [[:Bar:Article(context)|Article]]
10800 [[Article(context)]]
10801 [[Bar:X(Y)Z|X(Y)Z]]
10802 [[:Bar:X(Y)Z|X(Y)Z]]
10806 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
10810 [[Article (context)|]]
10811 [[Bar:Article (context)|]]
10812 [[:Bar:Article (context)|]]
10813 [[|Article (context)]]
10817 [[Article (context)|Article]]
10818 [[Bar:Article (context)|Article]]
10819 [[:Bar:Article (context)|Article]]
10820 [[Article (context)]]
10821 [[Bar:X (Y) Z|X (Y) Z]]
10822 [[:Bar:X (Y) Z|X (Y) Z]]
10826 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
10830 [[Article(context)|]]
10831 [[Bar:Article(context)|]]
10832 [[:Bar:Article(context)|]]
10833 [[|Article(context)]]
10837 [[Article(context)|Article]]
10838 [[Bar:Article(context)|Article]]
10839 [[:Bar:Article(context)|Article]]
10840 [[Article(context)]]
10841 [[Bar:X(Y)Z|X(Y)Z]]
10842 [[:Bar:X(Y)Z|X(Y)Z]]
10846 pre-save transform: context links ("pipe trick") with commas (bug 21660)
10850 [[Article (context), context|]]
10851 [[Article (context),context|]]
10852 [[Bar:Article (context), context|]]
10853 [[Bar:Article (context),context|]]
10854 [[:Bar:Article (context), context|]]
10855 [[:Bar:Article (context),context|]]
10857 [[Article (context), context|Article]]
10858 [[Article (context),context|Article]]
10859 [[Bar:Article (context), context|Article]]
10860 [[Bar:Article (context),context|Article]]
10861 [[:Bar:Article (context), context|Article]]
10862 [[:Bar:Article (context),context|Article]]
10866 pre-save transform: trim trailing empty lines
10870 Empty lines are trimmed
10876 Empty lines are trimmed
10880 pre-save transform: Signature expansion
10885 * <noinclude>~~~</noinclude>
10886 * <includeonly>~~~</includeonly>
10887 * <onlyinclude>~~~</onlyinclude>
10889 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
10890 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
10891 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
10892 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
10897 pre-save transform: Signature expansion in nowiki tags (bug 93)
10903 <nowiki>~~~~</nowiki>
10905 <includeonly><nowiki>~~~~</nowiki></includeonly>
10907 <noinclude><nowiki>~~~~</nowiki></noinclude>
10909 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10911 {{subst:Foo}} shall be converted to FOO
10913 As well as inside noinclude/onlyinclude
10914 <noinclude>{{subst:Foo}}</noinclude>
10915 <onlyinclude>{{subst:Foo}}</onlyinclude>
10917 But not inside includeonly
10918 <includeonly>{{subst:Foo}}</includeonly>
10922 <nowiki>~~~~</nowiki>
10924 <includeonly><nowiki>~~~~</nowiki></includeonly>
10926 <noinclude><nowiki>~~~~</nowiki></noinclude>
10928 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10930 FOO shall be converted to FOO
10932 As well as inside noinclude/onlyinclude
10933 <noinclude>FOO</noinclude>
10934 <onlyinclude>FOO</onlyinclude>
10936 But not inside includeonly
10937 <includeonly>{{subst:Foo}}</includeonly>
10941 Parsoid: Recognize nowiki with trailing space in tags
10945 <nowiki ><div>[[foo]]</nowiki >
10953 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10960 Parsoid: Recognize nowiki with odd capitalization
10964 <noWikI ><div>[[foo]]</Nowiki >
10966 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10971 Parsoid: Escape nowiki with trailing space in tags
10975 <nowiki > foo </nowiki >
10981 <p><nowiki > foo </nowiki ></p>
10982 <p>a<nowiki />b</p>
10983 <p>c<nowiki/ >d</p>
10987 Parsoid: Escape weird noWikI capitalizations
10991 <noWikI > foo </NoWikI >
10993 <p><noWikI > foo </NoWikI ></p>
10997 ### Message transform tests
11000 message transform: magic variables
11010 message transform: should not transform wiki markup
11020 message transform: <noinclude> in transcluded template (bug 4926)
11030 message transform: <onlyinclude> in transcluded template (bug 4926)
11040 {{#special:}} page name, known
11044 {{#special:Recentchanges}}
11046 Special:RecentChanges
11050 {{#special:}} page name with subpage, known
11054 {{#special:Recentchanges/param}}
11056 Special:RecentChanges/param
11060 {{#special:}} page name, unknown
11064 {{#special:foobar nonexistent}}
11066 Special:Foobar nonexistent
11070 {{#speciale:}} page name, known
11074 {{#speciale:Recentchanges}}
11076 Special:RecentChanges
11080 {{#speciale:}} page name with subpage, known
11084 {{#speciale:Recentchanges/param}}
11086 Special:RecentChanges/param
11090 {{#speciale:}} page name, unknown
11094 {{#speciale:foobar nonexistent}}
11096 Special:Foobar_nonexistent
11102 ### For Parsoid-specific tests, see
11103 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11108 parsoid=wt2html,wt2wt,html2html
11110 [[Image:foobar.jpg]]
11112 <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>
11115 <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>
11119 Simple image (using File: namespace, now canonical)
11121 [[File:Foobar.jpg]]
11123 <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>
11126 <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>
11130 Right-aligned image
11132 [[File:Foobar.jpg|right]]
11134 <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>
11137 <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>
11143 [[File:Foobar.jpg|right|Caption text]]
11145 <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>
11148 <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>
11152 Image with caption, bug 53312 #1
11154 [[File:Foobar.jpg|right|Caption page stuff]]
11156 <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>
11159 <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>
11163 Image with caption, bug 53312 #2
11165 [[File:Foobar.jpg|right|Caption page=]]
11167 <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>
11170 <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>
11174 Image with caption, bug 53312 #3
11176 [[File:Foobar.jpg|right|Caption page=stuff]]
11178 <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>
11181 <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>
11185 Allow empty links in image captions (Bug 60753)
11189 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11194 <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>
11197 <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>
11199 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11200 </figcaption></figure>
11204 Link with empty target
11213 Image with empty attribute
11215 parsoid=wt2html,wt2wt,html2html
11217 [[File:Foobar.jpg|right||Caption text]]
11219 <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>
11222 <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>
11226 1. Block image with individual attributes from templates
11228 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11230 <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>
11233 <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>
11237 2. Block Image with individual attributes from templates
11239 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11241 <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>
11244 <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>
11248 3. Inline image with individual attributes from templates
11250 [[File:Foobar.jpg|{{echo|50px}}]]
11252 <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>
11255 <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>
11258 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11259 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11261 Image with multiple attributes from the same template
11263 [[File:Foobar.jpg|{{image_attribs}}]]
11265 <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>
11268 <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>
11272 Image with link tails
11276 123[[File:Foobar.jpg]]456
11277 123[[File:Foobar.jpg|right]]456
11278 123[[File:Foobar.jpg|thumb]]456
11280 <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
11282 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
11283 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
11286 <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>
11288 <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>
11290 <div class="thumb tright">
11291 <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>
11292 <div class="thumbcaption">
11293 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11299 <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>
11300 <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>
11301 <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>
11305 Image with multiple captions -- only last one is accepted
11307 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11309 <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>
11312 <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>
11316 Image with multiple widths -- use last
11318 [[File:Foobar.jpg|200px|300px|caption]]
11320 <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>
11323 <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>
11327 Image with multiple alignments -- use first (bug 48664)
11331 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11333 [[File:Foobar.jpg|middle|text-top|caption]]
11335 <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>
11336 <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>
11339 <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>
11340 <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>
11344 Image with width attribute at different positions
11346 [[File:Foobar.jpg|200px|right|Caption]]
11347 [[File:Foobar.jpg|right|200px|Caption]]
11348 [[File:Foobar.jpg|right|Caption|200px]]
11350 <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>
11351 <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>
11352 <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>
11355 <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>
11356 <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>
11357 <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>
11360 # a sad bit of backward-compatibility
11362 Image with size specified with pxpx (bug 13500, 51628)
11364 parsoid=wt2html,wt2wt,html2html
11366 [[File:Foobar.jpg|20pxpx]]
11367 [[File:Foobar.jpg|200x20pxpx]]
11369 <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>
11370 <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>
11373 <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>
11377 Image with link parameter, wiki target
11379 [[File:Foobar.jpg|link=Main Page]]
11381 <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>
11384 <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>
11387 # parsoid bug 49293 (part 1)
11389 Image with link parameter, URL target
11391 [[File:Foobar.jpg|link=http://example.com/]]
11393 <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>
11396 <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>
11399 # parsoid bug 49293 (part 2)
11401 Image with link parameter, protocol-less URL target
11403 [[File:Foobar.jpg|link=//example.com/]]
11405 <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>
11408 <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>
11412 Image with link parameter, wgExternalLinkTarget
11414 [[Image:foobar.jpg|link=http://example.com/]]
11416 wgExternalLinkTarget='foobar'
11418 <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>
11423 Image with link parameter, wgNoFollowLinks set to false
11425 [[Image:foobar.jpg|link=http://example.com/]]
11427 wgNoFollowLinks=false
11429 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11434 Image with link parameter, wgNoFollowDomainExceptions
11436 [[Image:foobar.jpg|link=http://example.com/]]
11438 wgNoFollowDomainExceptions='example.com'
11440 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11445 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11447 [[Image:foobar.jpg|link=http://example.com/|Title]]
11449 wgExternalLinkTarget='foobar'
11451 <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>
11456 Image with empty link parameter
11458 [[File:Foobar.jpg|link=]]
11460 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11463 <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>
11467 Image with link parameter (wiki target) and unnamed parameter
11469 [[File:Foobar.jpg|link=Main_Page|Title]]
11471 <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>
11474 <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>
11478 Image with link parameter (URL target) and unnamed parameter
11480 [[File:Foobar.jpg|link=http://example.com/|Title]]
11482 <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>
11485 <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>
11489 Thumbnail image with link parameter
11492 parsoid=wt2html,wt2wt,html2html
11494 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11496 <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>
11499 <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>
11503 Manually-specified thumbnail image
11507 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11509 <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>
11512 <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>
11516 Manually-specified thumbnail image with explicit link to wiki page
11519 parsoid=wt2html,wt2wt,html2html
11521 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11523 <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>
11526 <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>
11530 Manually-specified thumbnail image with explicit link to url
11533 parsoid=wt2html,wt2wt,html2html
11535 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11537 <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>
11540 <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>
11544 Manually-specified thumbnail image with explicit no link
11547 parsoid=wt2html,wt2wt,html2html
11549 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11551 <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>
11554 <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>
11558 Manually-specified thumbnail image with explicit link and alt text
11561 parsoid=wt2html,wt2wt,html2html
11563 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11565 <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>
11568 <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>
11572 Image with frame and link
11574 parsoid=wt2html,wt2wt,html2html
11576 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11578 <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>
11581 <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>
11585 Image with frame and link and explicit alt
11587 parsoid=wt2html,wt2wt,html2html
11589 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11591 <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>
11594 <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>
11598 Image with wiki markup in implicit alt
11600 parsoid=wt2html,wt2wt,html2html
11602 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11604 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11606 <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>
11607 </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>
11610 <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>
11611 <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>
11614 ###################
11615 # Conflicting image format options.
11616 # First option specified should 'win'.
11617 # All three cases in each test should be identical.
11620 Image with 'frameless' first.
11622 parsoid=wt2html,wt2wt,html2html
11624 [[File:Foobar.jpg|frameless|caption]]
11626 [[File:Foobar.jpg|frameless|frame|caption]]
11628 [[File:Foobar.jpg|frameless|thumb|caption]]
11630 <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>
11631 </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>
11632 </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>
11635 <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>
11636 <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>
11637 <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>
11641 Image with 'frame' first.
11643 parsoid=wt2html,wt2wt,html2html
11645 [[File:Foobar.jpg|frame|caption]]
11646 [[File:Foobar.jpg|frame|frameless|caption]]
11647 [[File:Foobar.jpg|frame|thumb|caption]]
11649 <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>
11650 <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>
11651 <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>
11654 <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>
11655 <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>
11656 <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>
11660 Image with 'thumb' first.
11662 parsoid=wt2html,wt2wt,html2html
11664 [[File:Foobar.jpg|thumb|caption]]
11665 [[File:Foobar.jpg|thumb|frameless|caption]]
11666 [[File:Foobar.jpg|thumb|frame|caption]]
11668 <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>
11669 <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>
11670 <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>
11673 <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>
11674 <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>
11675 <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>
11678 ###################
11680 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
11681 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
11682 # Foobar has actual size of 1941x220
11683 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
11684 # a scalable format.
11685 # 2. Framed images always ignore size options; always render at default size.
11686 # 3. "Unspecified format" and border are the only types which can be
11690 Image: "unspecified format" and border enlarge
11692 parsoid=wt2html,wt2wt,html2html
11694 [[File:Foobar.jpg|2000px]]
11696 [[File:Foobar.jpg|border|2000px]]
11698 <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>
11699 </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>
11702 <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>
11703 <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>
11707 Image: "unspecified format" and border reduce
11709 parsoid=wt2html,wt2wt,html2html
11711 [[File:Foobar.jpg|1000px]]
11713 [[File:Foobar.jpg|border|1000px]]
11715 <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>
11716 </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>
11719 <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>
11720 <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>
11724 Image: thumbs reduce
11726 parsoid=wt2html,wt2wt,html2html
11728 [[File:Foobar.jpg|thumb|50px]]
11730 <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>
11733 <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>
11737 Image: bitmap thumbs can't be enlarged past original size, but vector can.
11739 parsoid=wt2html,wt2wt,html2html
11741 [[File:Foobar.jpg|thumb|2000px]]
11743 [[File:Foobar.svg|thumb|2000px]]
11745 <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>
11746 <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>
11749 <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>
11750 <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>
11754 Image: frameless can reduce in size
11756 parsoid=wt2html,wt2wt,html2html
11758 [[File:Foobar.jpg|frameless|50px]]
11760 <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>
11763 <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>
11767 Image: bitmap frameless can't be enlarged past original size, but vector can
11769 parsoid=wt2html,wt2wt,html2html
11771 [[File:Foobar.jpg|frameless|2000px]]
11773 [[File:Foobar.svg|frameless|2000px]]
11775 <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>
11776 </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>
11779 <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>
11780 <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>
11784 Image: framed images are always unscaled.
11786 parsoid=wt2html,wt2wt,html2html
11788 [[File:Foobar.jpg|frame]]
11790 [[File:Foobar.jpg|frame|50px]]
11792 [[File:Foobar.jpg|frame|50x50px]]
11794 [[File:Foobar.jpg|frame|2000px]]
11796 <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>
11797 <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>
11798 <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>
11799 <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>
11802 <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>
11803 <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>
11804 <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>
11805 <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>
11808 ###################
11811 Link to image page- image page normally doesn't exists, hence edit link
11812 Add test with existing image page
11813 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
11817 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
11822 bug 18784 Link to non-existent image page with caption should use caption as link text
11824 [[:Image:test|caption]]
11826 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
11831 Frameless image caption with a free URL
11833 [[File:Foobar.jpg|http://example.com]]
11835 <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>
11838 <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>
11842 Thumbnail image caption with a free URL
11846 [[File:Foobar.jpg|thumb|http://example.com]]
11848 <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>
11851 <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>
11855 Thumbnail image caption with a free URL and explicit alt
11858 parsoid=wt2html,wt2wt,html2html
11860 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
11862 <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>
11865 <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>
11869 SVG thumbnails with no language set
11872 [[File:Foobar.svg|thumb|caption]]
11874 <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>
11877 <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>
11881 SVG thumbnails with language de
11883 parsoid=wt2html,wt2wt,html2html
11885 [[File:Foobar.svg|thumb|caption|lang=de]]
11887 <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>
11890 <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>
11894 SVG thumbnails with invalid language code
11896 parsoid=wt2html,wt2wt,html2html
11898 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
11900 <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>
11903 <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>
11907 BUG 1887: A ISBN with a thumbnail
11909 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11911 <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>
11914 <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>
11918 BUG 1887: A RFC with a thumbnail
11920 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11922 <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>
11925 <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>
11929 BUG 1887: A mailto link with a thumbnail
11931 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11933 <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>
11936 <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>
11939 # Pending resolution to bug 368
11941 BUG 648: Frameless image caption with a link
11943 [[File:Foobar.jpg|text with a [[link]] in it]]
11945 <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>
11948 <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>
11952 BUG 648: Frameless image caption with a link (suffix)
11954 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11956 <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>
11959 <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>
11963 BUG 648: Frameless image caption with an interwiki link
11965 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11967 <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>
11970 <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>
11974 BUG 648: Frameless image caption with a piped interwiki link
11976 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11978 <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>
11981 <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>
11985 Escape HTML special chars in image alt text
11987 [[File:Foobar.jpg|& < > "]]
11989 <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>
11992 <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>
11996 BUG 499: Alt text should have Ӓ, not &1234;
11998 [[File:Foobar.jpg|♀]]
12000 <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>
12003 <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>
12007 Broken image caption with link
12009 parsoid=wt2html,wt2wt,html2html
12011 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
12013 <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.
12016 <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>
12020 Image caption containing another image
12022 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12024 <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>
12027 <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>
12031 Image: caption containing a newline
12033 [[File:Foobar.jpg|This
12036 <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>
12039 <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>
12043 Image: caption containing leading space
12044 (The leading space should not trigger nowiki escaping in wt2wt mode)
12046 [[File:Foobar.jpg|thumb| bar]]
12048 <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>
12051 <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>
12055 Image: caption containing a table
12057 parsoid=wt2html,wt2wt,html2html
12059 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12065 and some more text.]]
12067 <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>
12070 <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
12073 <tr><th>Foo </th><th>Bar</th></tr>
12076 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12080 Bug 3090: External links other than http: in image captions
12082 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12084 <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>
12087 <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>
12093 parsoid=wt2html,wt2wt,html2html
12095 [[Image:foobar.jpg|a|class=b]]
12097 <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>
12100 <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>
12104 Localized image handling (1).
12106 parsoid=wt2html,wt2wt,html2html
12109 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12111 <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>
12114 <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>
12118 Localized image handling (2).
12121 parsoid=wt2html,wt2wt,html2html
12124 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12126 <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>
12129 <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>
12133 "border", "frameless" and "class" attributes on an image.
12136 parsoid=wt2html,wt2wt,html2html
12138 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12140 <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>
12143 <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>
12146 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12148 Invalid image attributes (bug 62500)
12151 parsoid=wt2html,wt2wt,html2html
12153 [[File:Foobar.jpg|thumb|float|left|caption]]
12155 [[File:Foobar.jpg|thumb|righ|caption]]
12157 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12159 <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>
12160 <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>
12161 <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>
12164 <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>
12165 <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>
12166 <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>
12172 #REDIRECT [[File:Barfoo.jpg]]
12175 # FIXME: Parsoid should run this test -- but we'd need to teach the
12176 # mockAPI about the redirected Barfoo.jpg image.
12180 [[Image:Barfoo.jpg]]
12182 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12187 Missing image with uploads disabled
12191 [[File:Foobaz.jpg]]
12193 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12196 <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>
12199 # Parsoid-specific testing for images
12200 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12201 # Currently imperfect due to a flaw in the Parsoid testrunner
12203 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12207 Parsoid-specific image handling - simple image with size and middle alignment
12209 [[File:Foobar.jpg|middle|50px]]
12211 <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>
12215 Parsoid-specific image handling - simple image with size, middle alignment,
12216 non-standard namespace alias
12218 parsoid=wt2wt,wt2html,html2html
12220 [[Image:Foobar.jpg|middle|50px]]
12222 <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>
12226 Parsoid-specific image handling - simple image with size and middle alignment
12229 [[File:Foobar.jpg|50px|middle]]
12231 <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>
12235 Parsoid-specific image handling - simple image with size and middle alignment
12236 and non-standard namespace name
12238 parsoid=wt2html,wt2wt,html2html
12240 [[Image:Foobar.jpg|50px|middle]]
12242 <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>
12246 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12248 [[File:Foobar.jpg|500x10px|baseline|caption]]
12250 <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>
12254 Parsoid-specific image handling - simple image with border and size spec
12256 [[File:Foobar.jpg|50px|border|caption]]
12258 <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>
12262 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12264 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12266 <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>
12270 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12273 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12275 <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>
12279 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12281 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12283 <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>
12287 Parsoid-specific image handling - thumbnail with specific size, halign,
12288 valign, and caption (existing content)
12290 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12292 <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>
12296 Parsoid-specific image handling - framed image with specific size and caption
12299 parsoid=wt2html,wt2wt,html2html
12301 [[File:Foobar.jpg|frame|500x50px|caption]]
12303 <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>
12307 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12310 parsoid=wt2html,wt2wt,html2html
12312 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12314 <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>
12318 Parsoid-specific image handling - frameless image with specific size, border, and caption
12320 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12322 <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>
12326 Parsoid-specific image handling - simple image with a formatted caption
12328 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12330 <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>
12334 Parsoid-specific image handling - caption with a template in it
12336 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12338 <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>
12342 Parsoid-specific image handling - caption with unbalanced tags in it
12344 parsoid=wt2html,wt2wt,html2html
12347 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12351 <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>
12356 Parsoid-specific image handling - empty caption (1)
12358 parsoid=wt2html,wt2wt
12360 [[File:Foobar.jpg|thumb|]]
12362 <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>
12365 # empty captions don't get serialized unless we're in the "round trip" case
12367 Parsoid-specific image handling - empty caption (2)
12371 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12372 <a href="File:Foobar.jpg">
12373 <img resource="./File:Foobar.jpg"
12374 src="//example.com/images/3/3a/Foobar.jpg"
12375 height="25" width="220"/>
12377 <figcaption></figcaption>
12380 [[File:Foobar.jpg|thumb]]
12384 Parsoid-specific image handling - whitespace caption
12386 [[File:Foobar.jpg|thumb| ]]
12388 <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>
12392 Parsoid-specific image handling - lang option
12395 [[File:Foobar.svg|lang=de|caption]]
12399 <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>
12408 Subpage test/subpage
12416 subpage title=[[Subpage test]]
12420 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12425 Subpage noslash link
12427 subpage title=[[Subpage test]]
12431 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12436 Subpage test/1/2/subpage
12442 Relative subpage noslash link
12444 parsoid=wt2wt,wt2html,html2html
12445 subpage title=[[Subpage test/1/2/3/4]]
12451 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
12452 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
12455 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
12456 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12460 Parsoid: dot-slash prefixed wikilinks
12470 </p><p>[[././baz/]]
12475 </p><p>[[././baz/]]
12480 Render invalid page names as plain text (bug 51090)
12493 [[{{echo|./../foo}}|bar]]
12494 [[{{echo|foo/.}}|bar]]
12495 [[{{echo|foo/..}}|bar]]
12496 [[{{echo|foo~~~~bar}}]]
12497 [[{{echo|foo>bar}}]]
12498 [[{{echo|foo././bar}}]]
12499 [[{{echo|foo{bar}}]]
12500 [[{{echo|foo}bar}}]]
12501 [[{{echo|foo[bar}}]]
12502 [[{{echo|foo]bar}}]]
12503 [[{{echo|foo<bar}}]]
12505 <p>[[./../foo|bar]]
12515 </p><p>[[./../foo|bar]]
12528 <p>[[./../foo|bar]]
12539 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12540 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12541 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12542 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12543 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12544 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12545 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12546 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12547 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12548 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12549 [[<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>
12557 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12562 BUG 561: {{/Subpage}}
12564 subpage title=[[Page]]
12568 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12576 Category:MediaWiki User's Guide
12584 [[:Category:MediaWiki User's Guide]]
12586 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12595 [[Category:MediaWiki User's Guide]]
12597 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12601 PAGESINCATEGORY invalid title fatal (r33546 fix)
12603 {{PAGESINCATEGORY:<bogus>}}
12610 Category with different sort key
12614 [[Category:MediaWiki User's Guide|Foo]]
12616 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12620 Category with identical sort key
12624 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12626 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12630 Category with empty sort key
12635 [[Category:MediaWiki User's Guide|]]
12637 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12641 Category with empty sort key and parentheses
12646 [[Category:Foo (bar)|]]
12648 [[Category:Foo (bar)|Foo]]
12652 Category with link tail
12657 123[[Category:Foo]]456
12659 123[[Category:Foo]]456
12663 Category with template
12668 [[Category:{{echo|Foo}}]]
12670 [[Category:{{echo|Foo}}]]
12674 Category with template in sort key
12679 [[Category:Foo|{{echo|Bar}}]]
12681 [[Category:Foo|{{echo|Bar}}]]
12685 Category with template in sort key and title
12690 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12692 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12696 Category / paragraph interactions
12698 Foo [[Category:Baz]] Bar
12700 Foo [[Category:Baz]]
12708 [[Category:Baz]] Bar
12721 {{echo|[[Category:Baz]]}}
12736 Parsoid: Serialize link to category page with colon escape
12742 [[:Category:Foo|Bar]]
12745 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
12746 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
12751 Parsoid: Link prefix/suffixes aren't applied to category links
12753 parsoid=wt2html,wt2wt,html2html
12758 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
12762 Parsoid: Serialize link to file page with colon escape
12768 [[:File:Foo.png|Bar]]
12771 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
12772 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
12777 Parsoid: Serialize a genuine category link without colon escape
12782 [[Category:Foo|Bar]]
12784 <link rel="mw:PageProp/Category" href="Category:Foo">
12785 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
12789 Normalize hrefs properly before testing for invalid link targets (bug 70894)
12793 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
12795 [[Category:Toxine bactérienne]]
12799 Parsoid: Defaultsort
12803 {{DEFAULTSORT:Foo}}
12805 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
12809 ### Inter-language links
12812 Interlanguage links
12820 es:Alimento fr:Nourriture zh:食品
12822 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
12823 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
12824 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
12828 Duplicate interlanguage links (bug 24502)
12839 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
12840 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
12841 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
12842 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
12849 Basic section headings
12856 ===Smaller headline===
12859 <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>
12862 <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>
12865 <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>
12871 Section headings with TOC
12874 === Subheadline 1 ===
12875 ===== Skipping a level =====
12876 ====== Skipping a level ======
12880 ===Another headline===
12882 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12884 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
12886 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
12888 <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>
12890 <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>
12897 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
12899 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
12905 <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>
12906 <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>
12907 <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>
12908 <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>
12909 <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>
12912 <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>
12916 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
12918 Handling of sections up to level 6 and beyond
12921 == Level 2 Heading==
12922 === Level 3 Heading===
12923 ==== Level 4 Heading====
12924 ===== Level 5 Heading=====
12925 ====== Level 6 Heading======
12926 ======= Level 7 Heading=======
12927 ======== Level 8 Heading========
12928 ========= Level 9 Heading=========
12929 ========== Level 10 Heading==========
12931 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12933 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12935 <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>
12937 <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>
12939 <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>
12941 <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>
12943 <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>
12944 <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>
12945 <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>
12946 <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>
12947 <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>
12961 <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>
12962 <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>
12963 <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>
12964 <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>
12965 <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>
12966 <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>
12967 <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>
12968 <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>
12969 <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>
12970 <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>
12975 TOC regression (bug 9764)
12979 ==== title 1.1.1 ====
12984 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12986 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12988 <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>
12990 <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>
12993 <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>
12996 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12998 <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>
13004 <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>
13005 <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>
13006 <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>
13007 <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>
13008 <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>
13009 <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>
13014 TOC with wgMaxTocLevel=3 (bug 6204)
13020 ==== title 1.1.1 ====
13025 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13027 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13029 <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>
13030 <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>
13033 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13035 <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>
13041 <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>
13042 <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>
13043 <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>
13044 <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>
13045 <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>
13046 <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>
13051 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13057 ====Section 1.1.1====
13058 ====Section 1.1.1.1====
13061 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13063 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13065 <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>
13068 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13072 <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>
13073 <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>
13074 <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>
13075 <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>
13076 <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>
13082 Resolving duplicate section names
13087 <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>
13088 <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>
13093 Resolving duplicate section names with differing case (bug 10721)
13098 <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>
13099 <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>
13111 Template with sections, __NOTOC__
13118 <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>
13119 <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>
13120 <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>
13121 <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>
13126 __NOEDITSECTION__ keyword
13132 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13133 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13138 Link inside a section heading
13140 ==Section with a [[Main Page|link]] in it==
13142 <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>
13147 TOC regression (bug 12077)
13154 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13156 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13158 <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>
13161 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13165 <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>
13166 <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>
13167 <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>
13172 BUG 1219 URL next to image (good)
13174 http://example.com [[Image:foobar.jpg]]
13176 <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>
13181 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13184 The line above must have a trailing space!
13187 But just in case it doesn't...
13189 <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>
13190 <p>The line above must have a trailing space!
13192 <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>
13193 <p>But just in case it doesn't...
13198 Header with special characters (bug 25462)
13200 The tooltips shall not show entities to the user (ie. be double escaped)
13217 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13219 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13221 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13222 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13223 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13224 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13225 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13229 <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>
13232 <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>
13235 <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>
13238 <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>
13241 <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>
13247 Header with space, plus and underscore as entity
13249 Id should not contain + for spaces
13251 == Space between Text ==
13254 == Space-Entity between Text ==
13257 == Plus+between+Text ==
13260 == Plus-Entity+between+Text ==
13263 == Underscore_between_Text ==
13266 == Underscore-Entity_between_Text ==
13269 [[#Space between Text]]
13270 [[#Space-Entity between Text]]
13271 [[#Plus+between+Text]]
13272 [[#Plus-Entity+between+Text]]
13273 [[#Underscore_between_Text]]
13274 [[#Underscore-Entity_between_Text]]
13276 <p>Id should not contain + for spaces
13278 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13280 <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>
13281 <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>
13282 <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>
13283 <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>
13284 <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>
13285 <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>
13289 <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>
13292 <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>
13295 <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>
13298 <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>
13301 <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>
13304 <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>
13306 </p><p><a href="#Space_between_Text">#Space between Text</a>
13307 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13308 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13309 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13310 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13311 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13316 Headers with excess '=' characters
13317 (Are similar tests necessary beyond the 1st level?)
13321 =''italic'' heading==
13322 ==''italic'' heading=
13324 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13326 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13327 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13328 <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>
13329 <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>
13333 <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>
13334 <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>
13335 <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>
13336 <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>
13341 HTML headers vs TOC (bug 23393)
13342 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13354 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13356 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13358 <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>
13359 <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>
13362 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13364 <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>
13365 <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>
13371 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13372 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13373 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13374 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13375 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13376 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13381 Single-line or multiline-comments can follow headings
13383 parsoid=wt2html,wt2wt
13391 <h2><span class="mw-headline" id="foo">foo</span></h2>
13392 <h2><span class="mw-headline" id="bar">bar</span></h2>
13393 <h2><span class="mw-headline" id="baz">baz</span></h2>
13398 BUG 1219 URL next to image (broken)
13400 http://example.com[[Image:foobar.jpg]]
13402 <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>
13407 Bug 1186 news: in the middle of text
13409 http://en.wikinews.org/wiki/Wikinews:Workplace
13411 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13417 Namespaced link must have a title
13426 Namespaced link must have a title (bad fragment version)
13428 [[Project:#fragment]]
13430 <p>[[Project:#fragment]]
13436 ### HTML tags and HTML attributes
13440 div with no attributes
13442 <div>HTML rocks</div>
13444 <div>HTML rocks</div>
13449 div with double-quoted attribute
13451 <div id="rock">HTML rocks</div>
13453 <div id="rock">HTML rocks</div>
13458 div with single-quoted attribute
13460 <div id='rock'>HTML rocks</div>
13462 <div id="rock">HTML rocks</div>
13467 div with unquoted attribute
13469 <div id=rock>HTML rocks</div>
13471 <div id="rock">HTML rocks</div>
13476 div with illegal double attributes
13478 <div id="a" id="b">HTML rocks</div>
13480 <div id="b">HTML rocks</div>
13484 # FIXME: produce empty string instead of "class" in the PHP parser, following
13487 div with empty attribute value, space before equals
13491 <div class =>HTML rocks</div>
13493 <div class="">HTML rocks</div>
13498 div with multiple empty attribute values
13502 <div id= title=>HTML rocks</div>
13504 <div id="" title="">HTML rocks</div>
13509 table with multiple empty attribute values
13517 <table title="" id="">
13518 <tbody><tr><td> hi</td></tr>
13523 div with braces in attribute value
13525 <div title="{}">Foo</div>
13527 <div title="{}">Foo</div>
13530 <div title="{}">Foo</div>
13533 # This it very inconsistent in the PHP parser: it returns
13534 # class="class" if there is a space between the name and the equal sign (see
13535 # 'div with empty attribute value, space before equals'), but strips the
13536 # attribute completely if the space is missing. We hope that not much content
13537 # depends on this, so are implementing the behavior below in Parsoid for
13538 # consistencies' sake.
13539 # FIXME: fix this behavior in the PHP parser?
13541 div with empty attribute value, no space before equals
13543 parsoid=wt2html,html2html
13545 <div class=>HTML rocks</div>
13547 <div>HTML rocks</div>
13550 <div class="">HTML rocks</div>
13554 HTML multiple attributes correction
13556 <p class="error" class="awesome">Awesome!</p>
13558 <p class="awesome">Awesome!</p>
13563 Table multiple attributes correction
13566 !+ class="error" class="awesome"| status
13571 <th class="awesome"> status
13579 <DIV ID="x">HTML ROCKS</DIV>
13581 <div id="x">HTML ROCKS</div>
13586 Non-ASCII pseudo-tags are rendered as text
13595 Pseudo-tag with URL 'name' renders as url link
13597 <http://example.com/>
13599 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13604 text with amp in the middle of nowhere
13608 <p>Remember AT&T?
13613 text with character entity: eacute
13615 I always thought é was a cute letter.
13617 <p>I always thought é was a cute letter.
13620 <p>I always thought é was a cute letter.</p>
13624 text with entity-escaped character entity-like string: eacute
13626 I always thought &eacute; was a cute letter.
13628 <p>I always thought &eacute; was a cute letter.
13633 text with undefined character entity: xacute
13635 I always thought &xacute; was a cute letter.
13637 <p>I always thought &xacute; was a cute letter.
13641 # TODO: generalize to PHP parser?
13647 <data value="5">five</data>
13648 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13649 <mark>This highlighted text</mark>
13651 <p><data value="5">five</data>
13652 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13653 <mark>This highlighted text</mark></p>
13657 HTML tag with leading space is parsed as text
13661 <p>< div>foo< /div>
13666 ### Nesting tests (see bug 41545, 50604, 51081)
13669 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13670 # Note that html2wt is considerably more difficult if we use <b> in
13671 # the test case, instead of <big>
13673 Ensure that HTML adoption agency algorithm is properly implemented.
13675 <big>X<big>Y</big>Z</big>
13677 <p><big>X<big>Y</big>Z</big>
13681 # This was bug 41545 in the PHP parser.
13682 # Note that tidy doesn't handle this correctly.
13686 <kbd>X<kbd>Y</kbd>Z</kbd>
13688 <p><kbd>X<kbd>Y</kbd>Z</kbd>
13692 # The following cases were bug 51081 in the PHP parser.
13693 # Note that there are some other nestable tags (b, i, etc) which are
13694 # not covered; see bug 51081 for discussion.
13696 # Note that tidy doesn't handle this correctly.
13700 <em>X<em>Y</em>Z</em>
13702 <p><em>X<em>Y</em>Z</em>
13706 # Note that tidy doesn't handle this correctly.
13708 Nesting of <strong>
13710 <strong>X<strong>Y</strong>Z</strong>
13712 <p><strong>X<strong>Y</strong>Z</strong>
13721 <p><q>X<q>Y</q>Z</q></p>
13724 # Note that tidy doesn't handle this correctly.
13728 <ruby>X<ruby>Y</ruby>Z</ruby>
13730 <p><ruby>X<ruby>Y</ruby>Z</ruby>
13734 # Note that tidy doesn't handle this correctly.
13738 <bdo>X<bdo>Y</bdo>Z</bdo>
13740 <p><bdo>X<bdo>Y</bdo>Z</bdo>
13752 [[Media:Foobar.jpg]]
13754 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
13759 Media link with text
13761 [[Media:Foobar.jpg|A neat file to look at]]
13763 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
13767 # FIXME: this is still bad HTML tag nesting
13769 Media link with nasty text
13770 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
13772 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
13774 <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>
13777 <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>
13781 Media link to nonexistent file (bug 1702)
13783 [[Media:No such.jpg]]
13785 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
13790 Image link to nonexistent file (bug 1850 - good)
13792 [[File:No_such.jpg]]
13794 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
13797 <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>
13801 :Image link to nonexistent file (bug 1850 - bad)
13803 [[:Image:No such.jpg]]
13805 <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>
13808 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
13814 Character reference normalization in link text (bug 1938)
13816 [[Main Page|this&that]]
13818 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
13825 Test for unicode normalization
13827 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
13831 (bug 19451) Links should refer to the normalized form.
13839 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13840 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13841 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13842 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13843 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13848 Empty attribute crash test (bug 2067)
13850 <font color="">foo</font>
13852 <p><font color="">foo</font>
13857 Empty attribute crash test single-quotes (bug 2067)
13859 <font color=''>foo</font>
13861 <p><font color="">foo</font>
13866 Attribute test: equals, then nothing
13868 <font color=>foo</font>
13870 <p><font>foo</font>
13875 Attribute test: unquoted value
13877 <font color=x>foo</font>
13879 <p><font color="x">foo</font>
13884 Attribute test: unquoted but illegal value (hash)
13886 <font color=#x>foo</font>
13888 <p><font color="#x">foo</font>
13893 Attribute test: no value
13895 <font color>foo</font>
13897 <p><font color="color">foo</font>
13902 Bug 2095: link with three closing brackets
13906 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
13909 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
13913 Bug 2095: link with pipe and three closing brackets
13915 [[Main Page|link]]]
13917 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
13920 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
13924 Bug 2095: link with pipe and three closing brackets, version 2
13926 [[Main Page|[http://example.com/]]]
13928 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
13931 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
13940 Template:Dangerous attribute
13942 " onmouseover="alert(document.cookie)
13946 Template:Dangerous style attribute
13948 border-size: expression(alert(document.cookie))
13954 <div style="float: right; {{{1}}}">Magic div</div>
13958 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
13960 <div title="{{test}}"></div>
13962 <div title="This is a test template"></div>
13966 # Parsoid has enough context to handle this case
13968 Bug 2304: HTML attribute safety (dangerous template; 2309)
13970 <div title="{{dangerous attribute}}"></div>
13972 <div title=""></div>
13975 <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>
13979 Bug 2304: HTML attribute safety (dangerous style template; 2309)
13981 <div style="{{dangerous style attribute}}"></div>
13983 <div style="/* insecure input */"></div>
13988 Bug 2304: HTML attribute safety (safe parameter; 2309)
13990 {{div style|width: 200px}}
13992 <div style="float: right; width: 200px">Magic div</div>
13997 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
13999 {{div style|width: expression(alert(document.cookie))}}
14001 <div style="/* insecure input */">Magic div</div>
14006 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14008 {{div style|"><script>alert(document.cookie)</script>}}
14010 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14015 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14017 {{div style|" ><script>alert(document.cookie)</script>}}
14019 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14024 Bug 2304: HTML attribute safety (link)
14026 <div title="[[Main Page]]"></div>
14028 <div title="[[Main Page]]"></div>
14033 Bug 2304: HTML attribute safety (italics)
14035 <div title="''foobar''"></div>
14037 <div title="''foobar''"></div>
14042 Bug 2304: HTML attribute safety (bold)
14044 <div title="'''foobar'''"></div>
14046 <div title="'''foobar'''"></div>
14052 Bug 2304: HTML attribute safety (ISBN)
14054 <div title="ISBN 1234567890"></div>
14056 <div title="ISBN 1234567890"></div>
14061 Bug 2304: HTML attribute safety (RFC)
14063 <div title="RFC 1234"></div>
14065 <div title="RFC 1234"></div>
14070 Bug 2304: HTML attribute safety (PMID)
14072 <div title="PMID 1234567890"></div>
14074 <div title="PMID 1234567890"></div>
14079 Bug 2304: HTML attribute safety (web link)
14081 <div title="http://example.com/"></div>
14083 <div title="http://example.com/"></div>
14088 Bug 2304: HTML attribute safety (named web link)
14090 <div title="[http://example.com/ link]"></div>
14092 <div title="[http://example.com/ link]"></div>
14097 Bug 3244: HTML attribute safety (extension; safe)
14099 <div style="<nowiki>background:blue</nowiki>"></div>
14101 <div style="background:blue"></div>
14106 Bug 3244: HTML attribute safety (extension; unsafe)
14108 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14110 <div style="/* insecure input */"></div>
14114 # More MSIE fun discovered by Tom Gilder
14117 MSIE CSS safety test: spurious slash
14119 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14121 <div style="/* insecure input */">evil</div>
14126 MSIE CSS safety test: hex code
14128 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14130 <div style="/* insecure input */">evil</div>
14135 MSIE CSS safety test: comment in url
14137 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14139 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14144 MSIE CSS safety test: comment in expression
14146 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14148 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14153 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14155 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14157 <p style="/* invalid control char */">A</p>
14162 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14164 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14165 <div style="top:EXPRESSION(alert())">B</div>
14167 <p style="/* insecure input */">A</p>
14168 <div style="/* insecure input */">B</div>
14173 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14175 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14176 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14178 <div style="/* insecure input */">A</div>
14179 <p style="/* insecure input */">B</p>
14184 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14186 <div style="background-image:url⁽javascript:alert())">A</div>
14187 <div style="background-image:url₍javascript:alert())">B</div>
14188 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14190 <div style="/* insecure input */">A</div>
14191 <div style="/* insecure input */">B</div>
14192 <p style="/* insecure input */">C</p>
14200 title="data:text/html,<img src=1 onerror=alert(1)>"
14201 style="-o-link:attr(title);-o-link-source:current">X</div>
14203 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14208 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14210 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14211 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14212 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14213 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14214 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14215 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14216 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14218 <p style="/* insecure input */">A</p>
14219 <p style="/* insecure input */">B</p>
14220 <p style="/* insecure input */">C</p>
14221 <p style="/* insecure input */">D</p>
14222 <p style="/* insecure input */">E</p>
14223 <p style="/* insecure input */">F</p>
14224 <p style="/* insecure input */">G</p>
14229 Table attribute legitimate extension
14232 !+ style="<nowiki>color:blue</nowiki>"| status
14237 <th style="color:blue"> status
14243 Table attribute safety
14246 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14251 <th style="/* insecure input */"> status
14257 CSS line continuation 1
14259 <div style="background-image: u\ rl(test.jpg);"></div>
14261 <div style="/* insecure input */"></div>
14266 CSS line continuation 2
14268 <div style="background-image: u\ rl(test.jpg); "></div>
14270 <div style="/* insecure input */"></div>
14281 Expansion of multi-line templates in attribute values (bug 6255)
14283 <div style="background: {{identity|#00FF00}}">-</div>
14285 <div style="background: #00FF00">-</div>
14291 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14293 <div style="background:
14296 <div style="background: #00FF00">-</div>
14299 <div style="background:
14304 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14306 <div style="background: #00FF00">-</div>
14308 <div style="background: #00FF00">-</div>
14313 evil <math>-wiki-tags without Extension:Math enabled
14315 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14317 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14321 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14324 Parser hook: empty input
14337 Parser hook: empty input using terminated empty elements
14350 Parser hook: empty input using terminated empty elements (space before)
14363 Parser hook: basic input
14377 Parser hook: case insensitive
14391 Parser hook: case insensitive, redux
14404 Parser hook: nested tags
14408 <tag><tag></tag></tag>
14419 Parser hook: basic arguments
14421 <tag width=200 height = "100" depth = '50' square></tag>
14429 'square' => 'square',
14436 Parser hook: argument containing a forward slash (bug 5344)
14438 <tag filename='/tmp/bla'></tag>
14443 'filename' => '/tmp/bla',
14450 Parser hook: empty input using terminated empty elements (bug 2374)
14463 # </tag> should be output literally since there is no matching tag that begins it
14465 Parser hook: basic arguments using terminated empty elements (bug 2374)
14467 <tag width=200 height = "100" depth = '50' square/>
14477 'square' => 'square',
14486 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14490 Parser hook: static parser hook not inside a comment
14492 <statictag>hello, world</statictag>
14493 <statictag action=flush/>
14501 Parser hook: static parser hook inside a comment
14503 <!-- <statictag>hello, world</statictag> -->
14504 <statictag action=flush/>
14510 # Nested template calls; this case was broken by Parser.php rev 1.506,
14514 Template:One-parameter
14516 (My parameter is: {{{1}}})
14520 Template:Map-one-parameter
14522 {{{{{1}}}|{{{2}}}}}
14526 Nested template calls
14528 {{Map-one-parameter|One-parameter|param}}
14530 <p>(My parameter is: param)
14539 # HTML+Tidy effectively strips out the empty tags completely
14540 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14541 # which Tidy would have done for the PHP parser had there been content inside it.
14543 Sanitizer: Closing of open tags
14545 <s></s><table></table>
14547 <s></s><table></table>
14550 <p><s></s></p><table></table>
14554 Sanitizer: Closing of open but not closed tags
14563 Sanitizer: Closing of closed but not open tags
14572 Sanitizer: Closing of closed but not open table tags
14574 Table not started</td></tr></table>
14576 <p>Table not started</td></tr></table>
14581 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14583 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14585 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14589 # In HTML5, the restrictions are that id must contain at least one character,
14590 # and must not contain any space characters.
14592 Sanitizer: Validating the contents of the id attribute (bug 4515)
14596 <br id="" /><br id="a space" />
14601 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
14603 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14607 <br id="foo" /><br id="foo" />
14609 Something need to be done. foo-2 ?
14613 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14616 <meta itemprop="hello" content="world">
14617 <meta http-equiv="refresh" content="5">
14618 <meta itemprop="hello" http-equiv="refresh" content="5">
14619 <link itemprop="hello" href="{{SERVER}}">
14620 <link rel="stylesheet" href="{{SERVER}}">
14621 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14624 <div itemscope="itemscope">
14625 <p> <meta itemprop="hello" content="world" />
14626 <meta http-equiv="refresh" content="5">
14627 <meta itemprop="hello" content="5" />
14629 <link itemprop="hello" href="http://example.org" />
14630 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14631 <link itemprop="hello" href="http://example.org" />
14637 Language converter: output gets cut off unexpectedly (bug 5757)
14641 this bit is safe: }-
14643 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14645 then we get cut off here: }-
14647 all additional text is vanished
14649 <p>this bit is safe: }-
14650 </p><p>but if we add a conversion instance: xxx
14651 </p><p>then we get cut off here: }-
14652 </p><p>all additional text is vanished
14657 Self closed html pairs (bug 5487)
14660 <center><font id="bug" />Centered text</center>
14661 <div><font id="bug2" />In div text</div>
14663 <center><font id="bug" />Centered text</center>
14664 <div><font id="bug2" />In div text</div>
14673 Punctuation: nbsp before exclamation
14677 <p>C'est grave !
14682 Punctuation: CSS !important (bug 11874)
14684 <div style="width:50% !important">important</div>
14686 <div style="width:50% !important">important</div>
14691 Punctuation: CSS ! important (bug 11874; with space after)
14693 <div style="width:50% ! important">important</div>
14695 <div style="width:50% ! important">important</div>
14701 HTML bullet list, closed tags (bug 5497)
14714 <ul data-parsoid='{"stx":"html"}'>
14715 <li data-parsoid='{"stx":"html"}'>One</li>
14716 <li data-parsoid='{"stx":"html"}'>Two</li>
14722 HTML bullet list, unclosed tags (bug 5497)
14734 <ul data-parsoid='{"stx":"html"}'>
14735 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14736 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14742 HTML ordered list, closed tags (bug 5497)
14755 <ol data-parsoid='{"stx":"html"}'>
14756 <li data-parsoid='{"stx":"html"}'>One</li>
14757 <li data-parsoid='{"stx":"html"}'>Two</li>
14763 HTML ordered list, unclosed tags (bug 5497)
14776 <ol data-parsoid='{"stx":"html"}'>
14777 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14778 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14784 HTML nested bullet list, closed tags (bug 5497)
14809 HTML nested bullet list, open tags (bug 5497)
14846 HTML nested ordered list, closed tags (bug 5497)
14871 HTML nested ordered list, open tags (bug 5497)
14908 HTML ordered list item with parameters oddity
14910 <ol><li id="fragment">One</li>
14913 <ol><li id="fragment">One</li>
14918 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
14920 bug 5918: autonumbering
14922 [http://first/] [http://second] [ftp://ftp]
14926 [mailto:enclosed@mail.tld With target]
14928 [mailto:enclosed@mail.tld]
14930 mailto:inline@mail.tld
14932 <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>
14933 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
14934 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
14935 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
14936 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
14939 <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>
14940 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
14941 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
14942 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
14943 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
14948 # Security and HTML correctness
14949 # From Nick Jenkins' fuzz testing
14953 Fuzz testing: Parser13
14968 Fuzz testing: Parser14
14973 <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>
14974 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14976 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14982 <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>
14984 <div id="toc" class="toc">
14985 <div id="toctitle">
14989 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14995 Fuzz testing: Parser14-table
15000 <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>
15001 <table style="__TOC__">
15006 <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>
15007 <table style="__TOC__">
15014 # Known to produce bogus xml (extra </td>)
15016 Fuzz testing: Parser16
15045 Fuzz testing: Parser21
15048 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15053 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15063 Fuzz testing: Parser22
15065 http://===r:::https://b
15069 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15077 # Known to produce bad XML for now
15079 Fuzz testing: Parser24
15086 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15087 <br style="onmouseover='alert(document.cookie);' " />
15089 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15094 <u class="|">}}}} >
15095 <br style="onmouseover='alert(document.cookie);'" />
15097 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15106 # Note: the current result listed for this is not what the original one was,
15107 # but the original bug was JavaScript injection, which is fixed in any case.
15108 # It's not clear that the original result listed was any more correct than the
15109 # current one. Original result:
15112 # <li class="||">
15113 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15115 Fuzz testing: Parser25 (bug 6055)
15121 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15123 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15128 Fuzz testing: URL adjacent extension (with space, clean)
15130 http://example.com <nowiki>junk</nowiki>
15132 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15137 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15139 http://example.com<nowiki>junk</nowiki>
15141 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15146 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15148 http://example.com<pre>junk</pre>
15150 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15153 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15160 Fuzz testing: image with bogus manual thumbnail
15162 [[Image:foobar.jpg|thumbnail= ]]
15164 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15167 <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>
15171 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15173 <pre dir=" "></pre>
15175 <pre dir=" "></pre>
15180 Parsing optional HTML elements (Bug 6171)
15185 <td> Some tabular data</td>
15186 <td> More tabular data ...
15187 <td> And yet som tabular data</td>
15193 <td> Some tabular data</td>
15194 <td> More tabular data ...
15195 </td><td> And yet som tabular data</td>
15202 Correct handling of <td>, <tr> (Bug 6171)
15207 <td> Some tabular data</td>
15208 <td> More tabular data ...</td>
15209 <td> And yet som tabular data</td>
15215 <td> Some tabular data</td>
15216 <td> More tabular data ...</td>
15217 <td> And yet som tabular data</td>
15225 Parsing crashing regression (fr:JavaScript)
15229 <p></body></x>
15234 Inline wiki vs wiki block nesting
15240 <p><b>Bold paragraph</b>
15241 </p><p>New wiki paragraph
15245 # FIXME: The current php output is documented
15246 # and desired output is the parsoid target.
15248 Inline HTML vs wiki block nesting
15254 <p><b>Bold paragraph
15255 </p><p>New wiki paragraph</b>
15258 <p><b>Bold paragraph</b>
15259 </p><p>New wiki paragraph
15263 # Original result was this:
15264 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15266 # While that might be marginally more intuitive, maybe, the six-apostrophe
15267 # construct is clearly pathological and the result stated here (which is what
15268 # the parser actually does) is about as reasonable as anything.
15270 Mixing markup for italics and bold
15273 '''bold''''''bold''bolditalics'''''
15275 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15283 Article for special page transclusion test
15287 Special page transclusion
15290 {{Special:Prefixindex/Xyzzyx}}
15292 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15297 Special page transclusion twice (bug 5021)
15300 {{Special:Prefixindex/Xyzzyx}}
15301 {{Special:Prefixindex/Xyzzyx}}
15303 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15304 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15309 Transclusion of default MediaWiki message
15311 {{MediaWiki:Mainpage}}
15318 Transclusion of nonexistent MediaWiki message
15320 {{MediaWiki:Mainpagexxx}}
15322 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15327 Transclusion of MediaWiki message with underscore
15329 {{MediaWiki:history_short}}
15336 Transclusion of MediaWiki message with space
15338 {{MediaWiki:history short}}
15345 Invalid header with following text
15355 Section extraction test (section 0)
15375 Section extraction test (section 1)
15397 Section extraction test (section 2)
15418 Section extraction test (section 3)
15438 Section extraction test (section 4)
15462 Section extraction test (section 5)
15482 Section extraction test (section 6)
15503 Section extraction test (section 7)
15523 Section extraction test (section 8)
15543 Section extraction test (section 9)
15564 Section extraction test (section 10)
15584 Section extraction test (nonexistent section 11)
15603 Section extraction test with bogus heading (section 1)
15608 ==bogus== not a legal section
15612 ==bogus== not a legal section
15616 Section extraction test with bogus heading (section 2)
15621 ==bogus== not a legal section
15628 Section extraction test with comment after heading (section 1)
15640 Section extraction test with comment after heading (section 2)
15652 Section extraction test with bogus <nowiki> heading (section 1)
15657 ==bogus== <nowiki>not a legal section</nowiki>
15661 ==bogus== <nowiki>not a legal section</nowiki>
15665 Section extraction test with bogus <nowiki> heading (section 2)
15670 ==bogus== <nowiki>not a legal section</nowiki>
15677 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
15678 # instead of respecting commented sections
15680 Section extraction prefixed by comment (section 1)
15691 Section extraction prefixed by comment (section 2)
15702 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
15703 # instead of respecting HTML-style headings
15705 Section extraction, mixed wiki and html (section 1)
15721 Section extraction, mixed wiki and html (section 2)
15737 # Formerly testing for bug 3342
15739 Section extraction, heading surrounded by <noinclude>
15743 <noinclude>==unmarked==</noinclude>
15749 # Test behavior of bug 19910
15751 Sectiion with all-equals
15756 The line above must have a trailing space
15759 But just in case it doesn't...
15763 But just in case it doesn't...
15767 Section replacement test (section 0)
15798 Section replacement test (section 1)
15827 Section replacement test (section 2)
15857 Section replacement test (section 3)
15888 Section replacement test (section 4)
15915 Section replacement test (section 5)
15946 Section replacement test (section 6)
15976 Section replacement test (section 7)
16007 Section replacement test (section 8)
16038 Section replacement test (section 9)
16067 Section replacement test (section 10)
16097 Section replacement test with initial whitespace (bug 13728)
16101 Preformatted initial line
16105 Preformatted initial line
16112 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16124 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16137 Section extraction, <pre> around bogus header (bug 10309)
16154 Section replacement, <pre> around bogus header (bug 10309)
16156 noxml replace=2,"xxx"
16177 Handling of 
 in URLs
16181 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16184 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16186 a</a></li></ul></li></ul>
16190 Handling of %0A in URLs
16194 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16197 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16201 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16203 5 quotes, code coverage +1 line
16210 <p><b><i></i></b></p>
16213 # same html as previous, but wikitext adjusted to match parsoid html2wt
16214 # note that wt2html and html2html will put the <i> before the <b>
16216 5 quotes, code coverage +1 line w/ nowiki (1)
16218 parsoid=wt2wt,html2wt
16220 '''''<nowiki/>'''''
16225 <p><b><i></i></b></p>
16228 # same as previous, just swapping the <i> and <b>
16230 5 quotes, code coverage +1 line w/ nowiki (2)
16232 '''''<nowiki/>'''''
16237 <p><i><b></b></i></p>
16241 Special:Search page linking.
16245 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16250 {{!}} is a magic word
16252 {{!}} is a magic word there and {{!}} is still a magic word here
16254 <p>| is a magic word there and | is still a magic word here
16257 <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>
16263 title=[[Parser test]]
16268 * {{FULLPAGENAMEE}}
16270 * {{BASEPAGENAMEE}}
16274 * {{ROOTPAGENAMEE}}
16276 * {{TALKPAGENAMEE}}
16277 * {{SUBJECTPAGENAME}}
16278 * {{SUBJECTPAGENAMEE}}
16281 * {{NAMESPACENUMBER}}
16285 * {{SUBJECTSPACEE}}
16286 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16288 <ul><li> Parser test</li>
16289 <li> Parser_test</li>
16290 <li> Parser test</li>
16291 <li> Parser_test</li>
16292 <li> Parser test</li>
16293 <li> Parser_test</li>
16294 <li> Parser test</li>
16295 <li> Parser_test</li>
16296 <li> Parser test</li>
16297 <li> Parser_test</li>
16298 <li> Talk:Parser test</li>
16299 <li> Talk:Parser_test</li>
16300 <li> Parser test</li>
16301 <li> Parser_test</li>
16309 <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>
16312 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16322 image4 |300px| centre
16323 image5.svg| http://///////
16328 <ul class="gallery mw-gallery-traditional">
16329 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16330 <div class="thumb" style="height: 150px;">Image1.png</div>
16331 <div class="gallerytext">
16334 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16335 <div class="thumb" style="height: 150px;">Image2.gif</div>
16336 <div class="gallerytext">
16341 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16342 <div class="thumb" style="height: 150px;">Image3</div>
16343 <div class="gallerytext">
16346 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16347 <div class="thumb" style="height: 150px;">Image4</div>
16348 <div class="gallerytext">
16353 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16354 <div class="thumb" style="height: 150px;">Image5.svg</div>
16355 <div class="gallerytext">
16356 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16360 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16361 <div class="thumb" style="height: 150px;">* image6</div>
16362 <div class="gallerytext">
16370 Gallery (with options)
16372 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16373 File:Nonexistant.jpg|caption
16374 File:Nonexistant.jpg
16375 image:foobar.jpg|some '''caption''' [[Main Page]]
16377 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16380 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16381 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16382 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16383 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16384 <div class="gallerytext">
16389 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16390 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16391 <div class="gallerytext">
16394 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16395 <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>
16396 <div class="gallerytext">
16397 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16401 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16402 <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>
16403 <div class="gallerytext">
16406 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16407 <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>
16408 <div class="gallerytext">
16418 Gallery with link that has fragment
16421 image:foobar.jpg|link=Main_Page
16422 image:foobar.jpg|link=Main_Page#section
16423 image:foobar.jpg|link=Main Page#section|caption
16426 <ul class="gallery mw-gallery-traditional">
16427 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16428 <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>
16429 <div class="gallerytext">
16432 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16433 <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>
16434 <div class="gallerytext">
16437 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16438 <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>
16439 <div class="gallerytext">
16449 Gallery with wikitext inside caption
16452 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16453 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16456 <ul class="gallery mw-gallery-traditional">
16457 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16458 <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>
16459 <div class="gallerytext">
16460 <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>
16464 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16465 <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>
16466 <div class="gallerytext">
16467 <p>This is a test template
16476 gallery (with showfilename option)
16478 <gallery showfilename>
16479 File:Nonexistant.jpg|caption
16480 File:Nonexistant.jpg
16481 image:foobar.jpg|some '''caption''' [[Main Page]]
16485 <ul class="gallery mw-gallery-traditional">
16486 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16487 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16488 <div class="gallerytext">
16489 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16494 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16495 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16496 <div class="gallerytext">
16497 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16501 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16502 <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>
16503 <div class="gallerytext">
16504 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16505 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16509 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16510 <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>
16511 <div class="gallerytext">
16512 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16521 Gallery (with namespace-less filenames)
16524 File:Nonexistant.jpg
16530 <ul class="gallery mw-gallery-traditional">
16531 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16532 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16533 <div class="gallerytext">
16536 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16537 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16538 <div class="gallerytext">
16541 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16542 <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>
16543 <div class="gallerytext">
16546 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16547 <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>
16548 <div class="gallerytext">
16556 HTML Hex character encoding (spells the word "JavaScript")
16558 parsoid=wt2html,wt2wt,html2html
16560 JavaScript
16562 <p>JavaScript
16567 <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>
16571 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16575 <p>&#xsee;&#XSEE;
16578 <p>&#xsee;&#XSEE;</p>
16582 HTML Hex character encoding mixed case
16584 parsoid=wt2html,wt2wt,html2html
16593 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16597 __FORCETOC__ override
16609 ISBN 978-0-1234-56 789
16611 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16614 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16618 ISBN followed by 5 spaces
16629 ISBN ISBN 1234567890
16631 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16640 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16645 ISBN with empty prefix (parsoid test)
16649 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
16653 Bug 22905: <abbr> followed by ISBN followed by </a>
16655 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
16657 <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>
16666 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
16671 Double RFC with a wiki link
16675 <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>
16684 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
16687 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
16691 Centre-aligned image
16693 [[Image:foobar.jpg|centre]]
16695 <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>
16702 [[Image:foobar.jpg|none]]
16704 <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>
16709 Width + Height sized image (using px) (height is ignored)
16711 [[Image:foobar.jpg|640x480px]]
16713 <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>
16718 Width-sized image (using px, no following whitespace)
16720 [[Image:foobar.jpg|640px]]
16722 <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>
16727 Width-sized image (using px, with following whitespace - test regression from r39467)
16729 [[Image:foobar.jpg|640px ]]
16731 <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>
16736 Width-sized image (using px, with preceding whitespace - test regression from r39467)
16738 [[Image:foobar.jpg| 640px]]
16740 <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>
16745 Image with page parameter
16749 [[File:LoremIpsum.djvu|page=2]]
16751 <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>
16754 <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>
16758 Another italics / bold test
16766 # FIXME: The php output seems broken. It's interleaving some open/close tags.
16772 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
16775 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
16780 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
16782 Images with the "|" character in the comment
16784 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
16786 <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>
16789 <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>
16793 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
16795 <html><script>alert(1);</script></html>
16797 <p><html><script>alert(1);</script></html>
16802 HTML with raw HTML ($wgRawHtml==true)
16806 <html><script>alert(1);</script></html>
16808 <p><script>alert(1);</script>
16813 Parents of subpages, one level up
16815 subpage title=[[Subpage test/L1/L2/L3]]
16819 <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>
16825 Parents of subpages, one level up, not named
16827 subpage title=[[Subpage test/L1/L2/L3]]
16831 <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>
16838 Parents of subpages, two levels up
16840 subpage title=[[Subpage test/L1/L2/L3]]
16846 <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
16847 </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>
16852 Parents of subpages, two levels up, without trailing slash or name.
16854 subpage title=[[Subpage test/L1/L2/L3]]
16863 Parents of subpages, two levels up, with lots of extra trailing slashes.
16865 subpage title=[[Subpage test/L1/L2/L3]]
16869 <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>
16874 Subpage test/L1/L2/L3Sibling
16880 Transclusion of a sibling page (one level up)
16882 subpage title=[[Subpage test/L1/L2/L3]]
16891 Transclusion of a child page
16893 subpage title=[[Subpage test/L1/L2]]
16902 Non-transclusion because of too many up levels
16904 subpage title=[[Subpage test/L1/L2/L3]]
16906 {{../../../../More than parent}}
16908 <p>{{../../../../More than parent}}
16913 Definition list code coverage
16919 <dl><dt> title  </dt>
16921 <dt> title </dt>
16927 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16928 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16929 <dt>title</dt><dd> def</dd></dl>
16933 Don't fall for the self-closing div
16935 <div>hello world</div/>
16937 <div>hello world</div>
16946 <p>[[:Template:Msg]]
16955 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
16959 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
16961 Always escape literal '>' in output, not just after '<'
16975 <p>This is a test template
16976 This is a test template
16988 Inclusion of !userCanEdit() content
16992 <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>
16998 Out-of-order TOC heading levels
17007 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17009 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17011 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17012 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17015 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17017 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17018 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17024 <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>
17025 <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>
17026 <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>
17027 <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>
17028 <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>
17029 <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>
17035 ISBN with a dummy number
17045 ISBN with space-delimited number
17049 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17055 ISBN with multiple spaces, no number
17074 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17075 </p><p>ISBN 12345678901
17081 ISBN with trailing year (bug 8110)
17083 ISBN 1-234-56789-0 - 2006
17085 ISBN 1 234 56789 0 - 2006
17087 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17088 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17096 {{anchorencode:foo bar©#%n}}
17098 <p>foo_bar.C2.A9.23.25n
17103 anchorencode trims spaces
17105 {{anchorencode: __pretty__please__}}
17112 anchorencode deals with links
17114 {{anchorencode: [[hello|world]] [[hi]]}}
17121 anchorencode deals with templates
17123 {{anchorencode: {{Foo}} }}
17130 anchorencode encodes like the TOC generator: (bug 18431)
17132 === _ +:.3A%3A&&]] ===
17133 {{anchorencode: _ +:.3A%3A&&]] }}
17136 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17137 <p>.2B:.3A.253A.26.26.5D.5D
17142 Bug 6200: blockquotes and paragraph formatting
17163 Bug 8293: Use of center tag ruins paragraph formatting
17184 Parsing of overlapping (improperly nested) inline html tags
17186 <span><s>x</span></s>
17188 <p><span><s>x</span></s></span>
17191 <p><span><s>x</s></span>
17196 ### Language variants related tests
17199 Self-link in language variants
17201 title=[[Dunav]] language=sr
17203 Both [[Dunav]] and [[Дунав]] are names for this river.
17205 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17216 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17218 title=[[Duna]] language=sr
17220 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17222 <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.
17227 Link to a section of a variant of this title shouldn't be parsed as self-link
17229 title=[[Duna]] language=sr
17231 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17233 <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.
17238 Link to pages in language variants
17242 Main Page can be written as [[Маин Паге]]
17244 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17250 Multiple links to pages in language variants
17254 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17256 <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>.
17262 Simple template in language variants
17268 <p>This is a test template
17274 Template with explicit namespace in language variants
17280 <p>This is a test template
17286 Basic test for template parameter in language variants
17290 {{парамтест|param=foo}}
17292 <p>This is a test template with parameter foo
17298 Simple category in language variants
17302 [[Category:МедиаWики Усер'с Гуиде]]
17304 <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>
17321 Don't convert blue categorylinks to another variant (bug 33210)
17325 [[A]][[Category:分类]]
17327 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17332 Stripping -{}- tags (language variants)
17336 Latin proverb: -{Ne nuntium necare}-
17338 <p>Latin proverb: Ne nuntium necare
17344 Prevent conversion with -{}- tags (language variants)
17346 language=sr variant=sr-ec
17348 Latinski: -{Ne nuntium necare}-
17350 <p>Латински: Ne nuntium necare
17356 Prevent conversion of text with -{}- tags (language variants)
17358 language=sr variant=sr-ec
17360 Latinski: -{Ne nuntium necare}-
17362 <p>Латински: Ne nuntium necare
17368 Prevent conversion of links with -{}- tags (language variants)
17370 language=sr variant=sr-ec
17374 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17380 -{}- tags within headlines (within html for parserConvert())
17382 language=sr variant=sr-ec
17386 <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>
17392 Explicit definition of language variant alternatives
17394 language=zh variant=zh-tw
17396 -{zh:China;zh-tw:Taiwan}-, not China
17398 <p>Taiwan, not China
17404 Conversion around HTML tags
17406 language=sr variant=sr-ec
17408 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17409 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17412 <span title="ЛаCтин">ски</span>
17418 Explicit session-wise language variant mapping (A flag and - flag)
17420 language=zh variant=zh-tw
17422 Taiwan is not China.
17423 But -{A|zh:China;zh-tw:Taiwan}- is China,
17424 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17425 and -{China}- is China.
17427 <p>Taiwan is not China.
17428 But Taiwan is Taiwan,
17429 (This should be stripped!)
17430 and China is China.
17435 Explicit session-wise language variant mapping (H flag for hide)
17437 language=zh variant=zh-tw
17439 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17442 <p>(This should be stripped!)
17448 Adding explicit conversion rule for title (T flag)
17450 language=zh variant=zh-tw showtitle
17452 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17455 <p>Should be stripped!
17460 Testing that changing the language variant here in the tests actually works
17462 language=zh variant=zh showtitle
17464 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17467 <p>Should be stripped!
17472 Recursive conversion of alt and title attrs shouldn't clear converter state
17474 language=zh variant=zh-cn showtitle
17476 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17477 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17481 Should be stripped<span title="Exclamation">!</span>
17486 Bug 24072: more test on conversion rule for title
17488 language=zh variant=zh-tw showtitle
17490 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17491 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17494 <p>This should be stripped!
17495 This won't take interferes with the title rule.
17500 Partly disable title conversion if variant == main language code
17502 language=zh variant=zh title=[[ZH]] showtitle
17504 -{T|zh-cn:CN;zh-tw:TW}-
17512 Partly disable title conversion if variant == main language code, more
17514 language=zh variant=zh title=[[ZH]] showtitle
17524 Raw output of variant escape tags (R flag)
17526 language=zh variant=zh-tw
17528 Raw: -{R|zh:China;zh-tw:Taiwan}-
17530 <p>Raw: zh:China;zh-tw:Taiwan
17535 Nested using of manual convert syntax
17537 language=zh variant=zh-hk
17539 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17541 <p>Nested: Hello Hong Kong!
17546 Proper conversion of text in external links
17548 language=sr variant=sr-ec
17550 http://www.google.com
17551 gopher://www.google.com
17552 [http://www.google.com http://www.google.com]
17553 [gopher://www.google.com gopher://www.google.com]
17554 [https://www.google.com irc://www.google.com]
17555 [ftp://www.google.com www.google.com/ftp://dir]
17556 [//www.google.com www.google.com]
17558 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17559 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17560 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17561 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17562 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17563 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17564 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17569 Do not convert roman numbers to language variants
17571 language=sr variant=sr-ec
17575 <p>Фридрих IV је цар.
17580 Unclosed language converter markup "-{"
17591 Don't convert raw rule "-{R|=>}-" to "=>"
17602 Don't break link parsing if language converter markup is in the caption.
17604 language=sr variant=sr-ec
17606 [[Main Page|-{R|main page}-]]
17608 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17612 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17614 Don't break image parsing if language converter markup is in the caption.
17618 [[File:Foobar.jpg|-{R|caption}-]]
17620 <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>
17624 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17626 Don't break list handling if language converter markup is in the item.
17628 language=zh variant=zh-cn
17630 ;-{zh-cn:AAA;zh-tw:BBB}-
17632 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
17639 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17641 Don't break table handling if language converter markup is in the cell.
17643 language=sr variant=sr-ec
17666 Bug 529: Uncovered bullet
17675 # Plain MediaWiki does not remove empty lists, but tidy actually does.
17676 # Templates in Wikipedia rely on this behavior, as tidy has always been
17677 # enabled there. These tests are normally run *without* tidy, so specify the
17678 # full output here.
17679 # To test realistic parsing behavior, apply a tidy-like transformation to both
17680 # the expected output and your parser's output.
17682 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
17684 ******* Foo {{bullet}}
17686 <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>
17692 Bug 529: Uncovered table already at line-start
17715 Bug 529: Uncovered bullet in parser function result
17717 * Foo {{lc:{{bullet}} }}
17725 Bug 5678: Double-parsed template argument
17727 {{lc:{{{1}}}|hello}}
17734 Bug 5678: Double-parsed template invocation
17736 {{lc:{{paramtest {{!}} param = hello }} }}
17738 <p>{{paramtest | param = hello }}
17743 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
17746 title=[[Main Page]]
17748 {{PRVNÍVELKÉ:ěščř}}
17749 {{prvnívelké:ěščř}}
17769 Morwen/13: Unclosed link followed by heading
17776 <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>
17781 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
17788 <h1><span class="mw-headline" id="heading">heading</span></h1>
17793 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
17800 <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>
17815 Paragraphs inside divs (no extra line breaks)
17827 Paragraphs inside divs (extra line break on open)
17842 Paragraphs inside divs (extra line break on close)
17857 Paragraphs inside divs (extra line break on open and close)
17874 Nesting tags, paragraphs on lines which begin with <div>
17876 <div></div><strong>A
17879 <p><strong>A</strong></p>
17880 <p><strong>B</strong></p>
17888 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
17890 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
17892 <blockquote>Line one
17894 Line two</blockquote>
17896 <blockquote>Line one
17897 Line two</blockquote>
17901 <p>Line one Line two</p>
17906 Bug 6200: paragraphs inside blockquotes (extra line break on open)
17911 Line two</blockquote>
17916 Line two</blockquote>
17921 Line two</blockquote>
17925 Bug 6200: paragraphs inside blockquotes (extra line break on close)
17927 <blockquote>Line one
17932 <blockquote>Line one
17945 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
17967 Paragraphs inside blockquotes/divs (no extra line breaks)
17969 <blockquote><div>Line one
17971 Line two</div></blockquote>
17973 <blockquote><div>Line one
17974 Line two</div></blockquote>
17979 Paragraphs inside blockquotes/divs (extra line break on open)
17984 Line two</div></blockquote>
17989 Line two</div></blockquote>
17994 Paragraphs inside blockquotes/divs (extra line break on close)
17996 <blockquote><div>Line one
17999 </div></blockquote>
18001 <blockquote><div>Line one
18004 </div></blockquote>
18009 Paragraphs inside blockquotes/divs (extra line break on open and close)
18015 </div></blockquote>
18021 </div></blockquote>
18026 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18028 wgLinkHolderBatchSize=0
18034 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18035 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18036 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18041 Free external link invading image caption
18043 [[Image:Foobar.jpg|thumb|http://x|hello]]
18045 <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>
18050 Bug 15196: localised external link numbers
18054 [http://en.wikipedia.org/]
18056 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18059 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18063 Multibyte character in padleft
18065 {{padleft:-Hello|7|Æ}}
18072 Multibyte character in padright
18074 {{padright:Hello-|7|Æ}}
18081 formatdate parser function
18083 {{#formatdate:2009-03-24}}
18085 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18090 formatdate parser function, with default format
18092 {{#formatdate:2009-03-24|mdy}}
18094 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18099 Spacing of numbers in formatted dates
18101 {{#formatdate:January 15}}
18103 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18108 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
18110 language=nl title=[[MediaWiki:Common.css]]
18112 {{#formatdate:2009-03-24|dmy}}
18114 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18127 Edit comment with link
18131 I like the [[Main Page]] a lot
18133 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18137 Edit comment with link and link text
18141 I like the [[Main Page|best pages]] a lot
18143 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18147 Edit comment with link and link text with suffix
18151 I like the [[Main Page|best page]]s a lot
18153 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18157 Edit comment with section link (non-local, eg in history list)
18159 comment title=[[Main Page]]
18161 /* External links */ removed bogus entries
18163 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18167 Edit comment with section link and text before it (non-local, eg in history list)
18169 comment title=[[Main Page]]
18171 pre-comment text /* External links */ removed bogus entries
18173 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>
18177 Edit comment with section link (local, eg in diff view)
18179 comment local title=[[Main Page]]
18181 /* External links */ removed bogus entries
18183 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18187 Edit comment with subpage link (bug 14080)
18191 title=[[Subpage test]]
18193 Poked at a [[/subpage]] here...
18195 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18199 Edit comment with subpage link and link text (bug 14080)
18203 title=[[Subpage test]]
18205 Poked at a [[/subpage|neat little page]] here...
18207 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18211 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18214 title=[[Subpage test]]
18216 Poked at a [[/subpage]] here...
18218 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18222 Edit comment with bare anchor link (local, as on diff)
18226 title=[[Main Page]]
18230 <a href="#section">#section</a>
18234 Edit comment with bare anchor link (non-local, as on history)
18237 title=[[Main Page]]
18241 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18245 Anchor starting with underscore
18249 <p><a href="#_ref">One</a>
18254 Id starting with underscore
18256 <div id="_ref"></div>
18258 <div id="_ref"></div>
18263 Space normalisation on autocomment (bug 22784)
18266 title=[[Main Page]]
18268 /* __hello__world__ */
18270 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18274 percent-encoding and + signs in comments (Bug 26410)
18278 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18280 <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>
18283 # Parsoid doesn't support this yet: see bug 73581
18284 # but it *should* omit the 'src' attribute if the image is bad.
18285 # PHP side of tests was disabled in
18286 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
18287 # because of issues in the PHP parserTests infrastructure
18288 # (but the output below is indeed what the PHP side emits)
18290 Bad images - basic functionality
18293 !! DISABLED/html/php
18295 <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>
18299 Bad images - bug 16039: text after bad image disappears
18304 !! DISABLED/html/php
18310 <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>
18315 Verify that displaytitle works (bug #22501) no displaytitle
18319 wgAllowDisplayTitle=true
18320 wgRestrictDisplayTitle=false
18322 this is not the the title
18325 <p>this is not the the title
18330 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18335 wgAllowDisplayTitle=true
18336 wgRestrictDisplayTitle=false
18338 this is not the the title
18339 {{DISPLAYTITLE:whatever}}
18342 <p>this is not the the title
18347 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18352 wgAllowDisplayTitle=true
18353 wgRestrictDisplayTitle=true
18355 this is not the the title
18356 {{DISPLAYTITLE:whatever}}
18359 <p>this is not the the title
18364 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18369 wgAllowDisplayTitle=true
18370 wgRestrictDisplayTitle=true
18372 this is not the the title
18373 {{DISPLAYTITLE:screen}}
18376 <p>this is not the the title
18381 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18386 wgAllowDisplayTitle=false
18388 this is not the the title
18389 {{DISPLAYTITLE:screen}}
18392 <p>this is not the the title
18393 <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>
18398 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18403 wgAllowDisplayTitle=false
18405 this is not the the title
18408 <p>this is not the the title
18413 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18418 wgAllowDisplayTitle=true
18419 wgRestrictDisplayTitle=true
18421 this is not the the title
18422 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18424 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18425 <p>this is not the the title
18430 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18435 wgAllowDisplayTitle=true
18436 wgRestrictDisplayTitle=true
18438 this is not the the title
18439 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18441 <span style="color: red;">s</span>creen
18442 <p>this is not the the title
18447 preload: check <noinclude> and <includeonly>
18451 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18457 preload: check <onlyinclude>
18461 Goodbye <onlyinclude>Hello world</onlyinclude>
18467 preload: can pass tags through if we want to
18471 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18473 <includeonly>Hello world</includeonly>
18477 preload: check that it doesn't try to do tricks
18481 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18483 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18487 Play a bit with r67090 and bug 3158
18489 <div style="width:50% !important"> </div>
18490 <div style="width:50% !important"> </div>
18491 <div style="width:50% !important"> </div>
18492 <div style="border : solid;"> </div>
18494 <div style="width:50% !important"> </div>
18495 <div style="width:50% !important"> </div>
18496 <div style="width:50% !important"> </div>
18497 <div style="border : solid;"> </div>
18500 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18501 <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>
18502 <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>
18503 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18508 HTML5 data attributes
18510 <span data-foo="bar">Baz</span>
18511 <p data-abc-def_hij="">Quuz</p>
18513 <p><span data-foo="bar">Baz</span>
18515 <p data-abc-def_hij="">Quuz</p>
18520 percent-encoding and + signs in internal links (Bug 26410)
18522 [[User:+%]] [[Page+title%]]
18523 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18524 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
18525 [[%33%45]] [[%33%45+]]
18527 <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>
18528 <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>
18529 <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>
18530 <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>
18533 <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>
18537 Special characters in embedded file links (bug 27679)
18539 [[File:Contains & ampersand.jpg]]
18540 [[File:Does not exist.jpg|Title with & ampersand]]
18542 <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>
18543 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18546 <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>
18547 <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>
18551 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18553 Text's been normalized?
18555 <p>Text's been normalized?
18560 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18562 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18564 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18569 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18571 [http://www.example.org/ ideograms]
18573 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18578 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18580 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18582 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18606 Bug 31098 Template which includes system messages which includes the template
18610 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18611 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18616 Bug31490 Turkish: ucfirst 'blah'
18627 Bug31490 Turkish: ucfirst 'ix'
18638 Bug31490 Turkish: lcfirst 'BLAH'
18649 Bug31490 Turkish: ucfırst (with a dotless i)
18655 <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>
18660 Bug31490 ucfırst (with a dotless i) with English language
18666 <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>
18671 Bug 26375: TOC with italics
18673 title=[[Main Page]]
18676 == ''Lost'' episodes ==
18678 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18680 <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>
18684 <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>
18689 Bug 26375: TOC with bold
18691 title=[[Main Page]]
18694 == '''should be bold''' then normal text ==
18696 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18698 <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>
18702 <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>
18707 Bug 33845: Headings become cursive in TOC when they contain an image
18709 title=[[Main Page]]
18712 == Image [[Image:foobar.jpg]] ==
18714 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18716 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
18720 <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>
18725 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
18727 title=[[Main Page]]
18730 == <blockquote>Quote</blockquote> ==
18732 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18734 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18738 <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>
18741 <div id="toc" class="toc">
18742 <div id="toctitle">
18746 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18749 <h2><span class="mw-headline" id="Quote"></span></h2>
18751 <p><span class="mw-headline" id="Quote">Quote</span></p>
18753 <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>
18757 Unclosed tags in TOC
18759 title=[[Main Page]]
18763 <small>Hanc marginis exiguitas non caperet.</small>
18766 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18768 <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>
18772 <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>
18773 <p><small>Hanc marginis exiguitas non caperet.</small>
18779 Multiple tags in TOC
18782 == <i>Foo</i> <b>Bar</b> ==
18784 == <i>Foo</i> <blockquote>Bar</blockquote> ==
18786 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18788 <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>
18789 <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>
18793 <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>
18794 <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>
18797 <div id="toc" class="toc">
18798 <div id="toctitle">
18802 <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>
18803 <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>
18806 <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>
18807 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
18809 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
18811 <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>
18815 Tags with parameters in TOC
18818 == <sup class="in-h2">Hello</sup> ==
18820 == <sup class="a > b">Evilbye</sup> ==
18822 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18824 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
18825 <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>
18829 <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>
18830 <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>
18835 span tags with directionality in TOC
18838 == <span dir="ltr">C++</span> ==
18840 == <span dir="rtl">זבנג!</span> ==
18842 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
18844 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
18846 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
18848 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18850 <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>
18851 <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>
18852 <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>
18853 <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>
18854 <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>
18858 <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>
18859 <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>
18860 <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>
18861 <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>
18862 <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>
18869 == {{int:headline_sample}} ==
18873 Bug 32057: Title needed when expanding <h> nodes.
18875 title=[[Main Page]]
18879 <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>
18884 Strip marker in urlencode
18886 {{urlencode:x<nowiki/>y}}
18887 {{urlencode:x<nowiki/>y|wiki}}
18888 {{urlencode:x<nowiki/>y|path}}
18915 Strip marker in formatNum
18917 {{formatnum:1<nowiki/>2}}
18918 {{formatnum:1<nowiki/>2|R}}
18926 Check noCommafy in formatNum
18930 {{formatnum:123456.78}}
18931 {{formatnum:123456.78|NOSEP}}
18939 Wrong option for formatNum (bug 56199)
18941 {{formatnum:1,234.56|Random}}
18942 {{formatnum:1,234.56|EVERYTHING}}
18943 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
18952 Strip marker in grammar
18956 {{grammar:elative|foo<nowiki/>bar}}
18963 Strip marker in padleft
18965 {{padleft:|2|x<nowiki/>y}}
18972 Strip marker in padright
18974 {{padright:|2|x<nowiki/>y}}
18981 Strip marker in anchorencode
18983 {{anchorencode:x<nowiki/>y}}
18990 nowiki inside link inside heading (bug 18295)
18992 ==[[foo|x<nowiki>y</nowiki>z]]==
18994 <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>
18999 new support for bdi element (bug 31817)
19001 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19003 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19008 Ignore pipe between table row attributes
19012 |- id=foo | style='color: red'
19020 <tr id="foo" style="color: red">
19027 Gallery override link with WikiLink (bug 34852)
19030 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19033 <ul class="gallery mw-gallery-traditional">
19034 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19035 <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>
19036 <div class="gallerytext">
19046 Gallery override link with absolute external link (bug 34852)
19049 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19052 <ul class="gallery mw-gallery-traditional">
19053 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19054 <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>
19055 <div class="gallerytext">
19065 Gallery override link with malicious javascript (bug 34852)
19068 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19071 <ul class="gallery mw-gallery-traditional">
19072 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19073 <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>
19074 <div class="gallerytext">
19084 Gallery with invalid title as link (bug 43964)
19087 File:foobar.jpg|link=<
19090 <ul class="gallery mw-gallery-traditional">
19091 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19092 <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>
19093 <div class="gallerytext">
19101 Language parser function
19110 Padleft and padright as substr
19112 {{padleft:|3|abcde}}
19113 {{padright:|3|abcde}}
19121 Special parser function
19123 {{#special:RandomPage}}
19124 {{#special:BaDtItLe}}
19125 {{#special:Foobar}}
19134 Bug 34939 - Case insensitive link parsing ([HttP://])
19136 [HttP://MediaWiki.Org/]
19138 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19141 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19145 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19147 [HttP://MediaWiki.Org/ MediaWiki]
19149 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19154 Bug 34939 - Case insensitive link parsing (HttP://)
19156 HttP://MediaWiki.Org/
19158 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19161 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19179 <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>
19180 <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>
19181 <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>
19182 <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>
19183 <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>
19189 ### Parsoid-specific tests
19190 ### Parsoid-PHP parser incompatibilities
19193 1. SOL-sensitive wikitext tokens as template-args
19195 parsoid=wt2html,wt2wt
19201 <span about="#mwt1" typeof="mw:Transclusion">
19202 </span><ul about="#mwt1"><li>a</li>
19204 <span about="#mwt2" typeof="mw:Transclusion">
19205 </span><ol about="#mwt2"><li>a</li>
19207 <span about="#mwt3" typeof="mw:Transclusion">
19208 </span><dl about="#mwt3"><dd>a</dd>
19212 #### -----------------------------------------------------------------
19213 #### Parsoid-specific functionality tests
19214 #### -----------------------------------------------------------------
19216 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19217 # We know wt2wt will fail, but we expect selser to pass.
19218 # Due to the nature of our testing, wt2wt and selser tests will enter the
19219 # blacklist and we'll catch selser regressions based on changes to the
19220 # blacklist entries for selser tests.
19222 1. Bad treebuilder fixup of formatting elt is cleaned up
19224 parsoid=wt2html,wt2wt
19229 [[Image:Foobar.jpg|right|Test]]
19236 <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>
19243 2. Bad treebuilder fixup of formatting elt is cleaned up
19245 parsoid=wt2html,wt2wt
19247 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19249 <small>[[Image:Foobar.jpg|right|300px]]</small>
19252 <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>
19254 <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>
19257 #### ----------------------------------------------------------------
19258 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19259 #### tags. Parsoid's output for these tags differs from that of the
19261 #### ----------------------------------------------------------------
19264 Ref: 1. ref-location should be replaced with an index span
19269 B <ref name="x">foo</ref>
19272 <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>
19273 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>
19274 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>
19278 Ref: 2. ref-tags with identical names should all get the same index
19282 A <ref name="x">foo</ref>
19285 <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>
19286 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>
19290 Ref: 3. spaces in ref-names should be ignored
19294 A <ref name="x">foo</ref>
19295 B <ref name=" x " />
19298 <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>
19299 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>
19300 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>
19303 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19305 Ref: 4. 'constructor' should be accepted as a valid ref-name
19309 A <ref name="constructor">foo</ref>
19311 <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>
19315 Ref: 5. body should accept generic wikitext
19320 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19325 <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>
19327 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19328 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> 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>
19334 Ref: 6. indent-pres should not be output in ref-body
19346 <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>
19348 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19349 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19357 Ref: 7. No p-wrapping in ref-body
19376 <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>
19378 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19379 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19394 Ref: 8. transclusion wikitext has lower precedence
19398 A <ref> foo {{echo|</ref> B C}}
19402 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo <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>
19403 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19404 <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>
19409 Ref: 9. unclosed comments should not leak out of ref-body
19413 A <ref> foo <!--</ref> B C
19416 <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>
19417 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19418 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li>
19423 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19427 A <ref> <b> foo </ref> B C
19431 <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>
19434 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19435 <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>
19440 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19447 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B
19448 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>
19452 Ref: 12. ref-tags act as trailing newline migration barrier
19456 <!--the newline at the end of this line moves out of the p-tag-->a
19458 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19463 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19466 <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>
19467 <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>
19473 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19481 <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
19482 <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>
19486 Ref: 14. A nested ref-tag should be emitted as plain text
19490 <ref>foo <ref>bar</ref> baz</ref>
19494 <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>
19496 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19497 <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>
19502 Ref: 15. ref-tags with identical names should get identical indexes
19506 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19507 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19511 <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>
19512 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>
19514 <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>
19518 ## We don't bother wt2wt-ing non-standard whitespace
19520 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19528 <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>
19530 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19531 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19535 Ref: 17. Generate valid HTML5 id/about attributes
19539 <ref name="a b">foo</ref>
19543 <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>
19546 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19547 <li id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b-1-0">↑</a></span> foo</li>
19551 References: 1. references tag without any refs should be handled properly
19557 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19561 References: 2. references tag with group only outputs references from that group
19565 A <ref group="a">foo</ref>
19566 B <ref group="b">bar</ref>
19568 <references group="a" />
19570 <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>
19571 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>
19573 <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>
19578 References: 3. ref list should be cleared after processing references
19590 <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>
19592 <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>
19595 <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>
19597 <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>
19602 References: 4. only referenced group should be cleared after processing references
19606 A <ref group="a">afoo</ref>
19609 <references group="a" />
19615 <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>
19616 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>
19618 <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>
19621 <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>
19623 <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>
19628 References: 5. ref tags in references should be processed while ignoring all other content
19633 B <ref name="b">bar</ref>
19636 <ref name="a">foo</ref>
19637 This should just get lost.
19640 <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>
19641 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>
19644 <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>
19649 References: 6. <references /> from a transclusion
19653 <ref>Foo</ref> {{echo|<references />}}
19655 <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>
19659 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
19663 A <ref>foo bar for a</ref>
19664 B <ref group="X" name="b" />
19668 <references group="X">
19669 <ref name="b">foo</ref>
19672 <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>
19673 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>
19675 <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>
19677 <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>
19681 Entities in ref name
19685 <ref name="test & me">hi</ref>
19687 <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>
19690 # This test is wt2html only because we're permitting the serializer to produce
19691 # dirty diffs, normalizing the unclosed references to the self-closed version.
19693 Generate references for unclosed references tag
19701 <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>
19704 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19705 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19709 New reference serializes on its own line
19711 parsoid=wt2wt,html2wt
19716 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
19719 #--------- Test stripping of empty nodes in template content ----------
19721 Empty LI and TR nodes should be stripped from template content
19726 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
19730 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
19743 Empty LI and TR nodes should not be stripped from top-level content
19770 Empty TR nodes should not be stripped if they have any attributes set
19772 {{EmptyTRWithHTMLAttrTest}}
19774 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
19775 <tr align="center"></tr>
19776 <tr><td>foo</td></tr>
19777 <tr align="center"></tr>
19778 <tr><td>bar</td></tr>
19782 #### ----------------------------------------------------------------
19783 #### The following section of tests are primarily to test
19784 #### wikitext escaping capabilities of Parsoid. Given that
19785 #### escaping can be done any number of ways, the wikitext (input)
19786 #### is always adjusted to reflect how Parsoid adds nowiki
19789 #### We are marking several tests as parsoid-only since the
19790 #### HTML in the result section is different from what the
19791 #### PHP parser generates for it.
19792 #### ----------------------------------------------------------------
19795 #### --------------- Headings ---------------
19797 #### 1. Nested inside html <h1>=foo=</h1>
19798 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
19799 #### 3. Nested inside html with wikitext split by html tags
19800 #### 4. No escape needed
19801 #### 5. Empty headings <h1></h1>
19802 #### 6. Heading chars in SOL context
19803 #### ----------------------------------------
19805 Headings: 0. Unnested
19809 <nowiki>=foo=</nowiki>
19811 <nowiki> =foo= </nowiki>
19813 <nowiki>=foo=</nowiki>
19815 =foo''a''<nowiki>=</nowiki>
19817 <p><span typeof="mw:Nowiki">=foo=</span></p>
19819 <p><span typeof="mw:Nowiki"> =foo= </span>
19821 <span typeof="mw:Nowiki">=foo=</span></p>
19823 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
19826 # New headings and existing headings are handled differently
19828 Headings: 1. Nested inside html
19838 =<nowiki>=foo=</nowiki>=
19839 ==<nowiki>=foo=</nowiki>==
19840 ===<nowiki>=foo=</nowiki>===
19841 ====<nowiki>=foo=</nowiki>====
19842 =====<nowiki>=foo=</nowiki>=====
19843 ======<nowiki>=foo=</nowiki>======
19850 <h1 data-parsoid=''>=foo=</h1>
19851 <h2 data-parsoid=''>=foo=</h2>
19852 <h3 data-parsoid=''>=foo=</h3>
19853 <h4 data-parsoid=''>=foo=</h4>
19854 <h5 data-parsoid=''>=foo=</h5>
19855 <h6 data-parsoid=''>=foo=</h6>
19859 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
19864 <nowiki>*</nowiki>bar
19870 <nowiki>=bar=</nowiki>
19878 Headings: 3. Nested inside html with wikitext split by html tags
19882 = ='''bold'''<nowiki>foo=</nowiki> =
19884 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
19888 Headings: 4a. No escaping needed (testing just h1 and h2)
19906 = <nowiki>=</nowiki> =
19914 <h1><i>=</i>foo=</h1>
19915 <h1><span typeof="mw:Nowiki">=</span></h1>
19919 Headings: 4b. No escaping needed (inside p-tags)
19934 Headings: 5. Empty headings
19946 =====<nowiki/>=====
19948 ======<nowiki/>======
19959 Headings: 6a. Heading chars in SOL context (with trailing spaces)
19963 <nowiki>=a=</nowiki>
19965 <nowiki>=a=</nowiki>
19967 <nowiki>=a=</nowiki>
19969 <nowiki>=a=</nowiki>
19978 Headings: 6b. Heading chars in SOL context (with trailing newlines)
20006 Headings: 6c. Heading chars in SOL context (leading newline break)
20011 <nowiki>=b=</nowiki>
20018 Headings: 6d. Heading chars in SOL context (with interspersed comments)
20022 <!--c0--><nowiki>=a=</nowiki>
20024 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
20026 <p><!--c0-->=a=</p>
20027 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
20031 Headings: 6d. Heading chars in SOL context (No escaping needed)
20040 #### --------------- Lists ---------------
20041 #### 0. Outside nests (*foo, etc.)
20042 #### 1. Nested inside html <ul><li>*foo</li></ul>
20043 #### 2. Inside definition lists
20044 #### 3. Only bullets at start should be escaped
20045 #### 4. No escapes needed
20046 #### 5. No unnecessary escapes
20047 #### 6. Escape bullets in SOL position
20048 #### 7. Escape bullets in a multi-line context
20049 #### ----------------------------------------
20052 Lists: 0. Outside nests
20054 <nowiki>*</nowiki>foo
20056 <nowiki>#</nowiki>foo
20058 <nowiki>;Foo:</nowiki>bar
20067 Lists: 1. Nested inside html
20069 *<nowiki>*foo</nowiki>
20071 *<nowiki>#foo</nowiki>
20073 *<nowiki>:foo</nowiki>
20075 *<nowiki>;foo</nowiki>
20077 #<nowiki>*foo</nowiki>
20079 #<nowiki>#foo</nowiki>
20081 #<nowiki>:foo</nowiki>
20083 #<nowiki>;foo</nowiki>
20085 <ul><li>*foo</li></ul>
20086 <ul><li>#foo</li></ul>
20087 <ul><li>:foo</li></ul>
20088 <ul><li>;foo</li></ul>
20089 <ol><li>*foo</li></ol>
20090 <ol><li>#foo</li></ol>
20091 <ol><li>:foo</li></ol>
20092 <ol><li>;foo</li></ol>
20097 Lists: 2. Inside definition lists
20099 ;<nowiki>;foo</nowiki>
20101 ;<nowiki>:foo</nowiki>
20103 ;<nowiki>:foo</nowiki>
20106 :<nowiki>:foo</nowiki>
20108 <dl><dt>;foo</dt></dl>
20109 <dl><dt>:foo</dt></dl>
20112 <dl><dd>:foo</dd></dl>
20117 Lists: 3. Only bullets at start of text should be escaped
20119 *<nowiki>*foo*bar</nowiki>
20121 *<nowiki>*foo</nowiki>''it''*bar
20123 <ul><li>*foo*bar</li></ul>
20124 <ul><li>*foo<i>it</i>*bar</li></ul>
20129 Lists: 4. No escapes needed
20150 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20154 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20160 Lists: 5. No unnecessary escapes
20162 * bar <span><nowiki>[[foo]]</nowiki></span>
20164 *=bar <span><nowiki>[[foo]]</nowiki></span>
20166 *[[bar <span><nowiki>[[foo]]</nowiki></span>
20168 *]]bar <span><nowiki>[[foo]]</nowiki></span>
20170 *=bar <span>foo]]</span>=
20174 <ul><li> bar <span>[[foo]]</span></li></ul>
20175 <ul><li>=bar <span>[[foo]]</span></li></ul>
20176 <ul><li>[[bar <span>[[foo]]</span></li></ul>
20177 <ul><li>]]bar <span>[[foo]]</span></li></ul>
20178 <ul><li>=bar <span>foo]]</span>=</li></ul>
20179 <ul><li> <s></s>: a</li></ul>
20184 Lists: 6. Escape bullets in SOL position
20188 <!--cmt--><nowiki>*foo</nowiki>
20190 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
20194 Lists: 7. Escape bullets in a multi-line context
20197 <nowiki>*</nowiki>b
20204 #### --------------- HRs ---------------
20205 #### 1. Single line
20206 #### -----------------------------------
20209 HRs: 1. Single line
20213 ----<nowiki>----</nowiki>
20217 <hr><p><span typeof="mw:Nowiki">----</span></p>
20222 #### --------------- Tables ---------------
20223 #### 1a. Simple example
20224 #### 1b. No escaping needed (!foo)
20225 #### 1c. No escaping needed (|foo)
20226 #### 1d. No escaping needed (|}foo)
20228 #### 2a. Nested in td (<td>foo|bar</td>)
20229 #### 2b. Nested in td (<td>foo||bar</td>)
20230 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20232 #### 3a. Nested in th (<th>foo!bar</th>)
20233 #### 3b. Nested in th (<th>foo!!bar</th>)
20234 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20238 #### 4c. No escaping needed
20239 #### --------------------------------------
20242 Tables: 1a. Simple example
20253 Tables: 1b. No escaping needed
20262 Tables: 1c. No escaping needed
20271 Tables: 1d. No escaping needed
20280 Tables: 2a. Nested in td
20285 |<nowiki>foo|bar</nowiki>
20287 |x<div><nowiki>a|b</nowiki></div>
20291 <td>foo|bar</td></tr>
20292 <tr><td>x<div>a|b</div></td>
20297 Tables: 2b. Nested in td
20302 |<nowiki>foo||bar</nowiki>
20303 |''it''<nowiki>foo||bar</nowiki>
20307 <td><span typeof="mw:Nowiki">foo||bar</span></td>
20308 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
20312 Tables: 2c. Nested in td -- no escaping needed
20320 <table><tbody><tr><td>foo!!bar
20321 </td></tr></tbody></table>
20326 Tables: 3a. Nested in th
20334 <table><tbody><tr><th>foo!bar
20335 </th></tr></tbody></table>
20340 Tables: 3b. Nested in th
20345 !<nowiki>foo!!bar</nowiki>
20349 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
20354 Tables: 3c. Nested in th -- no escaping needed
20359 !<nowiki>foo||bar</nowiki>
20363 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
20367 Tables: 4a. Escape -
20374 |<nowiki>-bar</nowiki>
20378 <tr><th>-bar</th></tr>
20380 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
20384 Tables: 4b. Escape +
20391 |<nowiki>+bar</nowiki>
20395 <tr><th>+bar</th></tr>
20397 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
20401 Tables: 4c. No escaping needed
20422 <tr><td>foo-bar</td><td>foo+bar</td></tr>
20423 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
20429 <div>a|b</div></td>
20434 Tables: 4d. No escaping needed
20445 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
20446 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20447 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
20452 Tables: Digest broken attributes on table and tr tag
20468 #### --------------- Links ----------------
20469 #### 1. Quote marks in link text
20470 #### 2. Wikilinks: Escapes needed
20471 #### 3. Wikilinks: No escapes needed
20472 #### 4. Extlinks: Escapes needed
20473 #### 5. Extlinks: No escapes needed
20474 #### --------------------------------------
20476 Links 1. Quote marks in link text
20480 [[Foo|Foo<nowiki>''boo''</nowiki>]]
20482 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
20486 Links 2. WikiLinks: Escapes needed
20491 [[Foo|<nowiki>Foobar]</nowiki>]]
20492 [[Foo|x [Foobar] x]]
20493 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
20494 [[Foo|<nowiki>[[Bar]]</nowiki>]]
20495 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
20496 [[Foo|<nowiki>|Bar</nowiki>]]
20497 [[Foo|<nowiki>]]bar</nowiki>]]
20498 [[Foo|<nowiki>[[bar</nowiki>]]
20499 [[Foo|<nowiki>x [[ y</nowiki>]]
20500 [[Foo|<nowiki>x ]] y</nowiki>]]
20501 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
20503 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
20504 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
20505 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
20506 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
20507 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
20508 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
20509 <a href="Foo" rel="mw:WikiLink">|Bar</a>
20510 <a href="Foo" rel="mw:WikiLink">]]bar</a>
20511 <a href="Foo" rel="mw:WikiLink">[[bar</a>
20512 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
20513 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
20514 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
20518 Links 3. WikiLinks: No escapes needed
20525 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
20526 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
20530 Links 4. ExtLinks: Escapes needed
20534 [http://google.com <nowiki>[google]</nowiki>]
20535 [http://google.com <nowiki>google]</nowiki>]
20537 <nowiki>[http://google.com]</nowiki>
20539 <nowiki>[http://google.com google]</nowiki>
20542 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
20543 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
20544 <p>[http://google.com]</p>
20545 <p>[http://google.com google]</p>
20549 Links 5. ExtLinks: No escapes needed
20553 [http://google.com [google]
20555 <a href="http://google.com" rel="mw:ExtLink">[google</a>
20559 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
20561 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
20562 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
20563 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
20564 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
20565 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
20566 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
20567 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20568 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
20569 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20570 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
20571 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
20572 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
20573 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
20576 x<nowiki/>http://example.com<nowiki/>y
20577 http://example.com<nowiki/>?x
20578 http://example.com<nowiki/>&x
20579 http://example.com<nowiki/>'x
20580 http://example.com<nowiki/>,x
20581 http://example.com<nowiki/>.x
20582 http://example.com<nowiki/>;x
20583 http://example.com<nowiki/>:x
20584 http://example.com<nowiki/>;x
20585 http://example.com<nowiki/>!x
20586 http://example.com<nowiki/>=x
20587 http://example.com<nowiki/>(x)
20588 http://example.com(x<nowiki/>)
20592 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20595 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
20597 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
20598 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
20599 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
20600 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
20601 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
20607 "http://example.com"
20608 (http://example.com)
20609 (http://example.com) foo
20610 http://example.com,
20611 http://example.com, foo
20614 ## Parsoid currently fails wt2html on this one!
20616 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20618 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
20620 http://example.com.,;:!?
20624 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
20626 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
20632 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
20634 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20635 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20636 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
20637 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
20647 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
20649 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
20655 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
20657 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20658 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20659 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
20660 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
20670 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
20672 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
20673 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
20674 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
20677 ISBN 1234567890<nowiki/>1
20678 ISBN 1234567890<nowiki/>x
20679 ISBN 1234567890<nowiki/>b
20683 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
20685 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
20690 #### --------------- Quotes ---------------
20691 #### 1. Quotes inside <b> and <i>
20692 #### 2. Link fragments separated by <i> and <b> tags
20693 #### 3. Link fragments inside <i> and <b>
20694 #### 4. No escaping needed
20695 #### --------------------------------------
20697 1. Quotes inside <b> and <i>
20699 parsoid=html2wt,wt2wt
20701 ''<nowiki/>'foo'<nowiki/>''
20702 ''<nowiki>''foo''</nowiki>''
20703 ''<nowiki>'''foo'''</nowiki>''
20705 '''<nowiki/>'foo'<nowiki/>'''
20706 '''<nowiki>''foo''</nowiki>'''
20707 '''<nowiki>'''foo'''</nowiki>'''
20708 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
20709 '''foo'''<nowiki/>'s
20712 '<nowiki/>''foo''<nowiki/>'
20713 '<nowiki/>'''foo'''
20714 '''foo'''<nowiki/>'
20715 '<nowiki/>'''foo'''<nowiki/>'
20716 ''fools'<span> errand</span>''
20717 ''<span>fool</span>'s errand''
20726 <b>foo'<i>bar'</i>baz</b>
20734 <i>fools'<span> errand</span></i>
20735 <i><span>fool</span>'s errand</i>
20740 2. Link fragments separated by <i> and <b> tags
20742 [[''foo''<nowiki>hello]]</nowiki>
20744 [['''foo'''<nowiki>hello]]</nowiki>
20746 <p>[[<i>foo</i>hello]]
20747 </p><p>[[<b>foo</b>hello]]
20751 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
20752 # this is one of the shortcomings of this format
20754 3. Link fragments inside <i> and <b>
20756 ''[[foo''<nowiki>]]</nowiki>
20758 '''[[foo'''<nowiki>]]</nowiki>
20761 </p><p><b>[[foo</b>]]
20766 4. No escaping needed
20768 '<span>''bar''</span>'
20769 '<span>'''bar'''</span>'
20771 <p>'<span><i>bar</i></span>'
20772 '<span><b>bar</b></span>'
20776 #### ----------- Paragraphs ---------------
20777 #### 1. No unnecessary escapes
20778 #### --------------------------------------
20781 1. No unnecessary escapes
20783 bar <span><nowiki>[[foo]]</nowiki></span>
20785 =bar <span><nowiki>[[foo]]</nowiki></span>
20787 [[bar <span><nowiki>[[foo]]</nowiki></span>
20789 ]]bar <span><nowiki>[[foo]]</nowiki></span>
20791 =bar <span>foo]]</span><nowiki>=</nowiki>
20793 <p>bar <span>[[foo]]</span>
20794 </p><p>=bar <span>[[foo]]</span>
20795 </p><p>[[bar <span>[[foo]]</span>
20796 </p><p>]]bar <span>[[foo]]</span>
20797 </p><p>=bar <span>foo]]</span>=
20801 #### ----------------------- PRE --------------------------
20802 #### 1. Leading whitespace in SOL context should be escaped
20803 #### ------------------------------------------------------
20805 1. Leading whitespace in SOL context should be escaped
20809 <nowiki> </nowiki>a
20811 <nowiki> </nowiki> a
20813 <nowiki> </nowiki>a(tab)
20815 <nowiki> </nowiki> a
20817 <nowiki> </nowiki> a
20820 <nowiki> </nowiki>b
20823 <nowiki> </nowiki>b
20826 <nowiki> </nowiki> b
20832 <p><!--cmt--> a</p>
20842 2. Leading whitespace in non-indent-pre contexts should not be escaped
20849 <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>
20853 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
20872 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
20876 [[File:Foobar.jpg|thumb|caption]]
20879 <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>
20883 5. Nowiki escaping should account for indent-pres
20892 #### --------------- Behavior Switches --------------------
20894 1. Valid behavior switches should be escaped
20898 <nowiki>__TOC__</nowiki>
20899 ''<nowiki>__TOC__</nowiki>''
20906 2. Invalid behavior switches should not be escaped
20917 #### --------------- HTML tags ---------------
20920 #### 3. multi-line html tag
20921 #### 4. extension tags
20922 #### -----------------------------------------
20928 <a href="http://google.com">google</a>
20930 <a href="http://google.com">google</a>
20936 <nowiki><div>foo</div>
20937 <div style="color:red">foo</div></nowiki>
20939 <p><div>foo</div>
20940 <div style="color:red">foo</div>
20945 3. multi-line html tag
20960 <nowiki><ref>foo</ref></nowiki>
20962 <nowiki><ref>bar</nowiki>
20964 baz<nowiki></ref></nowiki>
20966 <p><ref>foo</ref>
20967 </p><p><ref>bar
20968 </p><p>baz</ref>
20972 #### --------------- Others ---------------
20976 <nowiki>foo</nowiki>
20978 <p><nowiki>foo</nowiki>
20982 ## The quote-char in the input is necessary for triggering the bug
20984 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
20986 parsoid=wt2wt,html2wt
20995 Tag-like HTML structures are passed through as text
21017 </p><p>1<d e>f
21022 # This was a bug in the PHP parser (see bug 17663 and its dups,
21023 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
21025 Tag names followed by punctuation should not be recognized as tags
21029 <p><s.ome> text
21034 HTML tag with necessary entities in attributes
21036 <span title="&amp;">foo</span>
21038 <p><span title="&amp;">foo</span>
21043 HTML tag with 'unnecessary' entity encoding in attributes
21045 <span title="&">foo</span>
21047 <p><span title="&">foo</span>
21052 HTML tag with broken attribute value quoting
21054 <span title="Hello world>Foo</span>
21056 <p><span>Foo</span>
21059 <p><span title="Hello world">Foo</span>
21064 Parsoid-only: HTML tag with broken attribute value quoting
21068 <span title="Hello world>Foo</span>
21070 <p><span title="Hello world">Foo</span>
21075 Table with broken attribute value quoting
21078 | title="Hello world|Foo
21089 <td title="Hello world">Foo
21095 Table with broken attribute value quoting on consecutive lines
21098 | title="Hello world|Foo
21099 | style="color:red|Bar
21112 <td title="Hello world">Foo
21113 </td><td style="color: red">Bar
21114 </td></tr></tbody></table>
21119 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21129 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21139 Accept empty td cell attribute
21142 | align="center" | foo || |
21147 <td align="center"> foo </td>
21154 Non-empty attributes in th-cells
21157 ! Foo !! style="color: red" | Bar
21163 <th style="color: red"> Bar
21169 Accept empty attributes in th-cells
21184 Empty table rows go away
21205 ### Parsoid-centric tests for testing RTing of inter-element separators
21206 ### Edge cases not tested by existing parser tests and specific to
21207 ### Parsoid-specific serialization strategies.
21211 RT-ed inter-element separators should be valid separators
21223 # Parsoid-only since PHP parser relies on Tidy for correct output
21225 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
21239 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
21240 <p>bar</p></small></td></tr>
21244 <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>
21249 Empty TD followed by TD with tpl-generated attribute
21254 |{{echo|style='color:red'}}|foo
21268 Indented table with an empty td
21287 Indented block & table
21301 <div data-parsoid='{"stx":"html"}'>foo</div>
21303 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
21308 Indent and comment before table row
21323 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
21324 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
21328 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
21330 Empty TR followed by a template-generated TR
21336 {{echo|<tr><td>foo</td></tr>}}
21342 <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}}]}'>
21347 ## PHP and parsoid output differ for this, and since this is primarily
21348 ## for testing Parsoid's serializer, marking this Parsoid only
21350 Empty TR followed by mixed-ws-comment line should RT correctly
21366 <!--c--> </tr><!--d-->
21372 Multi-line image caption generated by templates with/without trailing newlines
21374 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
21375 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
21377 <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>
21378 <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>
21382 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
21386 <includeonly>foo</includeonly>
21393 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
21395 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
21398 ## PHP emits broken html for this, and since this is primarily
21399 ## a Parsoid serializer test, marking this Parsoid only
21401 Improperly nested inline or quotes tags with whitespace in between
21405 <span> <s>x</span> </s>
21408 <p><span> <s>x</s></span><s> </s>
21409 <b> <i>x</i></b><i> </i>
21414 Encapsulate protected attributes from wt
21418 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
21420 <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>
21424 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
21425 ## Having nested or stray pre tags results in the attempt to add duplicates,
21426 ## causing an assertion fail. This test tries to prevent that situation.
21428 Ensure ParagraphWrapper can deal with stray closing pre tags
21438 1. Ensure fostered text content is wrapped in element nodes
21442 <table>hi</table><table>ho</table>
21451 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
21453 parsoid=wt2html,wt2wt
21462 <tbody><tr><td> a</td></tr>
21467 Encapsulation properly handles null DSR information from foster box
21469 parsoid=wt2html,wt2wt
21471 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
21473 <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>
21477 1. Encapsulate foster-parented transclusion content
21479 parsoid=wt2wt,wt2html
21481 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
21483 <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>
21493 2. Encapsulate foster-parented transclusion content
21495 parsoid=wt2wt,wt2html
21497 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
21499 <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>
21510 3. Encapsulate foster-parented transclusion content
21512 parsoid=wt2wt,wt2html
21514 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21516 <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>"]}">
21529 4. Encapsulate foster-parented transclusion content
21531 parsoid=wt2wt,wt2html
21533 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21535 <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>"]}">
21548 5. Encapsulate foster-parented transclusion content
21550 parsoid=wt2wt,wt2html
21552 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
21554 <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>
21569 6. Encapsulate foster-parented transclusion content
21571 parsoid=wt2wt,wt2html
21573 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
21575 <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>
21591 7. Encapsulate foster-parented transclusion content
21593 parsoid=wt2wt,wt2html
21595 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
21597 <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>
21608 8. Encapsulate foster-parented transclusion content
21610 parsoid=wt2wt,wt2html
21613 }}{|{{echo|style='color:red'}}
21618 <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>
21628 9. Encapsulate foster-parented transclusion content
21630 parsoid=wt2wt,wt2html
21632 <table>{{echo|hi</table>hello}}
21634 <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>
21638 Table in fosterable position
21640 parsoid=wt2html,wt2wt
21649 <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">
21651 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
21657 # Parsoid only for bug 64747
21659 Properly encapsulate empty-content transclusions in fosterable positions
21667 <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>"}'>
21673 Support <object> element with .data attribute
21677 <object data="test.swf"></object>
21679 <object data="test.swf"></object>
21683 Don't block XML namespace declaration
21685 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
21687 <p><span>MediaWiki</span>
21690 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
21693 # -----------------------------------------------------------------
21694 # The following section of tests are primarily to spec requirements
21695 # around serialization of new/edited content.
21697 # All these tests are marked Parsoid html2wt and html2html only
21698 # ----------------------------------------------------------------
21700 # 'mi' is a localinterwiki prefix as well as a language
21702 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
21708 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
21712 New wiki links (href variations)
21716 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
21717 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
21718 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
21719 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
21724 [[Toxine bactérienne]]
21728 New wiki links (content string variations)
21732 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
21733 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
21734 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
21738 [[Foo_bar|./Foo_bar]]
21742 New category links (href variations)
21746 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
21747 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
21748 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
21750 [[Category:Toxine bactérienne]]
21751 [[Category:Toxine bactérienne]]
21752 [[Category:Toxine bactérienne]]
21756 New interlanguage links (href variations)
21760 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
21761 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
21762 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
21764 [[es:Toxine bactérienne]]
21765 [[es:Toxine_bactérienne]]
21766 [[es:Toxine_bactérienne]]
21770 Image: Modifying size of an image (1)
21773 "modes": ["wt2wt"],
21775 ["img[height]", "attr", "height", "22"],
21776 ["img[width]", "attr", "width", "200"]
21780 [[Image:Foobar.jpg|230x230px]]
21782 [[Image:Foobar.jpg|200x200px]]
21786 Image: Modifying size of an image (2)
21789 "modes": ["wt2wt"],
21791 ["img[height]", "attr", "height", "100"],
21792 ["img[width]", "attr", "width", "500"]
21796 [[Image:Foobar.jpg|230x230px]]
21798 [[Image:Foobar.jpg|500x500px]]
21801 # Change in size is ignored so long as class='mw-default-size'
21803 Image: Modifying size of an image (3)
21806 "modes": ["wt2wt"],
21808 ["figure[class]", "removeClass", "mw-default-size"],
21809 ["figure img", "attr", "height", "19"],
21810 ["figure img", "attr", "width", "170"]
21814 [[Image:Foobar.jpg|thumb]]
21816 [[Image:Foobar.jpg|thumb|170x170px]]
21820 Image: Modifying alignment of an image (bug 48665)
21823 "modes": ["wt2wt"],
21825 ["figure[class]", "removeClass", "mw-halign-right"],
21826 ["figure[class]", "addClass", "mw-halign-left"]
21830 [[Image:Foobar.jpg|thumb|caption|right]]
21832 [[Image:Foobar.jpg|thumb|caption|left]]
21836 Image: Modifying mw-default-size of an frameless image (bug 62805)
21839 "modes": ["wt2wt"],
21841 ["figure.mw-default-size", "removeClass", "mw-default-size"]
21845 [[Image:Foobar.jpg|frameless|right]]
21847 [[Image:Foobar.jpg|frameless|right|220x220px]]
21851 Image: Modifying valign of an image (bug 49221)
21854 "modes": ["wt2wt"],
21856 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
21857 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
21861 [[File:Foobar.jpg|20px|middle]]
21863 [[File:Foobar.jpg|20px|text-top]]
21867 Image: Modifying alt attribute of an image (bug 56400)
21870 "modes": ["wt2wt"],
21872 ["img[alt]", "attr", "alt", "some alternate edited text"]
21876 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
21878 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
21882 Image: Modifying caption of an image
21885 "modes": ["wt2wt"],
21887 ["figcaption", "text", "new caption"]
21891 [[Image:Foobar.jpg|thumb|original caption]]
21893 [[Image:Foobar.jpg|thumb|new caption]]
21897 Image: empty alt attribute (bug 48924)
21901 [[File:Foobar.jpg|thumb|alt=|bar]]
21903 <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>
21907 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
21912 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
21914 #<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>
21918 Image: Block level image should have \n before and after
21921 [[File:Foobar.jpg|right|thumb|150x150px]]
21925 <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>
21930 Image: New block level image should have \n before and after (existing content)
21933 [[File:Foobar.jpg|right|thumb|150x150px]]
21937 <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>
21942 Image: upright option (parsoid)
21946 [[File:Foobar.jpg|thumb|upright|caption]]
21947 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
21948 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
21950 <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>
21951 <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>
21952 <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>
21956 Image: upright option is ignored on inline and frame images (parsoid)
21960 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
21962 <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>
21966 Image: from basic HTML (1)
21970 <span typeof="mw:Image">
21971 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21974 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21978 Image: from basic HTML (2)
21982 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21984 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21988 Image: from basic HTML (3)
21992 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
21994 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
21998 Image: from basic HTML (4)
22002 <img src="File:Foobar.jpg">
22004 [[File:Foobar.jpg|link=]]
22008 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
22015 <li><p>foo</p></li>
22020 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
22026 <ul> <li>foo</li></ul>
22030 Don't strip leading whitespace when handling indent-pre suppressing tags
22038 '''This is very bold of you!'''
22042 indented cell (no pre-wrapping!)
22049 <tr><td> indented row</td></tr>
22052 <b>This is very bold of you!</b>
22055 indented cell (no pre-wrapping!)
22063 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
22068 <nowiki> </nowiki><span>bar</span>
22071 <nowiki> </nowiki></span>bar2
22074 <nowiki> </nowiki><span>bar</span>
22077 <nowiki> </nowiki><span>foo</span>
22095 Lists: Add space after bullets
22101 * <span> baz</span>
22106 <li><span> baz</span></li>
22111 Lists: Dont insert newlines in a serialized list item.
22118 <ul><li>a<br>b</li><li>c</li></ul>
22122 Headings: Add space before/after == (Bug 51744)
22132 == <span> baz</span> ==
22137 <h2><span> baz</span></h2>
22141 Parsoid: Serialize positional parameters with = in them as named parameter
22147 {{echo|1 = f=oo|2 = bar}}
22149 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22150 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22151 {{echo|<nowiki>f=oo</nowiki>|bar}}
22153 <p about="#mwt1" typeof="mw:Transclusion"
22154 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
22156 <p about="#mwt1" typeof="mw:Transclusion"
22157 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
22159 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22160 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22161 <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>
22165 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
22181 <div>a<p>b</p></div>
22190 Substrings resembling wikitext in hrefs should not get nowiki escapes
22196 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
22199 #-----------------------------
22200 # I/B quote minimization tests
22201 #-----------------------------
22204 1. I/B quote minimization: wikitext-only tags should be combined
22224 <p><i>A</i><i>B</i></p>
22225 <p><b>A</b><b>B</b></p>
22226 <p><i>A</i><b><i>B</i></b></p>
22227 <p><b>A</b><i><b>B</b></i></p>
22228 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
22229 <p><i><b>A</b></i><i><b>B</b></i></p>
22230 <p><i><b>A</b></i><b><i>B</i></b></p>
22231 <p><b><i>A</i></b><i><b>B</b></i></p>
22235 2. I/B quote minimization: wikitext and html tags should not be combined
22241 ''A''<nowiki/>'''<i>B</i>'''
22243 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
22244 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
22248 3. I/B quote minimization: templated content stops minimization
22252 ''A''{{echo|''B''}}
22254 ''A''{{echo|'''''B'''''}}
22256 <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>
22257 <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>
22261 4. I/B quote minimization: new content should be mimimized with adjacent old content
22271 <p><i>A</i><i>B</i></p>
22272 <p><b>A</b><b>B</b></p>
22273 <p><i>A</i><b><i>B</i></b></p>
22276 #------------------------------------
22277 # End of I/B quote minimization tests
22278 #------------------------------------
22281 Bug 54262: New entities
22287 <span typeof="mw:Entity"> </span>
22290 ## Note that there is no wikitext output for 'unknownproperty' ##
22291 ## Unknown magic words are silently dropped ##
22306 __NOCONTENTCONVERT__
22308 <meta property='mw:PageProp/toc' />
22309 <meta property='mw:PageProp/notoc' />
22310 <meta property='mw:PageProp/forcetoc' />
22311 <meta property='mw:PageProp/index' />
22312 <meta property='mw:PageProp/noindex' />
22313 <meta property='mw:PageProp/nogallery' />
22314 <meta property='mw:PageProp/noeditsection' />
22315 <meta property='mw:PageProp/notitleconvert' />
22316 <meta property='mw:PageProp/nocontentconvert' />
22317 <meta property='mw:PageProp/unknownproperty' />
22321 Consecutive <pre>s should not get merged
22323 parsoid=html2wt,html2html
22339 <pre>a</pre><pre>b</pre>
22353 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
22357 [[Special:BookSources/1234567890|ISBN 1234567895]]
22359 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
22363 Edited RFC links not serializable as RFC links should serialize as extlinks
22367 [//tools.ietf.org/html/rfc123 New RFC]
22369 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
22373 Edited PMID links not serializable as PMID links should serialize as extlinks
22377 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
22379 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
22383 Edited Redirect link should emit a non-piped wikitext link
22389 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
22393 T75121: Infer extension name from typeOf if data-mw is not present
22399 <div typeOf="mw:Extension/foo"></div>
22402 # -----------------------------------------------------------------
22403 # End of section for Parsoid-only html2wt tests for serialization
22405 # -----------------------------------------------------------------
22412 Try for 100% code coverage