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
5723 Build table with pipe as data
5725 {| class="wikitable"
5728 |- style="color:red;"
5729 | data || style="color:red;" | second data
5731 | style="color:red;" | data with | || style="color:red;" | second data with |
5733 || data with | ||| second data with |
5736 <table class="wikitable">
5742 <tr style="color:red;">
5744 <td style="color:red;"> second data
5747 <td style="color:red;"> data with | </td>
5748 <td style="color:red;"> second data with |
5751 <td> data with | </td>
5752 <td> second data with |
5758 Build table with wikilink
5760 {| class="wikitable"
5761 ! header || second header
5762 |- style="color:red;"
5763 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
5765 | data || second data [[Main Page|link|text with pipe]]
5768 <table class="wikitable">
5773 <tr style="color:red;">
5774 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
5775 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
5779 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
5784 # The expected HTML structure in this test is debatable. The PHP parser does
5785 # not parse this kind of table at all. The main focus for Parsoid is on
5786 # round-tripping, so this output is ok for now. TODO: revisit!
5788 Wikitext table with html-syntax row
5798 <td>foo</td></tr></tbody></table>
5801 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5802 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5803 ## PHP parser, which tidy then compounds by fostering the content
5804 ## entirely out of the table. Parsoid recognizes the table context
5805 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5806 ## depends on PHP's treatment of broken table markup!
5808 Implicit <td> after a |-
5810 parsoid=wt2html,html2html
5830 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5832 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5834 parsoid=wt2html,html2html
5867 <tr><td><pre>a</pre></td></tr>
5868 <tr><td> b</td></tr>
5873 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5874 # Parsoid generates the missing <td>, so wt2wt won't succeed.
5876 Lists should be recognized in an implicit <td> context
5878 parsoid=wt2html,html2html
5905 Parsoid: Round-trip tables directly followed by content (bug 51219)
5907 parsoid=wt2html,wt2wt
5932 Parsoid: Default to a newline after tables in new content (bug 51219)
5939 <nowiki> </nowiki>bar
5946 <tr><td>foo</td></tr></tbody></table> bar
5948 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5952 Parsoid: newline inducing block nodes don't suppress <nowiki>
5964 Parsoid: Row-syntax table headings followed by comment & table cells
5966 parsoid=wt2html,wt2wt
5970 <!-- foo --> || baz || quux
5984 <tbody><tr><th> foo </th><th> bar
5985 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
5990 # PHP throws away the (semi-broken) "foo" class here; Parsoid
5993 Parsoid: Recover better from broken table attributes
6013 <p>foo</p></td></tr>
6018 Strip unsupported table tags
6069 Plain link, capitalized
6073 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6078 Plain link, uncapitalized
6082 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6089 [[Main Page|The Main Page]]
6091 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6096 Piped link with comment in link text
6098 [[Main Page|The Main<!--front--> Page]]
6100 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6105 Piped link with multiple pipe characters in link text
6107 [[Main Page||The|Main|Page|]]
6109 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6112 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6120 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6125 Broken link with fragment
6127 [[Zigzagzogzagzig#zug]]
6129 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6134 Special page link with fragment
6136 [[Special:Version#anchor]]
6138 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6143 Nonexistent special page link with fragment
6145 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6147 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6154 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6156 <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>
6163 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6165 <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>!!!
6176 Bug 43661: Piped links with identical prefixes
6178 [[prefixed article|prefixed articles with spaces]]
6180 [[prefixed article|prefixed articlesaoeu]]
6182 [[Main Page|Main Page test]]
6184 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6185 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6186 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6192 Link with HTML entity in suffix / tail
6194 [[Main Page]]", [[Main Page]]a
6196 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6201 Link with 3 brackets
6210 Link with 4 brackets
6214 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6219 Piped link with 3 brackets
6221 [[[main page|the main page]]]
6223 <p>[[[main page|the main page]]]
6228 Piped link with extlink-like text
6231 [[Main Page|This is a [bar]]]
6233 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6234 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6239 Link with multiple pipes
6241 [[Main Page|The|Main|Page]]
6243 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6247 # Note that parsoid does not munge anchor text; all non-space
6248 # characters are valid in HTML5 ids.
6250 Anchor containing a #. (bug 63430)
6252 [[Main Page#And#Link]]
6254 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6257 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6263 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6265 <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>
6270 Link with space in namespace
6272 [[User talk:Foo bar]]
6274 <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>
6279 MemoryAlpha:AlphaTest
6281 This is an article in the MemoryAlpha namespace
6282 (which shadows the memoryalpha interwiki link).
6286 Namespace takes precedence over interwiki link (bug 51680)
6288 [[MemoryAlpha:AlphaTest]]
6290 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6294 # The previous test doesn't work correctly in html2*, due to not recognizing the
6295 # link as an internal one. This one checks for the correct behavior.
6297 Link to namespace preferred over interwiki with correct rel attribute
6299 parsoid=html2wt,html2html
6301 [[MemoryAlpha:AlphaTest]]
6303 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6308 Piped link to namespace
6310 [[Meta:Disclaimers|The disclaimers]]
6312 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6319 [[Usually caused by a typo (oops}]]
6321 <p>[[Usually caused by a typo (oops}]]
6328 Just a test of an article title containing a percent.
6332 Link containing % (not as a hex sequence)
6336 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6339 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6342 # note that the parsoid HTML is identical to the previous test output,
6343 # so the previous test ensures that the html2wt mode will generate the
6344 # "not as a hex sequence" wikitext.
6346 Link containing % as a single hex sequence interpreted to char
6348 parsoid=wt2wt,wt2html,html2html
6352 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6355 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6359 Link containing % as a double hex sequence interpreted to hex sequence
6363 <p>[[7%2525 Solution]]
6367 # note that parsoid does not munge anchor text; all non-space
6368 # characters are valid in HTML5 anchors.
6370 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6371 Example for such a section: == < ==
6373 [[%23%3c]][[%23%3e]]
6375 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6378 <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>
6382 Link containing "<#" and ">#" as a hex sequences
6384 [[%3c%23]][[%3e%23]]
6386 <p>[[%3c%23]][[%3e%23]]
6391 Link containing an equals sign
6393 [[Special:BookSources/isbn=4-00-026157-6]]
6395 <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>
6398 <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>
6404 Just a test of an article title containing a tilde.
6407 # note that links containing signatures, like [[Foo~~~~]], are
6408 # massaged by the pre-save transform (PST) and so the tildes are never
6409 # seen by the parser.
6411 Link containing a tilde
6415 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6418 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6422 Link containing double-single-quotes '' (bug 4598)
6424 [[Lista d''e paise d''o munno]]
6426 <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>
6429 <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>
6433 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6435 Some [[Link|pretty ''italics'' and stuff]]!
6437 <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>!
6440 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6444 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6446 ''Some [[Link|pretty ''italics'' and stuff]]!''
6448 <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>
6453 Link with double quotes in title part (literal) and alternate part (interpreted)
6455 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
6459 [[''Pentecoste''|Pentecoste]]
6461 [[''Pentecoste''|''Pentecoste'']]
6463 <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>
6464 </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>
6465 </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>
6466 </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>
6469 <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>
6470 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6471 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6472 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6476 Broken image links with HTML captions (bug 39700)
6478 [[File:Nonexistent|<script></script>]]
6479 [[File:Nonexistent|100x100px|<script></script>]]
6480 [[File:Nonexistent|<]]
6481 [[File:Nonexistent|a<i>b</i>c]]
6483 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6484 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6485 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6486 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6489 <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>
6490 <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>
6491 <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>
6492 <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>
6498 [[http://www.example.com]]
6500 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6503 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6507 Plain link to URL with link text
6509 [[http://www.example.com Link text]]
6511 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6516 Plain link to protocol-relative URL
6518 [[//www.example.com]]
6520 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6523 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6527 Plain link to protocol-relative URL with link text
6529 [[//www.example.com Link text]]
6531 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6536 Plain link to page with question mark in title
6542 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6543 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6548 # I'm fairly sure the expected result here is wrong.
6549 # We want these to be URL links, not pseudo-pages with URLs for titles....
6550 # However the current output is also pretty screwy.
6553 # I'm changing it to match the current output--it arguably makes more
6554 # sense in the light of the test above. Old expected result was:
6555 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6557 # But I think this test is bordering on "garbage in, garbage out" anyway.
6562 Piped link to URL: [[http://www.example.com|an example URL]]
6564 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6567 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6571 BUG 2: [[page|http://url/]] should link to page, not http://url/
6573 [[Main Page|http://url/]]
6575 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6578 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6581 # Parsoid does not mark self-links, by design.
6583 BUG 337: Escaped self-links should be bold
6587 [[Bug462]] [[Bug462]]
6589 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6592 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6594 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6598 Self-link to section should not be bold
6602 [[Main Page#section]]
6604 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6615 Self-link to numeric title
6621 <p><strong class="selflink">0</strong>
6626 Link to numeric-equivalent title
6632 <p><a href="/wiki/00" title="00">00</a>
6637 <nowiki> inside a link
6639 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6641 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6646 Non-breaking spaces in title
6648 [[ Main Page ]]
6650 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6655 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6661 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6666 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6672 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6677 Internal link with en linktrail: no apostrophes (bug 27473)
6683 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6688 Internal link with ca linktrail with apostrophes (bug 27473)
6694 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6699 Internal link with kaa linktrail with apostrophes (bug 27473)
6705 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6710 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6712 [[User:Foo/Test/63636:Bar|Test]]
6714 <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>
6717 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6721 Purely hash wikilink
6723 title=[[User:test/123]]
6727 <p><a href="#a">b</a>
6730 <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>
6734 1. Interaction of linktrail and template encapsulation
6740 <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>
6744 2. Interaction of linktrail and template encapsulation
6748 {{echo|Some [[Fool]]}}s
6750 <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>
6754 3. Interaction of linktrail and template encapsulation
6758 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6760 <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>
6770 Internal link with is link prefix
6774 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6776 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6787 Internal link with is link trail and link prefix
6791 [[mótmælendatrú|xxx]]ar
6793 mótmælenda[[söfnuður]]
6794 mótmælenda[[söfnuður|söfnuðir]]
6795 mótmælenda[[söfnuður|söfnuðir]]xxx
6797 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6798 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6799 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6800 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6801 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6806 Parsoid link trail escaping
6808 parsoid=html2wt,html2html
6812 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6816 Parsoid link prefix escaping
6819 parsoid=html2wt,html2html
6821 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6823 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6827 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6835 [http://wp.org ''foo'']
6837 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6838 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6839 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6840 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6845 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6849 [[Foo|{{echo|a}} b {{echo|c}}]]
6851 <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>
6855 Link with angle bracket after anchor
6859 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6862 <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>
6866 ### Interwiki links (see maintenance/interwiki.sql)
6870 Inline interwiki link
6872 parsoid=wt2html,wt2wt,html2html
6874 [[MeatBall:SoftSecurity]]
6876 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6879 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
6883 Inline interwiki link with empty title (bug 2372)
6885 parsoid=wt2html,wt2wt,html2html
6889 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6892 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
6896 Interwiki link encoding conversion (bug 1636)
6898 *[[Wikipedia:ro:Olteniţa]]
6899 *[[Wikipedia:ro:Olteniţa]]
6901 <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>
6902 <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>
6906 <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>
6907 <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>
6912 Interwiki link with fragment (bug 2130)
6914 [[MeatBall:SoftSecurity#foo]]
6916 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6920 # Ideally the wikipedia: prefix here should be proto-relative too
6921 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
6922 # define the 'en' prefix, and originally the test used 'wikipedia',
6923 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
6926 Different interwiki prefixes mapping to the same URL
6934 [[:wikipedia:Foo|Foo]]
6936 [[wikipedia:en:Foo]]
6938 [[:wikipedia:en:Foo]]
6942 <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>
6944 <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>
6946 <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>
6948 <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>
6950 <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>
6952 <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>
6954 <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>
6958 Interwiki links that cannot be represented in wiki syntax
6961 [[meatball:ok#foo|ok with fragment]]
6962 [[meatball:ok_as_well?|ok ending with ? mark]]
6963 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6964 [http://de.wikipedia.org/wiki/#foo is just fragment]
6967 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
6968 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
6969 <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>
6970 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6971 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
6974 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
6975 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
6976 <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>
6977 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6978 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6982 Interwiki links: trail
6984 [[wikipedia:Foo|Ba]]r
6986 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
6989 <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>
6993 Local interwiki link
6995 parsoid=wt2html,wt2wt,html2html
6997 [[local:Template:Foo]]
6999 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7002 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7005 # Parsoid does not mark self-links, by design.
7007 Local interwiki link: self-link to current page
7010 parsoid=wt2html,wt2wt,html2html
7014 <p><strong class="selflink">local:Main Page</strong>
7017 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7021 Local interwiki link: prefix only (bug 64167)
7023 parsoid=wt2html,wt2wt,html2html
7027 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7030 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7034 Local interwiki link: with additional interwiki prefix (bug 61357)
7036 parsoid=wt2html,wt2wt,html2html
7038 [[local:meatball:Hello]]
7040 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7043 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7047 Multiple local interwiki link prefixes
7049 [[local:local:local:local:mi:local:Foo]]
7051 parsoid=wt2html,wt2wt,html2html
7053 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7056 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7060 ### Interlanguage links
7061 ### Language links (so that searching for '### language' matches..)
7067 parsoid=wt2html,wt2wt,html2html
7075 <p>Blah blah blah</p>
7076 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7080 Interlanguage link with spacing
7082 parsoid=wt2html,wt2wt,html2html
7090 <p>Blah blah blah</p>
7091 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7095 Double interlanguage link
7097 parsoid=wt2html,wt2wt,html2html
7106 <p>Blah blah blah</p>
7107 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7108 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7112 Interlanguage link variations
7114 parsoid=wt2html,wt2wt,html2html
7125 <p>Blah blah blah</p>
7126 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7127 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7128 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7129 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7133 Interlanguage link, with prefix links
7143 <p>Blah blah blah</p>
7144 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7148 Double interlanguage link, with prefix links (bug 8897)
7159 <p>Blah blah blah</p>
7160 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7161 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7165 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7173 <p>Blah blah blah</p>
7174 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7178 Parsoid-specific test: Wikilinks with should RT properly
7184 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7189 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7193 He&nbsp;llo [[Foo|He&nbsp;llo]]
7195 He&nbsp;llo [[He&nbsp;llo]]
7197 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7198 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7202 Parsoid: handle constructor well
7208 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7209 </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>
7212 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7214 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7223 # Note that `ko` isn't a known interlanguage prefix
7225 Parsoid: recognize interlanguage links without a target page
7235 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7237 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7240 # Note that `ko` isn't a known interwiki prefix
7242 Parsoid: recognize interwiki links without a target page
7244 parsoid=wt2html,wt2wt,html2html
7250 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7251 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7254 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7255 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7259 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7263 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7266 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7270 Interlanguage link with preceding local interwiki link (bug 68085)
7272 parsoid=wt2html,wt2wt,html2html
7275 [[local:es:Spanish]]
7278 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7282 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7286 Looks like an interlanguage link, but is actually a local interwiki
7288 parsoid=wt2html,wt2wt,html2html
7294 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7298 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7302 ### Redirects, Parsoid-only
7305 1. Simple redirect to page
7309 #REDIRECT [[Main Page]]
7311 <link rel="mw:PageProp/redirect" href="./Main_Page">
7314 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7316 2. Other redirect variants
7318 parsoid=wt2html,wt2wt
7320 #REDIRECT [[Main_Page]]
7321 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7323 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7329 parsoid=wt2html,wt2wt
7334 <li>REDIRECT [[]]</li></ol>
7338 Optional colon in #REDIRECT
7340 # the colon is archaic syntax. we support it for wt2html, but we
7341 # don't care that it roundtrips back to the modern syntax.
7342 parsoid=wt2html,html2html
7344 #REDIRECT:[[Main Page]]
7346 <link rel="mw:PageProp/redirect" href="./Main_Page">
7350 Whitespace in #REDIRECT with optional colon
7352 # the colon and gratuitous whitespace is archaic syntax. we support
7353 # it for wt2html, but we don't care that it roundtrips back to the
7354 # modern syntax (without extra whitespace)
7355 parsoid=wt2html,html2html
7362 <link rel="mw:PageProp/redirect" href="./Main_Page">
7366 Piped link in #REDIRECT
7368 # content after piped link is ignored. we support this syntax,
7369 # but don't care that the piped link is lost when we roundtrip this.
7372 #REDIRECT [[Main Page|bar]]
7374 <link rel="mw:PageProp/redirect" href="./Main_Page">
7378 Redirect to category
7382 #REDIRECT [[Category:Foo]]
7384 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7388 Redirect to category with URL encoding
7392 #REDIRECT [[Category%3AFoo]]
7394 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7398 Redirect to category page
7400 parsoid=wt2html,html2html
7402 #REDIRECT [[:Category:Foo]]
7404 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7408 Redirect to image page (1)
7412 #REDIRECT [[File:Wiki.png]]
7414 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7418 Redirect to image page (2)
7422 #REDIRECT [[Image:Wiki.png]]
7424 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7428 Redirect to language
7432 #REDIRECT [[en:File:Wiki.png]]
7434 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7438 Redirect to interwiki
7442 #REDIRECT [[meatball:File:Wiki.png]]
7444 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7448 Non-English #REDIRECT
7453 #TILVÍSUN [[Main Page]]
7455 <link rel="mw:PageProp/redirect" href="./Main_Page">
7466 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7483 Broken br tag sanitization
7491 # TODO: Fix html2html mode (bug 51055)!
7492 # This </br> handling was added as part of bug 50831; but it
7493 # differs from how PHP+tidy handles this. We should investigate
7496 Parsoid: Broken br tag recognition
7512 Incorrecly removing closing slashes from correctly formed XHTML
7514 <br style="clear:both;" />
7516 <p><br style="clear:both;" />
7521 Failing to transform badly formed HTML into correct XHTML
7523 <br style="clear: left;">
7524 <br style="clear: right;">
7525 <br style="clear: both;">
7527 <p><br style="clear: left;" />
7528 <br style="clear: right;" />
7529 <br style="clear: both;" />
7533 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
7534 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
7536 Handling html with a div self-closing tag
7545 <p><div title />
7549 <p><div title=bar />
7550 <div title=bar/>
7552 <div title="bar/"></div>
7556 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7557 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7558 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
7559 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7560 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7561 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
7565 Handling html with a br self-closing tag
7574 <p><br title="title" />
7575 <br title="title" />
7592 Horizontal ruler (should it add that extra space?)
7607 Horizontal ruler -- 4+ dashes render hr
7616 Horizontal ruler -- eats additional dashes on the same line
7625 Horizontal ruler -- does not collapse dashes on consecutive lines
7636 Horizontal ruler -- <4 dashes render as plain text
7645 Horizontal ruler -- Supports content following dashes on same line
7657 ### Block-level elements
7666 <ul><li>Common list</li>
7668 <li>item 3</li></ul>
7679 <ol><li>Numbered list</li>
7681 <li> item 3</li></ol>
7695 ***#Number on level 4
7697 **#Number on level 3
7698 **#Number on level 3
7702 #** Level 3, but ordered
7705 <ol><li> with numbers</li></ol>
7706 <ul><li> and bullets</li></ul>
7707 <ol><li> and numbers</li></ol></li>
7709 <ul><li>bullet level 2
7710 <ul><li>bullet level 3
7711 <ol><li>Number on level 4</li></ol></li></ul></li>
7713 <ol><li>Number on level 3</li>
7714 <li>Number on level 3</li></ol></li></ul>
7715 <ol><li>number level 2</li></ol></li>
7717 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7718 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7729 <ul><li>bar</li></ul></li></ul>
7739 <ul><li><ul><li>foo</li></ul></li>
7745 Nested lists 3 (first element empty)
7751 <ul><li>bar</li></ul></li></ul>
7756 Nested lists 4 (first element empty)
7761 <ul><li><ul><li></li></ul></li>
7767 Nested lists 5 (both elements empty)
7772 <ul><li><ul><li></li></ul></li>
7778 Nested lists 6 (both elements empty)
7784 <ul><li></li></ul></li></ul>
7789 Nested lists 7 (skip initial nesting levels)
7793 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7798 Nested lists 8 (multiple nesting transitions)
7806 <ul><li><ul><li> bar</li></ul></li>
7807 <li> baz</li></ul></li>
7813 1. Lists with start-of-line-transparent tokens before bullets: Comments
7826 2. Lists with start-of-line-transparent tokens before bullets: Template close
7831 <ul><li>foo bar</li>
7837 List items are not parsed correctly following a <pre> block (bug 785)
7843 <ul><li> <pre>foo</pre></li>
7844 <li> <pre>bar</pre></li>
7850 List items from template
7861 * notSOL{{inner list}}
7864 <ul><li> item 1</li>
7865 <li> item 2</li></ul>
7866 <ul><li> item 0</li>
7868 <li> item 2</li></ul>
7869 <ul><li> item 0</li>
7872 <li> item 2</li></ul>
7877 List interrupted by empty line or heading
7885 <ul><li> foo</li></ul>
7886 <ul><li><ul><li> bar</li></ul></li></ul>
7887 <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>
7888 <ul><li> Another list item</li></ul>
7893 Multiple list tags generated by templates
7914 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7917 <!--This line will NOT split the list-->
7919 <!--This line will NOT split the list either-->
7921 <!--foo--> <!----> <!--This line NOT split the list either-->
7932 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7935 <!--This line will NOT split the list-->
7937 <!--This line will NOT split the list either-->
7939 <!--foo--> <!----> <!--This line NOT split the list
7952 (The PHP parser relies on Tidy for the hack)
7954 parsoid=wt2html,wt2wt
7958 * {{echo|<li>templated li-hack}}
7959 * <!--foo--> <li> unsupported li-hack with preceding comments
7962 <li><li>not a li-hack
7969 <li>templated li-hack</li>
7970 <li>unsupported li-hack with preceding comments</li>
7973 <li>not a li-hack</li>
7978 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8005 Parsoid: Test of whitespace serialization with Templated bullets
8012 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8016 # ------------------------------------------------------------------------
8017 # The next set of tests are about Parsoid's ability to handle badly nested
8018 # tags (parse, minimize scope of fixup, and roundtrip back)
8019 # ------------------------------------------------------------------------
8022 Unbalanced closing block tags break a list
8023 (php parser relies on Tidy to fix up)
8041 # Parsoid fails this test, but it might be tricky to support properly.
8044 Unbalanced closing non-block tags don't break a list
8045 (php parser relies on Tidy to fix up)
8052 <li><span>a</span></li>
8053 <li><span>b</span></li>
8067 Unclosed formatting tags that straddle lists are closed and reopened
8068 (php parser relies on Tidy to fix up)
8070 parsoid=wt2html,wt2wt,html2html
8080 <ol><li> <s> a</s></li>
8081 <li><s> b </s></li></ol>
8084 # Parsoid fails this test, but it might be tricky to support properly.
8087 List embedded in a non-block tag
8088 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
8095 <li><small>foo</small></li>
8105 # This is a bug in the PHP parser + tidy combination.
8106 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8107 # and then fostered out of the table by tidy.)
8108 # We believe the Parsoid output to be correct.
8110 Table with missing opening <tr> tag
8112 parsoid=wt2html,wt2wt
8137 # Note that the current date is hard-coded as
8138 # 1970-01-01T00:02:03Z (a Thursday)
8139 # when running parser tests. The timezone is also fixed to GMT, so
8140 # local date will be identical to current date.
8143 Magic Word: {{CURRENTDAY}}
8152 Magic Word: {{CURRENTDAY2}}
8161 Magic Word: {{CURRENTDAYNAME}}
8170 Magic Word: {{CURRENTDOW}}
8179 Magic Word: {{CURRENTMONTH}}
8188 Magic Word: {{CURRENTMONTH1}}
8197 Magic Word: {{CURRENTMONTHABBREV}}
8199 {{CURRENTMONTHABBREV}}
8206 Magic Word: {{CURRENTMONTHNAME}}
8208 {{CURRENTMONTHNAME}}
8215 Magic Word: {{CURRENTMONTHNAMEGEN}}
8217 {{CURRENTMONTHNAMEGEN}}
8224 Magic Word: {{CURRENTTIME}}
8233 Magic Word: {{CURRENTHOUR}}
8242 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8251 Magic Word: {{CURRENTYEAR}}
8260 Magic Word: {{CURRENTTIMESTAMP}}
8262 {{CURRENTTIMESTAMP}}
8269 Magic Words LOCAL (UTC)
8273 * {{LOCALMONTHNAME}}
8274 * {{LOCALMONTHNAMEGEN}}
8275 * {{LOCALMONTHABBREV}}
8284 * {{LOCALTIMESTAMP}}
8299 <li> 19700101000203</li></ul>
8304 Magic Word: {{FULLPAGENAME}}
8306 title=[[User:Ævar Arnfjörð Bjarmason]]
8310 <p>User:Ævar Arnfjörð Bjarmason
8315 Magic Word: {{FULLPAGENAMEE}}
8317 title=[[User:Ævar Arnfjörð Bjarmason]]
8321 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8326 Magic Word: {{TALKSPACE}}
8328 title=[[User:Ævar Arnfjörð Bjarmason]]
8337 Magic Word: {{TALKSPACE}}, same namespace
8339 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8348 Magic Word: {{TALKSPACE}}, main namespace
8350 title=[[Parser Test]]
8359 Magic Word: {{TALKSPACEE}}
8361 title=[[User:Ævar Arnfjörð Bjarmason]]
8370 Magic Word: {{SUBJECTSPACE}}
8372 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8381 Magic Word: {{SUBJECTSPACE}}, same namespace
8383 title=[[User:Ævar Arnfjörð Bjarmason]]
8392 Magic Word: {{SUBJECTSPACE}}, main namespace
8394 title=[[Parser Test]]
8402 Magic Word: {{SUBJECTSPACEE}}
8404 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8413 Magic Word: {{NAMESPACE}}
8415 title=[[User:Ævar Arnfjörð Bjarmason]]
8424 Magic Word: {{NAMESPACEE}}
8426 title=[[User:Ævar Arnfjörð Bjarmason]]
8435 Magic Word: {{NAMESPACENUMBER}}
8437 title=[[User:Ævar Arnfjörð Bjarmason]]
8446 Magic Word: {{SUBPAGENAME}}
8448 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8457 Magic Word: {{SUBPAGENAMEE}}
8459 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8468 Magic Word: {{ROOTPAGENAME}}
8470 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8474 <p>Ævar Arnfjörð Bjarmason
8479 Magic Word: {{ROOTPAGENAMEE}}
8481 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8485 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8490 Magic Word: {{BASEPAGENAME}}
8492 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8496 <p>Ævar Arnfjörð Bjarmason
8501 Magic Word: {{BASEPAGENAMEE}}
8503 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8507 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8512 Magic Word: {{TALKPAGENAME}}
8514 title=[[User:Ævar Arnfjörð Bjarmason]]
8518 <p>User talk:Ævar Arnfjörð Bjarmason
8523 Magic Word: {{TALKPAGENAMEE}}
8525 title=[[User:Ævar Arnfjörð Bjarmason]]
8529 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8534 Magic Word: {{SUBJECTPAGENAME}}
8536 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8540 <p>User:Ævar Arnfjörð Bjarmason
8545 Magic Word: {{SUBJECTPAGENAMEE}}
8547 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8549 {{SUBJECTPAGENAMEE}}
8551 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8556 Magic Word: {{NUMBEROFFILES}}
8565 Magic Word: {{PAGENAME}}
8567 title=[[User:Ævar Arnfjörð Bjarmason]]
8571 <p>Ævar Arnfjörð Bjarmason
8576 Magic Word: {{PAGENAME}} with metacharacters
8578 title=[['foo & bar = baz']]
8582 <p><i>'foo & bar = baz'</i>
8585 <p><i>'foo & bar = baz'</i></p>
8589 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8591 title=[[*RFC 1234 http://example.com/]]
8595 <p>*RFC 1234 http://example.com/
8598 <p>*RFC 1234 http://example.com/</p>
8602 Magic Word: {{PAGENAMEE}}
8604 title=[[User:Ævar Arnfjörð Bjarmason]]
8608 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8613 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8615 title=[[*RFC 1234 http://example.com/]]
8619 <p>*RFC_1234_http://example.com/
8622 <p>*RFC_1234_http://example.com/</p>
8626 Magic Word: {{REVISIONID}}
8635 Magic Word: {{SCRIPTPATH}}
8644 Magic Word: {{STYLEPATH}}
8653 Magic Word: {{SERVER}}
8657 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8662 Magic Word: {{SERVERNAME}}
8671 Magic Word: {{SITENAME}}
8680 Case-sensitive magic words, when cased differently, should just be template transclusions
8687 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8688 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8689 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8690 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8695 Case-insensitive magic words should still work with weird casing.
8705 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8710 Namespace 1 {{ns:1}}
8719 Namespace 1 {{ns:01}}
8728 Namespace 0 {{ns:0}} (bug 4783)
8736 Namespace 0 {{ns:00}} (bug 4783)
8744 Namespace -1 {{ns:-1}}
8753 Namespace User {{ns:User}}
8762 Namespace User talk {{ns:User_talk}}
8771 Namespace User talk {{ns:uSeR tAlK}}
8780 Namespace File {{ns:File}}
8789 Namespace File {{ns:Image}}
8798 Namespace (lang=de) Benutzer {{ns:User}}
8809 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8815 <p>Benutzer Diskussion
8823 {{urlencode:hi world?!}}
8824 {{urlencode:hi world?!|WIKI}}
8825 {{urlencode:hi world?!|PATH}}
8826 {{urlencode:hi world?!|QUERY}}
8836 Magic Word: prioritize type info over data-parsoid
8842 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8846 Magic Word: serialize on separate line (parsoid)
8848 parsoid=wt2wt,html2wt
8854 foo<meta property="mw:PageProp/notoc"/>bar
8858 Magic Word: rt non-english wikis
8865 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8872 Magic links: internal link to RFC (bug 479)
8876 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8881 Magic links: RFC (bug 479)
8885 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8890 Magic links: ISBN (bug 1937)
8894 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8899 Magic links: PMID incorrectly converts space to underscore
8903 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8912 Nonexistent template
8914 {{thistemplatedoesnotexist}}
8916 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8921 Template with invalid target containing tags
8923 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8925 <p>{{a<b>b</b>|foo|a=b|a = b}}
8930 Template with invalid target containing unclosed tag
8932 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8934 <p>{{a<b>|foo|a=b|a = b}}</b>
8939 Template with invalid target containing wikilink
8943 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8946 <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>
8950 Template with just whitespace in it, bug #68421
8954 <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>
8960 This is a test template
8968 <p>This is a test template
8973 Template with explicit namespace
8977 <p>This is a test template
8985 This is a test template with parameter {{{param}}}
8991 {{paramtest|param=foo}}
8993 <p>This is a test template with parameter foo
8998 Template:paramtestnum
9004 Template unnamed parameter
9006 {{paramtestnum|Main Page|the main page}}
9008 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9013 Template:templatesimple
9019 Template:templateredirect
9021 #redirect [[Template:templatesimple]]
9025 Template:templateasargtestnum
9031 Template:templateasargtest
9033 {{template{{{templ}}}}}
9037 Template:templateasargtest2
9043 Template with template name as unnamed argument
9045 {{templateasargtestnum|templatesimple}}
9052 Template with template name as argument
9054 {{templateasargtest|templ=simple}}
9061 Template with template name as argument (2)
9063 {{templateasargtest2|templ=templatesimple}}
9070 Template:templateasargtestdefault
9072 {{{{{templ|templatesimple}}}}}
9082 Template with default value
9084 {{templateasargtestdefault}}
9091 Template with default value (value set)
9093 {{templateasargtestdefault|templ=templa}}
9102 {{templateredirect}}
9109 Template with argument in separate line
9111 {{ templateasargtest |
9119 Template with complex template as argument
9122 param ={{ templateasargtest |
9125 <p>This is a test template with parameter (test)
9130 Template with thumb image (with link in description)
9132 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9134 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>
9137 <p>This is a test template with parameter</p>
9138 <div class="thumb tright">
9139 <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>
9140 <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>
9144 <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>
9148 Template:complextemplate
9150 {{{1}}} {{paramtest|
9151 param ={{{param}}}}}
9155 Template with complex arguments
9158 param ={{ templateasargtest |
9159 templ = simple }}|[[Template:complextemplate|link]]}}
9161 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9166 BUG 553: link with two variables in a piped link
9169 |[[{{{1}}}|{{{2}}}]]
9174 <td>[[{{{1}}}|{{{2}}}]]
9180 Magic variable as template parameter
9182 {{paramtest|param={{SITENAME}}}}
9184 <p>This is a test template with parameter MediaWiki
9191 [[{{{param}}}|link]]
9195 Template parameter as link source
9197 {{linktest|param=Main Page}}
9199 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9204 Template-generated attribute string (k='v')
9206 <span {{attr_str|id|v1}}>bar</span>
9208 <p><span id="v1">bar</span>
9215 including another template, {{paramtest|param={{{arg}}}}}
9219 Template passing argument to another template
9221 {{paramtest2|arg='hmm'}}
9223 <p>including another template, This is a test template with parameter 'hmm'
9234 Template as link source
9238 [[{{linktest2}}|Main Page]]
9240 [[{{linktest2}}]]Page
9242 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9243 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9244 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9262 Template infinite loop
9266 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9271 Template from main namespace
9290 BUG 529: Template with table, not included at beginning of line
9309 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9329 BUG 41: Template parameters shown as broken links
9338 Template with targets containing wikilinks
9342 {{[[{{echo|foo}}]]}}
9344 {{{{echo|[[foo}}]]}}
9346 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9347 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9355 ''None'' of '''this''' should be
9357 but rather passed unmodified
9364 # hmm, fix this or just deprecate msgnw and document its behavior?
9368 {{msgnw:MSGNW test}}
9370 <p>''None'' of '''this''' should be
9372  but rather passed unmodified
9373 {{test}}
9383 {{int:youhavenewmessages|lots of money|not!}}
9385 <p>You have lots of money (not!).
9392 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9396 <includeonly> and <noinclude> being included
9407 <onlyinclude>Foo</onlyinclude>bar
9411 <onlyinclude> being included
9423 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9427 <onlyinclude> and <includeonly> being included
9436 <includeonly> and <noinclude> on a page
9438 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9445 Un-closed <noinclude>
9452 <onlyinclude> on a page
9454 <onlyinclude>Foo</onlyinclude>bar
9461 Un-closed <onlyinclude>
9468 Self-closed noinclude, includeonly, onlyinclude tags
9479 Unbalanced includeonly and noinclude tags
9483 |b</noinclude></noinclude>
9484 |c</noinclude></includeonly>
9485 |d</includeonly></includeonly>
9494 <td>c</includeonly>
9496 <td>d</includeonly></includeonly>
9502 Template:Includeonly section
9505 ==Includeonly section==
9511 Bug 6563: Edit link generation for section shown by <includeonly>
9513 {{includeonly section}}
9515 <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>
9516 <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>
9520 # Uses same input as the contents of [[Template:Includeonly section]]
9522 Bug 6563: Section extraction for section shown by <includeonly>
9527 ==Includeonly section==
9535 Bug 6563: Edit link generation for section suppressed by <includeonly>
9538 ==Includeonly section==
9542 <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>
9547 Bug 6563: Section extraction for section suppressed by <includeonly>
9552 ==Includeonly section==
9560 Un-closed <includeonly>
9567 Includes and comments at SOL
9569 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9576 <includeonly>can have stuff</includeonly>=== here ===
9579 <h2><span class="mw-headline" id="hu">hu</span></h2>
9584 <h3><span class="mw-headline" id="here">here</span></h3>
9587 <!-- 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>
9589 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9591 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9594 <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>
9598 # TODO: test with DOM fragment reuse!
9600 Parsoid: DOM fragment reuse
9602 parsoid=wt2wt,wt2html
9604 a{{echo|b<table></table>c}}d
9616 <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>
9618 <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">
9619 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9620 </span><p about="#mwt2">cd</p>
9622 <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">
9624 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9626 </span><p about="#mwt3">b</p>
9630 Parsoid: Merge double tds (bug 50603)
9639 <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>
9644 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9654 <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}}]}'>
9656 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9662 ### <includeonly> and <noinclude> in attributes
9665 0. includeonly around the entire attribute
9667 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9669 <p><span id="v2">bar</span>
9674 1. includeonly in html attr key
9676 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9678 <p><span id="foo">bar</span>
9683 2. includeonly in html attr value
9685 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9686 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9688 <p><span id="v1">bar</span>
9689 <span id="v1">bar</span>
9694 3. includeonly in part of an attr value
9696 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9698 <p><span style="color:red;">bar</span>
9703 4. includeonly in table attributes
9727 ### Token Stream Patcher tests
9729 ### These tests won't always pass wt2wt and other modes because
9730 ### on serialization, the table will be output on a new line.
9731 ### For now, we are blacklisting them, and using this to test selser.
9735 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9737 parsoid=wt2html,wt2wt
9739 {{echo|}}{| width = '100%'
9743 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
9744 <tbody><tr><td>foo</td></tr>
9749 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9751 parsoid=wt2html,wt2wt
9753 <includeonly>a</includeonly>{| {{{b}}}
9757 <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}}}":""}}'>
9758 <tbody><tr><td>c</td></tr>
9764 ### Testing parsing of templates where a template arg
9765 ### has the same name as the template itself.
9775 Templates: Template Name/Arg clash: 1. Use of positional param
9784 Templates: Template Name/Arg clash: 2. Use of named param
9793 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9802 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
9806 Templates: 1. Simple use
9815 Templates: 2. Inside a block tag
9817 <div>{{echo|Foo}}</div>
9818 <blockquote>{{echo|Foo}}</blockquote>
9821 <blockquote>Foo</blockquote>
9831 Templates: P-wrapping: 1a. Templates on consecutive lines
9842 Templates: P-wrapping: 1b. Templates on consecutive lines
9856 Templates: P-wrapping: 1c. Templates on consecutive lines
9859 {{echo|bar}} <div>baz</div>
9872 Templates: P-wrapping: 1d. Template preceded by comment-only line
9881 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
9885 Templates: Inline Text: 1. Multiple template uses
9887 {{echo|Foo}}bar{{echo|baz}}
9894 Templates: Inline Text: 2. Back-to-back template uses
9896 {{echo|Foo}}{{echo|bar}}
9903 Templates: Block Tags: 1. Multiple template uses
9905 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
9907 <div>Foo</div><div>bar</div><div>baz</div>
9912 Templates: Block Tags: 2. Back-to-back template uses
9914 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
9916 <div>Foo</div><div>bar</div>
9920 # This is an edge case relating to paragraph wrapping.
9922 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
9927 <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
9932 Templates: Links: 1. Simple example
9934 {{echo|[[Foo|bar]]}}
9936 <p><a href="/wiki/Foo" title="Foo">bar</a>
9941 Templates: Links: 2. Generation of link href
9943 [[{{echo|Foo}}|bar]]
9945 <p><a href="/wiki/Foo" title="Foo">bar</a>
9950 Templates: Links: 3. Generation of part of a link href
9952 [[Fo{{echo|o}}|bar]]
9956 [[Foo{{echo|bar}}baz]]
9958 [[Foo{{echo|bar}}|bar]]
9960 [[:Foo{{echo|bar}}]]
9962 [[:Foo{{echo|bar}}|bar]]
9964 <p><a href="/wiki/Foo" title="Foo">bar</a>
9965 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9966 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9967 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9968 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9969 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9974 Templates: Links: 4. Multiple templates generating link href
9976 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9978 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9983 Templates: Links: 5. Generation of link text
9985 [[Foo|{{echo|bar}}]]
9987 <p><a href="/wiki/Foo" title="Foo">bar</a>
9992 Templates: Links: 5. Nested templates (only outermost template should be marked)
9994 {{echo|[[{{echo|Foo}}|bar]]}}
9996 <p><a href="/wiki/Foo" title="Foo">bar</a>
10001 Templates: HTML Tag: 1. Generation of HTML attr. key
10003 <div {{echo|style}}="color:red;">foo</div>
10005 <div style="color:red;">foo</div>
10010 Templates: HTML Tag: 2. Generation of HTML attr. value
10012 <div style={{echo|'color:red;'}}>foo</div>
10014 <div style="color:red;">foo</div>
10019 Templates: HTML Tag: 3. Generation of HTML attr key and value
10021 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10023 <div style="color:red;">foo</div>
10028 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10030 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10032 <div title="This is a long title with just one piece templated">foo</div>
10037 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10039 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10041 <div title="This is a long title with just one piece templated">foo</div>
10046 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10048 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10050 <div title="This is a long title with just one piece templated">foo</div>
10055 Templates: HTML Tag: 7. Generation of partial attribute key string
10057 <div st{{echo|yle}}="color:red;">foo</div>
10059 <div style="color:red;">foo</div>
10064 Templates: HTML Tables: 1. Generating start of a HTML table
10066 {{echo|<table><tr><td>foo</td>}}</tr></table>
10068 <table><tr><td>foo</td></tr></table>
10073 Templates: HTML Tables: 2a. Generating middle of a HTML table
10075 <table><tr>{{echo|<td>foo</td>}}</tr></table>
10077 <table><tr><td>foo</td></tr></table>
10082 Templates: HTML Tables: 2b. Generating middle of a HTML table
10084 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10086 <table><tr><td>foo</td></tr></table>
10091 Templates: HTML Tables: 3. Generating end of a HTML table
10093 <table><tr>{{echo|<td>foo</td></tr></table>}}
10095 <table><tr><td>foo</td></tr></table>
10100 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10102 {{echo|<table>}}<tr><td>foo</td></tr></table>
10104 <table><tr><td>foo</td></tr></table>
10109 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10111 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10113 <table><tr><td>foo</td></tr></table>
10118 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10120 <table><tr>{{echo|<td>}}foo</td></tr></table>
10122 <table><tr><td>foo</td></tr></table>
10127 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10129 <table><tr><td>foo{{echo|</td>}}</tr></table>
10131 <table><tr><td>foo</td></tr></table>
10136 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10138 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10140 <table><tr><td>foo</td></tr></table>
10145 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10147 <table><tr><td>foo</td></tr>{{echo|</table>}}
10149 <table><tr><td>foo</td></tr></table>
10154 Templates: HTML Tables: 5. Proper fostering of categories from inside
10156 parsoid=wt2html,wt2wt
10158 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10159 <!--Two categories (Bug 50330)-->
10160 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10162 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10163 <!--Two categories (Bug 50330)-->
10164 <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>
10168 Templates: Wiki Tables: 1a. Fostering of entire template content
10176 <tr><td></td></tr></table>
10188 Templates: Wiki Tables: 1b. Fostering of entire template content
10201 <tr><td></td></tr></table>
10215 Templates: Wiki Tables: 2. Fostering of partial template content
10225 <tr><td></td></tr></table>
10238 Templates: Wiki Tables: 3. td-content via multiple templates
10241 {{echo|{{pipe}}a}}{{echo|b}}
10252 Templates: Wiki Tables: 4. Templated tags, no content
10258 <tr><td></td></tr></table>
10263 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10277 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10291 Templates: Lists: Multi-line list-items via templates
10293 *{{echo|a {{nonexistent|
10295 *{{echo|b {{nonexistent|
10298 <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>
10299 <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>
10304 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10306 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10308 <p><i>ab</i>c<i>d</i>e
10313 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10314 (PHP parser generates misnested html)
10316 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10318 <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>
10322 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10323 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10325 parsoid=wt2html,wt2wt
10327 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10329 <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>
10330 <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>
10331 <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>
10335 Templates: Ugly nesting: 4. Divs opened/closed across templates
10337 a<div>b{{echo|c</div>d}}e
10348 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10354 |{{echo|foo</table>}}
10358 <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|}"]}'>
10362 <td>foo</td></tr></tbody></table><span about="#mwt1">
10363 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10368 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10378 <td>1. {{echo|foo </table>}}</td>
10380 <td>2. {{echo|baz </table>}}</td>
10393 <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>"]}'>
10398 <td>1. foo </td></tr></tbody></table></td>
10400 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10401 </span><span about="#mwt2">
10402 </span><span about="#mwt2">
10403 </span><span about="#mwt2">abc</span><span about="#mwt2">
10404 </span><span about="#mwt2">
10405 </span><span about="#mwt2">
10406 </span><span about="#mwt2">
10407 </span><span about="#mwt2">
10408 </span><span about="#mwt2">
10409 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10410 </span><span about="#mwt2">
10415 Templates: Ugly templates: 3. newline-only template parameter
10424 # This looks like a bug: a single newline triggers p/br for some reason.
10426 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10435 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10436 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10438 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10444 <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
10445 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10449 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10450 # that are "identical" and generate nesting cycles in the algorithm
10452 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10454 {{echo|<table><tr><td><table>}}
10458 <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"}'>
10459 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10460 </table></td></tr></tbody></table>
10464 Parser Functions: 1. Simple example
10473 Parser Functions: 2. Nested use (only outermost should be marked up)
10482 ### Pre-save transform tests
10485 pre-save transform: subst:
10491 This is a test template
10495 pre-save transform: normal template
10505 pre-save transform: nonexistent template
10509 {{thistemplatedoesnotexist}}
10511 {{thistemplatedoesnotexist}}
10516 pre-save transform: subst magic variables
10525 # This is bug 89, which I fixed. -- wtm
10527 pre-save transform: subst: templates with parameters
10531 {{subst:paramtest|param="something else"}}
10533 This is a test template with parameter "something else"
10537 Template:nowikitest
10539 <nowiki>'''not wiki'''</nowiki>
10543 pre-save transform: nowiki in subst (bug 1188)
10547 {{subst:nowikitest}}
10549 <nowiki>'''not wiki'''</nowiki>
10554 Template:commenttest
10556 This template has <!-- a comment --> in it.
10560 pre-save transform: comment in subst (bug 1936)
10564 {{subst:commenttest}}
10566 This template has <!-- a comment --> in it.
10570 pre-save transform: unclosed tag
10574 <nowiki>'''not wiki'''
10576 <nowiki>'''not wiki'''
10580 pre-save transform: mixed tag case
10584 <NOwiki>'''not wiki'''</noWIKI>
10586 <NOwiki>'''not wiki'''</noWIKI>
10590 pre-save transform: unclosed comment in <nowiki>
10594 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10596 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10599 # Leading @ in this template definition works around a limitation
10600 # in parsoid's parserTests which otherwise strips the <span> from the
10601 # result (confusing it for a template wrapper)
10605 @<span onmouseover="alert('crap')">Oh no</span>
10609 (confirming safety of fix for subst bug 1936)
10611 {{Template:dangerous}}
10613 <p>@<span>Oh no</span>
10618 pre-save transform: comment containing gallery (bug 5024)
10622 <!-- <gallery>data</gallery> -->
10624 <!-- <gallery>data</gallery> -->
10628 pre-save transform: comment containing extension
10632 <!-- <tag>data</tag> -->
10634 <!-- <tag>data</tag> -->
10638 pre-save transform: comment containing nowiki
10642 <!-- <nowiki>data</nowiki> -->
10644 <!-- <nowiki>data</nowiki> -->
10648 pre-save transform: <noinclude> in subst (bug 3298)
10658 pre-save transform: <onlyinclude> in subst (bug 3298)
10662 {{subst:Includes2}}
10670 {{<includeonly>subst:</includeonly>Includes}}
10674 Template:SafeSubstTest
10676 {{<includeonly>safesubst:</includeonly>Includes}}
10680 bug 22297: safesubst: works during PST
10684 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10690 bug 22297: safesubst: works during normal parse
10699 subst: does not work during normal parse
10703 <p>{{subst:Includes}}
10708 pre-save transform: context links ("pipe trick")
10712 [[Article (context)|]]
10715 [[Bar:Article (context)|]]
10716 [[:Bar:Article (context)|]]
10718 [[|Article (context)]]
10722 [[Article (context)|Article]]
10723 [[Bar:Article|Article]]
10724 [[:Bar:Article|Article]]
10725 [[Bar:Article (context)|Article]]
10726 [[:Bar:Article (context)|Article]]
10728 [[Article (context)]]
10729 [[Bar:X (Y) Z|X (Y) Z]]
10730 [[:Bar:X (Y) Z|X (Y) Z]]
10734 pre-save transform: context links ("pipe trick") with interwiki prefix
10738 [[interwiki:Article|]]
10739 [[:interwiki:Article|]]
10740 [[interwiki:Bar:Article|]]
10741 [[:interwiki:Bar:Article|]]
10743 [[interwiki:Article|Article]]
10744 [[:interwiki:Article|Article]]
10745 [[interwiki:Bar:Article|Bar:Article]]
10746 [[:interwiki:Bar:Article|Bar:Article]]
10750 pre-save transform: context links ("pipe trick") with parens in title
10752 pst title=[[Somearticle (context)]]
10756 [[Article (context)|Article]]
10760 pre-save transform: context links ("pipe trick") with comma in title
10762 pst title=[[Someplace, Somewhere]]
10765 [[Otherplace, Elsewhere|]]
10766 [[Otherplace, Elsewhere, Anywhere|]]
10768 [[Otherplace, Somewhere|Otherplace]]
10769 [[Otherplace, Elsewhere|Otherplace]]
10770 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
10774 pre-save transform: context links ("pipe trick") with parens and comma
10776 pst title=[[Someplace (IGNORED), Somewhere]]
10779 [[Otherplace (place), Elsewhere|]]
10781 [[Otherplace, Somewhere|Otherplace]]
10782 [[Otherplace (place), Elsewhere|Otherplace]]
10786 pre-save transform: context links ("pipe trick") with comma and parens
10788 pst title=[[Who, me? (context)]]
10791 [[Me, Myself, and I (1937 song)|]]
10793 [[Yes, you. (context)|Yes, you.]]
10794 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
10798 pre-save transform: context links ("pipe trick") with namespace
10800 pst title=[[Ns:Somearticle]]
10804 [[Ns:Article|Article]]
10808 pre-save transform: context links ("pipe trick") with namespace and parens
10810 pst title=[[Ns:Somearticle (context)]]
10814 [[Ns:Article (context)|Article]]
10818 pre-save transform: context links ("pipe trick") with namespace and comma
10820 pst title=[[Ns:Somearticle, Context, Whatever]]
10824 [[Ns:Article, Context, Whatever|Article]]
10828 pre-save transform: context links ("pipe trick") with namespace, comma and parens
10830 pst title=[[Ns:Somearticle, Context (context)]]
10834 [[Ns:Article (context)|Article]]
10838 pre-save transform: context links ("pipe trick") with namespace, parens and comma
10840 pst title=[[Ns:Somearticle (IGNORED), Context]]
10844 [[Ns:Article, Context|Article]]
10848 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
10852 [[Article(context)|]]
10853 [[Bar:Article(context)|]]
10854 [[:Bar:Article(context)|]]
10855 [[|Article(context)]]
10859 [[Article(context)|Article]]
10860 [[Bar:Article(context)|Article]]
10861 [[:Bar:Article(context)|Article]]
10862 [[Article(context)]]
10863 [[Bar:X(Y)Z|X(Y)Z]]
10864 [[:Bar:X(Y)Z|X(Y)Z]]
10868 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
10872 [[Article (context)|]]
10873 [[Bar:Article (context)|]]
10874 [[:Bar:Article (context)|]]
10875 [[|Article (context)]]
10879 [[Article (context)|Article]]
10880 [[Bar:Article (context)|Article]]
10881 [[:Bar:Article (context)|Article]]
10882 [[Article (context)]]
10883 [[Bar:X (Y) Z|X (Y) Z]]
10884 [[:Bar:X (Y) Z|X (Y) Z]]
10888 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
10892 [[Article(context)|]]
10893 [[Bar:Article(context)|]]
10894 [[:Bar:Article(context)|]]
10895 [[|Article(context)]]
10899 [[Article(context)|Article]]
10900 [[Bar:Article(context)|Article]]
10901 [[:Bar:Article(context)|Article]]
10902 [[Article(context)]]
10903 [[Bar:X(Y)Z|X(Y)Z]]
10904 [[:Bar:X(Y)Z|X(Y)Z]]
10908 pre-save transform: context links ("pipe trick") with commas (bug 21660)
10912 [[Article (context), context|]]
10913 [[Article (context),context|]]
10914 [[Bar:Article (context), context|]]
10915 [[Bar:Article (context),context|]]
10916 [[:Bar:Article (context), context|]]
10917 [[:Bar:Article (context),context|]]
10919 [[Article (context), context|Article]]
10920 [[Article (context),context|Article]]
10921 [[Bar:Article (context), context|Article]]
10922 [[Bar:Article (context),context|Article]]
10923 [[:Bar:Article (context), context|Article]]
10924 [[:Bar:Article (context),context|Article]]
10928 pre-save transform: trim trailing empty lines
10932 Empty lines are trimmed
10938 Empty lines are trimmed
10942 pre-save transform: Signature expansion
10947 * <noinclude>~~~</noinclude>
10948 * <includeonly>~~~</includeonly>
10949 * <onlyinclude>~~~</onlyinclude>
10951 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
10952 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
10953 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
10954 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
10959 pre-save transform: Signature expansion in nowiki tags (bug 93)
10965 <nowiki>~~~~</nowiki>
10967 <includeonly><nowiki>~~~~</nowiki></includeonly>
10969 <noinclude><nowiki>~~~~</nowiki></noinclude>
10971 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10973 {{subst:Foo}} shall be converted to FOO
10975 As well as inside noinclude/onlyinclude
10976 <noinclude>{{subst:Foo}}</noinclude>
10977 <onlyinclude>{{subst:Foo}}</onlyinclude>
10979 But not inside includeonly
10980 <includeonly>{{subst:Foo}}</includeonly>
10984 <nowiki>~~~~</nowiki>
10986 <includeonly><nowiki>~~~~</nowiki></includeonly>
10988 <noinclude><nowiki>~~~~</nowiki></noinclude>
10990 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10992 FOO shall be converted to FOO
10994 As well as inside noinclude/onlyinclude
10995 <noinclude>FOO</noinclude>
10996 <onlyinclude>FOO</onlyinclude>
10998 But not inside includeonly
10999 <includeonly>{{subst:Foo}}</includeonly>
11003 Parsoid: Recognize nowiki with trailing space in tags
11007 <nowiki ><div>[[foo]]</nowiki >
11015 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11022 Parsoid: Recognize nowiki with odd capitalization
11026 <noWikI ><div>[[foo]]</Nowiki >
11028 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11033 Parsoid: Escape nowiki with trailing space in tags
11037 <nowiki > foo </nowiki >
11043 <p><nowiki > foo </nowiki ></p>
11044 <p>a<nowiki />b</p>
11045 <p>c<nowiki/ >d</p>
11049 Parsoid: Escape weird noWikI capitalizations
11053 <noWikI > foo </NoWikI >
11055 <p><noWikI > foo </NoWikI ></p>
11059 ### Message transform tests
11062 message transform: magic variables
11072 message transform: should not transform wiki markup
11082 message transform: <noinclude> in transcluded template (bug 4926)
11092 message transform: <onlyinclude> in transcluded template (bug 4926)
11102 {{#special:}} page name, known
11106 {{#special:Recentchanges}}
11108 Special:RecentChanges
11112 {{#special:}} page name with subpage, known
11116 {{#special:Recentchanges/param}}
11118 Special:RecentChanges/param
11122 {{#special:}} page name, unknown
11126 {{#special:foobar nonexistent}}
11128 Special:Foobar nonexistent
11132 {{#speciale:}} page name, known
11136 {{#speciale:Recentchanges}}
11138 Special:RecentChanges
11142 {{#speciale:}} page name with subpage, known
11146 {{#speciale:Recentchanges/param}}
11148 Special:RecentChanges/param
11152 {{#speciale:}} page name, unknown
11156 {{#speciale:foobar nonexistent}}
11158 Special:Foobar_nonexistent
11164 ### For Parsoid-specific tests, see
11165 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11170 parsoid=wt2html,wt2wt,html2html
11172 [[Image:foobar.jpg]]
11174 <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>
11177 <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>
11181 Simple image (using File: namespace, now canonical)
11183 [[File:Foobar.jpg]]
11185 <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>
11188 <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>
11192 Right-aligned image
11194 [[File:Foobar.jpg|right]]
11196 <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>
11199 <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>
11205 [[File:Foobar.jpg|right|Caption text]]
11207 <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>
11210 <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>
11214 Image with caption, bug 53312 #1
11216 [[File:Foobar.jpg|right|Caption page stuff]]
11218 <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>
11221 <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>
11225 Image with caption, bug 53312 #2
11227 [[File:Foobar.jpg|right|Caption page=]]
11229 <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>
11232 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption>Caption page=</figcaption></figure>
11236 Image with caption, bug 53312 #3
11238 [[File:Foobar.jpg|right|Caption page=stuff]]
11240 <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>
11243 <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>
11247 Allow empty links in image captions (Bug 60753)
11251 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11256 <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>
11259 <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>
11261 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11262 </figcaption></figure>
11266 Link with empty target
11275 Image with empty attribute
11277 parsoid=wt2html,wt2wt,html2html
11279 [[File:Foobar.jpg|right||Caption text]]
11281 <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>
11284 <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>
11288 1. Block image with individual attributes from templates
11290 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11292 <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>
11295 <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>
11299 2. Block Image with individual attributes from templates
11301 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11303 <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>
11306 <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>
11310 3. Inline image with individual attributes from templates
11312 [[File:Foobar.jpg|{{echo|50px}}]]
11314 <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>
11317 <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>
11320 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11321 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11323 Image with multiple attributes from the same template
11325 [[File:Foobar.jpg|{{image_attribs}}]]
11327 <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>
11330 <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>
11334 Image with link tails
11338 123[[File:Foobar.jpg]]456
11339 123[[File:Foobar.jpg|right]]456
11340 123[[File:Foobar.jpg|thumb]]456
11342 <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
11344 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
11345 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
11348 <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>
11350 <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>
11352 <div class="thumb tright">
11353 <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>
11354 <div class="thumbcaption">
11355 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11361 <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>
11362 <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>
11363 <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>
11367 Image with multiple captions -- only last one is accepted
11369 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11371 <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>
11374 <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>
11378 Image with multiple widths -- use last
11380 [[File:Foobar.jpg|200px|300px|caption]]
11382 <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>
11385 <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>
11389 Image with multiple alignments -- use first (bug 48664)
11393 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11395 [[File:Foobar.jpg|middle|text-top|caption]]
11397 <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>
11398 <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>
11401 <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>
11402 <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>
11406 Image with width attribute at different positions
11408 [[File:Foobar.jpg|200px|right|Caption]]
11409 [[File:Foobar.jpg|right|200px|Caption]]
11410 [[File:Foobar.jpg|right|Caption|200px]]
11412 <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>
11413 <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>
11414 <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>
11417 <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>
11418 <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>
11419 <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>
11422 # a sad bit of backward-compatibility
11424 Image with size specified with pxpx (bug 13500, 51628)
11426 parsoid=wt2html,wt2wt,html2html
11428 [[File:Foobar.jpg|20pxpx]]
11429 [[File:Foobar.jpg|200x20pxpx]]
11431 <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>
11432 <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>
11435 <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>
11439 Image with link parameter, wiki target
11441 [[File:Foobar.jpg|link=Main Page]]
11443 <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>
11446 <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>
11449 # parsoid bug 49293 (part 1)
11451 Image with link parameter, URL target
11453 [[File:Foobar.jpg|link=http://example.com/]]
11455 <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>
11458 <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>
11461 # parsoid bug 49293 (part 2)
11463 Image with link parameter, protocol-less URL target
11465 [[File:Foobar.jpg|link=//example.com/]]
11467 <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>
11470 <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>
11474 Image with link parameter, wgExternalLinkTarget
11476 [[Image:foobar.jpg|link=http://example.com/]]
11478 wgExternalLinkTarget='foobar'
11480 <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>
11485 Image with link parameter, wgNoFollowLinks set to false
11487 [[Image:foobar.jpg|link=http://example.com/]]
11489 wgNoFollowLinks=false
11491 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11496 Image with link parameter, wgNoFollowDomainExceptions
11498 [[Image:foobar.jpg|link=http://example.com/]]
11500 wgNoFollowDomainExceptions='example.com'
11502 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11507 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11509 [[Image:foobar.jpg|link=http://example.com/|Title]]
11511 wgExternalLinkTarget='foobar'
11513 <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>
11518 Image with empty link parameter
11520 [[File:Foobar.jpg|link=]]
11522 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11525 <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>
11529 Image with link parameter (wiki target) and unnamed parameter
11531 [[File:Foobar.jpg|link=Main_Page|Title]]
11533 <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>
11536 <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>
11540 Image with link parameter (URL target) and unnamed parameter
11542 [[File:Foobar.jpg|link=http://example.com/|Title]]
11544 <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>
11547 <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>
11551 Thumbnail image with link parameter
11554 parsoid=wt2html,wt2wt,html2html
11556 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11558 <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>
11561 <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>
11565 Manually-specified thumbnail image
11569 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11571 <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>
11574 <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>
11578 Manually-specified thumbnail image with explicit link to wiki page
11581 parsoid=wt2html,wt2wt,html2html
11583 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11585 <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>
11588 <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>
11592 Manually-specified thumbnail image with explicit link to url
11595 parsoid=wt2html,wt2wt,html2html
11597 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11599 <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>
11602 <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>
11606 Manually-specified thumbnail image with explicit no link
11609 parsoid=wt2html,wt2wt,html2html
11611 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11613 <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>
11616 <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>
11620 Manually-specified thumbnail image with explicit link and alt text
11623 parsoid=wt2html,wt2wt,html2html
11625 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11627 <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>
11630 <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>
11634 Image with frame and link
11636 parsoid=wt2html,wt2wt,html2html
11638 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11640 <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>
11643 <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>
11647 Image with frame and link and explicit alt
11649 parsoid=wt2html,wt2wt,html2html
11651 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11653 <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>
11656 <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>
11660 Image with wiki markup in implicit alt
11662 parsoid=wt2html,wt2wt,html2html
11664 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11666 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11668 <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>
11669 </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>
11672 <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>
11673 <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>
11676 ###################
11677 # Conflicting image format options.
11678 # First option specified should 'win'.
11679 # All three cases in each test should be identical.
11682 Image with 'frameless' first.
11684 parsoid=wt2html,wt2wt,html2html
11686 [[File:Foobar.jpg|frameless|caption]]
11688 [[File:Foobar.jpg|frameless|frame|caption]]
11690 [[File:Foobar.jpg|frameless|thumb|caption]]
11692 <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>
11693 </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>
11694 </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>
11697 <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>
11698 <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>
11699 <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>
11703 Image with 'frame' first.
11705 parsoid=wt2html,wt2wt,html2html
11707 [[File:Foobar.jpg|frame|caption]]
11708 [[File:Foobar.jpg|frame|frameless|caption]]
11709 [[File:Foobar.jpg|frame|thumb|caption]]
11711 <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>
11712 <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>
11713 <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>
11716 <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>
11717 <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>
11718 <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>
11722 Image with 'thumb' first.
11724 parsoid=wt2html,wt2wt,html2html
11726 [[File:Foobar.jpg|thumb|caption]]
11727 [[File:Foobar.jpg|thumb|frameless|caption]]
11728 [[File:Foobar.jpg|thumb|frame|caption]]
11730 <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>
11731 <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>
11732 <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>
11735 <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>
11736 <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>
11737 <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>
11740 ###################
11742 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
11743 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
11744 # Foobar has actual size of 1941x220
11745 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
11746 # a scalable format.
11747 # 2. Framed images always ignore size options; always render at default size.
11748 # 3. "Unspecified format" and border are the only types which can be
11752 Image: "unspecified format" and border enlarge
11754 parsoid=wt2html,wt2wt,html2html
11756 [[File:Foobar.jpg|2000px]]
11758 [[File:Foobar.jpg|border|2000px]]
11760 <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>
11761 </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>
11764 <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>
11765 <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>
11769 Image: "unspecified format" and border reduce
11771 parsoid=wt2html,wt2wt,html2html
11773 [[File:Foobar.jpg|1000px]]
11775 [[File:Foobar.jpg|border|1000px]]
11777 <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>
11778 </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>
11781 <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>
11782 <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>
11786 Image: thumbs reduce
11788 parsoid=wt2html,wt2wt,html2html
11790 [[File:Foobar.jpg|thumb|50px]]
11792 <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>
11795 <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>
11799 Image: bitmap thumbs can't be enlarged past original size, but vector can.
11801 parsoid=wt2html,wt2wt,html2html
11803 [[File:Foobar.jpg|thumb|2000px]]
11805 [[File:Foobar.svg|thumb|2000px]]
11807 <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>
11808 <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>
11811 <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>
11812 <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>
11816 Image: frameless can reduce in size
11818 parsoid=wt2html,wt2wt,html2html
11820 [[File:Foobar.jpg|frameless|50px]]
11822 <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>
11825 <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>
11829 Image: bitmap frameless can't be enlarged past original size, but vector can
11831 parsoid=wt2html,wt2wt,html2html
11833 [[File:Foobar.jpg|frameless|2000px]]
11835 [[File:Foobar.svg|frameless|2000px]]
11837 <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>
11838 </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>
11841 <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>
11842 <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>
11846 Image: framed images are always unscaled.
11848 parsoid=wt2html,wt2wt,html2html
11850 [[File:Foobar.jpg|frame]]
11852 [[File:Foobar.jpg|frame|50px]]
11854 [[File:Foobar.jpg|frame|50x50px]]
11856 [[File:Foobar.jpg|frame|2000px]]
11858 <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>
11859 <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>
11860 <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>
11861 <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>
11864 <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>
11865 <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>
11866 <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>
11867 <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>
11870 ###################
11873 Link to image page- image page normally doesn't exists, hence edit link
11874 Add test with existing image page
11875 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
11879 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
11884 bug 18784 Link to non-existent image page with caption should use caption as link text
11886 [[:Image:test|caption]]
11888 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
11893 Frameless image caption with a free URL
11895 [[File:Foobar.jpg|http://example.com]]
11897 <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>
11900 <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>
11904 Thumbnail image caption with a free URL
11908 [[File:Foobar.jpg|thumb|http://example.com]]
11910 <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>
11913 <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>
11917 Thumbnail image caption with a free URL and explicit alt
11920 parsoid=wt2html,wt2wt,html2html
11922 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
11924 <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>
11927 <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>
11931 SVG thumbnails with no language set
11934 [[File:Foobar.svg|thumb|caption]]
11936 <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>
11939 <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>
11943 SVG thumbnails with language de
11945 parsoid=wt2html,wt2wt,html2html
11947 [[File:Foobar.svg|thumb|caption|lang=de]]
11949 <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>
11952 <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>
11956 SVG thumbnails with invalid language code
11958 parsoid=wt2html,wt2wt,html2html
11960 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
11962 <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>
11965 <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>
11969 BUG 1887: A ISBN with a thumbnail
11971 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11973 <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>
11976 <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>
11980 BUG 1887: A RFC with a thumbnail
11982 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11984 <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>
11987 <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>
11991 BUG 1887: A mailto link with a thumbnail
11993 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11995 <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>
11998 <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>
12001 # Pending resolution to bug 368
12003 BUG 648: Frameless image caption with a link
12005 [[File:Foobar.jpg|text with a [[link]] in it]]
12007 <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>
12010 <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>
12014 BUG 648: Frameless image caption with a link (suffix)
12016 [[File:Foobar.jpg|text with a [[link]]foo in it]]
12018 <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>
12021 <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>
12025 BUG 648: Frameless image caption with an interwiki link
12027 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
12029 <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>
12032 <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>
12036 BUG 648: Frameless image caption with a piped interwiki link
12038 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
12040 <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>
12043 <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>
12047 Escape HTML special chars in image alt text
12049 [[File:Foobar.jpg|& < > "]]
12051 <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>
12054 <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>
12058 BUG 499: Alt text should have Ӓ, not &1234;
12060 [[File:Foobar.jpg|♀]]
12062 <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>
12065 <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>
12069 Broken image caption with link
12071 parsoid=wt2html,wt2wt,html2html
12073 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
12075 <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.
12078 <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>
12082 Image caption containing another image
12084 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12086 <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>
12089 <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>
12093 Image: caption containing a newline
12095 [[File:Foobar.jpg|This
12098 <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>
12101 <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>
12105 Image: caption containing leading space
12106 (The leading space should not trigger nowiki escaping in wt2wt mode)
12108 [[File:Foobar.jpg|thumb| bar]]
12110 <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>
12113 <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>
12117 Image: caption containing a table
12119 parsoid=wt2html,wt2wt,html2html
12121 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12127 and some more text.]]
12129 <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>
12132 <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
12135 <tr><th>Foo </th><th>Bar</th></tr>
12138 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12142 Bug 3090: External links other than http: in image captions
12144 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12146 <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>
12149 <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>
12155 parsoid=wt2html,wt2wt,html2html
12157 [[Image:foobar.jpg|a|class=b]]
12159 <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>
12162 <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>
12166 Localized image handling (1).
12168 parsoid=wt2html,wt2wt,html2html
12171 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12173 <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>
12176 <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>
12180 Localized image handling (2).
12183 parsoid=wt2html,wt2wt,html2html
12186 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12188 <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>
12191 <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>
12195 "border", "frameless" and "class" attributes on an image.
12198 parsoid=wt2html,wt2wt,html2html
12200 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12202 <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>
12205 <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>
12208 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12210 Invalid image attributes (bug 62500)
12213 parsoid=wt2html,wt2wt,html2html
12215 [[File:Foobar.jpg|thumb|float|left|caption]]
12217 [[File:Foobar.jpg|thumb|righ|caption]]
12219 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12221 <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>
12222 <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>
12223 <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>
12226 <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>
12227 <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>
12228 <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>
12234 #REDIRECT [[File:Barfoo.jpg]]
12237 # FIXME: Parsoid should run this test -- but we'd need to teach the
12238 # mockAPI about the redirected Barfoo.jpg image.
12242 [[Image:Barfoo.jpg]]
12244 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12249 Missing image with uploads disabled
12253 [[File:Foobaz.jpg]]
12255 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12258 <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>
12261 # Parsoid-specific testing for images
12262 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12263 # Currently imperfect due to a flaw in the Parsoid testrunner
12265 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12269 Parsoid-specific image handling - simple image with size and middle alignment
12271 [[File:Foobar.jpg|middle|50px]]
12273 <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>
12277 Parsoid-specific image handling - simple image with size, middle alignment,
12278 non-standard namespace alias
12280 parsoid=wt2wt,wt2html,html2html
12282 [[Image:Foobar.jpg|middle|50px]]
12284 <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>
12288 Parsoid-specific image handling - simple image with size and middle alignment
12291 [[File:Foobar.jpg|50px|middle]]
12293 <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>
12297 Parsoid-specific image handling - simple image with size and middle alignment
12298 and non-standard namespace name
12300 parsoid=wt2html,wt2wt,html2html
12302 [[Image:Foobar.jpg|50px|middle]]
12304 <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>
12308 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12310 [[File:Foobar.jpg|500x10px|baseline|caption]]
12312 <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>
12316 Parsoid-specific image handling - simple image with border and size spec
12318 [[File:Foobar.jpg|50px|border|caption]]
12320 <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>
12324 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12326 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12328 <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>
12332 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12335 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12337 <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>
12341 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12343 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12345 <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>
12349 Parsoid-specific image handling - thumbnail with specific size, halign,
12350 valign, and caption (existing content)
12352 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12354 <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>
12358 Parsoid-specific image handling - framed image with specific size and caption
12361 parsoid=wt2html,wt2wt,html2html
12363 [[File:Foobar.jpg|frame|500x50px|caption]]
12365 <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>
12369 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12372 parsoid=wt2html,wt2wt,html2html
12374 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12376 <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>
12380 Parsoid-specific image handling - frameless image with specific size, border, and caption
12382 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12384 <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>
12388 Parsoid-specific image handling - simple image with a formatted caption
12390 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12392 <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>
12396 Parsoid-specific image handling - caption with a template in it
12398 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12400 <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>
12404 Parsoid-specific image handling - caption with unbalanced tags in it
12406 parsoid=wt2html,wt2wt,html2html
12409 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12413 <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>
12418 Parsoid-specific image handling - empty caption (1)
12420 parsoid=wt2html,wt2wt
12422 [[File:Foobar.jpg|thumb|]]
12424 <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>
12427 # empty captions don't get serialized unless we're in the "round trip" case
12429 Parsoid-specific image handling - empty caption (2)
12433 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12434 <a href="File:Foobar.jpg">
12435 <img resource="./File:Foobar.jpg"
12436 src="//example.com/images/3/3a/Foobar.jpg"
12437 height="25" width="220"/>
12439 <figcaption></figcaption>
12442 [[File:Foobar.jpg|thumb]]
12446 Parsoid-specific image handling - whitespace caption
12448 [[File:Foobar.jpg|thumb| ]]
12450 <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>
12454 Parsoid-specific image handling - lang option
12457 [[File:Foobar.svg|lang=de|caption]]
12461 <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>
12470 Subpage test/subpage
12478 subpage title=[[Subpage test]]
12482 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12487 Subpage noslash link
12489 subpage title=[[Subpage test]]
12493 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12498 Subpage test/1/2/subpage
12504 Relative subpage noslash link
12506 parsoid=wt2wt,wt2html,html2html
12507 subpage title=[[Subpage test/1/2/3/4]]
12513 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
12514 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
12517 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
12518 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12522 Parsoid: dot-slash prefixed wikilinks
12532 </p><p>[[././baz/]]
12537 </p><p>[[././baz/]]
12542 Render invalid page names as plain text (bug 51090)
12555 [[{{echo|./../foo}}|bar]]
12556 [[{{echo|foo/.}}|bar]]
12557 [[{{echo|foo/..}}|bar]]
12558 [[{{echo|foo~~~~bar}}]]
12559 [[{{echo|foo>bar}}]]
12560 [[{{echo|foo././bar}}]]
12561 [[{{echo|foo{bar}}]]
12562 [[{{echo|foo}bar}}]]
12563 [[{{echo|foo[bar}}]]
12564 [[{{echo|foo]bar}}]]
12565 [[{{echo|foo<bar}}]]
12567 <p>[[./../foo|bar]]
12577 </p><p>[[./../foo|bar]]
12590 <p>[[./../foo|bar]]
12601 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12602 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12603 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12604 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12605 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12606 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12607 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12608 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12609 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12610 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12611 [[<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>
12619 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12624 BUG 561: {{/Subpage}}
12626 subpage title=[[Page]]
12630 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12638 Category:MediaWiki User's Guide
12646 [[:Category:MediaWiki User's Guide]]
12648 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12657 [[Category:MediaWiki User's Guide]]
12659 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12663 PAGESINCATEGORY invalid title fatal (r33546 fix)
12665 {{PAGESINCATEGORY:<bogus>}}
12672 Category with different sort key
12676 [[Category:MediaWiki User's Guide|Foo]]
12678 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12682 Category with identical sort key
12686 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12688 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12692 Category with empty sort key
12697 [[Category:MediaWiki User's Guide|]]
12699 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12703 Category with empty sort key and parentheses
12708 [[Category:Foo (bar)|]]
12710 [[Category:Foo (bar)|Foo]]
12714 Category with link tail
12719 123[[Category:Foo]]456
12721 123[[Category:Foo]]456
12725 Category with template
12730 [[Category:{{echo|Foo}}]]
12732 [[Category:{{echo|Foo}}]]
12736 Category with template in sort key
12741 [[Category:Foo|{{echo|Bar}}]]
12743 [[Category:Foo|{{echo|Bar}}]]
12747 Category with template in sort key and title
12752 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12754 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12758 Category / paragraph interactions
12760 Foo [[Category:Baz]] Bar
12762 Foo [[Category:Baz]]
12770 [[Category:Baz]] Bar
12783 {{echo|[[Category:Baz]]}}
12798 Parsoid: Serialize link to category page with colon escape
12804 [[:Category:Foo|Bar]]
12807 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
12808 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
12813 Parsoid: Link prefix/suffixes aren't applied to category links
12815 parsoid=wt2html,wt2wt,html2html
12820 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
12824 Parsoid: Serialize link to file page with colon escape
12830 [[:File:Foo.png|Bar]]
12833 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
12834 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
12839 Parsoid: Serialize a genuine category link without colon escape
12844 [[Category:Foo|Bar]]
12846 <link rel="mw:PageProp/Category" href="Category:Foo">
12847 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
12851 Normalize hrefs properly before testing for invalid link targets (bug 70894)
12855 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
12857 [[Category:Toxine bactérienne]]
12861 Parsoid: Defaultsort
12865 {{DEFAULTSORT:Foo}}
12867 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
12871 ### Inter-language links
12874 Interlanguage links
12882 es:Alimento fr:Nourriture zh:食品
12884 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
12885 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
12886 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
12890 Duplicate interlanguage links (bug 24502)
12901 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
12902 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
12903 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
12904 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
12911 Basic section headings
12918 ===Smaller headline===
12921 <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>
12924 <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>
12927 <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>
12933 Section headings with TOC
12936 === Subheadline 1 ===
12937 ===== Skipping a level =====
12938 ====== Skipping a level ======
12942 ===Another headline===
12944 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12946 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
12948 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
12950 <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>
12952 <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>
12959 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
12961 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
12967 <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>
12968 <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>
12969 <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>
12970 <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>
12971 <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>
12974 <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>
12978 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
12980 Handling of sections up to level 6 and beyond
12983 == Level 2 Heading==
12984 === Level 3 Heading===
12985 ==== Level 4 Heading====
12986 ===== Level 5 Heading=====
12987 ====== Level 6 Heading======
12988 ======= Level 7 Heading=======
12989 ======== Level 8 Heading========
12990 ========= Level 9 Heading=========
12991 ========== Level 10 Heading==========
12993 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12995 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12997 <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>
12999 <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>
13001 <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>
13003 <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>
13005 <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>
13006 <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>
13007 <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>
13008 <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>
13009 <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>
13023 <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>
13024 <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>
13025 <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>
13026 <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>
13027 <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>
13028 <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>
13029 <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>
13030 <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>
13031 <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>
13032 <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>
13037 TOC regression (bug 9764)
13041 ==== title 1.1.1 ====
13046 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13048 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13050 <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>
13052 <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>
13055 <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>
13058 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13060 <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>
13066 <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>
13067 <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>
13068 <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>
13069 <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>
13070 <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>
13071 <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>
13076 TOC with wgMaxTocLevel=3 (bug 6204)
13082 ==== title 1.1.1 ====
13087 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13089 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13091 <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>
13092 <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>
13095 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13097 <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>
13103 <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>
13104 <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>
13105 <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>
13106 <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>
13107 <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>
13108 <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>
13113 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13119 ====Section 1.1.1====
13120 ====Section 1.1.1.1====
13123 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13125 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13127 <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>
13130 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13134 <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>
13135 <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>
13136 <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>
13137 <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>
13138 <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>
13144 Resolving duplicate section names
13149 <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>
13150 <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>
13155 Resolving duplicate section names with differing case (bug 10721)
13160 <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>
13161 <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>
13173 Template with sections, __NOTOC__
13180 <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>
13181 <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>
13182 <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>
13183 <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>
13188 __NOEDITSECTION__ keyword
13194 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13195 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13200 Link inside a section heading
13202 ==Section with a [[Main Page|link]] in it==
13204 <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>
13209 TOC regression (bug 12077)
13216 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13218 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13220 <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>
13223 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13227 <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>
13228 <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>
13229 <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>
13234 BUG 1219 URL next to image (good)
13236 http://example.com [[Image:foobar.jpg]]
13238 <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>
13243 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13246 The line above must have a trailing space!
13249 But just in case it doesn't...
13251 <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>
13252 <p>The line above must have a trailing space!
13254 <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>
13255 <p>But just in case it doesn't...
13260 Header with special characters (bug 25462)
13262 The tooltips shall not show entities to the user (ie. be double escaped)
13279 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13281 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13283 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13284 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13285 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13286 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13287 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13291 <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>
13294 <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>
13297 <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>
13300 <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>
13303 <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>
13309 Header with space, plus and underscore as entity
13311 Id should not contain + for spaces
13313 == Space between Text ==
13316 == Space-Entity between Text ==
13319 == Plus+between+Text ==
13322 == Plus-Entity+between+Text ==
13325 == Underscore_between_Text ==
13328 == Underscore-Entity_between_Text ==
13331 [[#Space between Text]]
13332 [[#Space-Entity between Text]]
13333 [[#Plus+between+Text]]
13334 [[#Plus-Entity+between+Text]]
13335 [[#Underscore_between_Text]]
13336 [[#Underscore-Entity_between_Text]]
13338 <p>Id should not contain + for spaces
13340 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13342 <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>
13343 <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>
13344 <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>
13345 <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>
13346 <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>
13347 <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>
13351 <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>
13354 <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>
13357 <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>
13360 <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>
13363 <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>
13366 <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>
13368 </p><p><a href="#Space_between_Text">#Space between Text</a>
13369 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13370 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13371 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13372 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13373 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13378 Headers with excess '=' characters
13379 (Are similar tests necessary beyond the 1st level?)
13383 =''italic'' heading==
13384 ==''italic'' heading=
13386 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13388 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13389 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13390 <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>
13391 <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>
13395 <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>
13396 <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>
13397 <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>
13398 <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>
13403 HTML headers vs TOC (bug 23393)
13404 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13416 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13418 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13420 <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>
13421 <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>
13424 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13426 <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>
13427 <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>
13433 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13434 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13435 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13436 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13437 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13438 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13443 Single-line or multiline-comments can follow headings
13445 parsoid=wt2html,wt2wt
13453 <h2><span class="mw-headline" id="foo">foo</span></h2>
13454 <h2><span class="mw-headline" id="bar">bar</span></h2>
13455 <h2><span class="mw-headline" id="baz">baz</span></h2>
13460 BUG 1219 URL next to image (broken)
13462 http://example.com[[Image:foobar.jpg]]
13464 <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>
13469 Bug 1186 news: in the middle of text
13471 http://en.wikinews.org/wiki/Wikinews:Workplace
13473 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13479 Namespaced link must have a title
13488 Namespaced link must have a title (bad fragment version)
13490 [[Project:#fragment]]
13492 <p>[[Project:#fragment]]
13498 ### HTML tags and HTML attributes
13502 div with no attributes
13504 <div>HTML rocks</div>
13506 <div>HTML rocks</div>
13511 div with double-quoted attribute
13513 <div id="rock">HTML rocks</div>
13515 <div id="rock">HTML rocks</div>
13520 div with single-quoted attribute
13522 <div id='rock'>HTML rocks</div>
13524 <div id="rock">HTML rocks</div>
13529 div with unquoted attribute
13531 <div id=rock>HTML rocks</div>
13533 <div id="rock">HTML rocks</div>
13538 div with illegal double attributes
13540 <div id="a" id="b">HTML rocks</div>
13542 <div id="b">HTML rocks</div>
13546 # FIXME: produce empty string instead of "class" in the PHP parser, following
13549 div with empty attribute value, space before equals
13553 <div class =>HTML rocks</div>
13555 <div class="">HTML rocks</div>
13560 div with multiple empty attribute values
13564 <div id= title=>HTML rocks</div>
13566 <div id="" title="">HTML rocks</div>
13571 table with multiple empty attribute values
13579 <table title="" id="">
13580 <tbody><tr><td> hi</td></tr>
13585 div with braces in attribute value
13587 <div title="{}">Foo</div>
13589 <div title="{}">Foo</div>
13592 <div title="{}">Foo</div>
13595 # This it very inconsistent in the PHP parser: it returns
13596 # class="class" if there is a space between the name and the equal sign (see
13597 # 'div with empty attribute value, space before equals'), but strips the
13598 # attribute completely if the space is missing. We hope that not much content
13599 # depends on this, so are implementing the behavior below in Parsoid for
13600 # consistencies' sake.
13601 # FIXME: fix this behavior in the PHP parser?
13603 div with empty attribute value, no space before equals
13605 parsoid=wt2html,html2html
13607 <div class=>HTML rocks</div>
13609 <div>HTML rocks</div>
13612 <div class="">HTML rocks</div>
13616 HTML multiple attributes correction
13618 <p class="error" class="awesome">Awesome!</p>
13620 <p class="awesome">Awesome!</p>
13625 Table multiple attributes correction
13628 !+ class="error" class="awesome"| status
13633 <th class="awesome"> status
13641 <DIV ID="x">HTML ROCKS</DIV>
13643 <div id="x">HTML ROCKS</div>
13648 Non-ASCII pseudo-tags are rendered as text
13657 Pseudo-tag with URL 'name' renders as url link
13659 <http://example.com/>
13661 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13666 text with amp in the middle of nowhere
13670 <p>Remember AT&T?
13675 text with character entity: eacute
13677 I always thought é was a cute letter.
13679 <p>I always thought é was a cute letter.
13682 <p>I always thought é was a cute letter.</p>
13686 text with entity-escaped character entity-like string: eacute
13688 I always thought &eacute; was a cute letter.
13690 <p>I always thought &eacute; was a cute letter.
13695 text with undefined character entity: xacute
13697 I always thought &xacute; was a cute letter.
13699 <p>I always thought &xacute; was a cute letter.
13703 # TODO: generalize to PHP parser?
13709 <data value="5">five</data>
13710 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13711 <mark>This highlighted text</mark>
13713 <p><data value="5">five</data>
13714 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13715 <mark>This highlighted text</mark></p>
13719 HTML tag with leading space is parsed as text
13723 <p>< div>foo< /div>
13728 ### Nesting tests (see bug 41545, 50604, 51081)
13731 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13732 # Note that html2wt is considerably more difficult if we use <b> in
13733 # the test case, instead of <big>
13735 Ensure that HTML adoption agency algorithm is properly implemented.
13737 <big>X<big>Y</big>Z</big>
13739 <p><big>X<big>Y</big>Z</big>
13743 # This was bug 41545 in the PHP parser.
13744 # Note that tidy doesn't handle this correctly.
13748 <kbd>X<kbd>Y</kbd>Z</kbd>
13750 <p><kbd>X<kbd>Y</kbd>Z</kbd>
13754 # The following cases were bug 51081 in the PHP parser.
13755 # Note that there are some other nestable tags (b, i, etc) which are
13756 # not covered; see bug 51081 for discussion.
13758 # Note that tidy doesn't handle this correctly.
13762 <em>X<em>Y</em>Z</em>
13764 <p><em>X<em>Y</em>Z</em>
13768 # Note that tidy doesn't handle this correctly.
13770 Nesting of <strong>
13772 <strong>X<strong>Y</strong>Z</strong>
13774 <p><strong>X<strong>Y</strong>Z</strong>
13783 <p><q>X<q>Y</q>Z</q></p>
13786 # Note that tidy doesn't handle this correctly.
13790 <ruby>X<ruby>Y</ruby>Z</ruby>
13792 <p><ruby>X<ruby>Y</ruby>Z</ruby>
13796 # Note that tidy doesn't handle this correctly.
13800 <bdo>X<bdo>Y</bdo>Z</bdo>
13802 <p><bdo>X<bdo>Y</bdo>Z</bdo>
13814 [[Media:Foobar.jpg]]
13816 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
13821 Media link with text
13823 [[Media:Foobar.jpg|A neat file to look at]]
13825 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
13829 # FIXME: this is still bad HTML tag nesting
13831 Media link with nasty text
13832 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
13834 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
13836 <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>
13839 <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>
13843 Media link to nonexistent file (bug 1702)
13845 [[Media:No such.jpg]]
13847 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
13852 Image link to nonexistent file (bug 1850 - good)
13854 [[File:No_such.jpg]]
13856 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
13859 <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>
13863 :Image link to nonexistent file (bug 1850 - bad)
13865 [[:Image:No such.jpg]]
13867 <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>
13870 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
13876 Character reference normalization in link text (bug 1938)
13878 [[Main Page|this&that]]
13880 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
13887 Test for unicode normalization
13889 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
13893 (bug 19451) Links should refer to the normalized form.
13901 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13902 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13903 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13904 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13905 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13910 Empty attribute crash test (bug 2067)
13912 <font color="">foo</font>
13914 <p><font color="">foo</font>
13919 Empty attribute crash test single-quotes (bug 2067)
13921 <font color=''>foo</font>
13923 <p><font color="">foo</font>
13928 Attribute test: equals, then nothing
13930 <font color=>foo</font>
13932 <p><font>foo</font>
13937 Attribute test: unquoted value
13939 <font color=x>foo</font>
13941 <p><font color="x">foo</font>
13946 Attribute test: unquoted but illegal value (hash)
13948 <font color=#x>foo</font>
13950 <p><font color="#x">foo</font>
13955 Attribute test: no value
13957 <font color>foo</font>
13959 <p><font color="color">foo</font>
13964 Bug 2095: link with three closing brackets
13968 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
13971 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
13975 Bug 2095: link with pipe and three closing brackets
13977 [[Main Page|link]]]
13979 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
13982 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
13986 Bug 2095: link with pipe and three closing brackets, version 2
13988 [[Main Page|[http://example.com/]]]
13990 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
13993 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
14002 Template:Dangerous attribute
14004 " onmouseover="alert(document.cookie)
14008 Template:Dangerous style attribute
14010 border-size: expression(alert(document.cookie))
14016 <div style="float: right; {{{1}}}">Magic div</div>
14020 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
14022 <div title="{{test}}"></div>
14024 <div title="This is a test template"></div>
14028 # Parsoid has enough context to handle this case
14030 Bug 2304: HTML attribute safety (dangerous template; 2309)
14032 <div title="{{dangerous attribute}}"></div>
14034 <div title=""></div>
14037 <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>
14041 Bug 2304: HTML attribute safety (dangerous style template; 2309)
14043 <div style="{{dangerous style attribute}}"></div>
14045 <div style="/* insecure input */"></div>
14050 Bug 2304: HTML attribute safety (safe parameter; 2309)
14052 {{div style|width: 200px}}
14054 <div style="float: right; width: 200px">Magic div</div>
14059 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
14061 {{div style|width: expression(alert(document.cookie))}}
14063 <div style="/* insecure input */">Magic div</div>
14068 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14070 {{div style|"><script>alert(document.cookie)</script>}}
14072 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14077 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14079 {{div style|" ><script>alert(document.cookie)</script>}}
14081 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14086 Bug 2304: HTML attribute safety (link)
14088 <div title="[[Main Page]]"></div>
14090 <div title="[[Main Page]]"></div>
14095 Bug 2304: HTML attribute safety (italics)
14097 <div title="''foobar''"></div>
14099 <div title="''foobar''"></div>
14104 Bug 2304: HTML attribute safety (bold)
14106 <div title="'''foobar'''"></div>
14108 <div title="'''foobar'''"></div>
14114 Bug 2304: HTML attribute safety (ISBN)
14116 <div title="ISBN 1234567890"></div>
14118 <div title="ISBN 1234567890"></div>
14123 Bug 2304: HTML attribute safety (RFC)
14125 <div title="RFC 1234"></div>
14127 <div title="RFC 1234"></div>
14132 Bug 2304: HTML attribute safety (PMID)
14134 <div title="PMID 1234567890"></div>
14136 <div title="PMID 1234567890"></div>
14141 Bug 2304: HTML attribute safety (web link)
14143 <div title="http://example.com/"></div>
14145 <div title="http://example.com/"></div>
14150 Bug 2304: HTML attribute safety (named web link)
14152 <div title="[http://example.com/ link]"></div>
14154 <div title="[http://example.com/ link]"></div>
14159 Bug 3244: HTML attribute safety (extension; safe)
14161 <div style="<nowiki>background:blue</nowiki>"></div>
14163 <div style="background:blue"></div>
14168 Bug 3244: HTML attribute safety (extension; unsafe)
14170 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14172 <div style="/* insecure input */"></div>
14176 # More MSIE fun discovered by Tom Gilder
14179 MSIE CSS safety test: spurious slash
14181 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14183 <div style="/* insecure input */">evil</div>
14188 MSIE CSS safety test: hex code
14190 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14192 <div style="/* insecure input */">evil</div>
14197 MSIE CSS safety test: comment in url
14199 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14201 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14206 MSIE CSS safety test: comment in expression
14208 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14210 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14215 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14217 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14219 <p style="/* invalid control char */">A</p>
14224 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14226 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14227 <div style="top:EXPRESSION(alert())">B</div>
14229 <p style="/* insecure input */">A</p>
14230 <div style="/* insecure input */">B</div>
14235 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14237 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14238 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14240 <div style="/* insecure input */">A</div>
14241 <p style="/* insecure input */">B</p>
14246 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14248 <div style="background-image:url⁽javascript:alert())">A</div>
14249 <div style="background-image:url₍javascript:alert())">B</div>
14250 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14252 <div style="/* insecure input */">A</div>
14253 <div style="/* insecure input */">B</div>
14254 <p style="/* insecure input */">C</p>
14262 title="data:text/html,<img src=1 onerror=alert(1)>"
14263 style="-o-link:attr(title);-o-link-source:current">X</div>
14265 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14270 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14272 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14273 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14274 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14275 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14276 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14277 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14278 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14280 <p style="/* insecure input */">A</p>
14281 <p style="/* insecure input */">B</p>
14282 <p style="/* insecure input */">C</p>
14283 <p style="/* insecure input */">D</p>
14284 <p style="/* insecure input */">E</p>
14285 <p style="/* insecure input */">F</p>
14286 <p style="/* insecure input */">G</p>
14291 Table attribute legitimate extension
14294 !+ style="<nowiki>color:blue</nowiki>"| status
14299 <th style="color:blue"> status
14305 Table attribute safety
14308 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14313 <th style="/* insecure input */"> status
14319 CSS line continuation 1
14321 <div style="background-image: u\ rl(test.jpg);"></div>
14323 <div style="/* insecure input */"></div>
14328 CSS line continuation 2
14330 <div style="background-image: u\ rl(test.jpg); "></div>
14332 <div style="/* insecure input */"></div>
14343 Expansion of multi-line templates in attribute values (bug 6255)
14345 <div style="background: {{identity|#00FF00}}">-</div>
14347 <div style="background: #00FF00">-</div>
14353 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14355 <div style="background:
14358 <div style="background: #00FF00">-</div>
14361 <div style="background:
14366 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14368 <div style="background: #00FF00">-</div>
14370 <div style="background: #00FF00">-</div>
14375 evil <math>-wiki-tags without Extension:Math enabled
14377 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14379 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14383 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14386 Parser hook: empty input
14399 Parser hook: empty input using terminated empty elements
14412 Parser hook: empty input using terminated empty elements (space before)
14425 Parser hook: basic input
14439 Parser hook: case insensitive
14453 Parser hook: case insensitive, redux
14466 Parser hook: nested tags
14470 <tag><tag></tag></tag>
14481 Parser hook: basic arguments
14483 <tag width=200 height = "100" depth = '50' square></tag>
14491 'square' => 'square',
14498 Parser hook: argument containing a forward slash (bug 5344)
14500 <tag filename='/tmp/bla'></tag>
14505 'filename' => '/tmp/bla',
14512 Parser hook: empty input using terminated empty elements (bug 2374)
14525 # </tag> should be output literally since there is no matching tag that begins it
14527 Parser hook: basic arguments using terminated empty elements (bug 2374)
14529 <tag width=200 height = "100" depth = '50' square/>
14539 'square' => 'square',
14548 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14552 Parser hook: static parser hook not inside a comment
14554 <statictag>hello, world</statictag>
14555 <statictag action=flush/>
14563 Parser hook: static parser hook inside a comment
14565 <!-- <statictag>hello, world</statictag> -->
14566 <statictag action=flush/>
14572 # Nested template calls; this case was broken by Parser.php rev 1.506,
14576 Template:One-parameter
14578 (My parameter is: {{{1}}})
14582 Template:Map-one-parameter
14584 {{{{{1}}}|{{{2}}}}}
14588 Nested template calls
14590 {{Map-one-parameter|One-parameter|param}}
14592 <p>(My parameter is: param)
14601 # HTML+Tidy effectively strips out the empty tags completely
14602 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14603 # which Tidy would have done for the PHP parser had there been content inside it.
14605 Sanitizer: Closing of open tags
14607 <s></s><table></table>
14609 <s></s><table></table>
14612 <p><s></s></p><table></table>
14616 Sanitizer: Closing of open but not closed tags
14625 Sanitizer: Closing of closed but not open tags
14634 Sanitizer: Closing of closed but not open table tags
14636 Table not started</td></tr></table>
14638 <p>Table not started</td></tr></table>
14643 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14645 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14647 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14651 # In HTML5, the restrictions are that id must contain at least one character,
14652 # and must not contain any space characters.
14654 Sanitizer: Validating the contents of the id attribute (bug 4515)
14658 <br id="" /><br id="a space" />
14663 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
14665 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14669 <br id="foo" /><br id="foo" />
14671 Something need to be done. foo-2 ?
14675 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14678 <meta itemprop="hello" content="world">
14679 <meta http-equiv="refresh" content="5">
14680 <meta itemprop="hello" http-equiv="refresh" content="5">
14681 <link itemprop="hello" href="{{SERVER}}">
14682 <link rel="stylesheet" href="{{SERVER}}">
14683 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14686 <div itemscope="itemscope">
14687 <p> <meta itemprop="hello" content="world" />
14688 <meta http-equiv="refresh" content="5">
14689 <meta itemprop="hello" content="5" />
14691 <link itemprop="hello" href="http://example.org" />
14692 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14693 <link itemprop="hello" href="http://example.org" />
14699 Language converter: output gets cut off unexpectedly (bug 5757)
14703 this bit is safe: }-
14705 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14707 then we get cut off here: }-
14709 all additional text is vanished
14711 <p>this bit is safe: }-
14712 </p><p>but if we add a conversion instance: xxx
14713 </p><p>then we get cut off here: }-
14714 </p><p>all additional text is vanished
14719 Self closed html pairs (bug 5487)
14722 <center><font id="bug" />Centered text</center>
14723 <div><font id="bug2" />In div text</div>
14725 <center><font id="bug" />Centered text</center>
14726 <div><font id="bug2" />In div text</div>
14735 Punctuation: nbsp before exclamation
14739 <p>C'est grave !
14744 Punctuation: CSS !important (bug 11874)
14746 <div style="width:50% !important">important</div>
14748 <div style="width:50% !important">important</div>
14753 Punctuation: CSS ! important (bug 11874; with space after)
14755 <div style="width:50% ! important">important</div>
14757 <div style="width:50% ! important">important</div>
14763 HTML bullet list, closed tags (bug 5497)
14776 <ul data-parsoid='{"stx":"html"}'>
14777 <li data-parsoid='{"stx":"html"}'>One</li>
14778 <li data-parsoid='{"stx":"html"}'>Two</li>
14784 HTML bullet list, unclosed tags (bug 5497)
14796 <ul data-parsoid='{"stx":"html"}'>
14797 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14798 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14804 HTML ordered list, closed tags (bug 5497)
14817 <ol data-parsoid='{"stx":"html"}'>
14818 <li data-parsoid='{"stx":"html"}'>One</li>
14819 <li data-parsoid='{"stx":"html"}'>Two</li>
14825 HTML ordered list, unclosed tags (bug 5497)
14838 <ol data-parsoid='{"stx":"html"}'>
14839 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
14840 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
14846 HTML nested bullet list, closed tags (bug 5497)
14871 HTML nested bullet list, open tags (bug 5497)
14908 HTML nested ordered list, closed tags (bug 5497)
14933 HTML nested ordered list, open tags (bug 5497)
14970 HTML ordered list item with parameters oddity
14972 <ol><li id="fragment">One</li>
14975 <ol><li id="fragment">One</li>
14980 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
14982 bug 5918: autonumbering
14984 [http://first/] [http://second] [ftp://ftp]
14988 [mailto:enclosed@mail.tld With target]
14990 [mailto:enclosed@mail.tld]
14992 mailto:inline@mail.tld
14994 <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>
14995 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
14996 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
14997 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
14998 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
15001 <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>
15002 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
15003 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
15004 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
15005 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
15010 # Security and HTML correctness
15011 # From Nick Jenkins' fuzz testing
15015 Fuzz testing: Parser13
15030 Fuzz testing: Parser14
15035 <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>
15036 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15038 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15044 <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>
15046 <div id="toc" class="toc">
15047 <div id="toctitle">
15051 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15057 Fuzz testing: Parser14-table
15062 <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>
15063 <table style="__TOC__">
15068 <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>
15069 <table style="__TOC__">
15076 # Known to produce bogus xml (extra </td>)
15078 Fuzz testing: Parser16
15107 Fuzz testing: Parser21
15110 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15115 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15125 Fuzz testing: Parser22
15127 http://===r:::https://b
15131 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15139 # Known to produce bad XML for now
15141 Fuzz testing: Parser24
15148 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15149 <br style="onmouseover='alert(document.cookie);' " />
15151 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15156 <u class="|">}}}} >
15157 <br style="onmouseover='alert(document.cookie);'" />
15159 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15168 # Note: the current result listed for this is not what the original one was,
15169 # but the original bug was JavaScript injection, which is fixed in any case.
15170 # It's not clear that the original result listed was any more correct than the
15171 # current one. Original result:
15174 # <li class="||">
15175 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15177 Fuzz testing: Parser25 (bug 6055)
15183 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15185 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15190 Fuzz testing: URL adjacent extension (with space, clean)
15192 http://example.com <nowiki>junk</nowiki>
15194 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15199 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15201 http://example.com<nowiki>junk</nowiki>
15203 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15208 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15210 http://example.com<pre>junk</pre>
15212 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15215 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15222 Fuzz testing: image with bogus manual thumbnail
15224 [[Image:foobar.jpg|thumbnail= ]]
15226 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15229 <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>
15233 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15235 <pre dir=" "></pre>
15237 <pre dir=" "></pre>
15242 Parsing optional HTML elements (Bug 6171)
15247 <td> Some tabular data</td>
15248 <td> More tabular data ...
15249 <td> And yet som tabular data</td>
15255 <td> Some tabular data</td>
15256 <td> More tabular data ...
15257 </td><td> And yet som tabular data</td>
15264 Correct handling of <td>, <tr> (Bug 6171)
15269 <td> Some tabular data</td>
15270 <td> More tabular data ...</td>
15271 <td> And yet som tabular data</td>
15277 <td> Some tabular data</td>
15278 <td> More tabular data ...</td>
15279 <td> And yet som tabular data</td>
15287 Parsing crashing regression (fr:JavaScript)
15291 <p></body></x>
15296 Inline wiki vs wiki block nesting
15302 <p><b>Bold paragraph</b>
15303 </p><p>New wiki paragraph
15307 # FIXME: The current php output is documented
15308 # and desired output is the parsoid target.
15310 Inline HTML vs wiki block nesting
15316 <p><b>Bold paragraph
15317 </p><p>New wiki paragraph</b>
15320 <p><b>Bold paragraph</b>
15321 </p><p>New wiki paragraph
15325 # Original result was this:
15326 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15328 # While that might be marginally more intuitive, maybe, the six-apostrophe
15329 # construct is clearly pathological and the result stated here (which is what
15330 # the parser actually does) is about as reasonable as anything.
15332 Mixing markup for italics and bold
15335 '''bold''''''bold''bolditalics'''''
15337 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15345 Article for special page transclusion test
15349 Special page transclusion
15352 {{Special:Prefixindex/Xyzzyx}}
15354 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15359 Special page transclusion twice (bug 5021)
15362 {{Special:Prefixindex/Xyzzyx}}
15363 {{Special:Prefixindex/Xyzzyx}}
15365 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15366 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15371 Transclusion of default MediaWiki message
15373 {{MediaWiki:Mainpage}}
15380 Transclusion of nonexistent MediaWiki message
15382 {{MediaWiki:Mainpagexxx}}
15384 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15389 Transclusion of MediaWiki message with underscore
15391 {{MediaWiki:history_short}}
15398 Transclusion of MediaWiki message with space
15400 {{MediaWiki:history short}}
15407 Invalid header with following text
15417 Section extraction test (section 0)
15437 Section extraction test (section 1)
15459 Section extraction test (section 2)
15480 Section extraction test (section 3)
15500 Section extraction test (section 4)
15524 Section extraction test (section 5)
15544 Section extraction test (section 6)
15565 Section extraction test (section 7)
15585 Section extraction test (section 8)
15605 Section extraction test (section 9)
15626 Section extraction test (section 10)
15646 Section extraction test (nonexistent section 11)
15665 Section extraction test with bogus heading (section 1)
15670 ==bogus== not a legal section
15674 ==bogus== not a legal section
15678 Section extraction test with bogus heading (section 2)
15683 ==bogus== not a legal section
15690 Section extraction test with comment after heading (section 1)
15702 Section extraction test with comment after heading (section 2)
15714 Section extraction test with bogus <nowiki> heading (section 1)
15719 ==bogus== <nowiki>not a legal section</nowiki>
15723 ==bogus== <nowiki>not a legal section</nowiki>
15727 Section extraction test with bogus <nowiki> heading (section 2)
15732 ==bogus== <nowiki>not a legal section</nowiki>
15739 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
15740 # instead of respecting commented sections
15742 Section extraction prefixed by comment (section 1)
15753 Section extraction prefixed by comment (section 2)
15764 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
15765 # instead of respecting HTML-style headings
15767 Section extraction, mixed wiki and html (section 1)
15783 Section extraction, mixed wiki and html (section 2)
15799 # Formerly testing for bug 3342
15801 Section extraction, heading surrounded by <noinclude>
15805 <noinclude>==unmarked==</noinclude>
15811 # Test behavior of bug 19910
15813 Sectiion with all-equals
15818 The line above must have a trailing space
15821 But just in case it doesn't...
15825 But just in case it doesn't...
15829 Section replacement test (section 0)
15860 Section replacement test (section 1)
15889 Section replacement test (section 2)
15919 Section replacement test (section 3)
15950 Section replacement test (section 4)
15977 Section replacement test (section 5)
16008 Section replacement test (section 6)
16038 Section replacement test (section 7)
16069 Section replacement test (section 8)
16100 Section replacement test (section 9)
16129 Section replacement test (section 10)
16159 Section replacement test with initial whitespace (bug 13728)
16163 Preformatted initial line
16167 Preformatted initial line
16174 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16186 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16199 Section extraction, <pre> around bogus header (bug 10309)
16216 Section replacement, <pre> around bogus header (bug 10309)
16218 noxml replace=2,"xxx"
16239 Handling of 
 in URLs
16243 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16246 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16248 a</a></li></ul></li></ul>
16252 Handling of %0A in URLs
16256 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16259 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16263 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16265 5 quotes, code coverage +1 line
16272 <p><b><i></i></b></p>
16275 # same html as previous, but wikitext adjusted to match parsoid html2wt
16276 # note that wt2html and html2html will put the <i> before the <b>
16278 5 quotes, code coverage +1 line w/ nowiki (1)
16280 parsoid=wt2wt,html2wt
16282 '''''<nowiki/>'''''
16287 <p><b><i></i></b></p>
16290 # same as previous, just swapping the <i> and <b>
16292 5 quotes, code coverage +1 line w/ nowiki (2)
16294 '''''<nowiki/>'''''
16299 <p><i><b></b></i></p>
16303 Special:Search page linking.
16307 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16312 {{!}} is a magic word
16314 {{!}} is a magic word there and {{!}} is still a magic word here
16316 <p>| is a magic word there and | is still a magic word here
16319 <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>
16325 title=[[Parser test]]
16330 * {{FULLPAGENAMEE}}
16332 * {{BASEPAGENAMEE}}
16336 * {{ROOTPAGENAMEE}}
16338 * {{TALKPAGENAMEE}}
16339 * {{SUBJECTPAGENAME}}
16340 * {{SUBJECTPAGENAMEE}}
16343 * {{NAMESPACENUMBER}}
16347 * {{SUBJECTSPACEE}}
16348 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16350 <ul><li> Parser test</li>
16351 <li> Parser_test</li>
16352 <li> Parser test</li>
16353 <li> Parser_test</li>
16354 <li> Parser test</li>
16355 <li> Parser_test</li>
16356 <li> Parser test</li>
16357 <li> Parser_test</li>
16358 <li> Parser test</li>
16359 <li> Parser_test</li>
16360 <li> Talk:Parser test</li>
16361 <li> Talk:Parser_test</li>
16362 <li> Parser test</li>
16363 <li> Parser_test</li>
16371 <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>
16374 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16384 image4 |300px| centre
16385 image5.svg| http://///////
16390 <ul class="gallery mw-gallery-traditional">
16391 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16392 <div class="thumb" style="height: 150px;">Image1.png</div>
16393 <div class="gallerytext">
16396 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16397 <div class="thumb" style="height: 150px;">Image2.gif</div>
16398 <div class="gallerytext">
16403 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16404 <div class="thumb" style="height: 150px;">Image3</div>
16405 <div class="gallerytext">
16408 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16409 <div class="thumb" style="height: 150px;">Image4</div>
16410 <div class="gallerytext">
16415 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16416 <div class="thumb" style="height: 150px;">Image5.svg</div>
16417 <div class="gallerytext">
16418 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16422 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16423 <div class="thumb" style="height: 150px;">* image6</div>
16424 <div class="gallerytext">
16432 Gallery (with options)
16434 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16435 File:Nonexistant.jpg|caption
16436 File:Nonexistant.jpg
16437 image:foobar.jpg|some '''caption''' [[Main Page]]
16439 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16442 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16443 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16444 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16445 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16446 <div class="gallerytext">
16451 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16452 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16453 <div class="gallerytext">
16456 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16457 <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>
16458 <div class="gallerytext">
16459 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16463 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16464 <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>
16465 <div class="gallerytext">
16468 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16469 <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>
16470 <div class="gallerytext">
16480 Gallery with link that has fragment
16483 image:foobar.jpg|link=Main_Page
16484 image:foobar.jpg|link=Main_Page#section
16485 image:foobar.jpg|link=Main Page#section|caption
16488 <ul class="gallery mw-gallery-traditional">
16489 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16490 <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>
16491 <div class="gallerytext">
16494 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16495 <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>
16496 <div class="gallerytext">
16499 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16500 <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>
16501 <div class="gallerytext">
16511 Gallery with wikitext inside caption
16514 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16515 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16518 <ul class="gallery mw-gallery-traditional">
16519 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16520 <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>
16521 <div class="gallerytext">
16522 <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>
16526 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16527 <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>
16528 <div class="gallerytext">
16529 <p>This is a test template
16538 gallery (with showfilename option)
16540 <gallery showfilename>
16541 File:Nonexistant.jpg|caption
16542 File:Nonexistant.jpg
16543 image:foobar.jpg|some '''caption''' [[Main Page]]
16547 <ul class="gallery mw-gallery-traditional">
16548 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16549 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16550 <div class="gallerytext">
16551 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16556 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16557 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16558 <div class="gallerytext">
16559 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16563 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16564 <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>
16565 <div class="gallerytext">
16566 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16567 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16571 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16572 <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>
16573 <div class="gallerytext">
16574 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16583 Gallery (with namespace-less filenames)
16586 File:Nonexistant.jpg
16592 <ul class="gallery mw-gallery-traditional">
16593 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16594 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16595 <div class="gallerytext">
16598 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16599 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16600 <div class="gallerytext">
16603 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16604 <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>
16605 <div class="gallerytext">
16608 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16609 <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>
16610 <div class="gallerytext">
16618 HTML Hex character encoding (spells the word "JavaScript")
16620 parsoid=wt2html,wt2wt,html2html
16622 JavaScript
16624 <p>JavaScript
16629 <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>
16633 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16637 <p>&#xsee;&#XSEE;
16640 <p>&#xsee;&#XSEE;</p>
16644 HTML Hex character encoding mixed case
16646 parsoid=wt2html,wt2wt,html2html
16655 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16659 __FORCETOC__ override
16671 ISBN 978-0-1234-56 789
16673 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16676 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16680 ISBN followed by 5 spaces
16691 ISBN ISBN 1234567890
16693 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16702 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16707 ISBN with empty prefix (parsoid test)
16711 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
16715 Bug 22905: <abbr> followed by ISBN followed by </a>
16717 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
16719 <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>
16728 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
16733 Double RFC with a wiki link
16737 <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>
16746 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
16749 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
16753 Centre-aligned image
16755 [[Image:foobar.jpg|centre]]
16757 <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>
16764 [[Image:foobar.jpg|none]]
16766 <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>
16771 Width + Height sized image (using px) (height is ignored)
16773 [[Image:foobar.jpg|640x480px]]
16775 <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>
16780 Width-sized image (using px, no following whitespace)
16782 [[Image:foobar.jpg|640px]]
16784 <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>
16789 Width-sized image (using px, with following whitespace - test regression from r39467)
16791 [[Image:foobar.jpg|640px ]]
16793 <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>
16798 Width-sized image (using px, with preceding whitespace - test regression from r39467)
16800 [[Image:foobar.jpg| 640px]]
16802 <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>
16807 Image with page parameter
16811 [[File:LoremIpsum.djvu|page=2]]
16813 <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>
16816 <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>
16820 Another italics / bold test
16828 # FIXME: The php output seems broken. It's interleaving some open/close tags.
16834 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
16837 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
16842 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
16844 Images with the "|" character in the comment
16846 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
16848 <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>
16851 <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>
16855 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
16857 <html><script>alert(1);</script></html>
16859 <p><html><script>alert(1);</script></html>
16864 HTML with raw HTML ($wgRawHtml==true)
16868 <html><script>alert(1);</script></html>
16870 <p><script>alert(1);</script>
16875 Parents of subpages, one level up
16877 subpage title=[[Subpage test/L1/L2/L3]]
16881 <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>
16887 Parents of subpages, one level up, not named
16889 subpage title=[[Subpage test/L1/L2/L3]]
16893 <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>
16900 Parents of subpages, two levels up
16902 subpage title=[[Subpage test/L1/L2/L3]]
16908 <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
16909 </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>
16914 Parents of subpages, two levels up, without trailing slash or name.
16916 subpage title=[[Subpage test/L1/L2/L3]]
16925 Parents of subpages, two levels up, with lots of extra trailing slashes.
16927 subpage title=[[Subpage test/L1/L2/L3]]
16931 <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>
16936 Subpage test/L1/L2/L3Sibling
16942 Transclusion of a sibling page (one level up)
16944 subpage title=[[Subpage test/L1/L2/L3]]
16953 Transclusion of a child page
16955 subpage title=[[Subpage test/L1/L2]]
16964 Non-transclusion because of too many up levels
16966 subpage title=[[Subpage test/L1/L2/L3]]
16968 {{../../../../More than parent}}
16970 <p>{{../../../../More than parent}}
16975 Definition list code coverage
16981 <dl><dt> title  </dt>
16983 <dt> title </dt>
16989 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16990 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
16991 <dt>title</dt><dd> def</dd></dl>
16995 Don't fall for the self-closing div
16997 <div>hello world</div/>
16999 <div>hello world</div>
17008 <p>[[:Template:Msg]]
17017 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
17021 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
17023 Always escape literal '>' in output, not just after '<'
17037 <p>This is a test template
17038 This is a test template
17050 Inclusion of !userCanEdit() content
17054 <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>
17060 Out-of-order TOC heading levels
17069 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17071 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17073 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17074 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17077 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17079 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17080 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17086 <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>
17087 <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>
17088 <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>
17089 <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>
17090 <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>
17091 <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>
17097 ISBN with a dummy number
17107 ISBN with space-delimited number
17111 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17117 ISBN with multiple spaces, no number
17136 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17137 </p><p>ISBN 12345678901
17143 ISBN with trailing year (bug 8110)
17145 ISBN 1-234-56789-0 - 2006
17147 ISBN 1 234 56789 0 - 2006
17149 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17150 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17158 {{anchorencode:foo bar©#%n}}
17160 <p>foo_bar.C2.A9.23.25n
17165 anchorencode trims spaces
17167 {{anchorencode: __pretty__please__}}
17174 anchorencode deals with links
17176 {{anchorencode: [[hello|world]] [[hi]]}}
17183 anchorencode deals with templates
17185 {{anchorencode: {{Foo}} }}
17192 anchorencode encodes like the TOC generator: (bug 18431)
17194 === _ +:.3A%3A&&]] ===
17195 {{anchorencode: _ +:.3A%3A&&]] }}
17198 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17199 <p>.2B:.3A.253A.26.26.5D.5D
17204 Bug 6200: blockquotes and paragraph formatting
17225 Bug 8293: Use of center tag ruins paragraph formatting
17246 Parsing of overlapping (improperly nested) inline html tags
17248 <span><s>x</span></s>
17250 <p><span><s>x</span></s></span>
17253 <p><span><s>x</s></span>
17258 ### Language variants related tests
17261 Self-link in language variants
17263 title=[[Dunav]] language=sr
17265 Both [[Dunav]] and [[Дунав]] are names for this river.
17267 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17278 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17280 title=[[Duna]] language=sr
17282 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17284 <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.
17289 Link to a section of a variant of this title shouldn't be parsed as self-link
17291 title=[[Duna]] language=sr
17293 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17295 <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.
17300 Link to pages in language variants
17304 Main Page can be written as [[Маин Паге]]
17306 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17312 Multiple links to pages in language variants
17316 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17318 <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>.
17324 Simple template in language variants
17330 <p>This is a test template
17336 Template with explicit namespace in language variants
17342 <p>This is a test template
17348 Basic test for template parameter in language variants
17352 {{парамтест|param=foo}}
17354 <p>This is a test template with parameter foo
17360 Simple category in language variants
17364 [[Category:МедиаWики Усер'с Гуиде]]
17366 <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>
17383 Don't convert blue categorylinks to another variant (bug 33210)
17387 [[A]][[Category:分类]]
17389 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17394 Stripping -{}- tags (language variants)
17398 Latin proverb: -{Ne nuntium necare}-
17400 <p>Latin proverb: Ne nuntium necare
17406 Prevent conversion with -{}- tags (language variants)
17408 language=sr variant=sr-ec
17410 Latinski: -{Ne nuntium necare}-
17412 <p>Латински: Ne nuntium necare
17418 Prevent conversion of text with -{}- tags (language variants)
17420 language=sr variant=sr-ec
17422 Latinski: -{Ne nuntium necare}-
17424 <p>Латински: Ne nuntium necare
17430 Prevent conversion of links with -{}- tags (language variants)
17432 language=sr variant=sr-ec
17436 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17442 -{}- tags within headlines (within html for parserConvert())
17444 language=sr variant=sr-ec
17448 <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>
17454 Explicit definition of language variant alternatives
17456 language=zh variant=zh-tw
17458 -{zh:China;zh-tw:Taiwan}-, not China
17460 <p>Taiwan, not China
17466 Conversion around HTML tags
17468 language=sr variant=sr-ec
17470 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17471 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17474 <span title="ЛаCтин">ски</span>
17480 Explicit session-wise language variant mapping (A flag and - flag)
17482 language=zh variant=zh-tw
17484 Taiwan is not China.
17485 But -{A|zh:China;zh-tw:Taiwan}- is China,
17486 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17487 and -{China}- is China.
17489 <p>Taiwan is not China.
17490 But Taiwan is Taiwan,
17491 (This should be stripped!)
17492 and China is China.
17497 Explicit session-wise language variant mapping (H flag for hide)
17499 language=zh variant=zh-tw
17501 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17504 <p>(This should be stripped!)
17510 Adding explicit conversion rule for title (T flag)
17512 language=zh variant=zh-tw showtitle
17514 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17517 <p>Should be stripped!
17522 Testing that changing the language variant here in the tests actually works
17524 language=zh variant=zh showtitle
17526 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17529 <p>Should be stripped!
17534 Recursive conversion of alt and title attrs shouldn't clear converter state
17536 language=zh variant=zh-cn showtitle
17538 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17539 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17543 Should be stripped<span title="Exclamation">!</span>
17548 Bug 24072: more test on conversion rule for title
17550 language=zh variant=zh-tw showtitle
17552 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17553 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17556 <p>This should be stripped!
17557 This won't take interferes with the title rule.
17562 Partly disable title conversion if variant == main language code
17564 language=zh variant=zh title=[[ZH]] showtitle
17566 -{T|zh-cn:CN;zh-tw:TW}-
17574 Partly disable title conversion if variant == main language code, more
17576 language=zh variant=zh title=[[ZH]] showtitle
17586 Raw output of variant escape tags (R flag)
17588 language=zh variant=zh-tw
17590 Raw: -{R|zh:China;zh-tw:Taiwan}-
17592 <p>Raw: zh:China;zh-tw:Taiwan
17597 Nested using of manual convert syntax
17599 language=zh variant=zh-hk
17601 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17603 <p>Nested: Hello Hong Kong!
17608 Proper conversion of text in external links
17610 language=sr variant=sr-ec
17612 http://www.google.com
17613 gopher://www.google.com
17614 [http://www.google.com http://www.google.com]
17615 [gopher://www.google.com gopher://www.google.com]
17616 [https://www.google.com irc://www.google.com]
17617 [ftp://www.google.com www.google.com/ftp://dir]
17618 [//www.google.com www.google.com]
17620 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17621 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17622 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17623 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17624 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17625 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17626 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17631 Do not convert roman numbers to language variants
17633 language=sr variant=sr-ec
17637 <p>Фридрих IV је цар.
17642 Unclosed language converter markup "-{"
17653 Don't convert raw rule "-{R|=>}-" to "=>"
17664 Don't break link parsing if language converter markup is in the caption.
17666 language=sr variant=sr-ec
17668 [[Main Page|-{R|main page}-]]
17670 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17674 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17676 Don't break image parsing if language converter markup is in the caption.
17680 [[File:Foobar.jpg|-{R|caption}-]]
17682 <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>
17686 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17688 Don't break list handling if language converter markup is in the item.
17690 language=zh variant=zh-cn
17692 ;-{zh-cn:AAA;zh-tw:BBB}-
17694 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
17701 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17703 Don't break table handling if language converter markup is in the cell.
17705 language=sr variant=sr-ec
17728 Bug 529: Uncovered bullet
17737 # Plain MediaWiki does not remove empty lists, but tidy actually does.
17738 # Templates in Wikipedia rely on this behavior, as tidy has always been
17739 # enabled there. These tests are normally run *without* tidy, so specify the
17740 # full output here.
17741 # To test realistic parsing behavior, apply a tidy-like transformation to both
17742 # the expected output and your parser's output.
17744 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
17746 ******* Foo {{bullet}}
17748 <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>
17754 Bug 529: Uncovered table already at line-start
17777 Bug 529: Uncovered bullet in parser function result
17779 * Foo {{lc:{{bullet}} }}
17787 Bug 5678: Double-parsed template argument
17789 {{lc:{{{1}}}|hello}}
17796 Bug 5678: Double-parsed template invocation
17798 {{lc:{{paramtest {{!}} param = hello }} }}
17800 <p>{{paramtest | param = hello }}
17805 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
17808 title=[[Main Page]]
17810 {{PRVNÍVELKÉ:ěščř}}
17811 {{prvnívelké:ěščř}}
17831 Morwen/13: Unclosed link followed by heading
17838 <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>
17843 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
17850 <h1><span class="mw-headline" id="heading">heading</span></h1>
17855 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
17862 <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>
17877 Paragraphs inside divs (no extra line breaks)
17889 Paragraphs inside divs (extra line break on open)
17904 Paragraphs inside divs (extra line break on close)
17919 Paragraphs inside divs (extra line break on open and close)
17936 Nesting tags, paragraphs on lines which begin with <div>
17938 <div></div><strong>A
17941 <p><strong>A</strong></p>
17942 <p><strong>B</strong></p>
17950 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
17952 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
17954 <blockquote>Line one
17956 Line two</blockquote>
17958 <blockquote>Line one
17959 Line two</blockquote>
17963 <p>Line one Line two</p>
17968 Bug 6200: paragraphs inside blockquotes (extra line break on open)
17973 Line two</blockquote>
17978 Line two</blockquote>
17983 Line two</blockquote>
17987 Bug 6200: paragraphs inside blockquotes (extra line break on close)
17989 <blockquote>Line one
17994 <blockquote>Line one
18007 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
18029 Paragraphs inside blockquotes/divs (no extra line breaks)
18031 <blockquote><div>Line one
18033 Line two</div></blockquote>
18035 <blockquote><div>Line one
18036 Line two</div></blockquote>
18041 Paragraphs inside blockquotes/divs (extra line break on open)
18046 Line two</div></blockquote>
18051 Line two</div></blockquote>
18056 Paragraphs inside blockquotes/divs (extra line break on close)
18058 <blockquote><div>Line one
18061 </div></blockquote>
18063 <blockquote><div>Line one
18066 </div></blockquote>
18071 Paragraphs inside blockquotes/divs (extra line break on open and close)
18077 </div></blockquote>
18083 </div></blockquote>
18088 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18090 wgLinkHolderBatchSize=0
18096 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18097 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18098 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18103 Free external link invading image caption
18105 [[Image:Foobar.jpg|thumb|http://x|hello]]
18107 <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>
18112 Bug 15196: localised external link numbers
18116 [http://en.wikipedia.org/]
18118 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18121 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18125 Multibyte character in padleft
18127 {{padleft:-Hello|7|Æ}}
18134 Multibyte character in padright
18136 {{padright:Hello-|7|Æ}}
18143 formatdate parser function
18145 {{#formatdate:2009-03-24}}
18147 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18152 formatdate parser function, with default format
18154 {{#formatdate:2009-03-24|mdy}}
18156 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18161 Spacing of numbers in formatted dates
18163 {{#formatdate:January 15}}
18165 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18170 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
18172 language=nl title=[[MediaWiki:Common.css]]
18174 {{#formatdate:2009-03-24|dmy}}
18176 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18189 Edit comment with link
18193 I like the [[Main Page]] a lot
18195 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18199 Edit comment with link and link text
18203 I like the [[Main Page|best pages]] a lot
18205 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18209 Edit comment with link and link text with suffix
18213 I like the [[Main Page|best page]]s a lot
18215 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18219 Edit comment with section link (non-local, eg in history list)
18221 comment title=[[Main Page]]
18223 /* External links */ removed bogus entries
18225 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18229 Edit comment with section link and text before it (non-local, eg in history list)
18231 comment title=[[Main Page]]
18233 pre-comment text /* External links */ removed bogus entries
18235 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>
18239 Edit comment with section link (local, eg in diff view)
18241 comment local title=[[Main Page]]
18243 /* External links */ removed bogus entries
18245 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18249 Edit comment with subpage link (bug 14080)
18253 title=[[Subpage test]]
18255 Poked at a [[/subpage]] here...
18257 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18261 Edit comment with subpage link and link text (bug 14080)
18265 title=[[Subpage test]]
18267 Poked at a [[/subpage|neat little page]] here...
18269 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18273 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18276 title=[[Subpage test]]
18278 Poked at a [[/subpage]] here...
18280 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18284 Edit comment with bare anchor link (local, as on diff)
18288 title=[[Main Page]]
18292 <a href="#section">#section</a>
18296 Edit comment with bare anchor link (non-local, as on history)
18299 title=[[Main Page]]
18303 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18307 Anchor starting with underscore
18311 <p><a href="#_ref">One</a>
18316 Id starting with underscore
18318 <div id="_ref"></div>
18320 <div id="_ref"></div>
18325 Space normalisation on autocomment (bug 22784)
18328 title=[[Main Page]]
18330 /* __hello__world__ */
18332 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18336 percent-encoding and + signs in comments (Bug 26410)
18340 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18342 <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>
18345 # Parsoid doesn't support this yet: see bug 73581
18346 # but it *should* omit the 'src' attribute if the image is bad.
18347 # PHP side of tests was disabled in
18348 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
18349 # because of issues in the PHP parserTests infrastructure
18350 # (but the output below is indeed what the PHP side emits)
18352 Bad images - basic functionality
18355 !! DISABLED/html/php
18357 <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>
18361 Bad images - bug 16039: text after bad image disappears
18366 !! DISABLED/html/php
18372 <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>
18377 Verify that displaytitle works (bug #22501) no displaytitle
18381 wgAllowDisplayTitle=true
18382 wgRestrictDisplayTitle=false
18384 this is not the the title
18387 <p>this is not the the title
18392 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18397 wgAllowDisplayTitle=true
18398 wgRestrictDisplayTitle=false
18400 this is not the the title
18401 {{DISPLAYTITLE:whatever}}
18404 <p>this is not the the title
18409 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18414 wgAllowDisplayTitle=true
18415 wgRestrictDisplayTitle=true
18417 this is not the the title
18418 {{DISPLAYTITLE:whatever}}
18421 <p>this is not the the title
18426 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18431 wgAllowDisplayTitle=true
18432 wgRestrictDisplayTitle=true
18434 this is not the the title
18435 {{DISPLAYTITLE:screen}}
18438 <p>this is not the the title
18443 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18448 wgAllowDisplayTitle=false
18450 this is not the the title
18451 {{DISPLAYTITLE:screen}}
18454 <p>this is not the the title
18455 <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>
18460 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18465 wgAllowDisplayTitle=false
18467 this is not the the title
18470 <p>this is not the the title
18475 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18480 wgAllowDisplayTitle=true
18481 wgRestrictDisplayTitle=true
18483 this is not the the title
18484 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18486 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18487 <p>this is not the the title
18492 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18497 wgAllowDisplayTitle=true
18498 wgRestrictDisplayTitle=true
18500 this is not the the title
18501 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18503 <span style="color: red;">s</span>creen
18504 <p>this is not the the title
18509 preload: check <noinclude> and <includeonly>
18513 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18519 preload: check <onlyinclude>
18523 Goodbye <onlyinclude>Hello world</onlyinclude>
18529 preload: can pass tags through if we want to
18533 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18535 <includeonly>Hello world</includeonly>
18539 preload: check that it doesn't try to do tricks
18543 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18545 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18549 Play a bit with r67090 and bug 3158
18551 <div style="width:50% !important"> </div>
18552 <div style="width:50% !important"> </div>
18553 <div style="width:50% !important"> </div>
18554 <div style="border : solid;"> </div>
18556 <div style="width:50% !important"> </div>
18557 <div style="width:50% !important"> </div>
18558 <div style="width:50% !important"> </div>
18559 <div style="border : solid;"> </div>
18562 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18563 <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>
18564 <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>
18565 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></div>
18570 HTML5 data attributes
18572 <span data-foo="bar">Baz</span>
18573 <p data-abc-def_hij="">Quuz</p>
18575 <p><span data-foo="bar">Baz</span>
18577 <p data-abc-def_hij="">Quuz</p>
18582 percent-encoding and + signs in internal links (Bug 26410)
18584 [[User:+%]] [[Page+title%]]
18585 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18586 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
18587 [[%33%45]] [[%33%45+]]
18589 <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>
18590 <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>
18591 <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>
18592 <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>
18595 <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>
18599 Special characters in embedded file links (bug 27679)
18601 [[File:Contains & ampersand.jpg]]
18602 [[File:Does not exist.jpg|Title with & ampersand]]
18604 <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>
18605 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18608 <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>
18609 <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>
18613 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18615 Text's been normalized?
18617 <p>Text's been normalized?
18622 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18624 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18626 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18631 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18633 [http://www.example.org/ ideograms]
18635 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18640 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18642 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18644 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18668 Bug 31098 Template which includes system messages which includes the template
18672 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18673 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18678 Bug31490 Turkish: ucfirst 'blah'
18689 Bug31490 Turkish: ucfirst 'ix'
18700 Bug31490 Turkish: lcfirst 'BLAH'
18711 Bug31490 Turkish: ucfırst (with a dotless i)
18717 <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>
18722 Bug31490 ucfırst (with a dotless i) with English language
18728 <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>
18733 Bug 26375: TOC with italics
18735 title=[[Main Page]]
18738 == ''Lost'' episodes ==
18740 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18742 <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>
18746 <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>
18751 Bug 26375: TOC with bold
18753 title=[[Main Page]]
18756 == '''should be bold''' then normal text ==
18758 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18760 <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>
18764 <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>
18769 Bug 33845: Headings become cursive in TOC when they contain an image
18771 title=[[Main Page]]
18774 == Image [[Image:foobar.jpg]] ==
18776 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18778 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
18782 <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>
18787 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
18789 title=[[Main Page]]
18792 == <blockquote>Quote</blockquote> ==
18794 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18796 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18800 <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>
18803 <div id="toc" class="toc">
18804 <div id="toctitle">
18808 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18811 <h2><span class="mw-headline" id="Quote"></span></h2>
18813 <p><span class="mw-headline" id="Quote">Quote</span></p>
18815 <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>
18819 Unclosed tags in TOC
18821 title=[[Main Page]]
18825 <small>Hanc marginis exiguitas non caperet.</small>
18828 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18830 <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>
18834 <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>
18835 <p><small>Hanc marginis exiguitas non caperet.</small>
18841 Multiple tags in TOC
18844 == <i>Foo</i> <b>Bar</b> ==
18846 == <i>Foo</i> <blockquote>Bar</blockquote> ==
18848 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18850 <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>
18851 <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>
18855 <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>
18856 <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>
18859 <div id="toc" class="toc">
18860 <div id="toctitle">
18864 <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>
18865 <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>
18868 <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>
18869 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
18871 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
18873 <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>
18877 Tags with parameters in TOC
18880 == <sup class="in-h2">Hello</sup> ==
18882 == <sup class="a > b">Evilbye</sup> ==
18884 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18886 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
18887 <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>
18891 <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>
18892 <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>
18897 span tags with directionality in TOC
18900 == <span dir="ltr">C++</span> ==
18902 == <span dir="rtl">זבנג!</span> ==
18904 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
18906 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
18908 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
18910 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18912 <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>
18913 <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>
18914 <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>
18915 <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>
18916 <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>
18920 <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>
18921 <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>
18922 <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>
18923 <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>
18924 <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>
18931 == {{int:headline_sample}} ==
18935 Bug 32057: Title needed when expanding <h> nodes.
18937 title=[[Main Page]]
18941 <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>
18946 Strip marker in urlencode
18948 {{urlencode:x<nowiki/>y}}
18949 {{urlencode:x<nowiki/>y|wiki}}
18950 {{urlencode:x<nowiki/>y|path}}
18977 Strip marker in formatNum
18979 {{formatnum:1<nowiki/>2}}
18980 {{formatnum:1<nowiki/>2|R}}
18988 Check noCommafy in formatNum
18992 {{formatnum:123456.78}}
18993 {{formatnum:123456.78|NOSEP}}
19001 Wrong option for formatNum (bug 56199)
19003 {{formatnum:1,234.56|Random}}
19004 {{formatnum:1,234.56|EVERYTHING}}
19005 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
19014 Strip marker in grammar
19018 {{grammar:elative|foo<nowiki/>bar}}
19025 Strip marker in padleft
19027 {{padleft:|2|x<nowiki/>y}}
19034 Strip marker in padright
19036 {{padright:|2|x<nowiki/>y}}
19043 Strip marker in anchorencode
19045 {{anchorencode:x<nowiki/>y}}
19052 nowiki inside link inside heading (bug 18295)
19054 ==[[foo|x<nowiki>y</nowiki>z]]==
19056 <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>
19061 new support for bdi element (bug 31817)
19063 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19065 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19070 Ignore pipe between table row attributes
19074 |- id=foo | style='color: red'
19082 <tr id="foo" style="color: red">
19089 Gallery override link with WikiLink (bug 34852)
19092 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19095 <ul class="gallery mw-gallery-traditional">
19096 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19097 <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>
19098 <div class="gallerytext">
19108 Gallery override link with absolute external link (bug 34852)
19111 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19114 <ul class="gallery mw-gallery-traditional">
19115 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19116 <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>
19117 <div class="gallerytext">
19127 Gallery override link with malicious javascript (bug 34852)
19130 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19133 <ul class="gallery mw-gallery-traditional">
19134 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19135 <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>
19136 <div class="gallerytext">
19146 Gallery with invalid title as link (bug 43964)
19149 File:foobar.jpg|link=<
19152 <ul class="gallery mw-gallery-traditional">
19153 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19154 <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>
19155 <div class="gallerytext">
19163 Language parser function
19172 Padleft and padright as substr
19174 {{padleft:|3|abcde}}
19175 {{padright:|3|abcde}}
19183 Special parser function
19185 {{#special:RandomPage}}
19186 {{#special:BaDtItLe}}
19187 {{#special:Foobar}}
19196 Bug 34939 - Case insensitive link parsing ([HttP://])
19198 [HttP://MediaWiki.Org/]
19200 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19203 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19207 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19209 [HttP://MediaWiki.Org/ MediaWiki]
19211 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19216 Bug 34939 - Case insensitive link parsing (HttP://)
19218 HttP://MediaWiki.Org/
19220 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19223 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19241 <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>
19242 <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>
19243 <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>
19244 <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>
19245 <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>
19251 ### Parsoid-specific tests
19252 ### Parsoid-PHP parser incompatibilities
19255 1. SOL-sensitive wikitext tokens as template-args
19257 parsoid=wt2html,wt2wt
19263 <span about="#mwt1" typeof="mw:Transclusion">
19264 </span><ul about="#mwt1"><li>a</li>
19266 <span about="#mwt2" typeof="mw:Transclusion">
19267 </span><ol about="#mwt2"><li>a</li>
19269 <span about="#mwt3" typeof="mw:Transclusion">
19270 </span><dl about="#mwt3"><dd>a</dd>
19274 #### -----------------------------------------------------------------
19275 #### Parsoid-specific functionality tests
19276 #### -----------------------------------------------------------------
19278 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19279 # We know wt2wt will fail, but we expect selser to pass.
19280 # Due to the nature of our testing, wt2wt and selser tests will enter the
19281 # blacklist and we'll catch selser regressions based on changes to the
19282 # blacklist entries for selser tests.
19284 1. Bad treebuilder fixup of formatting elt is cleaned up
19286 parsoid=wt2html,wt2wt
19291 [[Image:Foobar.jpg|right|Test]]
19298 <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>
19305 2. Bad treebuilder fixup of formatting elt is cleaned up
19307 parsoid=wt2html,wt2wt
19309 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19311 <small>[[Image:Foobar.jpg|right|300px]]</small>
19314 <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>
19316 <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>
19319 #### ----------------------------------------------------------------
19320 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19321 #### tags. Parsoid's output for these tags differs from that of the
19323 #### ----------------------------------------------------------------
19326 Ref: 1. ref-location should be replaced with an index span
19331 B <ref name="x">foo</ref>
19334 <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>
19335 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>
19336 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>
19340 Ref: 2. ref-tags with identical names should all get the same index
19344 A <ref name="x">foo</ref>
19347 <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>
19348 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>
19352 Ref: 3. spaces in ref-names should be ignored
19356 A <ref name="x">foo</ref>
19357 B <ref name=" x " />
19360 <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>
19361 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>
19362 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>
19365 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19367 Ref: 4. 'constructor' should be accepted as a valid ref-name
19371 A <ref name="constructor">foo</ref>
19373 <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>
19377 Ref: 5. body should accept generic wikitext
19382 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19387 <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>
19389 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19390 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> 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>
19396 Ref: 6. indent-pres should not be output in ref-body
19408 <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>
19410 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19411 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19419 Ref: 7. No p-wrapping in ref-body
19438 <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>
19440 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19441 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19456 Ref: 8. transclusion wikitext has lower precedence
19460 A <ref> foo {{echo|</ref> B C}}
19464 <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>
19465 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19466 <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>
19471 Ref: 9. unclosed comments should not leak out of ref-body
19475 A <ref> foo <!--</ref> B C
19478 <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>
19479 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19480 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <!----></li>
19485 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19489 A <ref> <b> foo </ref> B C
19493 <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>
19496 <ol class="references" typeof="mw:Extension/references" about="#mwt4" 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> <b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></li>
19502 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19509 <p>A <span about="#mwt2" class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B
19510 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>
19514 Ref: 12. ref-tags act as trailing newline migration barrier
19518 <!--the newline at the end of this line moves out of the p-tag-->a
19520 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19525 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19528 <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>
19529 <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>
19535 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19543 <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
19544 <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>
19548 Ref: 14. A nested ref-tag should be emitted as plain text
19552 <ref>foo <ref>bar</ref> baz</ref>
19556 <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>
19558 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19559 <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>
19564 Ref: 15. ref-tags with identical names should get identical indexes
19568 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19569 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19573 <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>
19574 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>
19576 <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>
19580 ## We don't bother wt2wt-ing non-standard whitespace
19582 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
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":{}}'>
19593 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19597 Ref: 17. Generate valid HTML5 id/about attributes
19601 <ref name="a b">foo</ref>
19605 <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>
19608 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19609 <li id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b-1-0">↑</a></span> foo</li>
19613 References: 1. references tag without any refs should be handled properly
19619 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19623 References: 2. references tag with group only outputs references from that group
19627 A <ref group="a">foo</ref>
19628 B <ref group="b">bar</ref>
19630 <references group="a" />
19632 <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>
19633 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>
19635 <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>
19640 References: 3. ref list should be cleared after processing references
19652 <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>
19654 <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>
19657 <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>
19659 <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>
19664 References: 4. only referenced group should be cleared after processing references
19668 A <ref group="a">afoo</ref>
19671 <references group="a" />
19677 <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>
19678 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>
19680 <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>
19683 <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>
19685 <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>
19690 References: 5. ref tags in references should be processed while ignoring all other content
19695 B <ref name="b">bar</ref>
19698 <ref name="a">foo</ref>
19699 This should just get lost.
19702 <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>
19703 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>
19706 <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>
19711 References: 6. <references /> from a transclusion
19715 <ref>Foo</ref> {{echo|<references />}}
19717 <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>
19721 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
19725 A <ref>foo bar for a</ref>
19726 B <ref group="X" name="b" />
19730 <references group="X">
19731 <ref name="b">foo</ref>
19734 <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>
19735 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>
19737 <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>
19739 <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>
19743 Entities in ref name
19747 <ref name="test & me">hi</ref>
19749 <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>
19752 # This test is wt2html only because we're permitting the serializer to produce
19753 # dirty diffs, normalizing the unclosed references to the self-closed version.
19755 Generate references for unclosed references tag
19763 <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>
19766 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19767 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19771 New reference serializes on its own line
19773 parsoid=wt2wt,html2wt
19778 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
19781 #--------- Test stripping of empty nodes in template content ----------
19783 Empty LI and TR nodes should be stripped from template content
19788 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
19792 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
19805 Empty LI and TR nodes should not be stripped from top-level content
19832 Empty TR nodes should not be stripped if they have any attributes set
19834 {{EmptyTRWithHTMLAttrTest}}
19836 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
19837 <tr align="center"></tr>
19838 <tr><td>foo</td></tr>
19839 <tr align="center"></tr>
19840 <tr><td>bar</td></tr>
19844 #### ----------------------------------------------------------------
19845 #### The following section of tests are primarily to test
19846 #### wikitext escaping capabilities of Parsoid. Given that
19847 #### escaping can be done any number of ways, the wikitext (input)
19848 #### is always adjusted to reflect how Parsoid adds nowiki
19851 #### We are marking several tests as parsoid-only since the
19852 #### HTML in the result section is different from what the
19853 #### PHP parser generates for it.
19854 #### ----------------------------------------------------------------
19857 #### --------------- Headings ---------------
19859 #### 1. Nested inside html <h1>=foo=</h1>
19860 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
19861 #### 3. Nested inside html with wikitext split by html tags
19862 #### 4. No escape needed
19863 #### 5. Empty headings <h1></h1>
19864 #### 6. Heading chars in SOL context
19865 #### ----------------------------------------
19867 Headings: 0. Unnested
19871 <nowiki>=foo=</nowiki>
19873 <nowiki> =foo= </nowiki>
19875 <nowiki>=foo=</nowiki>
19877 =foo''a''<nowiki>=</nowiki>
19879 <p><span typeof="mw:Nowiki">=foo=</span></p>
19881 <p><span typeof="mw:Nowiki"> =foo= </span>
19883 <span typeof="mw:Nowiki">=foo=</span></p>
19885 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
19888 # New headings and existing headings are handled differently
19890 Headings: 1. Nested inside html
19900 =<nowiki>=foo=</nowiki>=
19901 ==<nowiki>=foo=</nowiki>==
19902 ===<nowiki>=foo=</nowiki>===
19903 ====<nowiki>=foo=</nowiki>====
19904 =====<nowiki>=foo=</nowiki>=====
19905 ======<nowiki>=foo=</nowiki>======
19912 <h1 data-parsoid=''>=foo=</h1>
19913 <h2 data-parsoid=''>=foo=</h2>
19914 <h3 data-parsoid=''>=foo=</h3>
19915 <h4 data-parsoid=''>=foo=</h4>
19916 <h5 data-parsoid=''>=foo=</h5>
19917 <h6 data-parsoid=''>=foo=</h6>
19921 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
19926 <nowiki>*</nowiki>bar
19932 <nowiki>=bar=</nowiki>
19940 Headings: 3. Nested inside html with wikitext split by html tags
19944 = ='''bold'''<nowiki>foo=</nowiki> =
19946 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
19950 Headings: 4a. No escaping needed (testing just h1 and h2)
19968 = <nowiki>=</nowiki> =
19976 <h1><i>=</i>foo=</h1>
19977 <h1><span typeof="mw:Nowiki">=</span></h1>
19981 Headings: 4b. No escaping needed (inside p-tags)
19996 Headings: 5. Empty headings
20008 =====<nowiki/>=====
20010 ======<nowiki/>======
20021 Headings: 6a. Heading chars in SOL context (with trailing spaces)
20025 <nowiki>=a=</nowiki>
20027 <nowiki>=a=</nowiki>
20029 <nowiki>=a=</nowiki>
20031 <nowiki>=a=</nowiki>
20040 Headings: 6b. Heading chars in SOL context (with trailing newlines)
20068 Headings: 6c. Heading chars in SOL context (leading newline break)
20073 <nowiki>=b=</nowiki>
20080 Headings: 6d. Heading chars in SOL context (with interspersed comments)
20084 <!--c0--><nowiki>=a=</nowiki>
20086 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
20088 <p><!--c0-->=a=</p>
20089 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
20093 Headings: 6d. Heading chars in SOL context (No escaping needed)
20102 #### --------------- Lists ---------------
20103 #### 0. Outside nests (*foo, etc.)
20104 #### 1. Nested inside html <ul><li>*foo</li></ul>
20105 #### 2. Inside definition lists
20106 #### 3. Only bullets at start should be escaped
20107 #### 4. No escapes needed
20108 #### 5. No unnecessary escapes
20109 #### 6. Escape bullets in SOL position
20110 #### 7. Escape bullets in a multi-line context
20111 #### ----------------------------------------
20114 Lists: 0. Outside nests
20116 <nowiki>*</nowiki>foo
20118 <nowiki>#</nowiki>foo
20120 <nowiki>;Foo:</nowiki>bar
20129 Lists: 1. Nested inside html
20131 *<nowiki>*foo</nowiki>
20133 *<nowiki>#foo</nowiki>
20135 *<nowiki>:foo</nowiki>
20137 *<nowiki>;foo</nowiki>
20139 #<nowiki>*foo</nowiki>
20141 #<nowiki>#foo</nowiki>
20143 #<nowiki>:foo</nowiki>
20145 #<nowiki>;foo</nowiki>
20147 <ul><li>*foo</li></ul>
20148 <ul><li>#foo</li></ul>
20149 <ul><li>:foo</li></ul>
20150 <ul><li>;foo</li></ul>
20151 <ol><li>*foo</li></ol>
20152 <ol><li>#foo</li></ol>
20153 <ol><li>:foo</li></ol>
20154 <ol><li>;foo</li></ol>
20159 Lists: 2. Inside definition lists
20161 ;<nowiki>;foo</nowiki>
20163 ;<nowiki>:foo</nowiki>
20165 ;<nowiki>:foo</nowiki>
20168 :<nowiki>:foo</nowiki>
20170 <dl><dt>;foo</dt></dl>
20171 <dl><dt>:foo</dt></dl>
20174 <dl><dd>:foo</dd></dl>
20179 Lists: 3. Only bullets at start of text should be escaped
20181 *<nowiki>*foo*bar</nowiki>
20183 *<nowiki>*foo</nowiki>''it''*bar
20185 <ul><li>*foo*bar</li></ul>
20186 <ul><li>*foo<i>it</i>*bar</li></ul>
20191 Lists: 4. No escapes needed
20212 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20216 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20222 Lists: 5. No unnecessary escapes
20224 * bar <span><nowiki>[[foo]]</nowiki></span>
20226 *=bar <span><nowiki>[[foo]]</nowiki></span>
20228 *[[bar <span><nowiki>[[foo]]</nowiki></span>
20230 *]]bar <span><nowiki>[[foo]]</nowiki></span>
20232 *=bar <span>foo]]</span>=
20236 <ul><li> bar <span>[[foo]]</span></li></ul>
20237 <ul><li>=bar <span>[[foo]]</span></li></ul>
20238 <ul><li>[[bar <span>[[foo]]</span></li></ul>
20239 <ul><li>]]bar <span>[[foo]]</span></li></ul>
20240 <ul><li>=bar <span>foo]]</span>=</li></ul>
20241 <ul><li> <s></s>: a</li></ul>
20246 Lists: 6. Escape bullets in SOL position
20250 <!--cmt--><nowiki>*foo</nowiki>
20252 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
20256 Lists: 7. Escape bullets in a multi-line context
20259 <nowiki>*</nowiki>b
20266 #### --------------- HRs ---------------
20267 #### 1. Single line
20268 #### -----------------------------------
20271 HRs: 1. Single line
20275 ----<nowiki>----</nowiki>
20279 <hr><p><span typeof="mw:Nowiki">----</span></p>
20284 #### --------------- Tables ---------------
20285 #### 1a. Simple example
20286 #### 1b. No escaping needed (!foo)
20287 #### 1c. No escaping needed (|foo)
20288 #### 1d. No escaping needed (|}foo)
20290 #### 2a. Nested in td (<td>foo|bar</td>)
20291 #### 2b. Nested in td (<td>foo||bar</td>)
20292 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20294 #### 3a. Nested in th (<th>foo!bar</th>)
20295 #### 3b. Nested in th (<th>foo!!bar</th>)
20296 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20300 #### 4c. No escaping needed
20301 #### --------------------------------------
20304 Tables: 1a. Simple example
20315 Tables: 1b. No escaping needed
20324 Tables: 1c. No escaping needed
20333 Tables: 1d. No escaping needed
20342 Tables: 2a. Nested in td
20347 |<nowiki>foo|bar</nowiki>
20349 |x<div><nowiki>a|b</nowiki></div>
20353 <td>foo|bar</td></tr>
20354 <tr><td>x<div>a|b</div></td>
20359 Tables: 2b. Nested in td
20364 |<nowiki>foo||bar</nowiki>
20365 |''it''<nowiki>foo||bar</nowiki>
20369 <td><span typeof="mw:Nowiki">foo||bar</span></td>
20370 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
20374 Tables: 2c. Nested in td -- no escaping needed
20382 <table><tbody><tr><td>foo!!bar
20383 </td></tr></tbody></table>
20388 Tables: 3a. Nested in th
20396 <table><tbody><tr><th>foo!bar
20397 </th></tr></tbody></table>
20402 Tables: 3b. Nested in th
20407 !<nowiki>foo!!bar</nowiki>
20411 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
20416 Tables: 3c. Nested in th -- no escaping needed
20421 !<nowiki>foo||bar</nowiki>
20425 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
20429 Tables: 4a. Escape -
20436 |<nowiki>-bar</nowiki>
20440 <tr><th>-bar</th></tr>
20442 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
20446 Tables: 4b. Escape +
20453 |<nowiki>+bar</nowiki>
20457 <tr><th>+bar</th></tr>
20459 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
20463 Tables: 4c. No escaping needed
20484 <tr><td>foo-bar</td><td>foo+bar</td></tr>
20485 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
20491 <div>a|b</div></td>
20496 Tables: 4d. No escaping needed
20507 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
20508 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20509 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
20514 Tables: Digest broken attributes on table and tr tag
20530 #### --------------- Links ----------------
20531 #### 1. Quote marks in link text
20532 #### 2. Wikilinks: Escapes needed
20533 #### 3. Wikilinks: No escapes needed
20534 #### 4. Extlinks: Escapes needed
20535 #### 5. Extlinks: No escapes needed
20536 #### --------------------------------------
20538 Links 1. Quote marks in link text
20542 [[Foo|Foo<nowiki>''boo''</nowiki>]]
20544 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
20548 Links 2. WikiLinks: Escapes needed
20553 [[Foo|<nowiki>Foobar]</nowiki>]]
20554 [[Foo|x [Foobar] x]]
20555 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
20556 [[Foo|<nowiki>[[Bar]]</nowiki>]]
20557 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
20558 [[Foo|<nowiki>|Bar</nowiki>]]
20559 [[Foo|<nowiki>]]bar</nowiki>]]
20560 [[Foo|<nowiki>[[bar</nowiki>]]
20561 [[Foo|<nowiki>x [[ y</nowiki>]]
20562 [[Foo|<nowiki>x ]] y</nowiki>]]
20563 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
20565 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
20566 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
20567 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
20568 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
20569 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
20570 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
20571 <a href="Foo" rel="mw:WikiLink">|Bar</a>
20572 <a href="Foo" rel="mw:WikiLink">]]bar</a>
20573 <a href="Foo" rel="mw:WikiLink">[[bar</a>
20574 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
20575 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
20576 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
20580 Links 3. WikiLinks: No escapes needed
20587 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
20588 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
20592 Links 4. ExtLinks: Escapes needed
20596 [http://google.com <nowiki>[google]</nowiki>]
20597 [http://google.com <nowiki>google]</nowiki>]
20599 <nowiki>[http://google.com]</nowiki>
20601 <nowiki>[http://google.com google]</nowiki>
20604 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
20605 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
20606 <p>[http://google.com]</p>
20607 <p>[http://google.com google]</p>
20611 Links 5. ExtLinks: No escapes needed
20615 [http://google.com [google]
20617 <a href="http://google.com" rel="mw:ExtLink">[google</a>
20621 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
20623 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
20624 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
20625 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
20626 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
20627 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
20628 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
20629 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20630 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
20631 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20632 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
20633 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
20634 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
20635 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
20638 x<nowiki/>http://example.com<nowiki/>y
20639 http://example.com<nowiki/>?x
20640 http://example.com<nowiki/>&x
20641 http://example.com<nowiki/>'x
20642 http://example.com<nowiki/>,x
20643 http://example.com<nowiki/>.x
20644 http://example.com<nowiki/>;x
20645 http://example.com<nowiki/>:x
20646 http://example.com<nowiki/>;x
20647 http://example.com<nowiki/>!x
20648 http://example.com<nowiki/>=x
20649 http://example.com<nowiki/>(x)
20650 http://example.com(x<nowiki/>)
20654 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20657 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
20659 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
20660 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
20661 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
20662 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
20663 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
20669 "http://example.com"
20670 (http://example.com)
20671 (http://example.com) foo
20672 http://example.com,
20673 http://example.com, foo
20676 ## Parsoid currently fails wt2html on this one!
20678 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20680 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
20682 http://example.com.,;:!?
20686 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
20688 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
20694 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
20696 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20697 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20698 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
20699 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
20709 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
20711 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
20717 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
20719 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20720 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20721 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
20722 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
20732 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
20734 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
20735 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
20736 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
20739 ISBN 1234567890<nowiki/>1
20740 ISBN 1234567890<nowiki/>x
20741 ISBN 1234567890<nowiki/>b
20745 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
20747 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
20752 #### --------------- Quotes ---------------
20753 #### 1. Quotes inside <b> and <i>
20754 #### 2. Link fragments separated by <i> and <b> tags
20755 #### 3. Link fragments inside <i> and <b>
20756 #### 4. No escaping needed
20757 #### --------------------------------------
20759 1. Quotes inside <b> and <i>
20761 parsoid=html2wt,wt2wt
20763 ''<nowiki/>'foo'<nowiki/>''
20764 ''<nowiki>''foo''</nowiki>''
20765 ''<nowiki>'''foo'''</nowiki>''
20767 '''<nowiki/>'foo'<nowiki/>'''
20768 '''<nowiki>''foo''</nowiki>'''
20769 '''<nowiki>'''foo'''</nowiki>'''
20770 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
20771 '''foo'''<nowiki/>'s
20774 '<nowiki/>''foo''<nowiki/>'
20775 '<nowiki/>'''foo'''
20776 '''foo'''<nowiki/>'
20777 '<nowiki/>'''foo'''<nowiki/>'
20778 ''fools'<span> errand</span>''
20779 ''<span>fool</span>'s errand''
20788 <b>foo'<i>bar'</i>baz</b>
20796 <i>fools'<span> errand</span></i>
20797 <i><span>fool</span>'s errand</i>
20802 2. Link fragments separated by <i> and <b> tags
20804 [[''foo''<nowiki>hello]]</nowiki>
20806 [['''foo'''<nowiki>hello]]</nowiki>
20808 <p>[[<i>foo</i>hello]]
20809 </p><p>[[<b>foo</b>hello]]
20813 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
20814 # this is one of the shortcomings of this format
20816 3. Link fragments inside <i> and <b>
20818 ''[[foo''<nowiki>]]</nowiki>
20820 '''[[foo'''<nowiki>]]</nowiki>
20823 </p><p><b>[[foo</b>]]
20828 4. No escaping needed
20830 '<span>''bar''</span>'
20831 '<span>'''bar'''</span>'
20833 <p>'<span><i>bar</i></span>'
20834 '<span><b>bar</b></span>'
20838 #### ----------- Paragraphs ---------------
20839 #### 1. No unnecessary escapes
20840 #### --------------------------------------
20843 1. No unnecessary escapes
20845 bar <span><nowiki>[[foo]]</nowiki></span>
20847 =bar <span><nowiki>[[foo]]</nowiki></span>
20849 [[bar <span><nowiki>[[foo]]</nowiki></span>
20851 ]]bar <span><nowiki>[[foo]]</nowiki></span>
20853 =bar <span>foo]]</span><nowiki>=</nowiki>
20855 <p>bar <span>[[foo]]</span>
20856 </p><p>=bar <span>[[foo]]</span>
20857 </p><p>[[bar <span>[[foo]]</span>
20858 </p><p>]]bar <span>[[foo]]</span>
20859 </p><p>=bar <span>foo]]</span>=
20863 #### ----------------------- PRE --------------------------
20864 #### 1. Leading whitespace in SOL context should be escaped
20865 #### ------------------------------------------------------
20867 1. Leading whitespace in SOL context should be escaped
20871 <nowiki> </nowiki>a
20873 <nowiki> </nowiki> a
20875 <nowiki> </nowiki>a(tab)
20877 <nowiki> </nowiki> a
20879 <nowiki> </nowiki> a
20882 <nowiki> </nowiki>b
20885 <nowiki> </nowiki>b
20888 <nowiki> </nowiki> b
20894 <p><!--cmt--> a</p>
20904 2. Leading whitespace in non-indent-pre contexts should not be escaped
20911 <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>
20915 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
20934 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
20938 [[File:Foobar.jpg|thumb|caption]]
20941 <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>
20945 5. Nowiki escaping should account for indent-pres
20954 #### --------------- Behavior Switches --------------------
20956 1. Valid behavior switches should be escaped
20960 <nowiki>__TOC__</nowiki>
20961 ''<nowiki>__TOC__</nowiki>''
20968 2. Invalid behavior switches should not be escaped
20979 #### --------------- HTML tags ---------------
20982 #### 3. multi-line html tag
20983 #### 4. extension tags
20984 #### -----------------------------------------
20990 <a href="http://google.com">google</a>
20992 <a href="http://google.com">google</a>
20998 <nowiki><div>foo</div>
20999 <div style="color:red">foo</div></nowiki>
21001 <p><div>foo</div>
21002 <div style="color:red">foo</div>
21007 3. multi-line html tag
21022 <nowiki><ref>foo</ref></nowiki>
21024 <nowiki><ref>bar</nowiki>
21026 baz<nowiki></ref></nowiki>
21028 <p><ref>foo</ref>
21029 </p><p><ref>bar
21030 </p><p>baz</ref>
21034 #### --------------- Others ---------------
21038 <nowiki>foo</nowiki>
21040 <p><nowiki>foo</nowiki>
21044 ## The quote-char in the input is necessary for triggering the bug
21046 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
21048 parsoid=wt2wt,html2wt
21057 Tag-like HTML structures are passed through as text
21079 </p><p>1<d e>f
21084 # This was a bug in the PHP parser (see bug 17663 and its dups,
21085 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
21087 Tag names followed by punctuation should not be recognized as tags
21091 <p><s.ome> text
21096 HTML tag with necessary entities in attributes
21098 <span title="&amp;">foo</span>
21100 <p><span title="&amp;">foo</span>
21105 HTML tag with 'unnecessary' entity encoding in attributes
21107 <span title="&">foo</span>
21109 <p><span title="&">foo</span>
21114 HTML tag with broken attribute value quoting
21116 <span title="Hello world>Foo</span>
21118 <p><span>Foo</span>
21121 <p><span title="Hello world">Foo</span>
21126 Parsoid-only: HTML tag with broken attribute value quoting
21130 <span title="Hello world>Foo</span>
21132 <p><span title="Hello world">Foo</span>
21137 Table with broken attribute value quoting
21140 | title="Hello world|Foo
21151 <td title="Hello world">Foo
21157 Table with broken attribute value quoting on consecutive lines
21160 | title="Hello world|Foo
21161 | style="color:red|Bar
21174 <td title="Hello world">Foo
21175 </td><td style="color: red">Bar
21176 </td></tr></tbody></table>
21181 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21191 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21201 Accept empty td cell attribute
21204 | align="center" | foo || |
21209 <td align="center"> foo </td>
21216 Non-empty attributes in th-cells
21219 ! Foo !! style="color: red" | Bar
21225 <th style="color: red"> Bar
21231 Accept empty attributes in th-cells
21246 Empty table rows go away
21267 ### Parsoid-centric tests for testing RTing of inter-element separators
21268 ### Edge cases not tested by existing parser tests and specific to
21269 ### Parsoid-specific serialization strategies.
21273 RT-ed inter-element separators should be valid separators
21285 # Parsoid-only since PHP parser relies on Tidy for correct output
21287 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
21301 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
21302 <p>bar</p></small></td></tr>
21306 <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>
21311 Empty TD followed by TD with tpl-generated attribute
21316 |{{echo|style='color:red'}}|foo
21330 Indented table with an empty td
21349 Indented block & table
21363 <div data-parsoid='{"stx":"html"}'>foo</div>
21365 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
21370 Indent and comment before table row
21385 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
21386 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
21390 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
21392 Empty TR followed by a template-generated TR
21398 {{echo|<tr><td>foo</td></tr>}}
21404 <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}}]}'>
21409 ## PHP and parsoid output differ for this, and since this is primarily
21410 ## for testing Parsoid's serializer, marking this Parsoid only
21412 Empty TR followed by mixed-ws-comment line should RT correctly
21428 <!--c--> </tr><!--d-->
21434 Multi-line image caption generated by templates with/without trailing newlines
21436 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
21437 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
21439 <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>
21440 <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>
21444 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
21448 <includeonly>foo</includeonly>
21455 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
21457 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
21460 ## PHP emits broken html for this, and since this is primarily
21461 ## a Parsoid serializer test, marking this Parsoid only
21463 Improperly nested inline or quotes tags with whitespace in between
21467 <span> <s>x</span> </s>
21470 <p><span> <s>x</s></span><s> </s>
21471 <b> <i>x</i></b><i> </i>
21476 Encapsulate protected attributes from wt
21480 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
21482 <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>
21486 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
21487 ## Having nested or stray pre tags results in the attempt to add duplicates,
21488 ## causing an assertion fail. This test tries to prevent that situation.
21490 Ensure ParagraphWrapper can deal with stray closing pre tags
21500 1. Ensure fostered text content is wrapped in element nodes
21504 <table>hi</table><table>ho</table>
21513 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
21515 parsoid=wt2html,wt2wt
21524 <tbody><tr><td> a</td></tr>
21529 Encapsulation properly handles null DSR information from foster box
21531 parsoid=wt2html,wt2wt
21533 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
21535 <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>
21539 1. Encapsulate foster-parented transclusion content
21541 parsoid=wt2wt,wt2html
21543 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
21545 <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>
21555 2. Encapsulate foster-parented transclusion content
21557 parsoid=wt2wt,wt2html
21559 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
21561 <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>
21572 3. Encapsulate foster-parented transclusion content
21574 parsoid=wt2wt,wt2html
21576 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21578 <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>"]}">
21591 4. Encapsulate foster-parented transclusion content
21593 parsoid=wt2wt,wt2html
21595 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21597 <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>"]}">
21610 5. Encapsulate foster-parented transclusion content
21612 parsoid=wt2wt,wt2html
21614 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
21616 <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>
21631 6. Encapsulate foster-parented transclusion content
21633 parsoid=wt2wt,wt2html
21635 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
21637 <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>
21653 7. Encapsulate foster-parented transclusion content
21655 parsoid=wt2wt,wt2html
21657 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
21659 <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>
21670 8. Encapsulate foster-parented transclusion content
21672 parsoid=wt2wt,wt2html
21675 }}{|{{echo|style='color:red'}}
21680 <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>
21690 9. Encapsulate foster-parented transclusion content
21692 parsoid=wt2wt,wt2html
21694 <table>{{echo|hi</table>hello}}
21696 <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>
21700 Table in fosterable position
21702 parsoid=wt2html,wt2wt
21711 <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">
21713 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
21719 # Parsoid only for bug 64747
21721 Properly encapsulate empty-content transclusions in fosterable positions
21729 <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>"}'>
21735 Support <object> element with .data attribute
21739 <object data="test.swf"></object>
21741 <object data="test.swf"></object>
21745 Don't block XML namespace declaration
21747 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
21749 <p><span>MediaWiki</span>
21752 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
21755 # -----------------------------------------------------------------
21756 # The following section of tests are primarily to spec requirements
21757 # around serialization of new/edited content.
21759 # All these tests are marked Parsoid html2wt and html2html only
21760 # ----------------------------------------------------------------
21762 # 'mi' is a localinterwiki prefix as well as a language
21764 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
21770 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
21774 New wiki links (href variations)
21778 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
21779 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
21780 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
21781 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
21786 [[Toxine bactérienne]]
21790 New wiki links (content string variations)
21794 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
21795 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
21796 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
21800 [[Foo_bar|./Foo_bar]]
21804 New category links (href variations)
21808 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
21809 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
21810 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
21812 [[Category:Toxine bactérienne]]
21813 [[Category:Toxine bactérienne]]
21814 [[Category:Toxine bactérienne]]
21818 New interlanguage links (href variations)
21822 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
21823 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
21824 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
21826 [[es:Toxine bactérienne]]
21827 [[es:Toxine_bactérienne]]
21828 [[es:Toxine_bactérienne]]
21832 Image: Modifying size of an image (1)
21835 "modes": ["wt2wt"],
21837 ["img[height]", "attr", "height", "22"],
21838 ["img[width]", "attr", "width", "200"]
21842 [[Image:Foobar.jpg|230x230px]]
21844 [[Image:Foobar.jpg|200x200px]]
21848 Image: Modifying size of an image (2)
21851 "modes": ["wt2wt"],
21853 ["img[height]", "attr", "height", "100"],
21854 ["img[width]", "attr", "width", "500"]
21858 [[Image:Foobar.jpg|230x230px]]
21860 [[Image:Foobar.jpg|500x500px]]
21863 # Change in size is ignored so long as class='mw-default-size'
21865 Image: Modifying size of an image (3)
21868 "modes": ["wt2wt"],
21870 ["figure[class]", "removeClass", "mw-default-size"],
21871 ["figure img", "attr", "height", "19"],
21872 ["figure img", "attr", "width", "170"]
21876 [[Image:Foobar.jpg|thumb]]
21878 [[Image:Foobar.jpg|thumb|170x170px]]
21882 Image: Modifying alignment of an image (bug 48665)
21885 "modes": ["wt2wt"],
21887 ["figure[class]", "removeClass", "mw-halign-right"],
21888 ["figure[class]", "addClass", "mw-halign-left"]
21892 [[Image:Foobar.jpg|thumb|caption|right]]
21894 [[Image:Foobar.jpg|thumb|caption|left]]
21898 Image: Modifying mw-default-size of an frameless image (bug 62805)
21901 "modes": ["wt2wt"],
21903 ["figure.mw-default-size", "removeClass", "mw-default-size"]
21907 [[Image:Foobar.jpg|frameless|right]]
21909 [[Image:Foobar.jpg|frameless|right|220x220px]]
21913 Image: Modifying valign of an image (bug 49221)
21916 "modes": ["wt2wt"],
21918 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
21919 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
21923 [[File:Foobar.jpg|20px|middle]]
21925 [[File:Foobar.jpg|20px|text-top]]
21929 Image: Modifying alt attribute of an image (bug 56400)
21932 "modes": ["wt2wt"],
21934 ["img[alt]", "attr", "alt", "some alternate edited text"]
21938 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
21940 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
21944 Image: Modifying caption of an image
21947 "modes": ["wt2wt"],
21949 ["figcaption", "text", "new caption"]
21953 [[Image:Foobar.jpg|thumb|original caption]]
21955 [[Image:Foobar.jpg|thumb|new caption]]
21959 Image: empty alt attribute (bug 48924)
21963 [[File:Foobar.jpg|thumb|alt=|bar]]
21965 <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>
21969 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
21974 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
21976 #<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>
21980 Image: Block level image should have \n before and after
21983 [[File:Foobar.jpg|right|thumb|150x150px]]
21987 <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>
21992 Image: New block level image should have \n before and after (existing content)
21995 [[File:Foobar.jpg|right|thumb|150x150px]]
21999 <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>
22004 Image: upright option (parsoid)
22008 [[File:Foobar.jpg|thumb|upright|caption]]
22009 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
22010 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
22012 <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>
22013 <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>
22014 <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>
22018 Image: upright option is ignored on inline and frame images (parsoid)
22022 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
22024 <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>
22028 Image: from basic HTML (1)
22032 <span typeof="mw:Image">
22033 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22036 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22040 Image: from basic HTML (2)
22044 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22046 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22050 Image: from basic HTML (3)
22054 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
22056 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
22060 Image: from basic HTML (4)
22064 <img src="File:Foobar.jpg">
22066 [[File:Foobar.jpg|link=]]
22070 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
22077 <li><p>foo</p></li>
22082 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
22088 <ul> <li>foo</li></ul>
22092 Don't strip leading whitespace when handling indent-pre suppressing tags
22100 '''This is very bold of you!'''
22104 indented cell (no pre-wrapping!)
22111 <tr><td> indented row</td></tr>
22114 <b>This is very bold of you!</b>
22117 indented cell (no pre-wrapping!)
22125 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
22130 <nowiki> </nowiki><span>bar</span>
22133 <nowiki> </nowiki></span>bar2
22136 <nowiki> </nowiki><span>bar</span>
22139 <nowiki> </nowiki><span>foo</span>
22157 Lists: Add space after bullets
22163 * <span> baz</span>
22168 <li><span> baz</span></li>
22173 Lists: Dont insert newlines in a serialized list item.
22180 <ul><li>a<br>b</li><li>c</li></ul>
22184 Headings: Add space before/after == (Bug 51744)
22194 == <span> baz</span> ==
22199 <h2><span> baz</span></h2>
22203 Parsoid: Serialize positional parameters with = in them as named parameter
22209 {{echo|1 = f=oo|2 = bar}}
22211 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22212 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22213 {{echo|<nowiki>f=oo</nowiki>|bar}}
22215 <p about="#mwt1" typeof="mw:Transclusion"
22216 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
22218 <p about="#mwt1" typeof="mw:Transclusion"
22219 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
22221 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22222 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22223 <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>
22227 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
22243 <div>a<p>b</p></div>
22252 Substrings resembling wikitext in hrefs should not get nowiki escapes
22258 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
22261 #-----------------------------
22262 # I/B quote minimization tests
22263 #-----------------------------
22266 1. I/B quote minimization: wikitext-only tags should be combined
22286 <p><i>A</i><i>B</i></p>
22287 <p><b>A</b><b>B</b></p>
22288 <p><i>A</i><b><i>B</i></b></p>
22289 <p><b>A</b><i><b>B</b></i></p>
22290 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
22291 <p><i><b>A</b></i><i><b>B</b></i></p>
22292 <p><i><b>A</b></i><b><i>B</i></b></p>
22293 <p><b><i>A</i></b><i><b>B</b></i></p>
22297 2. I/B quote minimization: wikitext and html tags should not be combined
22303 ''A''<nowiki/>'''<i>B</i>'''
22305 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
22306 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
22310 3. I/B quote minimization: templated content stops minimization
22314 ''A''{{echo|''B''}}
22316 ''A''{{echo|'''''B'''''}}
22318 <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>
22319 <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>
22323 4. I/B quote minimization: new content should be mimimized with adjacent old content
22333 <p><i>A</i><i>B</i></p>
22334 <p><b>A</b><b>B</b></p>
22335 <p><i>A</i><b><i>B</i></b></p>
22338 #------------------------------------
22339 # End of I/B quote minimization tests
22340 #------------------------------------
22343 Bug 54262: New entities
22349 <span typeof="mw:Entity"> </span>
22352 ## Note that there is no wikitext output for 'unknownproperty' ##
22353 ## Unknown magic words are silently dropped ##
22368 __NOCONTENTCONVERT__
22370 <meta property='mw:PageProp/toc' />
22371 <meta property='mw:PageProp/notoc' />
22372 <meta property='mw:PageProp/forcetoc' />
22373 <meta property='mw:PageProp/index' />
22374 <meta property='mw:PageProp/noindex' />
22375 <meta property='mw:PageProp/nogallery' />
22376 <meta property='mw:PageProp/noeditsection' />
22377 <meta property='mw:PageProp/notitleconvert' />
22378 <meta property='mw:PageProp/nocontentconvert' />
22379 <meta property='mw:PageProp/unknownproperty' />
22383 Consecutive <pre>s should not get merged
22385 parsoid=html2wt,html2html
22401 <pre>a</pre><pre>b</pre>
22415 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
22419 [[Special:BookSources/1234567890|ISBN 1234567895]]
22421 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
22425 Edited RFC links not serializable as RFC links should serialize as extlinks
22429 [//tools.ietf.org/html/rfc123 New RFC]
22431 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
22435 Edited PMID links not serializable as PMID links should serialize as extlinks
22439 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
22441 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
22445 Edited Redirect link should emit a non-piped wikitext link
22451 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
22455 T75121: Infer extension name from typeOf if data-mw is not present
22461 <div typeOf="mw:Extension/foo"></div>
22464 # -----------------------------------------------------------------
22465 # End of section for Parsoid-only html2wt tests for serialization
22467 # -----------------------------------------------------------------
22474 Try for 100% code coverage