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
115 Template:table_attribs
118 |</noinclude>style="color:red;"|Foo
122 Template:table_attribs_2
125 |</noinclude>style="color:red;"|Foo
130 Template:table_header_cells
132 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
138 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
142 Template:image_attribs
145 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
148 ## See T48811 for details
150 Template:mixed_attr_content_template
152 style="color:red;" title="T48811"
198 Template:EmptyTRWithHTMLAttrTest
201 <tr align="center"></tr>
202 <tr><td>foo</td></tr>
203 <tr align="center"></tr>
204 <tr><td>bar</td></tr>
221 This is a simple paragraph.
223 <p>This is a simple paragraph.
228 Paragraphs with extra newline spacing
251 Paragraphs with newline spacing with comment lines in between
259 <!--foo--><!--More than 1 comment, still stripped-->
263 <!--foo--> <!----> <!-- bar -->
324 Paragraphs with newline spacing with non-empty white-space lines in between
351 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
359 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
398 Extra newlines: More paragraphs with indented comment
413 Extra newlines followed by heading
428 <h1><a href="#b" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
432 <h1><a href="#b_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
437 Extra newlines between heading and content are swallowed
445 <h1><a href="#b" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
446 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
453 http://fr.wikipedia.org/wiki/🍺
454 <!-- EasterEgg we love beer, better be able be able to link to it -->
456 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
460 # Note that the html+tidy output removes the spaces after the <li>,
461 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
462 # This is an issue for all tests with lists. We intentionally do
463 # *not* add html+tidy clauses for these, as we don't want to
464 # document/test the broken behavior. (Parsoid matches the non-tidy
465 # output in these cases.)
474 <li> Item 2</li></ul>
482 * plain''italic''plain
483 * plain''italic''plain''italic''plain
484 * plain'''bold'''plain
485 * plain'''bold'''plain'''bold'''plain
486 * plain''italic''plain'''bold'''plain
487 * plain'''bold'''plain''italic''plain
488 * plain''italic'''bold-italic'''italic''plain
489 * plain'''bold''bold-italic''bold'''plain
490 * plain'''''bold-italic'''italic''plain
491 * plain'''''bold-italic''bold'''plain
492 * plain''italic'''bold-italic'''''plain
493 * plain'''bold''bold-italic'''''plain
494 * plain l'''italic''plain
495 * plain l''''bold''' plain
498 <li> plain<i>italic</i>plain</li>
499 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
500 <li> plain<b>bold</b>plain</li>
501 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
502 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
503 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
504 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
505 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
506 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
507 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
508 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
509 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
510 <li> plain l'<i>italic</i>plain</li>
511 <li> plain l'<b>bold</b> plain</li></ul>
515 # this example taken from the [[simple:Moon]] article (bug 47326)
517 Italics and possessives (1)
519 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
521 <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
525 # this example taken from [[en:Flaming Pie]] (bug 49926)
527 Italics and possessives (2)
529 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
531 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
535 # this example taken from [[en:Dictionary]] (bug 49926)
537 Italics and possessives (3)
539 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''.
541 <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>.
547 ### 2-quote opening sequence tests
550 Italics and bold: 2-quote opening sequence: (2,2)
559 Italics and bold: 2-quote opening sequence: (2,3)
568 Italics and bold: 2-quote opening sequence: (2,4)
578 # same html as previous, but wikitext adjusted to match parsoid html2wt
580 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
582 ''foo<nowiki>''</nowiki>''
588 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
590 Italics and bold: 2-quote opening sequence: (2,5)
603 # same html as previous, but wikitext adjusted to match parsoid html2wt
605 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
607 ''foo'''''<nowiki/>'''
618 ### 3-quote opening sequence tests
622 Italics and bold: 3-quote opening sequence: (3,2)
631 Italics and bold: 3-quote opening sequence: (3,3)
640 Italics and bold: 3-quote opening sequence: (3,4)
648 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
650 Italics and bold: 3-quote opening sequence: (3,5)
663 # same html as previous, but wikitext adjusted to match parsoid html2wt
665 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
667 '''foo'''''<nowiki/>''
678 ### 4-quote opening sequence tests
682 Italics and bold: 4-quote opening sequence: (4,2)
692 # same html as previous, but wikitext adjusted to match parsoid html2wt
694 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
696 <nowiki>''</nowiki>''foo''
703 Italics and bold: 4-quote opening sequence: (4,3)
712 Italics and bold: 4-quote opening sequence: (4,4)
722 # same html as previous, but wikitext adjusted to match parsoid html2wt
724 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
732 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
734 Italics and bold: 4-quote opening sequence: (4,5)
743 <p>'<b>foo</b><i></i>
747 # same html as previous, but wikitext adjusted to match parsoid html2wt
749 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
751 '<nowiki/>'''foo'''''<nowiki/>''
756 <p>'<b>foo</b><i></i>
762 ### 5-quote opening sequence tests
766 Italics and bold: 5-quote opening sequence: (5,2)
776 # same html as previous, but wikitext adjusted to match parsoid html2wt
777 # skipping wt2html and html2html because it wants to put <i> before <b>
779 Italics and bold: 5-quote opening sequence: (5,2+3)
781 parsoid=wt2wt,html2wt
790 Italics and bold: 5-quote opening sequence: (5,3)
800 # same html as previous, but wikitext adjusted to match parsoid html2wt
802 Italics and bold: 5-quote opening sequence: (5,3+2)
811 Italics and bold: 5-quote opening sequence: (5,4)
817 <p><i><b>foo'</b></i>
822 Italics and bold: 5-quote opening sequence: (5,5)
831 Italics and bold: 5-quote opening sequence: (5,6)
835 <p><i><b>foo'</b></i>
840 ### multiple quote sequences in a line
843 Italics and bold: multiple quote sequences: (2,4,2)
849 <p><i>foo'<b>bar</b></i>
854 # same html as previous, but wikitext adjusted to match parsoid html2wt
856 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
858 ''foo'<nowiki/>'''bar'''''
860 <p><i>foo'<b>bar</b></i>
866 Italics and bold: multiple quote sequences: (2,4,3)
872 <p><i>foo'<b>bar</b></i>
877 # same html as previous, but wikitext adjusted to match parsoid html2wt
879 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
881 ''foo'<nowiki/>'''bar'''''
883 <p><i>foo'<b>bar</b></i>
889 Italics and bold: multiple quote sequences: (2,4,4)
895 <p><i>foo'<b>bar'</b></i>
900 # same html as previous, but wikitext adjusted to match parsoid html2wt
902 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
904 ''foo'<nowiki/>'''bar'<nowiki/>'''''
906 <p><i>foo'<b>bar'</b></i>
911 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
913 Italics and bold: multiple quote sequences: (3,4,2)
922 <p><b>foo'</b>bar<i></i>
926 # same html as previous, but wikitext adjusted to match parsoid html2wt
928 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
932 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
937 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
942 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
944 Italics and bold: multiple quote sequences: (3,4,3)
953 <p><b>foo'</b>bar<b></b>
957 # same html as previous, but wikitext adjusted to match parsoid html2wt
959 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
961 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
966 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
971 ### other quote tests
974 Italics and bold: other quote tests: (2,3,5)
976 ''this is about '''foo's family'''''
978 <p><i>this is about <b>foo's family</b></i>
984 Italics and bold: other quote tests: (2,(3,3),2)
986 ''this is about '''foo's''' family''
988 <p><i>this is about <b>foo's</b> family</i>
994 Italics and bold: other quote tests: (3,2,3,2)
998 '''this is about ''foo'''s family''
1000 <p><b>this is about <i>foo</i></b><i>s family</i>
1005 # same html as previous, but wikitext adjusted to match parsoid html2wt
1007 Italics and bold: other quote tests: (3,2,3+2+2,2)
1009 '''this is about ''foo'''''<nowiki/>''s family''
1011 <p><b>this is about <i>foo</i></b><i>s family</i>
1017 Italics and bold: other quote tests: (3,2,3,3)
1019 '''this is about ''foo'''s family'''
1021 <p>'<i>this is about </i>foo<b>s family</b>
1027 Italics and bold: other quote tests: (3,(2,2),3)
1029 '''this is about ''foo's'' family'''
1031 <p><b>this is about <i>foo's</i> family</b>
1037 Italicized possessive
1039 The ''[[Main Page]]'''s talk page.
1041 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1044 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1048 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1049 (Requires tidy for PHP parser output to be fixed up)
1051 parsoid=wt2html,wt2wt
1068 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1069 <td><i>a</i></td><td><i>b</i></td></tr>
1078 Non-html5 tags should be accepted
1080 <center>''foo''</center>
1082 <font>''foo''</font>
1083 <strike>''foo''</strike>
1086 <center><i>foo</i></center>
1087 <p><big><i>foo</i></big>
1088 <font><i>foo</i></font>
1089 <strike><i>foo</i></strike>
1095 <wbr> is valid wikitext (bug 52468)
1103 # <strike> is HTML4, <s> is HTML4/5.
1105 <s> or <strike> for strikethrough
1107 <strike>strike</strike>
1111 <p><strike>strike</strike>
1119 Text-level semantic html elements in wikitext
1122 <strong>text</strong>
1138 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1145 <strong>text</strong>
1161 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1169 # test cases taken from
1170 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1172 Ruby markup (W3C-style)
1174 ; Mono-ruby for individual base characters
1175 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1177 : <ruby>今日<rt>きょう</rt></ruby>
1179 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1181 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1183 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1185 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1186 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1187 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1190 <dl><dt> Mono-ruby for individual base characters</dt>
1191 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1192 <dt> Group ruby</dt>
1193 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1194 <dt> Jukugo ruby</dt>
1195 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1196 <dt> Inline ruby</dt>
1197 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1198 <dt> Double-sided ruby</dt>
1199 <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>
1201 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1202 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1203 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1208 # The next two test different paths in the sanitizer.
1210 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1212 <b→> doesn't terminate </b→>
1214 <bä> doesn't terminate </bä>
1216 <boo> doesn't terminate </boo>
1218 <s.foo> doesn't terminate </s.foo>
1222 <p><b→> doesn't terminate </b→>
1223 </p><p><bä> doesn't terminate </bä>
1224 </p><p><boo> doesn't terminate </boo>
1225 </p><p><s.foo> doesn't terminate </s.foo>
1226 </p><p><sub-ID#1>
1230 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1232 Non-word characters don't terminate tag names + tidy
1234 <b→> doesn't terminate </b→>
1236 <bä> doesn't terminate </bä>
1238 <boo> doesn't terminate </boo>
1240 <s.foo> doesn't terminate </s.foo>
1244 <p><b→> doesn't terminate </b→></p>
1245 <p><bä> doesn't terminate </bä></p>
1246 <p><boo> doesn't terminate </boo></p>
1247 <p><s.foo> doesn't terminate </s.foo></p>
1248 <p><sub-ID#1></p>
1252 Isolated close tags should be treated as literal text (bug 52760)
1259 </p><p><s.foo>s</s>
1264 ### Special characters
1268 Bare pipe character (bug 52363)
1277 Bare pipe character from a template (bug 52363)
1286 ### <nowiki> test cases
1290 <nowiki> unordered list
1292 <nowiki>* This is not an unordered list item.</nowiki>
1294 <p>* This is not an unordered list item.
1301 <nowiki>Lorem ipsum dolor
1309 <p>Lorem ipsum dolor
1322 :There is not nowiki.
1323 :There is <nowiki>nowiki</nowiki>.
1325 #There is not nowiki.
1326 #There is <nowiki>nowiki</nowiki>.
1328 *There is not nowiki.
1329 *There is <nowiki>nowiki</nowiki>.
1331 <dl><dd>There is not nowiki.</dd>
1332 <dd>There is nowiki.</dd></dl>
1333 <ol><li>There is not nowiki.</li>
1334 <li>There is nowiki.</li></ol>
1335 <ul><li>There is not nowiki.</li>
1336 <li>There is nowiki.</li></ul>
1341 Entities inside <nowiki>
1343 <nowiki><</nowiki>
1350 Entities inside template parameters
1356 <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>
1360 Properly escape nowiki when combined with other wiki markup
1364 <p>* </nowiki> tag</p>
1366 <nowiki>* </nowiki></nowiki> tag
1373 Comments and Indent-Pre
1375 <!-- comment 1 --> asdf
1377 <!-- comment 1 --> asdf
1380 <!-- comment 1 --> asdf
1381 <!-- comment 2 -->xyz
1383 <!-- comment 1 --> asdf
1384 <!-- comment 2 --> xyz
1440 asdf<!-- comment 1 -->jkl
1450 <!-- foo --> b <!-- bar -->
1464 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1470 Comment semantics and delimiters
1472 <!-- --><!----><!-----><!------>
1478 Comment semantics and delimiters, redux
1480 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1481 -- foo -- funky huh? ... -->
1487 Comment semantics and delimiters: directors cut
1489 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1490 everything starting with < followed by !-- until the first -- and > we see,
1491 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1499 Comment semantics: nesting
1501 <!--<!-- no, we're not going to do anything fancy here -->-->
1508 Comment semantics: unclosed comment at end
1510 <!--This comment will run out to the end of the document
1515 # Bug 58184: document parsoid's behaviour
1517 Suppress comment closing tag in lenient browsers
1519 parsoid=wt2html,html2html
1521 <!-- Browsers--!> think this is closed -->
1525 <!-- Browsers--¡> think this is closed -->
1529 Comment in template title
1538 Comment on its own line post-expand
1550 Comment on its own line post-expand with non-significant whitespace
1562 Multiple comments should still parse as SOL-transparent
1564 parsoid=wt2html,wt2wt
1567 <!--c2--><!--c3--><!--c4-->*b
1578 ### paragraph wrapping tests
1593 Block tag on one line (<div>)
1609 Block tag on one line (<blockquote>)
1611 a <blockquote>foo</blockquote>
1615 a <blockquote>foo</blockquote>
1627 Block tag on both lines (<div>)
1644 Block tag on both lines (<blockquote>)
1646 a <blockquote>foo</blockquote>
1648 b <blockquote>foo</blockquote>
1650 a <blockquote>foo</blockquote>
1651 b <blockquote>foo</blockquote>
1665 Multiple lines without block tags
1689 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1690 # So, we have a separate section for Parsoid. We don't want
1691 # to mimic this stripping behavior in Parsoid. It affects
1692 # editing experience and also requires us to maintain additional
1695 Empty lines between lines with block tags
1733 <div data-parsoid='{"stx":"html"}'></div>
1736 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1739 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1741 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1744 <div data-parsoid='{"stx":"html"}'>e</div>
1747 ## PHP parser emits output which is broken
1748 ## XXX The parsoid output doesn't match the tidy output.
1750 Unclosed HTML p-tags should be handled properly
1758 <p>foo</div></p>
1762 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1767 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1768 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1771 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
1775 a [[Category:A1]] [[Category:A2]]
1780 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1784 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
1790 <link href="Category:A1"/><p>a</p>
1794 ### Preformatted text
1803 And a [[Main Page|link]]
1809 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1814 Tabs don't trigger preformatted text
1818 This is preformatted text.
1824 <pre>This is preformatted text.
1830 Ident preformatting with inline content
1841 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1858 Regression with preformatted in <center>
1872 Bug 52763: Preformatted in <blockquote>
1878 indented cell (no pre-wrapping!)
1888 <p> indented cell (no pre-wrapping!)
1896 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1913 Bug 15491: <ins>/<del> in blockquote
1916 Foo <del>bar</del> <ins>baz</ins> quux
1920 <p>Foo <del>bar</del> <ins>baz</ins> quux
1926 # Note that the p-wrapping is newline sensitive, which could be
1927 # considered a bug: tidy will wrap only the 'Foo' in the example
1928 # below in a <p> tag. (see comment 23-25 of bug #6200)
1930 Bug 15491: <ins>/<del> in blockquote (2)
1932 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1935 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1941 <del>bar</del> <ins>baz</ins> quux</blockquote>
1945 <pre> with attributes (bug 3202)
1947 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1949 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1954 <pre> with width attribute (bug 3202)
1956 <pre width="8">Narrow screen goodies</pre>
1958 <pre width="8">Narrow screen goodies</pre>
1963 <pre> with forbidden attribute (bug 3202)
1965 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1967 <pre width="8">Narrow screen goodies</pre>
1972 Entities inside <pre>
1981 <pre> with forbidden attribute values (bug 3202)
1983 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1985 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1990 <nowiki> inside <pre> (bug 13238)
1998 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2006 <pre><nowiki>Foo</nowiki></pre>
2011 <nowiki> and <pre> preference (first one wins)
2042 </pre> inside nowiki
2044 <nowiki></pre></nowiki>
2050 # Parsoid doesn't strip empty tags, like Tidy does.
2052 Empty pre; pre inside other HTML tags (bug 54946)
2054 parsoid=wt2html,wt2wt
2085 HTML pre followed by indent-pre
2100 <p><pre>foo</pre></p>
2102 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2106 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2114 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2124 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2136 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2157 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2161 {{echo| foo}}{{echo| bar}}
2166 {{echo|<!--cmt--> foo}}
2168 <!--cmt-->{{echo| foo}}
2170 {{echo|{{echo| }}bar}}
2188 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2225 Things that look like <pre> tags aren't treated as such
2227 Barack Obama <President> of the United States
2228 <President></President>
2230 <p>Barack Obama <President> of the United States
2231 <President></President>
2235 ## PHP parser discards the "<pre " string
2237 Handle broken pre-like tags (bug 64025)
2241 {{echo|<pre <pre>x</pre>}}
2243 <table><pre </table>
2246 <table><pre></pre></table>
2249 <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>
2258 Parsoid: handle pre with space after attribute
2262 <pre style="width:50%;" >{{echo|foo}}</pre>
2264 <pre style="width:50%;">{{echo|foo}}</pre>
2267 # TODO / maybe: fix wt2wt for this
2269 Parsoid: Don't paragraph-wrap fosterable content
2295 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2323 #--------------------------------------------------------------------
2324 # Transclusion parameter whitespace stripping tests
2325 # Behavior is different for positional and named parameters
2326 #--------------------------------------------------------------------
2328 Templates: Strip leading and trailing whitespace from named-param values
2332 {{echo|1= {{echo|b}} }}
2345 <ul><li> d</li></ul>
2350 Templates: Don't strip whitespace from positional-param values
2354 {{echo|{{echo|b}} }}
2386 <ul><li> f</li></ul>
2394 Templates: Handle empty comment-and-ws-only lines correctly
2397 <!--should be ignored-->
2398 <!--should be ignored as well-->
2407 Templates: Handle comments in the target
2410 <!-- should be ignored -->
2413 {{echo<!-- should be ignored -->
2416 {{echo<!-- should be ignored -->|foo}}
2418 {{<!-- should be ignored -->echo|foo}}
2420 <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>
2422 <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>
2424 <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>
2426 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2430 Templates: Handle comments in parameter names (bug 67657)
2433 <!-- should be ignored -->
2437 <!-- should be ignored -->
2440 {{echo|1<!-- should be ignored --> = foo}}
2442 {{echo|<!-- should be ignored -->1 = foo}}
2444 <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>
2446 <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>
2448 <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>
2450 <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>
2454 Templates: Other wikitext in parameter names (bug 67657)
2458 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2464 #--------------------------------------------------------------------
2465 # Transclusion parameter escaping tests
2466 #--------------------------------------------------------------------
2468 Templates: Parsoid parameter escaping test 1
2472 {{echo|[foo]|{{echo|[bar]}}}}
2474 <p about="#mwt1" typeof="mw:Transclusion"
2475 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2479 Parsoid: Pipes in external links in template parameter
2483 {{echo|[{{echo|http://example.com}} link]}}
2485 <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>
2489 Parsoid: pipe in transclusion parameter
2493 {{echo|http://foo.com/a|b}}
2495 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2496 typeof="mw:Transclusion"
2497 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>
2501 Parsoid: Pipe in external link target and content in template parameter
2503 parsoid=html2wt,wt2wt
2505 {{echo|[http://foo.com/a|b a|b]}}
2507 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2508 typeof="mw:Transclusion"
2509 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2510 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2514 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2518 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2520 <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>
2524 Templates: Don't escape already nowiki-escaped text in template parameters
2526 parsoid=html2wt,wt2wt
2528 {{echo|foo<nowiki>|</nowiki>bar}}
2529 {{echo|<nowiki><div></nowiki>}}
2530 {{echo|<nowiki></nowiki>}}
2532 <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>
2533 <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>
2534 <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>
2540 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2542 parsoid=html2wt,wt2wt
2544 {{echo|{{echo|1=bar}}}}
2546 <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>
2551 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2557 <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>
2562 Templates: Preserve blank parameter names
2569 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2573 ### Parsoid-centric tests for testing RT edge cases for pre
2577 1a. Indent-Pre and Comments
2590 1b. Indent-Pre and Comments
2603 1c. Indent-Pre and Comments
2616 1d. Indent-Pre and Comments
2617 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2630 2a. Indent-Pre and tables
2651 2b. Indent-Pre and tables
2667 2c. Indent-Pre and tables (bug 42252)
2684 2d. Indent-Pre and tables
2701 <tbody><tr><td> b</td></tr>
2706 2e. Indent-Pre and table-line syntax
2719 2f. Indent-pre started by table-line syntax
2738 3a. Indent-Pre and block tags (single-line html)
2742 c <blockquote> foo </blockquote>
2747 c <blockquote> foo </blockquote>
2748 <pre><span> foo </span>
2751 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2752 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2753 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2754 <pre><span> foo </span>
2771 3b. Indent-Pre and block tags (multi-line html)
2776 <pre>a <span>foo</span>
2781 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2782 b <div data-parsoid='{"stx":"html"}'> foo </div>
2792 3c. Indent-Pre and block tags (pre-content on separate line)
2856 4. Indent-Pre and extension tags
2862 a <ul class="gallery mw-gallery-traditional">
2863 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2864 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
2865 <div class="gallerytext">
2872 <ul class="gallery mw-gallery-traditional">
2873 <li class="gallerybox" style="width: 155px">
2874 <div style="width: 155px">
2875 <div class="thumb" style="width: 150px;">
2876 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div>
2878 <div class="gallerytext"></div>
2885 Table wikitext syntax outside wiki-tables
2888 ! not a table heading
2891 | class="foo bar" | baz
2898 ! not a table heading
2901 | class="foo bar" | baz
2910 Render paragraphs when indent-pre is suppressed in blocklevels
2927 4. Multiple spaces at start-of-line
2945 ## NOTE: the leading white-space chars on empty line are significant
2947 5a. White-space in indent-pre
2959 ## NOTE: the leading white-space chars on empty line are significant
2961 5b. White-space in indent-pre
2980 5c. White-space in indent-pre
2993 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3016 7a. Indent-pre and category links
3018 parsoid=wt2html,wt2wt
3020 [[Category:foo]] <!-- No pre-wrapping -->
3021 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3023 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3024 <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 -->
3028 7b. Indent-pre and category links
3030 parsoid=wt2html,wt2wt
3033 [[Category:foo]] {{echo|b}}
3036 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
3037 <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>
3041 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3045 HTML-pre: 1. embedded newlines
3079 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3081 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3085 <pre data-parsoid='{"stx":"html"}'>
3090 <pre data-parsoid='{"stx":"html"}'>
3098 HTML-pre: big spaces
3135 <pre data-parsoid='{"stx":"html"}'>
3154 HTML-pre: 2: indented text
3167 HTML-pre: 3: other wikitext
3188 ### Definition lists
3195 <dl><dt> name </dt>
3196 <dd> Definition</dd></dl>
3201 Definition list for indentation only
3205 <dl><dd> Indented text</dd></dl>
3210 Definition list with no space
3215 <dd>Definition</dd></dl>
3220 Definition list with URL link
3222 ; http://example.com/ : definition
3224 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3225 <dd> definition</dd></dl>
3230 Definition list with bracketed URL link
3232 ;[http://www.example.com/ Example]:Something about it
3234 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3235 <dd>Something about it</dd></dl>
3240 Definition list with wikilink containing colon
3242 ; [[Help:FAQ]]: The least-read page on Wikipedia
3244 <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>
3245 <dd> The least-read page on Wikipedia</dd></dl>
3249 # At Brion's and JeLuF's insistence... :)
3251 Definition list with news link containing colon
3253 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3255 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3256 <dd> This isn't even a real newsgroup!</dd></dl>
3259 <dl><dt> <a rel="mw:ExtLink" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'> This isn't even a real newsgroup!</dd></dl>
3263 Malformed definition list with colon
3265 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3267 <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>
3272 Definition lists: colon in external link text
3274 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3276 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3277 <dd> OK, I made that up</dd></dl>
3282 Definition lists: colon in HTML attribute
3284 ;<b style="display: inline">bold</b>
3286 <dl><dt><b style="display: inline">bold</b></dt></dl>
3291 Definition lists: self-closed tag
3293 ;one<br/>two : two-line fun
3295 <dl><dt>one<br />two </dt>
3296 <dd> two-line fun</dd></dl>
3301 Bug 11748: Literal closing tags
3305 <dd>test test test test test</dd>
3307 <dd>test test test test test</dd>
3312 <dd>test test test test test</dd>
3314 <dd>test test test test test</dd>
3320 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3323 ; term : description
3328 <dl><dt> term </dt>
3329 <dd> description</dd></dl>
3330 <ul><li> unordered</li></ul>
3337 Definition list with empty definition and following paragraph
3349 Nested definition lists using html syntax
3358 Definition Lists: No nesting: Multiple dd's
3371 Definition Lists: Indentation: Regular
3379 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3384 Definition Lists: Indentation: Missing 1st level
3390 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3395 Definition Lists: Indentation: Multi-level indent
3399 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3404 Definition Lists: Hacky use to indent tables
3411 should be left alone
3413 <dl><dd><dl><dd><table>
3418 </td></tr></table></dd></dl></dd></dl>
3420 should be left alone
3425 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3433 should be left alone
3436 <dl><dd><dl><dd><table><tr>
3439 </tr></table><!-- bar --></dd></dl></dd></dl>
3441 should be left alone</p>
3445 Definition Lists: Hacky use to indent tables, with comment before table
3451 <dl><dd><dl><dd><!-- foo --><table><tr>
3453 </tr></table></dd></dl></dd></dl>
3458 Definition Lists: Hacky use to indent tables (WS-insensitive)
3467 <dd> <table><tr><td>a</td></tr></table> </dd>
3470 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3471 ## as an empty dt item. It also ignores all but the last ";" when followed
3472 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3473 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3476 ## Ex: ";;t2 ::d2" is transformed into:
3488 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3489 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3500 ## All Parsoid only definition list tests have this difference.
3502 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3503 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3506 Table / list interaction: indented table with lists in table contents
3521 <ul><li> b</li></ul>
3525 <ul><li> d</li></ul>
3526 </td></tr></table></dd></dl>
3531 Table / list interaction: lists nested in tables nested in indented lists
3554 </td></tr></table></dd></dl>
3561 Definition Lists: Nesting: Multi-level (Parsoid only)
3591 Definition Lists: Nesting: Test 2 (Parsoid only)
3611 Definition Lists: Nesting: Test 3 (Parsoid only)
3639 Definition Lists: Nesting: Test 4
3644 <dl><dd><dl><dd><dl><dt>t3</dt>
3645 <dd>d3</dd></dl></dd></dl></dd></dl>
3650 ## The Parsoid team believes the following three test exposes a
3651 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3652 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3653 ## It also exposes a "misfeature" in tidy, which doesn't like
3654 ## <dl> tags with a single <dt> child; it converts the <dt> into
3655 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3657 Definition Lists: Mixed Lists: Test 1
3663 <dl><dd><dl><dt><ul><li> foo</li>
3664 <li> bar</li></ul></dt></dl>
3665 <dl><dt> baz</dt></dl></dd></dl>
3700 Definition Lists: Mixed Lists: Test 2
3705 <ul><li><dl><dd> d1</dd>
3706 <dd> d2</dd></dl></li></ul>
3712 Definition Lists: Mixed Lists: Test 3
3717 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3718 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3724 Definition Lists: Mixed Lists: Test 4
3729 <ul><li><dl><dt>d1 </dt>
3732 <dd>d4</dd></dl></li></ul>
3738 Definition Lists: Mixed Lists: Test 5
3744 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3750 Definition Lists: Mixed Lists: Test 6
3755 <ol><li><ul><li><dl><dd>d1
3756 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3762 Definition Lists: Mixed Lists: Test 7
3767 <dl><dd><ul><li> d1</li>
3768 <li> d2</li></ul></dd></dl>
3774 Definition Lists: Mixed Lists: Test 8
3779 <dl><dd><ul><li> d1</li></ul>
3780 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3786 Definition Lists: Mixed Lists: Test 9
3790 <ul><li><dl><dt>foo </dt>
3791 <dd>bar</dd></dl></li></ul>
3797 Definition Lists: Mixed Lists: Test 10
3801 <ul><li><ol><li><dl><dt>foo </dt>
3802 <dd>bar</dd></dl></li></ol></li></ul>
3806 # The Parsoid team disagrees with the PHP parser's seemingly-random
3807 # rules regarding dd/dt on the next two tests. Parsoid is more
3808 # consistent, and recognizes the shared nesting and keeps the
3809 # still-open tags around until the nesting is complete.
3810 # (And tidy again converts <dt> to <dd> before 'bar'.)
3813 Definition Lists: Mixed Lists: Test 11
3818 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3819 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3820 <dl><dt>boo </dt>
3821 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3876 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3877 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3881 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3882 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3891 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
3893 Definition Lists: Weird Ones: Test 1
3895 *#;*::;; foo : bar (who uses this?)
3897 <ul><li><ol><li><dl><dt> foo </dt>
3898 <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>
3917 <dt>bar (who uses this?)</dt>
3949 <dt> foo<span typeof="mw:Placeholder"> </span></dt>
3950 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3962 Definition Lists: colons occurring in tags
3979 <dt><span>a:b</span></dt>
3997 Definition Lists: colons and tables 1
4009 </td></tr></table></dd></dl>
4013 </td></tr></table></dd></dl>
4017 # Parsoid's output (as documented below) differs from php's in this case.
4018 # This is probably a bug. If we fixup parsoid to match php's output, the
4019 # above test should pass and the below test case can be removed. It is
4020 # unclear which output is more desirable.
4023 Definition Lists: colons and tables 2
4035 </td></tr></table></dd>
4039 </td></tr></table></dd></dl>
4047 External links: non-bracketed
4049 Non-bracketed: http://example.com
4051 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4055 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4057 External links: numbered
4059 Numbered: [http://example.com]
4060 Numbered: [http://example.net]
4061 Numbered: [http://example.com]
4063 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4064 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4065 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4068 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4069 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4070 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4074 External links: specified text
4076 Specified text: [http://example.com link]
4078 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4083 External links: trail
4085 Linktrails should not work for external links: [http://example.com link]s
4087 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4092 External links: dollar sign in URL
4094 http://example.com/1$2345
4096 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4100 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4102 External links: dollar sign in URL (autonumber)
4104 [http://example.com/1$2345]
4106 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4109 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4113 External links: open square bracket forbidden in URL (bug 4377)
4115 parsoid=wt2html,wt2wt,html2html
4117 http://example.com/1[2345
4119 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4122 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4126 External links: open square bracket forbidden in URL (named) (bug 4377)
4128 parsoid=wt2html,html2html
4130 [http://example.com/1[2345]
4132 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4135 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4138 # parsoid adds a space before the link name
4140 External links: open square bracket forbidden in URL (named) (bug 4377)
4143 [http://example.com/1 [2345]
4145 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4150 External links: nowiki in URL link text (bug 6230)
4152 [http://example.com/ <nowiki>''example site''</nowiki>]
4154 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4159 External links: newline forbidden in text (bug 6230 regression check)
4161 [http://example.com/ first
4164 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4170 External links: Pipe char between url and text
4172 [http://example.com | link]
4174 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4179 External links: protocol-relative URL in brackets
4181 [//example.com/ Test]
4183 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4187 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4189 External links: protocol-relative URL in brackets without text
4193 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4196 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4200 External links: protocol-relative URL in free text is left alone
4204 <p>//example.com/Foo
4209 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4211 foo//example.com/Foo
4213 <p>foo//example.com/Foo
4218 External links: with no contents
4220 [http://en.wikipedia.org/wiki/Foo]
4222 [[wikipedia:Foo|Bar]]
4224 [[wikipedia:Foo|<span>Bar</span>]]
4226 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4227 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4228 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4231 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4232 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4233 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4237 External links: Free with trailing punctuation
4247 http://example.com/url_with_(brackets)
4248 (http://example.com/url_without_brackets)
4249 http://example.com/url_with_entity
4250 http://example.com/url_with_entity 
4251 http://example.com/url_with_entity 
4252 http://example.com/url_with_entity<
4253 http://example.com/url_with_entity<
4254 http://example.com/url_with_entity<
4256 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4257 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4258 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4259 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4260 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4261 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4262 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4263 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4264 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4265 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4266 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4267 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4268 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4269 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4270 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4271 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4274 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4275 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4276 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4277 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4278 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4279 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4280 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4281 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4282 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4283 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4284 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4285 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4286 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4287 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4288 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4289 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4293 External links: No preceding word characters allowed (bug 65278)
4295 NOPEhttp://example.com
4296 N0http://example.com
4297 ok:http://example.com
4298 ok-http://example.com
4300 <p>NOPEhttp://example.com
4301 N0http://example.com
4302 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4303 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4310 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4312 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4317 External image from https
4319 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4321 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4326 External image (when not allowed)
4328 wgAllowExternalImages=0
4330 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4332 <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>
4337 Link to non-http image, no img tag
4339 Link to non-http image, no img tag: ftp://example.com/test.jpg
4341 <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>
4346 External links: terminating separator
4348 Terminating separator: http://example.com/thing,
4350 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4355 External links: intervening separator
4357 Intervening separator: http://example.com/1,2,3
4359 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4364 External links: old bug with URL in query
4366 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4368 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4373 External links: old URL-in-URL bug, mixed protocols
4375 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4377 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4382 External links: URL in text
4384 URL in text: [http://example.com http://example.com]
4386 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4391 External links: Clickable images
4393 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4395 <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>
4398 <p>ja-style clickable images: <a rel="mw:ExtLink" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
4402 External links: raw ampersand
4404 Old & use: http://x&y
4406 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4411 External links: encoded ampersand
4413 Old & use: http://x&y
4415 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4418 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4422 External links: encoded equals (bug 6102)
4424 http://example.com/?foo=bar
4426 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4429 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4433 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4434 ## does it number them. As discussed in bug 53505, we can identify
4435 ## autonumbered links via CSS.
4439 External links: [raw ampersand]
4441 Old & use: [http://x&y]
4443 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4446 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4449 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4450 # mode will return the [raw ampersand] wikitext
4452 External links: [encoded ampersand]
4454 parsoid=wt2html,wt2wt,html2html
4456 Old & use: [http://x&y]
4458 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4461 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4465 External links: [raw equals]
4467 [http://example.com/?foo=bar]
4469 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4472 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4475 # note that parsoid html is identical to [raw equals] case; so html2wt
4476 # mode will return the [raw equals] wikitext
4478 External links: [encoded equals] (bug 6102)
4480 parsoid=wt2html,wt2wt,html2html
4482 [http://example.com/?foo=bar]
4484 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4487 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4490 # xxx parsoid strips the IDN character, so the round-trip tests will
4491 # obviously fail and are disabled. --cscott
4493 External links: [IDN ignored character reference in hostname; strip it right off]
4495 parsoid=wt2html,wt2wt,html2html
4497 [http://e‌xample.com/]
4499 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4502 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4505 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4506 # Where an external link could easily circumvent the sanitization of the text of
4507 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4508 # test demands a higher standard. That's a bit strange.
4512 # http://example.com -> [http://example.com|http://example.com]
4513 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4515 # The first example is sanitized, but the second is not. Any security benefits
4516 # from this production are trivial to circumvent. Either remove this test and
4517 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4518 # the test accordingly.
4522 # xxx parsoid strips the IDN character, so the round-trip tests will
4523 # obviously fail and are disabled. --cscott
4525 External links: IDN ignored character reference in hostname; strip it right off
4527 parsoid=wt2html,html2html
4529 http://e‌xample.com/
4531 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4534 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4538 External links: www.jpeg.org (bug 554)
4542 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4546 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4548 External links: URL within URL (original bug 2)
4550 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4552 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4555 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4559 BUG 361: URL inside bracketed URL
4561 [http://www.example.com/foo http://www.example.com/bar]
4563 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4568 BUG 361: URL within URL, not bracketed
4570 http://www.example.com/foo?=http://www.example.com/bar
4572 <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>
4577 BUG 289: ">"-token in URL-tail
4579 http://www.example.com/<hello>
4581 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4586 BUG 289: literal ">"-token in URL-tail
4588 http://www.example.com/<b>html</b>
4590 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4593 <p><a rel="mw:ExtLink" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
4597 BUG 289: ">"-token in bracketed URL
4599 [http://www.example.com/<hello> stuff]
4601 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4606 BUG 289: literal ">"-token in bracketed URL
4608 [http://www.example.com/<b>html</b> stuff]
4610 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4615 BUG 289: literal double quote at end of URL
4617 http://www.example.com/"hello"
4619 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4624 BUG 289: literal double quote in bracketed URL
4626 [http://www.example.com/"hello" stuff]
4628 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4633 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4635 [http://www.example.com test]
4637 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4642 External links: link text with spaces
4644 [http://www.example.com a b c]
4645 [http://www.example.com ''a'' ''b'']
4647 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4648 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4653 External links: wiki links within external link (Bug 3695)
4655 [http://example.com [[wikilink]] embedded in ext link]
4657 <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>
4660 <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>
4664 BUG 787: Links with one slash after the url protocol are invalid
4668 [http:/example.com title]
4670 <p>http:/example.com
4671 </p><p>[http:/example.com title]
4676 Bracketed external links with template-generated invalid target
4678 [{{echo|http:/example.com}} title]
4680 <p>[http:/example.com title]
4685 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4687 ''[http://example.com text'']
4688 [http://example.com '''text]'''
4689 ''Something [http://example.com in italic'']
4690 ''Something [http://example.com mixed''''', even bold]'''
4691 '''''Now [http://example.com both''''']
4693 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4694 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4695 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4696 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4697 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4703 Bug 4781: %26 in URL
4705 http://www.example.com/?title=AT%26T
4707 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4710 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4713 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
4714 # % is actually legal in HTML5. Any change in output would need testing though.
4716 Bug 4781, 5267: %25 in URL
4718 http://www.example.com/?title=100%25_Bran
4720 <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>
4723 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4727 Bug 4781, 5267: %28, %29 in URL
4729 http://www.example.com/?title=Ben-Hur_%281959_film%29
4731 <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>
4734 <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>
4739 Bug 4781: %26 in autonumber URL
4741 [http://www.example.com/?title=AT%26T]
4743 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4746 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4750 Bug 4781, 5267: %26 in autonumber URL
4752 [http://www.example.com/?title=100%25_Bran]
4754 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4757 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4761 Bug 4781, 5267: %28, %29 in autonumber URL
4763 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4765 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4768 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4773 Bug 4781: %26 in bracketed URL
4775 [http://www.example.com/?title=AT%26T link]
4777 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4780 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4784 Bug 4781, 5267: %25 in bracketed URL
4786 [http://www.example.com/?title=100%25_Bran link]
4788 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4793 Bug 4781, 5267: %28, %29 in bracketed URL
4795 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4797 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4800 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4804 External link containing a period in the anchor. (bug 63947)
4806 [//foo.org/bar#baz. bang]
4808 [//foo.org/bar. bang]
4810 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4811 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4814 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4815 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4819 External link containing a single quote. (bug 63947)
4823 [//foo.org/bar'baz bang]
4825 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4826 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4829 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4830 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4835 External link containing a period in the anchor. (bug 63947)
4837 [//foo.org/bar#baz. bang]
4839 [//foo.org/bar. bang]
4841 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4842 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4845 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4846 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4850 External link containing a single quote. (bug 63947)
4854 [//foo.org/bar'baz bang]
4856 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4857 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4860 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4861 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4866 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4868 Some [http://example.com/ pretty ''italics'' and stuff]!
4870 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4875 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4877 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4879 <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>
4884 External link containing double-single-quotes with no space separating the url from text in italics
4886 [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]].]
4888 <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>
4891 <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>
4893 <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>
4897 External link with comments in link text
4899 [http://www.google.com Google <!-- comment -->]
4901 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4906 URL-encoding in URL functions (single parameter)
4908 {{localurl:Some page|amp=&}}
4910 <p>/index.php?title=Some_page&amp=&
4915 URL-encoding in URL functions (multiple parameters)
4917 {{localurl:Some page|q=?&=&}}
4919 <p>/index.php?title=Some_page&q=?&amp=&
4926 http://example.com/index.php?foozoid%5B%5D=bar
4928 http://example.com/index.php?foozoid[]=bar
4930 <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>
4931 </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>
4934 <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>
4936 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4940 IPv6 urls (bug 21261)
4944 http://[2404:130:0:1000::187:2]/index.php
4946 <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>
4951 Non-extlinks in brackets
4960 [{{echo|foo}} ''bar'']
4961 [{{echo|foo}}l's] errand
4962 [{{echo|foo}}l's errand]
4964 [url=http://example.com]
4977 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4982 Percent encoding in external links
4984 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4986 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4989 <p><a rel="mw:ExtLink"
4990 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4994 Use url link syntax for links where the content is equal the link target
4998 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5001 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5005 Parenthesis in external links, especially URL links
5009 http://example.com/test)
5011 http://example.com/(test)
5013 http://example.com/((test)
5015 (http://example.com/(test))
5017 (http://example.com/(test)))))
5019 http://example.com/a)b
5021 [http://example.com) foo]
5023 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5024 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5025 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5026 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5027 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5028 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5029 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5030 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5033 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5034 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5035 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5036 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5037 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5038 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5039 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5040 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5044 Parenthesis in external links, w/ transclusion or comment
5046 (http://example.com/{{echo|hi}})
5048 (http://example.com<!-- hi -->)
5050 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5051 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5054 <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>
5056 <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>
5060 Replace invalid link targets when serializing
5064 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
5066 [[MediaWiki:Badtitletext|Manual]]
5076 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5078 Normal text. '''''Bold italic text.''''' Normal text.
5080 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5081 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5086 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5087 # parser strips. The wikitext contains just the first half of the bold
5090 Unclosed and unmatched quotes
5092 '''''Bold italic text '''with bold deactivated''' in between.'''''
5094 '''''Bold italic text ''with italic deactivated'' in between.'''''
5098 ..spanning two paragraphs (should not work).'''
5100 '''Bold tag left open
5102 ''Italic tag left open
5106 <!-- Unmatching number of opening, closing tags: -->
5107 '''This year''''s election ''should'' beat '''last year''''s.
5109 ''Tom'''s car is bigger than ''Susan'''s.
5111 Plain ''italic'''s plain
5113 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5114 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5115 </p><p><b>Bold text..</b>
5116 </p><p>..spanning two paragraphs (should not work).
5117 </p><p><b>Bold tag left open</b>
5118 </p><p><i>Italic tag left open</i>
5120 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5121 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5122 </p><p>Plain <i>italic'</i>s plain
5125 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5126 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5127 </p><p><b>Bold text..</b>
5128 </p><p>..spanning two paragraphs (should not work).<b></b>
5129 </p><p><b>Bold tag left open</b>
5130 </p><p><i>Italic tag left open</i>
5132 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5133 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5134 </p><p>Plain <i>italic'</i>s plain
5141 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5144 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5145 # is the bare minimum required by the spec, see:
5146 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5147 # Parsoid team replies: empty table tags are legal in HTML5
5149 A table with no data.
5162 A table with stray table end tags on start tag line (wt2html)
5166 {|style="color: red;"|}
5168 {|style="color: red;" |}
5172 {|style="color: red;"|} id="foo"
5176 {|style="color: red;" |} id="foo"
5180 <table style="color: red;"></table>
5182 <table style="color: red;">
5188 <table style="color: red;" id="foo">
5194 <table style="color: red;" id="foo">
5203 A table with no data (take 2)
5211 # A table with nothing but a caption is invalid XHTML, we might want to render
5212 # this as <p>caption</p>
5213 # Parsoid team replies: table with only a caption is legal in HTML5
5215 A table with nothing but a caption
5223 </caption><tr><td></td></tr></table>
5226 <table><caption> caption</caption></table>
5230 A table with caption with default-spaced attributes and a table row
5233 |+ style="color: red;" | caption1
5239 <caption style="color: red;"> caption1
5248 A table with captions with non-default spaced attributes and a table row
5251 |+style="color: red;"|caption2
5252 |+ style="color: red;"| caption3
5258 <caption style="color: red;">caption2
5260 <caption style="color: red;"> caption3
5269 Table td-cell syntax variations
5273 | foo bar foo || baz
5274 | style='color:red;' | baz
5275 | style='color:red;' || baz
5282 <td> foo bar foo </td>
5285 <td style="color:red;"> baz
5287 <td> style='color:red;' </td>
5315 Simple table but with multiple dashes for row wikitext
5333 Multiplication table
5335 {| border="1" cellpadding="2"
5336 |+Multiplication table
5338 ! × !! 1 !! 2 !! 3
5356 <table border="1" cellpadding="2">
5357 <caption>Multiplication table
5404 Accept "||" in table headings
5419 Accept "!!" in table data
5433 <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>
5438 Accept "||" in indented table headings
5448 </th></tr></table></dd></dl>
5453 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5470 Accept "| !" at start of line in tables (ignore !-attribute)
5474 | !style="color:red" | bar
5486 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 +/-
5490 |style='color:red;'|+1
5491 |style='color:blue;'|-1
5503 <td style="color:red;">+1
5505 <td style="color:blue;">-1
5529 |rowspan=2| Cell 2, row 1 (and 2)
5540 <td rowspan="2"> Cell 2, row 1 (and 2)
5558 {| bgcolor=#ABCDEF border=2
5563 |the original table again
5571 <table bgcolor="#ABCDEF" border="2">
5579 <td>the original table again
5585 Invalid attributes in table cell (bug 1830)
5598 # The "|}" to close the table is missing from the input, so parsoid's
5599 # *2wt modes will fail.
5601 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5603 parsoid=wt2html,html2html
5606 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5610 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5611 <td>]" onmouseover="alert(document.cookie)">test
5619 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5622 # FIXME: The php output is broken.
5624 ! and || in td attributes should not be parsed as <th>/<td>
5627 | style="color: red !important;" data-contrived="put this here ||" | foo
5632 <td> style="color: red !important;" data-contrived="put this here </td>
5638 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
5643 Indented table markup mixed with indented pre content (proposed in bug 6200)
5648 Text that should be rendered preformatted
5656 <pre>Text that should be rendered preformatted
5665 1. Template-generated table cell attributes and cell content
5670 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
5671 |align=center {{table_attribs}}
5672 | <!--foo--> align=center <!--bar--> {{table_attribs}}
5677 <td style="color:red;">Foo
5679 <td style="color:red;">Foo
5681 <td style="color:red;">Foo
5683 <td align="center" style="color:red;">Foo
5685 <td align="center" style="color:red;">Foo
5691 2. Template-generated table cell attributes and cell content
5694 |{{table_attribs_2}}
5699 <td style="color:red;">Foo
5707 <tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
5708 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
5713 3. Template-generated table cell attributes and cell content
5716 !align=center {{table_header_cells}}
5718 |align=center {{table_cells}}
5723 <th align="center" style="color:red;">Foo</th>
5724 <th style="color:red;"><i>Bar</i></th>
5725 <th style="color:brown;"><i>Foo</i> and Baz
5728 <td align="center" style="color:red;">Foo</td>
5729 <td style="color:red;"><i>Bar</i></td>
5730 <td style="color:brown;"><i>Foo</i> and Baz
5735 <tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
5736 <td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
5741 Table with row followed by newlines and table heading
5759 Table with empty line following the start tag
5776 # FIXME: Preserve the attribute properly (with an empty string as value) in
5777 # the PHP parser. Parsoid implements the behavior below.
5779 Table attributes with empty value
5789 </td></tr></tbody></table>
5794 Wikitext table with a lot of comments
5817 Wikitext table with double-line table cell
5834 Table cell with a single comment
5851 Table-cell after a comment-only-empty-line
5868 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5870 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5876 Build table with {{!}}
5878 {{{!}} class="wikitable"
5881 {{!}}- style="color:red;"
5882 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5885 <table class="wikitable">
5891 <tr style="color:red;">
5893 <td style="color:red;"> second data
5899 Build table with pipe as data
5901 {| class="wikitable"
5904 |- style="color:red;"
5905 | data || style="color:red;" | second data
5907 | style="color:red;" | data with | || style="color:red;" | second data with |
5909 || data with | ||| second data with |
5912 <table class="wikitable">
5918 <tr style="color:red;">
5920 <td style="color:red;"> second data
5923 <td style="color:red;"> data with | </td>
5924 <td style="color:red;"> second data with |
5927 <td> data with | </td>
5928 <td> second data with |
5934 Build table with wikilink
5936 {| class="wikitable"
5937 ! header || second header
5938 |- style="color:red;"
5939 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
5941 | data || second data [[Main Page|link|text with pipe]]
5944 <table class="wikitable">
5949 <tr style="color:red;">
5950 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
5951 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
5955 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
5960 # The expected HTML structure in this test is debatable. The PHP parser does
5961 # not parse this kind of table at all. The main focus for Parsoid is on
5962 # round-tripping, so this output is ok for now. TODO: revisit!
5964 Wikitext table with html-syntax row
5974 <td>foo</td></tr></tbody></table>
5977 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5978 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5979 ## PHP parser, which tidy then compounds by fostering the content
5980 ## entirely out of the table. Parsoid recognizes the table context
5981 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5982 ## depends on PHP's treatment of broken table markup!
5984 Implicit <td> after a |-
5986 parsoid=wt2html,html2html
6006 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6008 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6010 parsoid=wt2html,html2html
6043 <tr><td><pre>a</pre></td></tr>
6044 <tr><td> b</td></tr>
6049 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6050 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6052 Lists should be recognized in an implicit <td> context
6054 parsoid=wt2html,html2html
6081 Parsoid: Round-trip tables directly followed by content (bug 51219)
6083 parsoid=wt2html,wt2wt
6108 Parsoid: Default to a newline after tables in new content (bug 51219)
6113 <tr><td>foo</td></tr></tbody></table> bar
6115 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6120 <nowiki> </nowiki>bar
6128 Parsoid: newline inducing block nodes don't suppress <nowiki>
6140 Parsoid: Row-syntax table headings followed by comment & table cells
6142 parsoid=wt2html,wt2wt
6146 <!-- foo --> || baz || quux
6160 <tbody><tr><th> foo </th><th> bar
6161 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6166 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6169 Parsoid: Recover better from broken table attributes
6189 <p>foo</p></td></tr>
6194 Strip unsupported table tags
6245 Plain link, capitalized
6249 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6254 Plain link, uncapitalized
6258 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6265 [[Main Page|The Main Page]]
6267 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6272 Piped link with comment in link text
6274 [[Main Page|The Main<!--front--> Page]]
6276 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6281 Piped link with multiple pipe characters in link text
6283 [[Main Page||The|Main|Page|]]
6285 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6288 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6296 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6301 Broken link with fragment
6303 [[Zigzagzogzagzig#zug]]
6305 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6310 Special page link with fragment
6312 [[Special:Version#anchor]]
6314 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6319 Nonexistent special page link with fragment
6321 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6323 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6330 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6332 <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>
6339 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6341 <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>!!!
6352 Bug 43661: Piped links with identical prefixes
6354 [[prefixed article|prefixed articles with spaces]]
6356 [[prefixed article|prefixed articlesaoeu]]
6358 [[Main Page|Main Page test]]
6360 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6361 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6362 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6368 Link with HTML entity in suffix / tail
6370 [[Main Page]]", [[Main Page]]a
6372 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6375 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&#97;","srcContent":"a"}'>a</span></p>
6379 Link with 3 brackets
6388 Link with 4 brackets
6392 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6397 Piped link with 3 brackets
6399 [[[main page|the main page]]]
6401 <p>[[[main page|the main page]]]
6406 Piped link with extlink-like text
6409 [[Main Page|This is a [bar]]]
6411 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6412 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6415 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6416 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6420 Link with multiple pipes
6422 [[Main Page|The|Main|Page]]
6424 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6428 # Note that parsoid does not munge anchor text; all non-space
6429 # characters are valid in HTML5 ids.
6431 Anchor containing a #. (bug 63430)
6433 [[Main Page#And#Link]]
6435 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6438 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6444 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6446 <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>
6451 Link with space in namespace
6453 [[User talk:Foo bar]]
6455 <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>
6460 MemoryAlpha:AlphaTest
6462 This is an article in the MemoryAlpha namespace
6463 (which shadows the memoryalpha interwiki link).
6467 Namespace takes precedence over interwiki link (bug 51680)
6469 [[MemoryAlpha:AlphaTest]]
6471 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6475 # The previous test doesn't work correctly in html2*, due to not recognizing the
6476 # link as an internal one. This one checks for the correct behavior.
6478 Link to namespace preferred over interwiki with correct rel attribute
6480 parsoid=html2wt,html2html
6482 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
6484 [[MemoryAlpha:AlphaTest]]
6488 Piped link to namespace
6490 [[Meta:Disclaimers|The disclaimers]]
6492 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6499 [[Usually caused by a typo (oops}]]
6501 <p>[[Usually caused by a typo (oops}]]
6508 Just a test of an article title containing a percent.
6512 Link containing % (not as a hex sequence)
6516 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6519 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6522 # note that the parsoid HTML is identical to the previous test output,
6523 # so the previous test ensures that the html2wt mode will generate the
6524 # "not as a hex sequence" wikitext.
6526 Link containing % as a single hex sequence interpreted to char
6528 parsoid=wt2wt,wt2html,html2html
6532 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6535 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6539 Link containing % as a double hex sequence interpreted to hex sequence
6543 <p>[[7%2525 Solution]]
6547 # note that parsoid does not munge anchor text; all non-space
6548 # characters are valid in HTML5 anchors.
6550 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6551 Example for such a section: == < ==
6553 [[%23%3c]][[%23%3e]]
6555 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6558 <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>
6562 Link containing "<#" and ">#" as a hex sequences
6564 [[%3c%23]][[%3e%23]]
6566 <p>[[%3c%23]][[%3e%23]]
6571 Link containing an equals sign
6573 [[Special:BookSources/isbn=4-00-026157-6]]
6575 <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>
6578 <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>
6584 Just a test of an article title containing a tilde.
6587 # note that links containing signatures, like [[Foo~~~~]], are
6588 # massaged by the pre-save transform (PST) and so the tildes are never
6589 # seen by the parser.
6591 Link containing a tilde
6595 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6598 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6602 Link containing double-single-quotes '' (bug 4598)
6604 [[Lista d''e paise d''o munno]]
6606 <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>
6609 <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>
6613 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6615 Some [[Link|pretty ''italics'' and stuff]]!
6617 <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>!
6620 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6624 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6626 ''Some [[Link|pretty ''italics'' and stuff]]!''
6628 <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>
6633 Link with double quotes in title part (literal) and alternate part (interpreted)
6635 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
6639 [[''Pentecoste''|Pentecoste]]
6641 [[''Pentecoste''|''Pentecoste'']]
6643 <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>
6644 </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>
6645 </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>
6646 </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>
6649 <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>
6650 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6651 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6652 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6656 Broken image links with HTML captions (bug 39700)
6658 [[File:Nonexistent|<script></script>]]
6659 [[File:Nonexistent|100x100px|<script></script>]]
6660 [[File:Nonexistent|<]]
6661 [[File:Nonexistent|a<i>b</i>c]]
6663 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6664 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6665 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6666 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6669 <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>
6670 <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>
6671 <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>
6672 <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>
6678 [[http://www.example.com]]
6680 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6683 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6687 Plain link to URL with link text
6689 [[http://www.example.com Link text]]
6691 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6696 Plain link to protocol-relative URL
6698 [[//www.example.com]]
6700 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6703 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6707 Plain link to protocol-relative URL with link text
6709 [[//www.example.com Link text]]
6711 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6716 Plain link to page with question mark in title
6722 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6723 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6728 # I'm fairly sure the expected result here is wrong.
6729 # We want these to be URL links, not pseudo-pages with URLs for titles....
6730 # However the current output is also pretty screwy.
6733 # I'm changing it to match the current output--it arguably makes more
6734 # sense in the light of the test above. Old expected result was:
6735 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6737 # But I think this test is bordering on "garbage in, garbage out" anyway.
6742 Piped link to URL: [[http://www.example.com|an example URL]]
6744 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6747 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6751 BUG 2: [[page|http://url/]] should link to page, not http://url/
6753 [[Main Page|http://url/]]
6755 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6758 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6761 # Parsoid does not mark self-links, by design.
6763 BUG 337: Escaped self-links should be bold
6767 [[Bug462]] [[Bug462]]
6769 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6772 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6774 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6778 Self-link to section should not be bold
6782 [[Main Page#section]]
6784 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6795 Self-link to numeric title
6801 <p><strong class="selflink">0</strong>
6806 Link to numeric-equivalent title
6812 <p><a href="/wiki/00" title="00">00</a>
6817 <nowiki> inside a link
6819 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6821 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6826 Non-breaking spaces in title
6828 [[ Main Page ]]
6830 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6835 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6841 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6846 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6852 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6857 Internal link with en linktrail: no apostrophes (bug 27473)
6863 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6868 Internal link with ca linktrail with apostrophes (bug 27473)
6874 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6879 Internal link with kaa linktrail with apostrophes (bug 27473)
6885 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6890 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6892 [[User:Foo/Test/63636:Bar|Test]]
6894 <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>
6897 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6901 Purely hash wikilink
6903 title=[[User:test/123]]
6907 <p><a href="#a">b</a>
6910 <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>
6914 1. Interaction of linktrail and template encapsulation
6920 <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>
6924 2. Interaction of linktrail and template encapsulation
6928 {{echo|Some [[Fool]]}}s
6930 <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>
6934 3. Interaction of linktrail and template encapsulation
6938 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6940 <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>
6950 Internal link with is link prefix
6954 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6956 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6967 Internal link with is link trail and link prefix
6971 [[mótmælendatrú|xxx]]ar
6973 mótmælenda[[söfnuður]]
6974 mótmælenda[[söfnuður|söfnuðir]]
6975 mótmælenda[[söfnuður|söfnuðir]]xxx
6977 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6978 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6979 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6980 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6981 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6986 Parsoid link trail escaping
6988 parsoid=html2wt,html2html
6990 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6996 Parsoid link prefix escaping
6999 parsoid=html2wt,html2html
7001 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7003 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7007 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7015 [http://wp.org ''foo'']
7017 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7018 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7019 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7020 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7025 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7029 [[Foo|{{echo|a}} b {{echo|c}}]]
7031 <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>
7035 Link with angle bracket after anchor
7039 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7042 <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>
7046 ### Interwiki links (see maintenance/interwiki.sql)
7050 Inline interwiki link
7052 parsoid=wt2html,wt2wt,html2html
7054 [[MeatBall:SoftSecurity]]
7056 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7059 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7063 Inline interwiki link with empty title (bug 2372)
7065 parsoid=wt2html,wt2wt,html2html
7069 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7072 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7076 Interwiki link encoding conversion (bug 1636)
7078 *[[Wikipedia:ro:Olteniţa]]
7079 *[[Wikipedia:ro:Olteniţa]]
7081 <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>
7082 <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>
7086 <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>
7087 <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>
7092 Interwiki link with fragment (bug 2130)
7094 [[MeatBall:SoftSecurity#foo]]
7096 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7100 # Ideally the wikipedia: prefix here should be proto-relative too
7101 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7102 # define the 'en' prefix, and originally the test used 'wikipedia',
7103 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7106 Different interwiki prefixes mapping to the same URL
7114 [[:wikipedia:Foo|Foo]]
7116 [[wikipedia:en:Foo]]
7118 [[:wikipedia:en:Foo]]
7122 <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>
7124 <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>
7126 <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>
7128 <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>
7130 <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>
7132 <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>
7134 <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>
7138 Interwiki links that cannot be represented in wiki syntax
7141 [[meatball:ok#foo|ok with fragment]]
7142 [[meatball:ok_as_well?|ok ending with ? mark]]
7143 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7144 [http://de.wikipedia.org/wiki/#foo is just fragment]
7147 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7148 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7149 <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>
7150 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7151 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7154 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7155 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7156 <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>
7157 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7158 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7162 Interwiki links: trail
7164 [[wikipedia:Foo|Ba]]r
7166 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7169 <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>
7173 Local interwiki link
7175 parsoid=wt2html,wt2wt,html2html
7177 [[local:Template:Foo]]
7179 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7182 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7185 # Parsoid does not mark self-links, by design.
7187 Local interwiki link: self-link to current page
7190 parsoid=wt2html,wt2wt,html2html
7194 <p><strong class="selflink">local:Main Page</strong>
7197 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7201 Local interwiki link: prefix only (bug 64167)
7203 parsoid=wt2html,wt2wt,html2html
7207 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7210 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7214 Local interwiki link: with additional interwiki prefix (bug 61357)
7216 parsoid=wt2html,wt2wt,html2html
7218 [[local:meatball:Hello]]
7220 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7223 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7227 Multiple local interwiki link prefixes
7229 [[local:local:local:local:mi:local:Foo]]
7231 parsoid=wt2html,wt2wt,html2html
7233 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7236 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7240 ### Interlanguage links
7241 ### Language links (so that searching for '### language' matches..)
7247 parsoid=wt2html,wt2wt,html2html
7255 <p>Blah blah blah</p>
7256 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7260 Interlanguage link with spacing
7262 parsoid=wt2html,wt2wt,html2html
7270 <p>Blah blah blah</p>
7271 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7275 Double interlanguage link
7277 parsoid=wt2html,wt2wt,html2html
7286 <p>Blah blah blah</p>
7287 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7288 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7292 Interlanguage link variations
7294 parsoid=wt2html,wt2wt,html2html
7305 <p>Blah blah blah</p>
7306 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7307 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7308 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7309 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7313 Interlanguage link, with prefix links
7323 <p>Blah blah blah</p>
7324 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7328 Double interlanguage link, with prefix links (bug 8897)
7339 <p>Blah blah blah</p>
7340 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7341 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7345 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7353 <p>Blah blah blah</p>
7354 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7358 Parsoid-specific test: Wikilinks with should RT properly
7364 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7369 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7373 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7374 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7376 He&nbsp;llo [[Foo|He&nbsp;llo]]
7378 He&nbsp;llo [[He&nbsp;llo]]
7382 Parsoid: handle constructor well
7388 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7389 </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>
7392 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7394 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7403 # Note that `ko` isn't a known interlanguage prefix
7405 Parsoid: recognize interlanguage links without a target page
7415 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7417 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7420 # Note that `ko` isn't a known interwiki prefix
7422 Parsoid: recognize interwiki links without a target page
7424 parsoid=wt2html,wt2wt,html2html
7430 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7431 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7434 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7435 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7439 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7443 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7446 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7450 Interlanguage link with preceding local interwiki link (bug 68085)
7452 parsoid=wt2html,wt2wt,html2html
7455 [[local:es:Spanish]]
7458 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7462 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7466 Looks like an interlanguage link, but is actually a local interwiki
7468 parsoid=wt2html,wt2wt,html2html
7474 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7478 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7482 ### Redirects, Parsoid-only
7485 1. Simple redirect to page
7489 #REDIRECT [[Main Page]]
7491 <link rel="mw:PageProp/redirect" href="./Main_Page">
7494 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7496 2. Other redirect variants
7498 parsoid=wt2html,wt2wt
7500 #REDIRECT [[Main_Page]]
7501 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7503 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7509 parsoid=wt2html,wt2wt
7514 <li>REDIRECT [[]]</li></ol>
7518 Optional colon in #REDIRECT
7520 # the colon is archaic syntax. we support it for wt2html, but we
7521 # don't care that it roundtrips back to the modern syntax.
7522 parsoid=wt2html,html2html
7524 #REDIRECT:[[Main Page]]
7526 <link rel="mw:PageProp/redirect" href="./Main_Page">
7530 Whitespace in #REDIRECT with optional colon
7532 # the colon and gratuitous whitespace is archaic syntax. we support
7533 # it for wt2html, but we don't care that it roundtrips back to the
7534 # modern syntax (without extra whitespace)
7535 parsoid=wt2html,html2html
7542 <link rel="mw:PageProp/redirect" href="./Main_Page">
7546 Piped link in #REDIRECT
7548 # content after piped link is ignored. we support this syntax,
7549 # but don't care that the piped link is lost when we roundtrip this.
7552 #REDIRECT [[Main Page|bar]]
7554 <link rel="mw:PageProp/redirect" href="./Main_Page">
7558 Redirect to category
7562 #REDIRECT [[Category:Foo]]
7564 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7568 Redirect to category with URL encoding
7572 #REDIRECT [[Category%3AFoo]]
7574 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7578 Redirect to category page
7580 parsoid=wt2html,html2html
7582 #REDIRECT [[:Category:Foo]]
7584 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7588 Redirect to image page (1)
7592 #REDIRECT [[File:Wiki.png]]
7594 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7598 Redirect to image page (2)
7602 #REDIRECT [[Image:Wiki.png]]
7604 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7608 Redirect to language
7612 #REDIRECT [[en:File:Wiki.png]]
7614 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7618 Redirect to interwiki
7622 #REDIRECT [[meatball:File:Wiki.png]]
7624 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7628 Non-English #REDIRECT
7633 #TILVÍSUN [[Main Page]]
7635 <link rel="mw:PageProp/redirect" href="./Main_Page">
7643 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7663 Broken br tag sanitization
7671 # TODO: Fix html2html mode (bug 51055)!
7672 # This </br> handling was added as part of bug 50831; but it
7673 # differs from how PHP+tidy handles this. We should investigate
7676 Parsoid: Broken br tag recognition
7692 Incorrecly removing closing slashes from correctly formed XHTML
7694 <br style="clear:both;" />
7696 <p><br style="clear:both;" />
7701 Failing to transform badly formed HTML into correct XHTML
7703 <br style="clear: left;">
7704 <br style="clear: right;">
7705 <br style="clear: both;">
7707 <p><br style="clear: left;" />
7708 <br style="clear: right;" />
7709 <br style="clear: both;" />
7713 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
7714 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
7716 Handling html with a div self-closing tag
7725 <p><div title />
7729 <p><div title=bar />
7730 <div title=bar/>
7732 <div title="bar/"></div>
7736 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7737 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7738 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
7739 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7740 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7741 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
7745 Handling html with a br self-closing tag
7754 <p><br title="title" />
7755 <br title="title" />
7772 Horizontal ruler (should it add that extra space?)
7787 Horizontal ruler -- 4+ dashes render hr
7796 Horizontal ruler -- eats additional dashes on the same line
7805 Horizontal ruler -- does not collapse dashes on consecutive lines
7816 Horizontal ruler -- <4 dashes render as plain text
7825 Horizontal ruler -- Supports content following dashes on same line
7837 ### Block-level elements
7846 <ul><li>Common list</li>
7848 <li>item 3</li></ul>
7859 <ol><li>Numbered list</li>
7861 <li> item 3</li></ol>
7875 ***#Number on level 4
7877 **#Number on level 3
7878 **#Number on level 3
7882 #** Level 3, but ordered
7885 <ol><li> with numbers</li></ol>
7886 <ul><li> and bullets</li></ul>
7887 <ol><li> and numbers</li></ol></li>
7889 <ul><li>bullet level 2
7890 <ul><li>bullet level 3
7891 <ol><li>Number on level 4</li></ol></li></ul></li>
7893 <ol><li>Number on level 3</li>
7894 <li>Number on level 3</li></ol></li></ul>
7895 <ol><li>number level 2</li></ol></li>
7897 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7898 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7909 <ul><li>bar</li></ul></li></ul>
7919 <ul><li><ul><li>foo</li></ul></li>
7925 Nested lists 3 (first element empty)
7931 <ul><li>bar</li></ul></li></ul>
7936 Nested lists 4 (first element empty)
7941 <ul><li><ul><li></li></ul></li>
7947 Nested lists 5 (both elements empty)
7952 <ul><li><ul><li></li></ul></li>
7958 Nested lists 6 (both elements empty)
7964 <ul><li></li></ul></li></ul>
7969 Nested lists 7 (skip initial nesting levels)
7973 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7978 Nested lists 8 (multiple nesting transitions)
7986 <ul><li><ul><li> bar</li></ul></li>
7987 <li> baz</li></ul></li>
7993 1. Lists with start-of-line-transparent tokens before bullets: Comments
8006 2. Lists with start-of-line-transparent tokens before bullets: Template close
8011 <ul><li>foo bar</li>
8017 List items are not parsed correctly following a <pre> block (bug 785)
8023 <ul><li> <pre>foo</pre></li>
8024 <li> <pre>bar</pre></li>
8030 List items from template
8041 * notSOL{{inner list}}
8044 <ul><li> item 1</li>
8045 <li> item 2</li></ul>
8046 <ul><li> item 0</li>
8048 <li> item 2</li></ul>
8049 <ul><li> item 0</li>
8052 <li> item 2</li></ul>
8057 List interrupted by empty line or heading
8065 <ul><li> foo</li></ul>
8066 <ul><li><ul><li> bar</li></ul></li></ul>
8067 <h2><a href="#A_heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
8068 <ul><li> Another list item</li></ul>
8073 Multiple list tags generated by templates
8094 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8097 <!--This line will NOT split the list-->
8099 <!--This line will NOT split the list either-->
8101 <!--foo--> <!----> <!--This line NOT split the list either-->
8112 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8115 <!--This line will NOT split the list-->
8117 <!--This line will NOT split the list either-->
8119 <!--foo--> <!----> <!--This line NOT split the list
8132 (The PHP parser relies on Tidy for the hack)
8134 parsoid=wt2html,wt2wt
8138 * {{echo|<li>templated li-hack}}
8139 * <!--foo--> <li> unsupported li-hack with preceding comments
8142 <li><li>not a li-hack
8149 <li>templated li-hack</li>
8150 <li>unsupported li-hack with preceding comments</li>
8153 <li>not a li-hack</li>
8158 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8185 Parsoid: Test of whitespace serialization with Templated bullets
8192 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8196 # ------------------------------------------------------------------------
8197 # The next set of tests are about Parsoid's ability to handle badly nested
8198 # tags (parse, minimize scope of fixup, and roundtrip back)
8199 # ------------------------------------------------------------------------
8202 Unbalanced closing block tags break a list
8203 (php parser relies on Tidy to fix up)
8221 # Parsoid fails this test, but it might be tricky to support properly.
8224 Unbalanced closing non-block tags don't break a list
8225 (php parser relies on Tidy to fix up)
8232 <li><span>a</span></li>
8233 <li><span>b</span></li>
8247 Unclosed formatting tags that straddle lists are closed and reopened
8248 (php parser relies on Tidy to fix up)
8250 parsoid=wt2html,wt2wt,html2html
8260 <ol><li> <s> a</s></li>
8261 <li><s> b </s></li></ol>
8264 # Parsoid fails this test, but it might be tricky to support properly.
8267 List embedded in a non-block tag
8268 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
8275 <li><small>foo</small></li>
8285 # This is a bug in the PHP parser + tidy combination.
8286 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8287 # and then fostered out of the table by tidy.)
8288 # We believe the Parsoid output to be correct.
8290 Table with missing opening <tr> tag
8292 parsoid=wt2html,wt2wt
8317 # Note that the current date is hard-coded as
8318 # 1970-01-01T00:02:03Z (a Thursday)
8319 # when running parser tests. The timezone is also fixed to GMT, so
8320 # local date will be identical to current date.
8323 Magic Word: {{CURRENTDAY}}
8332 Magic Word: {{CURRENTDAY2}}
8341 Magic Word: {{CURRENTDAYNAME}}
8350 Magic Word: {{CURRENTDOW}}
8359 Magic Word: {{CURRENTMONTH}}
8368 Magic Word: {{CURRENTMONTH1}}
8377 Magic Word: {{CURRENTMONTHABBREV}}
8379 {{CURRENTMONTHABBREV}}
8386 Magic Word: {{CURRENTMONTHNAME}}
8388 {{CURRENTMONTHNAME}}
8395 Magic Word: {{CURRENTMONTHNAMEGEN}}
8397 {{CURRENTMONTHNAMEGEN}}
8404 Magic Word: {{CURRENTTIME}}
8413 Magic Word: {{CURRENTHOUR}}
8422 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8431 Magic Word: {{CURRENTYEAR}}
8440 Magic Word: {{CURRENTTIMESTAMP}}
8442 {{CURRENTTIMESTAMP}}
8449 Magic Words LOCAL (UTC)
8453 * {{LOCALMONTHNAME}}
8454 * {{LOCALMONTHNAMEGEN}}
8455 * {{LOCALMONTHABBREV}}
8464 * {{LOCALTIMESTAMP}}
8479 <li> 19700101000203</li></ul>
8484 Magic Word: {{FULLPAGENAME}}
8486 title=[[User:Ævar Arnfjörð Bjarmason]]
8490 <p>User:Ævar Arnfjörð Bjarmason
8495 Magic Word: {{FULLPAGENAMEE}}
8497 title=[[User:Ævar Arnfjörð Bjarmason]]
8501 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8506 Magic Word: {{TALKSPACE}}
8508 title=[[User:Ævar Arnfjörð Bjarmason]]
8517 Magic Word: {{TALKSPACE}}, same namespace
8519 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8528 Magic Word: {{TALKSPACE}}, main namespace
8530 title=[[Parser Test]]
8539 Magic Word: {{TALKSPACEE}}
8541 title=[[User:Ævar Arnfjörð Bjarmason]]
8550 Magic Word: {{SUBJECTSPACE}}
8552 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8561 Magic Word: {{SUBJECTSPACE}}, same namespace
8563 title=[[User:Ævar Arnfjörð Bjarmason]]
8572 Magic Word: {{SUBJECTSPACE}}, main namespace
8574 title=[[Parser Test]]
8582 Magic Word: {{SUBJECTSPACEE}}
8584 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8593 Magic Word: {{NAMESPACE}}
8595 title=[[User:Ævar Arnfjörð Bjarmason]]
8604 Magic Word: {{NAMESPACEE}}
8606 title=[[User:Ævar Arnfjörð Bjarmason]]
8615 Magic Word: {{NAMESPACENUMBER}}
8617 title=[[User:Ævar Arnfjörð Bjarmason]]
8626 Magic Word: {{SUBPAGENAME}}
8628 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8637 Magic Word: {{SUBPAGENAMEE}}
8639 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8648 Magic Word: {{ROOTPAGENAME}}
8650 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8654 <p>Ævar Arnfjörð Bjarmason
8659 Magic Word: {{ROOTPAGENAMEE}}
8661 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8665 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8670 Magic Word: {{BASEPAGENAME}}
8672 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8676 <p>Ævar Arnfjörð Bjarmason
8681 Magic Word: {{BASEPAGENAMEE}}
8683 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8687 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8692 Magic Word: {{TALKPAGENAME}}
8694 title=[[User:Ævar Arnfjörð Bjarmason]]
8698 <p>User talk:Ævar Arnfjörð Bjarmason
8703 Magic Word: {{TALKPAGENAMEE}}
8705 title=[[User:Ævar Arnfjörð Bjarmason]]
8709 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8714 Magic Word: {{SUBJECTPAGENAME}}
8716 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8720 <p>User:Ævar Arnfjörð Bjarmason
8725 Magic Word: {{SUBJECTPAGENAMEE}}
8727 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8729 {{SUBJECTPAGENAMEE}}
8731 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8736 Magic Word: {{NUMBEROFFILES}}
8745 Magic Word: {{PAGENAME}}
8747 title=[[User:Ævar Arnfjörð Bjarmason]]
8751 <p>Ævar Arnfjörð Bjarmason
8756 Magic Word: {{PAGENAME}} with metacharacters
8758 title=[['foo & bar = baz']]
8762 <p><i>'foo & bar = baz'</i>
8765 <p><i>'foo & bar = baz'</i></p>
8769 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8771 title=[[*RFC 1234 http://example.com/]]
8775 <p>*RFC 1234 http://example.com/
8778 <p>*RFC 1234 http://example.com/</p>
8782 Magic Word: {{PAGENAMEE}}
8784 title=[[User:Ævar Arnfjörð Bjarmason]]
8788 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8793 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8795 title=[[*RFC 1234 http://example.com/]]
8799 <p>*RFC_1234_http://example.com/
8802 <p>*RFC_1234_http://example.com/</p>
8806 Magic Word: {{REVISIONID}}
8815 Magic Word: {{SCRIPTPATH}}
8824 Magic Word: {{STYLEPATH}}
8833 Magic Word: {{SERVER}}
8837 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8842 Magic Word: {{SERVERNAME}}
8851 Magic Word: {{SITENAME}}
8860 Case-sensitive magic words, when cased differently, should just be template transclusions
8867 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8868 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8869 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8870 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8875 Case-insensitive magic words should still work with weird casing.
8885 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8889 # From plwiki:PLOS_ONE
8891 Parsoid: Page property magic word with magic word contents
8893 {{DISPLAYTITLE:''{{PAGENAME}}''}}
8895 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid=\"{&quot;dsr&quot;:[15,31,2,2]}\"><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[17,29,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;PAGENAME&quot;,&quot;function&quot;:&quot;pagename&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">Main Page</span></i>"}]]}'/>
8899 Parsoid: Template-generated DISPLAYTITLE
8901 {{{{echo|DISPLAYTITLE}}:Foo}}
8903 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,29,null,null],"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
8907 Namespace 1 {{ns:1}}
8916 Namespace 1 {{ns:01}}
8925 Namespace 0 {{ns:0}} (bug 4783)
8933 Namespace 0 {{ns:00}} (bug 4783)
8941 Namespace -1 {{ns:-1}}
8950 Namespace User {{ns:User}}
8959 Namespace User talk {{ns:User_talk}}
8968 Namespace User talk {{ns:uSeR tAlK}}
8977 Namespace File {{ns:File}}
8986 Namespace File {{ns:Image}}
8995 Namespace (lang=de) Benutzer {{ns:User}}
9006 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9012 <p>Benutzer Diskussion
9020 {{urlencode:hi world?!}}
9021 {{urlencode:hi world?!|WIKI}}
9022 {{urlencode:hi world?!|PATH}}
9023 {{urlencode:hi world?!|QUERY}}
9033 Magic Word: prioritize type info over data-parsoid
9037 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9043 Magic Word: serialize on separate line (parsoid)
9045 parsoid=wt2wt,html2wt
9051 foo<meta property="mw:PageProp/notoc"/>bar
9055 Magic Word: rt non-english wikis
9062 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9069 Magic links: internal link to RFC (bug 479)
9073 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9078 Magic links: RFC (bug 479)
9082 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9087 Magic links: RFC (bug 65278)
9089 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9091 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
9096 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9098 RFC      822
9102 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9109 Magic links: ISBN (bug 1937)
9113 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9118 Magic links: ISBN (bug 65278)
9120 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9122 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9125 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:ExtLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
9129 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9131 ISBN      978 0 316 09811 3
9137 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9146 Magic links: PMID incorrectly converts space to underscore
9150 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9155 Magic links: PMID (bug 65278)
9157 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9159 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
9164 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9166 PMID      1234
9170 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9181 Nonexistent template
9183 {{thistemplatedoesnotexist}}
9185 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9190 Template with invalid target containing tags
9192 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9194 <p>{{a<b>b</b>|foo|a=b|a = b}}
9199 Template with invalid target containing unclosed tag
9201 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9203 <p>{{a<b>|foo|a=b|a = b}}</b>
9208 Template with invalid target containing wikilink
9212 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9215 <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>
9219 Template with just whitespace in it, bug #68421
9223 <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>
9229 This is a test template
9237 <p>This is a test template
9242 Template with explicit namespace
9246 <p>This is a test template
9254 This is a test template with parameter {{{param}}}
9260 {{paramtest|param=foo}}
9262 <p>This is a test template with parameter foo
9267 Template:paramtestnum
9273 Template unnamed parameter
9275 {{paramtestnum|Main Page|the main page}}
9277 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9282 Template:templatesimple
9288 Template:templateredirect
9290 #redirect [[Template:templatesimple]]
9294 Template:templateasargtestnum
9300 Template:templateasargtest
9302 {{template{{{templ}}}}}
9306 Template:templateasargtest2
9312 Template with template name as unnamed argument
9314 {{templateasargtestnum|templatesimple}}
9321 Template with template name as argument
9323 {{templateasargtest|templ=simple}}
9330 Template with template name as argument (2)
9332 {{templateasargtest2|templ=templatesimple}}
9339 Template:templateasargtestdefault
9341 {{{{{templ|templatesimple}}}}}
9351 Template with default value
9353 {{templateasargtestdefault}}
9360 Template with default value (value set)
9362 {{templateasargtestdefault|templ=templa}}
9371 {{templateredirect}}
9378 Template with argument in separate line
9380 {{ templateasargtest |
9388 Template with complex template as argument
9391 param ={{ templateasargtest |
9394 <p>This is a test template with parameter (test)
9399 Template with thumb image (with link in description)
9401 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9403 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>
9406 <p>This is a test template with parameter</p>
9407 <div class="thumb tright">
9408 <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>
9409 <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>
9413 <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>
9417 Template:complextemplate
9419 {{{1}}} {{paramtest|
9420 param ={{{param}}}}}
9424 Template with complex arguments
9427 param ={{ templateasargtest |
9428 templ = simple }}|[[Template:complextemplate|link]]}}
9430 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9435 BUG 553: link with two variables in a piped link
9438 |[[{{{1}}}|{{{2}}}]]
9443 <td>[[{{{1}}}|{{{2}}}]]
9449 Magic variable as template parameter
9451 {{paramtest|param={{SITENAME}}}}
9453 <p>This is a test template with parameter MediaWiki
9460 [[{{{param}}}|link]]
9464 Template parameter as link source
9466 {{linktest|param=Main Page}}
9468 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9475 including another template, {{paramtest|param={{{arg}}}}}
9479 Template passing argument to another template
9481 {{paramtest2|arg='hmm'}}
9483 <p>including another template, This is a test template with parameter 'hmm'
9494 Template as link source
9498 [[{{linktest2}}|Main Page]]
9500 [[{{linktest2}}]]Page
9502 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9503 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9504 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9522 Template infinite loop
9526 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9531 Template from main namespace
9550 BUG 529: Template with table, not included at beginning of line
9569 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9589 BUG 41: Template parameters shown as broken links
9598 Template with targets containing wikilinks
9602 {{[[{{echo|foo}}]]}}
9604 {{{{echo|[[foo}}]]}}
9606 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9607 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9615 ''None'' of '''this''' should be
9617 but rather passed unmodified
9624 # hmm, fix this or just deprecate msgnw and document its behavior?
9628 {{msgnw:MSGNW test}}
9630 <p>''None'' of '''this''' should be
9632  but rather passed unmodified
9633 {{test}}
9643 {{int:youhavenewmessages|lots of money|not!}}
9645 <p>You have lots of money (not!).
9652 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9656 <includeonly> and <noinclude> being included
9667 <onlyinclude>Foo</onlyinclude>bar
9671 <onlyinclude> being included
9683 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9687 <onlyinclude> and <includeonly> being included
9696 <includeonly> and <noinclude> on a page
9698 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9705 Un-closed <noinclude>
9712 <onlyinclude> on a page
9714 <onlyinclude>Foo</onlyinclude>bar
9721 Un-closed <onlyinclude>
9728 Self-closed noinclude, includeonly, onlyinclude tags
9739 Unbalanced includeonly and noinclude tags
9743 |b</noinclude></noinclude>
9744 |c</noinclude></includeonly>
9745 |d</includeonly></includeonly>
9754 <td>c</includeonly>
9756 <td>d</includeonly></includeonly>
9762 Template:Includeonly section
9765 ==Includeonly section==
9771 Bug 6563: Edit link generation for section shown by <includeonly>
9773 {{includeonly section}}
9775 <h2><a href="#Includeonly_section" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
9776 <h2><a href="#Section_T-1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
9780 # Uses same input as the contents of [[Template:Includeonly section]]
9782 Bug 6563: Section extraction for section shown by <includeonly>
9787 ==Includeonly section==
9795 Bug 6563: Edit link generation for section suppressed by <includeonly>
9798 ==Includeonly section==
9802 <h2><a href="#Section_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
9807 Bug 6563: Section extraction for section suppressed by <includeonly>
9812 ==Includeonly section==
9820 Un-closed <includeonly>
9827 Includes and comments at SOL
9829 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9836 <includeonly>can have stuff</includeonly>=== here ===
9839 <h2><a href="#hu" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="hu">hu</span></h2>
9844 <h3><a href="#here" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="here">here</span></h3>
9847 <!-- 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>
9849 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9851 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9854 <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>
9858 # TODO: test with DOM fragment reuse!
9860 Parsoid: DOM fragment reuse
9862 parsoid=wt2wt,wt2html
9864 a{{echo|b<table></table>c}}d
9876 <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>
9878 <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">
9879 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9880 </span><p about="#mwt2">cd</p>
9882 <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">
9884 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9886 </span><p about="#mwt3">b</p>
9890 Parsoid: Merge double tds (bug 50603)
9899 <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>
9904 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9914 <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}}]}'>
9916 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9922 ### <includeonly> and <noinclude> in attributes
9925 0. includeonly around the entire attribute
9927 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9929 <p><span id="v2">bar</span>
9934 1. includeonly in html attr key
9936 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9938 <p><span id="foo">bar</span>
9943 2. includeonly in html attr value
9945 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9946 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9948 <p><span id="v1">bar</span>
9949 <span id="v1">bar</span>
9954 3. includeonly in part of an attr value
9956 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9958 <p><span style="color:red;">bar</span>
9963 4. includeonly in table attributes
9987 ### Token Stream Patcher tests
9989 ### These tests won't always pass wt2wt and other modes because
9990 ### on serialization, the table will be output on a new line.
9991 ### For now, we are blacklisting them, and using this to test selser.
9995 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9997 parsoid=wt2html,wt2wt
9999 {{echo|}}{| width = '100%'
10003 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10004 <tbody><tr><td>foo</td></tr>
10009 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10011 parsoid=wt2html,wt2wt
10013 <includeonly>a</includeonly>{| {{{b}}}
10017 <meta typeof="mw:Includes/IncludeOnly"/><meta typeof="mw:Includes/IncludeOnly/End"/><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}}}":""}}'>
10018 <tbody><tr><td>c</td></tr>
10024 ### Testing parsing of templates where a template arg
10025 ### has the same name as the template itself.
10031 {{{quote|{{{1}}}}}}
10035 Templates: Template Name/Arg clash: 1. Use of positional param
10044 Templates: Template Name/Arg clash: 2. Use of named param
10046 {{quote|quote=foo}}
10053 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10062 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10066 Templates: 1. Simple use
10075 Templates: 2. Inside a block tag
10077 <div>{{echo|Foo}}</div>
10078 <blockquote>{{echo|Foo}}</blockquote>
10081 <blockquote>Foo</blockquote>
10091 Templates: P-wrapping: 1a. Templates on consecutive lines
10102 Templates: P-wrapping: 1b. Templates on consecutive lines
10116 Templates: P-wrapping: 1c. Templates on consecutive lines
10119 {{echo|bar}} <div>baz</div>
10132 Templates: P-wrapping: 1d. Template preceded by comment-only line
10141 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10145 Templates: Inline Text: 1. Multiple template uses
10147 {{echo|Foo}}bar{{echo|baz}}
10154 Templates: Inline Text: 2. Back-to-back template uses
10156 {{echo|Foo}}{{echo|bar}}
10163 Templates: Block Tags: 1. Multiple template uses
10165 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10167 <div>Foo</div><div>bar</div><div>baz</div>
10172 Templates: Block Tags: 2. Back-to-back template uses
10174 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10176 <div>Foo</div><div>bar</div>
10180 # This is an edge case relating to paragraph wrapping.
10182 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10187 <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
10192 Templates: Links: 1. Simple example
10194 {{echo|[[Foo|bar]]}}
10196 <p><a href="/wiki/Foo" title="Foo">bar</a>
10201 Templates: Links: 2. Generation of link href
10203 [[{{echo|Foo}}|bar]]
10205 <p><a href="/wiki/Foo" title="Foo">bar</a>
10210 Templates: Links: 3. Generation of part of a link href
10212 [[Fo{{echo|o}}|bar]]
10214 [[Foo{{echo|bar}}]]
10216 [[Foo{{echo|bar}}baz]]
10218 [[Foo{{echo|bar}}|bar]]
10220 [[:Foo{{echo|bar}}]]
10222 [[:Foo{{echo|bar}}|bar]]
10224 <p><a href="/wiki/Foo" title="Foo">bar</a>
10225 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10226 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10227 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10228 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10229 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10234 Templates: Links: 4. Multiple templates generating link href
10236 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10238 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10243 Templates: Links: 5. Generation of link text
10245 [[Foo|{{echo|bar}}]]
10247 <p><a href="/wiki/Foo" title="Foo">bar</a>
10252 Templates: Links: 5. Nested templates (only outermost template should be marked)
10254 {{echo|[[{{echo|Foo}}|bar]]}}
10256 <p><a href="/wiki/Foo" title="Foo">bar</a>
10261 Templates: HTML Tag: 1. Generation of HTML attr. key
10263 <div {{echo|style}}="color:red;">foo</div>
10265 <div style="color:red;">foo</div>
10270 Templates: HTML Tag: 2. Generation of HTML attr. value
10272 <div style={{echo|'color:red;'}}>foo</div>
10274 <div style="color:red;">foo</div>
10279 Templates: HTML Tag: 3. Generation of HTML attr key and value
10281 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10283 <div style="color:red;">foo</div>
10288 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10290 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10292 <div title="This is a long title with just one piece templated">foo</div>
10297 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10299 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10301 <div title="This is a long title with just one piece templated">foo</div>
10306 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10308 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10310 <div title="This is a long title with just one piece templated">foo</div>
10314 # SSS FIXME: While it is great we added support for all this,
10315 # do we want to make this part of the spec? Maybe we want to
10316 # deprecate this kind of usage in the future?
10318 Templates: HTML Tag: 7. Generation of partial attribute key string
10320 <div st{{echo|yle}}="color:red;">foo</div>
10322 <div style="color:red;">foo</div>
10327 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10329 <div {{echo|1=id="v1"}}>bar</div>
10331 <div id="v1">bar</div>
10336 Templates: HTML Tag: 9. Multiple template-generated attributes
10338 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10340 <div id="v1" title="foo">bar</div>
10345 Templates: Support for templates generating attributes and content
10347 {| {{mixed_attr_content_template}}
10352 <table style="color:red;" title="T48811">
10362 <table style="color:red;" title="T48811" about="#mwt1" typeof="mw:Transclusion mw:ExpandedAttrs" data-mw='{"parts":["{| ",{"template":{"target":{"wt":"mixed_attr_content_template","href":"./Template:Mixed_attr_content_template"},"params":{},"i":0}},"\n|-\n|bar\n|}"]}'>
10371 Templates: HTML Tables: 1. Generating start of a HTML table
10373 {{echo|<table><tr><td>foo</td>}}</tr></table>
10375 <table><tr><td>foo</td></tr></table>
10380 Templates: HTML Tables: 2a. Generating middle of a HTML table
10382 <table><tr>{{echo|<td>foo</td>}}</tr></table>
10384 <table><tr><td>foo</td></tr></table>
10389 Templates: HTML Tables: 2b. Generating middle of a HTML table
10391 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10393 <table><tr><td>foo</td></tr></table>
10398 Templates: HTML Tables: 3. Generating end of a HTML table
10400 <table><tr>{{echo|<td>foo</td></tr></table>}}
10402 <table><tr><td>foo</td></tr></table>
10407 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10409 {{echo|<table>}}<tr><td>foo</td></tr></table>
10411 <table><tr><td>foo</td></tr></table>
10416 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10418 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10420 <table><tr><td>foo</td></tr></table>
10425 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10427 <table><tr>{{echo|<td>}}foo</td></tr></table>
10429 <table><tr><td>foo</td></tr></table>
10434 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10436 <table><tr><td>foo{{echo|</td>}}</tr></table>
10438 <table><tr><td>foo</td></tr></table>
10443 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10445 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10447 <table><tr><td>foo</td></tr></table>
10452 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10454 <table><tr><td>foo</td></tr>{{echo|</table>}}
10456 <table><tr><td>foo</td></tr></table>
10461 Templates: HTML Tables: 5. Proper fostering of categories from inside
10463 parsoid=wt2html,wt2wt
10465 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10466 <!--Two categories (Bug 50330)-->
10467 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10469 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10470 <!--Two categories (Bug 50330)-->
10471 <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>
10475 Templates: Wiki Tables: 1a. Fostering of entire template content
10483 <tr><td></td></tr></table>
10495 Templates: Wiki Tables: 1b. Fostering of entire template content
10508 <tr><td></td></tr></table>
10522 Templates: Wiki Tables: 2. Fostering of partial template content
10532 <tr><td></td></tr></table>
10545 Templates: Wiki Tables: 3. td-content via multiple templates
10548 {{echo|{{pipe}}a}}{{echo|b}}
10559 Templates: Wiki Tables: 4. Templated tags, no content
10565 <tr><td></td></tr></table>
10570 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10584 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10598 Templates: Lists: Multi-line list-items via templates
10600 *{{echo|a {{nonexistent|
10602 *{{echo|b {{nonexistent|
10605 <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>
10606 <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>
10611 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10613 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10615 <p><i>ab</i>c<i>d</i>e
10620 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10621 (PHP parser generates misnested html)
10623 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10625 <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>
10629 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10630 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10632 parsoid=wt2html,wt2wt
10634 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10636 <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>
10637 <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>
10638 <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>
10642 Templates: Ugly nesting: 4. Divs opened/closed across templates
10644 a<div>b{{echo|c</div>d}}e
10655 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10661 |{{echo|foo</table>}}
10665 <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|}"]}'>
10669 <td>foo</td></tr></tbody></table><span about="#mwt1">
10670 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10675 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10685 <td>1. {{echo|foo </table>}}</td>
10687 <td>2. {{echo|baz </table>}}</td>
10700 <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>"]}'>
10705 <td>1. foo </td></tr></tbody></table></td>
10707 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10708 </span><span about="#mwt2">
10709 </span><span about="#mwt2">
10710 </span><span about="#mwt2">abc</span><span about="#mwt2">
10711 </span><span about="#mwt2">
10712 </span><span about="#mwt2">
10713 </span><span about="#mwt2">
10714 </span><span about="#mwt2">
10715 </span><span about="#mwt2">
10716 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10717 </span><span about="#mwt2">
10722 Templates: Ugly templates: 3. newline-only template parameter
10731 # This looks like a bug: a single newline triggers p/br for some reason.
10733 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10742 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10743 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10745 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10751 <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
10752 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10756 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10757 # that are "identical" and generate nesting cycles in the algorithm
10759 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10761 {{echo|<table><tr><td><table>}}
10765 <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"}'>
10766 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10767 </table></td></tr></tbody></table>
10771 Parser Functions: 1. Simple example
10780 Parser Functions: 2. Nested use (only outermost should be marked up)
10789 ### Pre-save transform tests
10792 pre-save transform: subst:
10798 This is a test template
10802 pre-save transform: normal template
10812 pre-save transform: nonexistent template
10816 {{thistemplatedoesnotexist}}
10818 {{thistemplatedoesnotexist}}
10823 pre-save transform: subst magic variables
10832 # This is bug 89, which I fixed. -- wtm
10834 pre-save transform: subst: templates with parameters
10838 {{subst:paramtest|param="something else"}}
10840 This is a test template with parameter "something else"
10844 Template:nowikitest
10846 <nowiki>'''not wiki'''</nowiki>
10850 pre-save transform: nowiki in subst (bug 1188)
10854 {{subst:nowikitest}}
10856 <nowiki>'''not wiki'''</nowiki>
10861 Template:commenttest
10863 This template has <!-- a comment --> in it.
10867 pre-save transform: comment in subst (bug 1936)
10871 {{subst:commenttest}}
10873 This template has <!-- a comment --> in it.
10877 pre-save transform: unclosed tag
10881 <nowiki>'''not wiki'''
10883 <nowiki>'''not wiki'''
10887 pre-save transform: mixed tag case
10891 <NOwiki>'''not wiki'''</noWIKI>
10893 <NOwiki>'''not wiki'''</noWIKI>
10897 pre-save transform: unclosed comment in <nowiki>
10901 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10903 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10906 # Leading @ in this template definition works around a limitation
10907 # in parsoid's parserTests which otherwise strips the <span> from the
10908 # result (confusing it for a template wrapper)
10912 @<span onmouseover="alert('crap')">Oh no</span>
10916 (confirming safety of fix for subst bug 1936)
10918 {{Template:dangerous}}
10920 <p>@<span>Oh no</span>
10925 pre-save transform: comment containing gallery (bug 5024)
10929 <!-- <gallery>data</gallery> -->
10931 <!-- <gallery>data</gallery> -->
10935 pre-save transform: comment containing extension
10939 <!-- <tag>data</tag> -->
10941 <!-- <tag>data</tag> -->
10945 pre-save transform: comment containing nowiki
10949 <!-- <nowiki>data</nowiki> -->
10951 <!-- <nowiki>data</nowiki> -->
10955 pre-save transform: <noinclude> in subst (bug 3298)
10965 pre-save transform: <onlyinclude> in subst (bug 3298)
10969 {{subst:Includes2}}
10977 {{<includeonly>subst:</includeonly>Includes}}
10981 Template:SafeSubstTest
10983 {{<includeonly>safesubst:</includeonly>Includes}}
10987 bug 22297: safesubst: works during PST
10991 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10997 bug 22297: safesubst: works during normal parse
11006 subst: does not work during normal parse
11010 <p>{{subst:Includes}}
11015 pre-save transform: context links ("pipe trick")
11019 [[Article (context)|]]
11022 [[Bar:Article (context)|]]
11023 [[:Bar:Article (context)|]]
11025 [[|Article (context)]]
11029 [[Article (context)|Article]]
11030 [[Bar:Article|Article]]
11031 [[:Bar:Article|Article]]
11032 [[Bar:Article (context)|Article]]
11033 [[:Bar:Article (context)|Article]]
11035 [[Article (context)]]
11036 [[Bar:X (Y) Z|X (Y) Z]]
11037 [[:Bar:X (Y) Z|X (Y) Z]]
11041 pre-save transform: context links ("pipe trick") with interwiki prefix
11045 [[interwiki:Article|]]
11046 [[:interwiki:Article|]]
11047 [[interwiki:Bar:Article|]]
11048 [[:interwiki:Bar:Article|]]
11050 [[interwiki:Article|Article]]
11051 [[:interwiki:Article|Article]]
11052 [[interwiki:Bar:Article|Bar:Article]]
11053 [[:interwiki:Bar:Article|Bar:Article]]
11057 pre-save transform: context links ("pipe trick") with parens in title
11059 pst title=[[Somearticle (context)]]
11063 [[Article (context)|Article]]
11067 pre-save transform: context links ("pipe trick") with comma in title
11069 pst title=[[Someplace, Somewhere]]
11072 [[Otherplace, Elsewhere|]]
11073 [[Otherplace, Elsewhere, Anywhere|]]
11075 [[Otherplace, Somewhere|Otherplace]]
11076 [[Otherplace, Elsewhere|Otherplace]]
11077 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11081 pre-save transform: context links ("pipe trick") with parens and comma
11083 pst title=[[Someplace (IGNORED), Somewhere]]
11086 [[Otherplace (place), Elsewhere|]]
11088 [[Otherplace, Somewhere|Otherplace]]
11089 [[Otherplace (place), Elsewhere|Otherplace]]
11093 pre-save transform: context links ("pipe trick") with comma and parens
11095 pst title=[[Who, me? (context)]]
11098 [[Me, Myself, and I (1937 song)|]]
11100 [[Yes, you. (context)|Yes, you.]]
11101 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11105 pre-save transform: context links ("pipe trick") with namespace
11107 pst title=[[Ns:Somearticle]]
11111 [[Ns:Article|Article]]
11115 pre-save transform: context links ("pipe trick") with namespace and parens
11117 pst title=[[Ns:Somearticle (context)]]
11121 [[Ns:Article (context)|Article]]
11125 pre-save transform: context links ("pipe trick") with namespace and comma
11127 pst title=[[Ns:Somearticle, Context, Whatever]]
11131 [[Ns:Article, Context, Whatever|Article]]
11135 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11137 pst title=[[Ns:Somearticle, Context (context)]]
11141 [[Ns:Article (context)|Article]]
11145 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11147 pst title=[[Ns:Somearticle (IGNORED), Context]]
11151 [[Ns:Article, Context|Article]]
11155 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11159 [[Article(context)|]]
11160 [[Bar:Article(context)|]]
11161 [[:Bar:Article(context)|]]
11162 [[|Article(context)]]
11166 [[Article(context)|Article]]
11167 [[Bar:Article(context)|Article]]
11168 [[:Bar:Article(context)|Article]]
11169 [[Article(context)]]
11170 [[Bar:X(Y)Z|X(Y)Z]]
11171 [[:Bar:X(Y)Z|X(Y)Z]]
11175 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11179 [[Article (context)|]]
11180 [[Bar:Article (context)|]]
11181 [[:Bar:Article (context)|]]
11182 [[|Article (context)]]
11186 [[Article (context)|Article]]
11187 [[Bar:Article (context)|Article]]
11188 [[:Bar:Article (context)|Article]]
11189 [[Article (context)]]
11190 [[Bar:X (Y) Z|X (Y) Z]]
11191 [[:Bar:X (Y) Z|X (Y) Z]]
11195 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11199 [[Article(context)|]]
11200 [[Bar:Article(context)|]]
11201 [[:Bar:Article(context)|]]
11202 [[|Article(context)]]
11206 [[Article(context)|Article]]
11207 [[Bar:Article(context)|Article]]
11208 [[:Bar:Article(context)|Article]]
11209 [[Article(context)]]
11210 [[Bar:X(Y)Z|X(Y)Z]]
11211 [[:Bar:X(Y)Z|X(Y)Z]]
11215 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11219 [[Article (context), context|]]
11220 [[Article (context),context|]]
11221 [[Bar:Article (context), context|]]
11222 [[Bar:Article (context),context|]]
11223 [[:Bar:Article (context), context|]]
11224 [[:Bar:Article (context),context|]]
11226 [[Article (context), context|Article]]
11227 [[Article (context),context|Article]]
11228 [[Bar:Article (context), context|Article]]
11229 [[Bar:Article (context),context|Article]]
11230 [[:Bar:Article (context), context|Article]]
11231 [[:Bar:Article (context),context|Article]]
11235 pre-save transform: trim trailing empty lines
11239 Empty lines are trimmed
11245 Empty lines are trimmed
11249 pre-save transform: Signature expansion
11254 * <noinclude>~~~</noinclude>
11255 * <includeonly>~~~</includeonly>
11256 * <onlyinclude>~~~</onlyinclude>
11258 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11259 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11260 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11261 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11266 pre-save transform: Signature expansion in nowiki tags (bug 93)
11272 <nowiki>~~~~</nowiki>
11274 <includeonly><nowiki>~~~~</nowiki></includeonly>
11276 <noinclude><nowiki>~~~~</nowiki></noinclude>
11278 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11280 {{subst:Foo}} shall be converted to FOO
11282 As well as inside noinclude/onlyinclude
11283 <noinclude>{{subst:Foo}}</noinclude>
11284 <onlyinclude>{{subst:Foo}}</onlyinclude>
11286 But not inside includeonly
11287 <includeonly>{{subst:Foo}}</includeonly>
11291 <nowiki>~~~~</nowiki>
11293 <includeonly><nowiki>~~~~</nowiki></includeonly>
11295 <noinclude><nowiki>~~~~</nowiki></noinclude>
11297 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11299 FOO shall be converted to FOO
11301 As well as inside noinclude/onlyinclude
11302 <noinclude>FOO</noinclude>
11303 <onlyinclude>FOO</onlyinclude>
11305 But not inside includeonly
11306 <includeonly>{{subst:Foo}}</includeonly>
11310 Parsoid: Recognize nowiki with trailing space in tags
11314 <nowiki ><div>[[foo]]</nowiki >
11322 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11329 Parsoid: Recognize nowiki with odd capitalization
11333 <noWikI ><div>[[foo]]</Nowiki >
11335 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11340 Parsoid: Escape nowiki with trailing space in tags
11344 <p><nowiki > foo </nowiki ></p>
11345 <p>a<nowiki />b</p>
11346 <p>c<nowiki/ >d</p>
11348 <nowiki > foo </nowiki >
11356 Parsoid: Escape weird noWikI capitalizations
11360 <p><noWikI > foo </NoWikI ></p>
11362 <noWikI > foo </NoWikI >
11366 ### Message transform tests
11369 message transform: magic variables
11379 message transform: should not transform wiki markup
11389 message transform: <noinclude> in transcluded template (bug 4926)
11399 message transform: <onlyinclude> in transcluded template (bug 4926)
11409 {{#special:}} page name, known
11413 {{#special:Recentchanges}}
11415 Special:RecentChanges
11419 {{#special:}} page name with subpage, known
11423 {{#special:Recentchanges/param}}
11425 Special:RecentChanges/param
11429 {{#special:}} page name, unknown
11433 {{#special:foobar nonexistent}}
11435 Special:Foobar nonexistent
11439 {{#speciale:}} page name, known
11443 {{#speciale:Recentchanges}}
11445 Special:RecentChanges
11449 {{#speciale:}} page name with subpage, known
11453 {{#speciale:Recentchanges/param}}
11455 Special:RecentChanges/param
11459 {{#speciale:}} page name, unknown
11463 {{#speciale:foobar nonexistent}}
11465 Special:Foobar_nonexistent
11471 ### For Parsoid-specific tests, see
11472 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11477 parsoid=wt2html,wt2wt,html2html
11479 [[Image:foobar.jpg]]
11481 <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>
11484 <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>
11488 Simple image (using File: namespace, now canonical)
11490 [[File:Foobar.jpg]]
11492 <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>
11495 <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>
11499 Right-aligned image
11501 [[File:Foobar.jpg|right]]
11503 <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>
11506 <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>
11512 [[File:Foobar.jpg|right|Caption text]]
11514 <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>
11517 <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>
11521 Image with caption, bug 53312 #1
11523 [[File:Foobar.jpg|right|Caption page stuff]]
11525 <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>
11528 <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>
11532 Image with caption, bug 53312 #2
11534 [[File:Foobar.jpg|right|Caption page=]]
11536 <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>
11539 <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>
11543 Image with caption, bug 53312 #3
11545 [[File:Foobar.jpg|right|Caption page=stuff]]
11547 <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>
11550 <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>
11554 Allow empty links in image captions (Bug 60753)
11558 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11563 <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>
11566 <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>
11568 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11569 </figcaption></figure>
11573 Titles in unlinked images (T23454)
11575 [[File:Foobar.jpg|link=|stuff]]
11577 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
11582 Link with empty target
11591 Image with link trail
11593 Linktrails should not work for images: [[File:Foobar.jpg]]s
11595 <p>Linktrails should not work for images: <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>s
11598 <p>Linktrails should not work for images: <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>s</p>
11602 Image with empty attribute
11604 parsoid=wt2html,wt2wt,html2html
11606 [[File:Foobar.jpg|right||Caption text]]
11608 <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>
11611 <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>
11615 1. Block image with individual attributes from templates
11617 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11619 <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>
11622 <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>
11626 2. Block Image with individual attributes from templates
11628 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11630 <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>
11633 <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>
11637 3. Inline image with individual attributes from templates
11639 [[File:Foobar.jpg|{{echo|50px}}]]
11641 <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>
11644 <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>
11647 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11648 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11650 Image with multiple attributes from the same template
11652 [[File:Foobar.jpg|{{image_attribs}}]]
11654 <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>
11657 <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>
11661 Image with link tails
11665 123[[File:Foobar.jpg]]456
11666 123[[File:Foobar.jpg|right]]456
11667 123[[File:Foobar.jpg|thumb]]456
11669 <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
11671 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
11672 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
11675 <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>
11677 <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>
11679 <div class="thumb tright">
11680 <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>
11681 <div class="thumbcaption">
11682 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11688 <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>
11689 <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>
11690 <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>
11694 Image with multiple captions -- only last one is accepted
11696 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11698 <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>
11701 <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>
11705 Image with multiple widths -- use last
11707 [[File:Foobar.jpg|200px|300px|caption]]
11709 <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>
11712 <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>
11716 Image with multiple alignments -- use first (bug 48664)
11720 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11722 [[File:Foobar.jpg|middle|text-top|caption]]
11724 <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>
11725 <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>
11728 <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>
11729 <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>
11733 Image with width attribute at different positions
11735 [[File:Foobar.jpg|200px|right|Caption]]
11736 [[File:Foobar.jpg|right|200px|Caption]]
11737 [[File:Foobar.jpg|right|Caption|200px]]
11739 <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>
11740 <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>
11741 <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>
11744 <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>
11745 <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>
11746 <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>
11749 # a sad bit of backward-compatibility
11751 Image with size specified with pxpx (bug 13500, 51628)
11753 parsoid=wt2html,wt2wt,html2html
11755 [[File:Foobar.jpg|20pxpx]]
11756 [[File:Foobar.jpg|200x20pxpx]]
11758 <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>
11759 <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>
11762 <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>
11766 Image with link parameter, wiki target
11768 [[File:Foobar.jpg|link=Main Page]]
11770 <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>
11773 <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>
11776 # parsoid bug 49293 (part 1)
11778 Image with link parameter, URL target
11780 [[File:Foobar.jpg|link=http://example.com/]]
11782 <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>
11785 <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>
11788 # parsoid bug 49293 (part 2)
11790 Image with link parameter, protocol-less URL target
11792 [[File:Foobar.jpg|link=//example.com/]]
11794 <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>
11797 <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>
11801 Image with link parameter, wgExternalLinkTarget
11803 [[Image:foobar.jpg|link=http://example.com/]]
11805 wgExternalLinkTarget='foobar'
11807 <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>
11812 Image with link parameter, wgNoFollowLinks set to false
11814 [[Image:foobar.jpg|link=http://example.com/]]
11816 wgNoFollowLinks=false
11818 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11823 Image with link parameter, wgNoFollowDomainExceptions
11825 [[Image:foobar.jpg|link=http://example.com/]]
11827 wgNoFollowDomainExceptions='example.com'
11829 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11834 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11836 [[Image:foobar.jpg|link=http://example.com/|Title]]
11838 wgExternalLinkTarget='foobar'
11840 <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>
11845 Image with empty link parameter
11847 [[File:Foobar.jpg|link=]]
11849 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11852 <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>
11856 Image with link parameter (wiki target) and unnamed parameter
11858 [[File:Foobar.jpg|link=Main_Page|Title]]
11860 <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>
11863 <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>
11867 Image with link parameter (URL target) and unnamed parameter
11869 [[File:Foobar.jpg|link=http://example.com/|Title]]
11871 <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>
11874 <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>
11878 Thumbnail image with link parameter
11881 parsoid=wt2html,wt2wt,html2html
11883 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11885 <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>
11888 <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>
11892 Manually-specified thumbnail image
11896 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11898 <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>
11901 <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>
11905 Manually-specified thumbnail image with explicit link to wiki page
11908 parsoid=wt2html,wt2wt,html2html
11910 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11912 <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>
11915 <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>
11919 Manually-specified thumbnail image with explicit link to url
11922 parsoid=wt2html,wt2wt,html2html
11924 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11926 <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>
11929 <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>
11933 Manually-specified thumbnail image with explicit no link
11936 parsoid=wt2html,wt2wt,html2html
11938 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11940 <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>
11943 <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>
11947 Manually-specified thumbnail image with explicit link and alt text
11950 parsoid=wt2html,wt2wt,html2html
11952 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11954 <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>
11957 <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>
11961 Image with frame and link
11963 parsoid=wt2html,wt2wt,html2html
11965 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11967 <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>
11970 <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>
11974 Image with frame and link and explicit alt
11976 parsoid=wt2html,wt2wt,html2html
11978 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11980 <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>
11983 <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>
11987 Image with wiki markup in implicit alt
11989 parsoid=wt2html,wt2wt,html2html
11991 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11993 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11995 <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>
11996 </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>
11999 <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>
12000 <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>
12003 ###################
12004 # Conflicting image format options.
12005 # First option specified should 'win'.
12006 # All three cases in each test should be identical.
12009 Image with 'frameless' first.
12011 parsoid=wt2html,wt2wt,html2html
12013 [[File:Foobar.jpg|frameless|caption]]
12015 [[File:Foobar.jpg|frameless|frame|caption]]
12017 [[File:Foobar.jpg|frameless|thumb|caption]]
12019 <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>
12020 </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>
12021 </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>
12024 <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>
12025 <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>
12026 <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>
12030 Image with 'frame' first.
12032 parsoid=wt2html,wt2wt,html2html
12034 [[File:Foobar.jpg|frame|caption]]
12035 [[File:Foobar.jpg|frame|frameless|caption]]
12036 [[File:Foobar.jpg|frame|thumb|caption]]
12038 <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>
12039 <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>
12040 <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>
12043 <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>
12044 <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>
12045 <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>
12049 Image with 'thumb' first.
12051 parsoid=wt2html,wt2wt,html2html
12053 [[File:Foobar.jpg|thumb|caption]]
12054 [[File:Foobar.jpg|thumb|frameless|caption]]
12055 [[File:Foobar.jpg|thumb|frame|caption]]
12057 <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>
12058 <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>
12059 <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>
12062 <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>
12063 <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>
12064 <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>
12067 ###################
12069 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12070 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12071 # Foobar has actual size of 1941x220
12072 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12073 # a scalable format.
12074 # 2. Framed images always ignore size options; always render at default size.
12075 # 3. "Unspecified format" and border are the only types which can be
12079 Image: "unspecified format" and border enlarge
12081 parsoid=wt2html,wt2wt,html2html
12083 [[File:Foobar.jpg|2000px]]
12085 [[File:Foobar.jpg|border|2000px]]
12087 <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>
12088 </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>
12091 <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>
12092 <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>
12096 Image: "unspecified format" and border reduce
12098 parsoid=wt2html,wt2wt,html2html
12100 [[File:Foobar.jpg|1000px]]
12102 [[File:Foobar.jpg|border|1000px]]
12104 <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>
12105 </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>
12108 <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>
12109 <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>
12113 Image: thumbs reduce
12115 parsoid=wt2html,wt2wt,html2html
12117 [[File:Foobar.jpg|thumb|50px]]
12119 <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>
12122 <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>
12126 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12128 parsoid=wt2html,wt2wt,html2html
12130 [[File:Foobar.jpg|thumb|2000px]]
12132 [[File:Foobar.svg|thumb|2000px]]
12134 <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>
12135 <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>
12138 <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>
12139 <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>
12143 Image: frameless can reduce in size
12145 parsoid=wt2html,wt2wt,html2html
12147 [[File:Foobar.jpg|frameless|50px]]
12149 <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>
12152 <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>
12156 Image: bitmap frameless can't be enlarged past original size, but vector can
12158 parsoid=wt2html,wt2wt,html2html
12160 [[File:Foobar.jpg|frameless|2000px]]
12162 [[File:Foobar.svg|frameless|2000px]]
12164 <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>
12165 </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>
12168 <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>
12169 <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>
12173 Image: framed images are always unscaled.
12175 parsoid=wt2html,wt2wt,html2html
12177 [[File:Foobar.jpg|frame]]
12179 [[File:Foobar.jpg|frame|50px]]
12181 [[File:Foobar.jpg|frame|50x50px]]
12183 [[File:Foobar.jpg|frame|2000px]]
12185 <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>
12186 <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>
12187 <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>
12188 <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>
12191 <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>
12192 <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>
12193 <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>
12194 <figure typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></figure>
12197 ###################
12200 Link to image page- image page normally doesn't exists, hence edit link
12201 Add test with existing image page
12202 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12206 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12211 bug 18784 Link to non-existent image page with caption should use caption as link text
12213 [[:Image:test|caption]]
12215 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12220 Frameless image caption with a free URL
12222 [[File:Foobar.jpg|http://example.com]]
12224 <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>
12227 <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>
12231 Thumbnail image caption with a free URL
12235 [[File:Foobar.jpg|thumb|http://example.com]]
12237 <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>
12240 <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>
12244 Thumbnail image caption with a free URL and explicit alt
12247 parsoid=wt2html,wt2wt,html2html
12249 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12251 <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>
12254 <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>
12258 SVG thumbnails with no language set
12261 [[File:Foobar.svg|thumb|caption]]
12263 <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>
12266 <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>
12270 SVG thumbnails with language de
12272 parsoid=wt2html,wt2wt,html2html
12274 [[File:Foobar.svg|thumb|caption|lang=de]]
12276 <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>
12279 <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>
12283 SVG thumbnails with invalid language code
12285 parsoid=wt2html,wt2wt,html2html
12287 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12289 <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>
12292 <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>
12296 BUG 1887: A ISBN with a thumbnail
12298 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12300 <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>
12303 <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>
12307 BUG 1887: A RFC with a thumbnail
12309 [[File:Foobar.jpg|thumb|This is RFC 12354]]
12311 <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>
12314 <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>
12318 BUG 1887: A mailto link with a thumbnail
12320 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
12322 <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>
12325 <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>
12328 # Pending resolution to bug 368
12330 BUG 648: Frameless image caption with a link
12332 [[File:Foobar.jpg|text with a [[link]] in it]]
12334 <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>
12337 <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>
12341 BUG 648: Frameless image caption with a link (suffix)
12343 [[File:Foobar.jpg|text with a [[link]]foo in it]]
12345 <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>
12348 <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>
12352 BUG 648: Frameless image caption with an interwiki link
12354 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
12356 <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>
12359 <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>
12363 BUG 648: Frameless image caption with a piped interwiki link
12365 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
12367 <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>
12370 <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>
12374 Escape HTML special chars in image alt text
12376 [[File:Foobar.jpg|& < > "]]
12378 <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>
12381 <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>
12385 BUG 499: Alt text should have Ӓ, not &1234;
12387 [[File:Foobar.jpg|♀]]
12389 <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>
12392 <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>
12396 Broken image caption with link
12398 parsoid=wt2html,wt2wt,html2html
12400 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
12402 <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.
12405 <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>
12409 Image caption containing another image
12411 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12413 <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>
12416 <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>
12420 Image: caption containing a newline
12422 [[File:Foobar.jpg|This
12425 <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>
12428 <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>
12432 Image: caption containing leading space
12433 (The leading space should not trigger nowiki escaping in wt2wt mode)
12435 [[File:Foobar.jpg|thumb| bar]]
12437 <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>
12440 <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>
12444 Image: caption containing a table
12446 parsoid=wt2html,wt2wt,html2html
12448 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12454 and some more text.]]
12456 <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>
12459 <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
12462 <tr><th>Foo </th><th>Bar</th></tr>
12465 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12469 Bug 3090: External links other than http: in image captions
12471 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12473 <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>
12476 <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>
12482 parsoid=wt2html,wt2wt,html2html
12484 [[Image:foobar.jpg|a|class=b]]
12486 <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>
12489 <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>
12493 Localized image handling (1).
12495 parsoid=wt2html,wt2wt,html2html
12498 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12500 <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>
12503 <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>
12507 Localized image handling (2).
12510 parsoid=wt2html,wt2wt,html2html
12513 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12515 <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>
12518 <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>
12522 "border", "frameless" and "class" attributes on an image.
12525 parsoid=wt2html,wt2wt,html2html
12527 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12529 <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>
12532 <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>
12535 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12537 Invalid image attributes (bug 62500)
12540 parsoid=wt2html,wt2wt,html2html
12542 [[File:Foobar.jpg|thumb|float|left|caption]]
12544 [[File:Foobar.jpg|thumb|righ|caption]]
12546 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12548 <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>
12549 <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>
12550 <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>
12553 <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>
12554 <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>
12555 <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>
12561 #REDIRECT [[File:Barfoo.jpg]]
12564 # FIXME: Parsoid should run this test -- but we'd need to teach the
12565 # mockAPI about the redirected Barfoo.jpg image.
12569 [[Image:Barfoo.jpg]]
12571 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12576 Missing image with uploads disabled
12580 [[File:Foobaz.jpg]]
12582 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12585 <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>
12588 # Parsoid-specific testing for images
12589 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12590 # Currently imperfect due to a flaw in the Parsoid testrunner
12592 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12596 Parsoid-specific image handling - simple image with size and middle alignment
12598 [[File:Foobar.jpg|middle|50px]]
12600 <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>
12604 Parsoid-specific image handling - simple image with size, middle alignment,
12605 non-standard namespace alias
12607 parsoid=wt2wt,wt2html,html2html
12609 [[Image:Foobar.jpg|middle|50px]]
12611 <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>
12615 Parsoid-specific image handling - simple image with size and middle alignment
12618 [[File:Foobar.jpg|50px|middle]]
12620 <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>
12624 Parsoid-specific image handling - simple image with size and middle alignment
12625 and non-standard namespace name
12627 parsoid=wt2html,wt2wt,html2html
12629 [[Image:Foobar.jpg|50px|middle]]
12631 <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>
12635 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12637 [[File:Foobar.jpg|500x10px|baseline|caption]]
12639 <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>
12643 Parsoid-specific image handling - simple image with border and size spec
12645 [[File:Foobar.jpg|50px|border|caption]]
12647 <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>
12651 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12653 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12655 <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>
12659 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12662 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12664 <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>
12668 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12670 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12672 <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>
12676 Parsoid-specific image handling - thumbnail with specific size, halign,
12677 valign, and caption (existing content)
12679 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12681 <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>
12685 Parsoid-specific image handling - framed image with specific size and caption
12688 parsoid=wt2html,wt2wt,html2html
12690 [[File:Foobar.jpg|frame|500x50px|caption]]
12692 <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>
12696 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12699 parsoid=wt2html,wt2wt,html2html
12701 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12703 <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>
12707 Parsoid-specific image handling - frameless image with specific size, border, and caption
12709 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12711 <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>
12715 Parsoid-specific image handling - simple image with a formatted caption
12717 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12719 <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>
12723 Parsoid-specific image handling - caption with a template in it
12725 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12727 <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>
12731 Parsoid-specific image handling - caption with unbalanced tags in it
12733 parsoid=wt2html,wt2wt,html2html
12736 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12740 <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>
12745 Parsoid-specific image handling - empty caption (1)
12747 parsoid=wt2html,wt2wt
12749 [[File:Foobar.jpg|thumb|]]
12751 <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>
12754 # empty captions don't get serialized unless we're in the "round trip" case
12756 Parsoid-specific image handling - empty caption (2)
12760 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12761 <a href="File:Foobar.jpg">
12762 <img resource="./File:Foobar.jpg"
12763 src="//example.com/images/3/3a/Foobar.jpg"
12764 height="25" width="220"/>
12766 <figcaption></figcaption>
12769 [[File:Foobar.jpg|thumb]]
12773 Parsoid-specific image handling - whitespace caption
12775 [[File:Foobar.jpg|thumb| ]]
12777 <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>
12781 Parsoid-specific image handling - lang option
12784 [[File:Foobar.svg|lang=de|caption]]
12788 <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>
12797 Subpage test/subpage
12805 subpage title=[[Subpage test]]
12809 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12814 Subpage noslash link
12816 subpage title=[[Subpage test]]
12820 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12825 Subpage test/1/2/subpage
12831 Relative subpage noslash link
12833 parsoid=wt2wt,wt2html,html2html
12834 subpage title=[[Subpage test/1/2/3/4]]
12840 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
12841 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
12844 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
12845 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12849 Parsoid: dot-slash prefixed wikilinks
12859 </p><p>[[././baz/]]
12864 </p><p>[[././baz/]]
12869 Render invalid page names as plain text (bug 51090)
12882 [[{{echo|./../foo}}|bar]]
12883 [[{{echo|foo/.}}|bar]]
12884 [[{{echo|foo/..}}|bar]]
12885 [[{{echo|foo~~~~bar}}]]
12886 [[{{echo|foo>bar}}]]
12887 [[{{echo|foo././bar}}]]
12888 [[{{echo|foo{bar}}]]
12889 [[{{echo|foo}bar}}]]
12890 [[{{echo|foo[bar}}]]
12891 [[{{echo|foo]bar}}]]
12892 [[{{echo|foo<bar}}]]
12894 <p>[[./../foo|bar]]
12904 </p><p>[[./../foo|bar]]
12917 <p>[[./../foo|bar]]
12928 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12929 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12930 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12931 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12932 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12933 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12934 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12935 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12936 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12937 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12938 [[<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>
12946 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12951 BUG 561: {{/Subpage}}
12953 subpage title=[[Page]]
12957 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12965 Category:MediaWiki User's Guide
12973 [[:Category:MediaWiki User's Guide]]
12975 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12984 [[Category:MediaWiki User's Guide]]
12986 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12990 PAGESINCATEGORY invalid title fatal (r33546 fix)
12992 {{PAGESINCATEGORY:<bogus>}}
12999 Category with different sort key
13003 [[Category:MediaWiki User's Guide|Foo]]
13005 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13009 Category with identical sort key
13013 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13015 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13019 Category with empty sort key
13024 [[Category:MediaWiki User's Guide|]]
13026 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13030 Category with empty sort key and parentheses
13035 [[Category:Foo (bar)|]]
13037 [[Category:Foo (bar)|Foo]]
13041 Category with link tail
13046 123[[Category:Foo]]456
13048 123[[Category:Foo]]456
13052 Category with template
13057 [[Category:{{echo|Foo}}]]
13059 [[Category:{{echo|Foo}}]]
13063 Category with template in sort key
13068 [[Category:Foo|{{echo|Bar}}]]
13070 [[Category:Foo|{{echo|Bar}}]]
13074 Category with template in sort key and title
13079 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13081 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13085 Category / paragraph interactions
13087 Foo [[Category:Baz]] Bar
13089 Foo [[Category:Baz]]
13097 [[Category:Baz]] Bar
13110 {{echo|[[Category:Baz]]}}
13125 Parsoid: Serialize link to category page with colon escape
13131 [[:Category:Foo|Bar]]
13134 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13135 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13140 Parsoid: Link prefix/suffixes aren't applied to category links
13142 parsoid=wt2html,wt2wt,html2html
13147 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
13151 Parsoid: Serialize link to file page with colon escape
13157 [[:File:Foo.png|Bar]]
13160 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
13161 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
13166 Parsoid: Serialize a genuine category link without colon escape
13171 [[Category:Foo|Bar]]
13173 <link rel="mw:PageProp/Category" href="Category:Foo">
13174 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
13178 Normalize hrefs properly before testing for invalid link targets (bug 70894)
13182 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
13184 [[Category:Toxine bactérienne]]
13188 Parsoid: Defaultsort
13190 {{DEFAULTSORT:Foo}}
13192 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
13196 Parsoid: Defaultsort (template-generated)
13198 {{{{echo|DEFAULTSORT}}:Foo}}
13200 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,28,null,null],"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
13204 ### Inter-language links
13207 Interlanguage links
13215 es:Alimento fr:Nourriture zh:食品
13217 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
13218 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
13219 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
13223 Duplicate interlanguage links (bug 24502)
13234 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
13235 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
13236 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
13237 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
13244 Basic section headings
13251 ===Smaller headline===
13254 <h2><a href="#Headline_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13257 <h2><a href="#Headline_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13260 <h3><a href="#Smaller_headline" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13266 Section headings with TOC
13269 === Subheadline 1 ===
13270 ===== Skipping a level =====
13271 ====== Skipping a level ======
13275 ===Another headline===
13277 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13279 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
13281 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
13283 <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>
13285 <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>
13292 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
13294 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
13300 <h2><a href="#Headline_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13301 <h3><a href="#Subheadline_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13302 <h5><a href="#Skipping_a_level" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13303 <h6><a href="#Skipping_a_level_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13304 <h2><a href="#Headline_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13307 <h3><a href="#Another_headline" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13312 TOC anchors don't collide
13320 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13322 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
13323 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
13324 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
13325 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
13329 <h2><a href="#Headline_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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=1" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13330 <h2><a href="#Headline" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Headline">Headline</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">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13331 <h2><a href="#Headline_2_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Headline_2_2">Headline 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: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13332 <h2><a href="#Headline_3" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Headline_3">Headline</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: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13336 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
13338 Handling of sections up to level 6 and beyond
13341 == Level 2 Heading==
13342 === Level 3 Heading===
13343 ==== Level 4 Heading====
13344 ===== Level 5 Heading=====
13345 ====== Level 6 Heading======
13346 ======= Level 7 Heading=======
13347 ======== Level 8 Heading========
13348 ========= Level 9 Heading=========
13349 ========== Level 10 Heading==========
13351 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13353 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
13355 <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>
13357 <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>
13359 <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>
13361 <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>
13363 <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>
13364 <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>
13365 <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>
13366 <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>
13367 <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>
13381 <h1><a href="#Level_1_Heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13382 <h2><a href="#Level_2_Heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13383 <h3><a href="#Level_3_Heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13384 <h4><a href="#Level_4_Heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13385 <h5><a href="#Level_5_Heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13386 <h6><a href="#Level_6_Heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13387 <h6><a href="#.3D_Level_7_Heading.3D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13388 <h6><a href="#.3D.3D_Level_8_Heading.3D.3D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13389 <h6><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13390 <h6><a href="#.3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13395 TOC regression (bug 9764)
13399 ==== title 1.1.1 ====
13404 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13406 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13408 <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>
13410 <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>
13413 <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>
13416 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13418 <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>
13424 <h2><a href="#title_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13425 <h3><a href="#title_1.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13426 <h4><a href="#title_1.1.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13427 <h3><a href="#title_1.2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13428 <h2><a href="#title_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13429 <h3><a href="#title_2.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13434 TOC with wgMaxTocLevel=3 (bug 6204)
13440 ==== title 1.1.1 ====
13445 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13447 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13449 <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>
13450 <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>
13453 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13455 <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>
13461 <h2><a href="#title_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13462 <h3><a href="#title_1.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13463 <h4><a href="#title_1.1.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13464 <h3><a href="#title_1.2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13465 <h2><a href="#title_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13466 <h3><a href="#title_2.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13471 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13477 ====Section 1.1.1====
13478 ====Section 1.1.1.1====
13481 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13483 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13485 <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>
13488 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13492 <h2><a href="#Section_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13493 <h3><a href="#Section_1.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13494 <h4><a href="#Section_1.1.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13495 <h4><a href="#Section_1.1.1.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13496 <h2><a href="#Section_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13502 Resolving duplicate section names
13507 <h2><a href="#Foo_bar" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13508 <h2><a href="#Foo_bar_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13513 Resolving duplicate section names with differing case (bug 10721)
13518 <h2><a href="#Foo_bar" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13519 <h2><a href="#Foo_Bar_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13531 Template with sections, __NOTOC__
13538 <h2><a href="#Section_0" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13539 <h3><a href="#Section_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13540 <h2><a href="#Section_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13541 <h2><a href="#Section_4" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13546 __NOEDITSECTION__ keyword
13552 <h2><a href="#Section_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Section_1">Section 1</span></h2>
13553 <h2><a href="#Section_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Section_2">Section 2</span></h2>
13558 Link inside a section heading
13560 ==Section with a [[Main Page|link]] in it==
13562 <h2><a href="#Section_with_a_link_in_it" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13567 TOC regression (bug 12077)
13574 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13576 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13578 <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>
13581 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13585 <h2><a href="#title_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13586 <h3><a href="#title_1.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13587 <h2><a href="#title_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13592 BUG 1219 URL next to image (good)
13594 http://example.com [[File:Foobar.jpg]]
13596 <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>
13599 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> <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>
13603 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13606 The line above must have a trailing space!
13609 But just in case it doesn't...
13611 <h1><a href="#.3D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13612 <p>The line above must have a trailing space!
13614 <h1><a href="#.3D_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13615 <p>But just in case it doesn't...
13620 Header with special characters (bug 25462)
13622 The tooltips shall not show entities to the user (ie. be double escaped)
13639 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13641 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13643 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13644 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13645 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13646 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13647 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13651 <h2><a href="#text_.3E_text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13654 <h2><a href="#text_.3C_text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13657 <h2><a href="#text_.26_text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13660 <h2><a href="#text_.27_text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13663 <h2><a href="#text_.22_text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13669 Header with space, plus and underscore as entity
13671 Id should not contain + for spaces
13673 == Space between Text ==
13676 == Space-Entity between Text ==
13679 == Plus+between+Text ==
13682 == Plus-Entity+between+Text ==
13685 == Underscore_between_Text ==
13688 == Underscore-Entity_between_Text ==
13691 [[#Space between Text]]
13692 [[#Space-Entity between Text]]
13693 [[#Plus+between+Text]]
13694 [[#Plus-Entity+between+Text]]
13695 [[#Underscore_between_Text]]
13696 [[#Underscore-Entity_between_Text]]
13698 <p>Id should not contain + for spaces
13700 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13702 <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>
13703 <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>
13704 <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>
13705 <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>
13706 <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>
13707 <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>
13711 <h2><a href="#Space_between_Text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13714 <h2><a href="#Space-Entity_between_Text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13717 <h2><a href="#Plus.2Bbetween.2BText" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13720 <h2><a href="#Plus-Entity.2Bbetween.2BText" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13723 <h2><a href="#Underscore_between_Text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13726 <h2><a href="#Underscore-Entity_between_Text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13728 </p><p><a href="#Space_between_Text">#Space between Text</a>
13729 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13730 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13731 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13732 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13733 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13738 Headers with excess '=' characters
13739 (Are similar tests necessary beyond the 1st level?)
13743 =''italic'' heading==
13744 ==''italic'' heading=
13746 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13748 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13749 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13750 <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>
13751 <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>
13755 <h1><a href="#foo.3D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13756 <h1><a href="#.3Dfoo" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13757 <h1><a href="#italic_heading.3D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13758 <h1><a href="#.3Ditalic_heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
13763 HTML headers vs TOC (bug 23393)
13764 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13776 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13778 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13780 <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>
13781 <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>
13784 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13786 <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>
13787 <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>
13793 <h1><a href="#Header_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Header_1">Header 1</span></h1>
13794 <h2><a href="#Header_1.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13795 <h2><a href="#Header_1.2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13796 <h1><a href="#Header_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Header_2">Header 2</span></h1>
13797 <h2><a href="#Header_2.1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13798 <h2><a href="#Header_2.2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13803 Single-line or multiline-comments can follow headings
13805 parsoid=wt2html,wt2wt
13813 <h2><a href="#foo" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="foo">foo</span></h2>
13814 <h2><a href="#bar" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="bar">bar</span></h2>
13815 <h2><a href="#baz" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="baz">baz</span></h2>
13820 BUG 1219 URL next to image (broken)
13822 http://example.com[[File:Foobar.jpg]]
13824 <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>
13827 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a><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>
13831 Bug 1186 news: in the middle of text
13833 http://en.wikinews.org/wiki/Wikinews:Workplace
13835 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13841 Namespaced link must have a title
13850 Namespaced link must have a title (bad fragment version)
13852 [[Project:#fragment]]
13854 <p>[[Project:#fragment]]
13860 ### HTML tags and HTML attributes
13864 div with no attributes
13866 <div>HTML rocks</div>
13868 <div>HTML rocks</div>
13873 div with double-quoted attribute
13875 <div id="rock">HTML rocks</div>
13877 <div id="rock">HTML rocks</div>
13882 div with single-quoted attribute
13884 <div id='rock'>HTML rocks</div>
13886 <div id="rock">HTML rocks</div>
13891 div with unquoted attribute
13893 <div id=rock>HTML rocks</div>
13895 <div id="rock">HTML rocks</div>
13900 div with illegal double attributes
13902 <div id="a" id="b">HTML rocks</div>
13904 <div id="b">HTML rocks</div>
13908 # FIXME: produce empty string instead of "class" in the PHP parser, following
13911 div with empty attribute value, space before equals
13915 <div class =>HTML rocks</div>
13917 <div class="">HTML rocks</div>
13922 div with multiple empty attribute values
13926 <div id= title=>HTML rocks</div>
13928 <div id="" title="">HTML rocks</div>
13933 table with multiple empty attribute values
13941 <table title="" id="">
13942 <tbody><tr><td> hi</td></tr>
13947 div with braces in attribute value
13949 <div title="{}">Foo</div>
13951 <div title="{}">Foo</div>
13954 <div title="{}">Foo</div>
13957 # This it very inconsistent in the PHP parser: it returns
13958 # class="class" if there is a space between the name and the equal sign (see
13959 # 'div with empty attribute value, space before equals'), but strips the
13960 # attribute completely if the space is missing. We hope that not much content
13961 # depends on this, so are implementing the behavior below in Parsoid for
13962 # consistencies' sake.
13963 # FIXME: fix this behavior in the PHP parser?
13965 div with empty attribute value, no space before equals
13967 parsoid=wt2html,html2html
13969 <div class=>HTML rocks</div>
13971 <div>HTML rocks</div>
13974 <div class="">HTML rocks</div>
13978 HTML multiple attributes correction
13980 <p class="error" class="awesome">Awesome!</p>
13982 <p class="awesome">Awesome!</p>
13987 Table multiple attributes correction
13990 !+ class="error" class="awesome"| status
13995 <th class="awesome"> status
14003 <DIV ID="x">HTML ROCKS</DIV>
14005 <div id="x">HTML ROCKS</div>
14010 Non-ASCII pseudo-tags are rendered as text
14019 Pseudo-tag with URL 'name' renders as url link
14021 <http://example.com/>
14023 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
14028 text with amp in the middle of nowhere
14032 <p>Remember AT&T?
14037 text with character entity: eacute
14039 I always thought é was a cute letter.
14041 <p>I always thought é was a cute letter.
14044 <p>I always thought é was a cute letter.</p>
14048 text with entity-escaped character entity-like string: eacute
14050 I always thought &eacute; was a cute letter.
14052 <p>I always thought &eacute; was a cute letter.
14057 text with undefined character entity: xacute
14059 I always thought &xacute; was a cute letter.
14061 <p>I always thought &xacute; was a cute letter.
14065 # TODO: generalize to PHP parser?
14071 <data value="5">five</data>
14072 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14073 <mark>This highlighted text</mark>
14075 <p><data value="5">five</data>
14076 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14077 <mark>This highlighted text</mark></p>
14081 HTML tag with leading space is parsed as text
14085 <p>< div>foo< /div>
14090 ### Nesting tests (see bug 41545, 50604, 51081)
14093 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
14094 # Note that html2wt is considerably more difficult if we use <b> in
14095 # the test case, instead of <big>
14097 Ensure that HTML adoption agency algorithm is properly implemented.
14099 <big>X<big>Y</big>Z</big>
14101 <p><big>X<big>Y</big>Z</big>
14105 # This was bug 41545 in the PHP parser.
14106 # Note that tidy doesn't handle this correctly.
14110 <kbd>X<kbd>Y</kbd>Z</kbd>
14112 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14116 # The following cases were bug 51081 in the PHP parser.
14117 # Note that there are some other nestable tags (b, i, etc) which are
14118 # not covered; see bug 51081 for discussion.
14120 # Note that tidy doesn't handle this correctly.
14124 <em>X<em>Y</em>Z</em>
14126 <p><em>X<em>Y</em>Z</em>
14130 # Note that tidy doesn't handle this correctly.
14132 Nesting of <strong>
14134 <strong>X<strong>Y</strong>Z</strong>
14136 <p><strong>X<strong>Y</strong>Z</strong>
14145 <p><q>X<q>Y</q>Z</q></p>
14148 # Note that tidy doesn't handle this correctly.
14152 <ruby>X<ruby>Y</ruby>Z</ruby>
14154 <p><ruby>X<ruby>Y</ruby>Z</ruby>
14158 # Note that tidy doesn't handle this correctly.
14162 <bdo>X<bdo>Y</bdo>Z</bdo>
14164 <p><bdo>X<bdo>Y</bdo>Z</bdo>
14176 [[Media:Foobar.jpg]]
14178 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
14183 Media link with text
14185 [[Media:Foobar.jpg|A neat file to look at]]
14187 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
14191 # FIXME: this is still bad HTML tag nesting
14193 Media link with nasty text
14194 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
14196 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
14198 <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>
14201 <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>
14205 Media link to nonexistent file (bug 1702)
14207 [[Media:No such.jpg]]
14209 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
14214 Image link to nonexistent file (bug 1850 - good)
14216 [[File:No_such.jpg]]
14218 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
14221 <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>
14225 :Image link to nonexistent file (bug 1850 - bad)
14227 [[:Image:No such.jpg]]
14229 <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>
14232 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
14238 Character reference normalization in link text (bug 1938)
14240 [[Main Page|this&that]]
14242 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
14249 Test for unicode normalization
14251 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
14255 (bug 19451) Links should refer to the normalized form.
14263 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14264 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14265 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14266 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14267 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14272 Empty attribute crash test (bug 2067)
14274 <font color="">foo</font>
14276 <p><font color="">foo</font>
14281 Empty attribute crash test single-quotes (bug 2067)
14283 <font color=''>foo</font>
14285 <p><font color="">foo</font>
14290 Attribute test: equals, then nothing
14292 <font color=>foo</font>
14294 <p><font>foo</font>
14299 Attribute test: unquoted value
14301 <font color=x>foo</font>
14303 <p><font color="x">foo</font>
14308 Attribute test: unquoted but illegal value (hash)
14310 <font color=#x>foo</font>
14312 <p><font color="#x">foo</font>
14317 Attribute test: no value
14319 <font color>foo</font>
14321 <p><font color="color">foo</font>
14326 Bug 2095: link with three closing brackets
14330 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
14333 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
14337 Bug 2095: link with pipe and three closing brackets
14339 [[Main Page|link]]]
14341 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
14344 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
14348 Bug 2095: link with pipe and three closing brackets, version 2
14350 [[Main Page|[http://example.com/]]]
14352 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
14355 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
14364 Template:Dangerous attribute
14366 " onmouseover="alert(document.cookie)
14370 Template:Dangerous style attribute
14372 border-size: expression(alert(document.cookie))
14378 <div style="float: right; {{{1}}}">Magic div</div>
14382 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
14384 <div title="{{test}}"></div>
14386 <div title="This is a test template"></div>
14390 # Parsoid has enough context to handle this case
14392 Bug 2304: HTML attribute safety (dangerous template; 2309)
14394 <div title="{{dangerous attribute}}"></div>
14396 <div title=""></div>
14399 <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>
14403 Bug 2304: HTML attribute safety (dangerous style template; 2309)
14405 <div style="{{dangerous style attribute}}"></div>
14407 <div style="/* insecure input */"></div>
14412 Bug 2304: HTML attribute safety (safe parameter; 2309)
14414 {{div style|width: 200px}}
14416 <div style="float: right; width: 200px">Magic div</div>
14421 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
14423 {{div style|width: expression(alert(document.cookie))}}
14425 <div style="/* insecure input */">Magic div</div>
14430 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14432 {{div style|"><script>alert(document.cookie)</script>}}
14434 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14439 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14441 {{div style|" ><script>alert(document.cookie)</script>}}
14443 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14448 Bug 2304: HTML attribute safety (link)
14450 <div title="[[Main Page]]"></div>
14452 <div title="[[Main Page]]"></div>
14457 Bug 2304: HTML attribute safety (italics)
14459 <div title="''foobar''"></div>
14461 <div title="''foobar''"></div>
14466 Bug 2304: HTML attribute safety (bold)
14468 <div title="'''foobar'''"></div>
14470 <div title="'''foobar'''"></div>
14476 Bug 2304: HTML attribute safety (ISBN)
14478 <div title="ISBN 1234567890"></div>
14480 <div title="ISBN 1234567890"></div>
14485 Bug 2304: HTML attribute safety (RFC)
14487 <div title="RFC 1234"></div>
14489 <div title="RFC 1234"></div>
14494 Bug 2304: HTML attribute safety (PMID)
14496 <div title="PMID 1234567890"></div>
14498 <div title="PMID 1234567890"></div>
14503 Bug 2304: HTML attribute safety (web link)
14505 <div title="http://example.com/"></div>
14507 <div title="http://example.com/"></div>
14512 Bug 2304: HTML attribute safety (named web link)
14514 <div title="[http://example.com/ link]"></div>
14516 <div title="[http://example.com/ link]"></div>
14521 Bug 3244: HTML attribute safety (extension; safe)
14523 <div style="<nowiki>background:blue</nowiki>"></div>
14525 <div style="background:blue"></div>
14530 Bug 3244: HTML attribute safety (extension; unsafe)
14532 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14534 <div style="/* insecure input */"></div>
14538 # More MSIE fun discovered by Tom Gilder
14541 MSIE CSS safety test: spurious slash
14543 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14545 <div style="/* insecure input */">evil</div>
14550 MSIE CSS safety test: hex code
14552 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14554 <div style="/* insecure input */">evil</div>
14559 MSIE CSS safety test: comment in url
14561 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14563 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14568 MSIE CSS safety test: comment in expression
14570 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14572 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14577 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14579 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14581 <p style="/* invalid control char */">A</p>
14586 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14588 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14589 <div style="top:EXPRESSION(alert())">B</div>
14591 <p style="/* insecure input */">A</p>
14592 <div style="/* insecure input */">B</div>
14597 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14599 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14600 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14602 <div style="/* insecure input */">A</div>
14603 <p style="/* insecure input */">B</p>
14608 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14610 <div style="background-image:url⁽javascript:alert())">A</div>
14611 <div style="background-image:url₍javascript:alert())">B</div>
14612 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14614 <div style="/* insecure input */">A</div>
14615 <div style="/* insecure input */">B</div>
14616 <p style="/* insecure input */">C</p>
14624 title="data:text/html,<img src=1 onerror=alert(1)>"
14625 style="-o-link:attr(title);-o-link-source:current">X</div>
14627 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14632 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14634 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14635 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14636 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14637 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14638 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14639 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14640 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14642 <p style="/* insecure input */">A</p>
14643 <p style="/* insecure input */">B</p>
14644 <p style="/* insecure input */">C</p>
14645 <p style="/* insecure input */">D</p>
14646 <p style="/* insecure input */">E</p>
14647 <p style="/* insecure input */">F</p>
14648 <p style="/* insecure input */">G</p>
14653 Table attribute legitimate extension
14656 !+ style="<nowiki>color:blue</nowiki>"| status
14661 <th style="color:blue"> status
14667 Table attribute safety
14670 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14675 <th style="/* insecure input */"> status
14681 CSS line continuation 1
14683 <div style="background-image: u\ rl(test.jpg);"></div>
14685 <div style="/* insecure input */"></div>
14690 CSS line continuation 2
14692 <div style="background-image: u\ rl(test.jpg); "></div>
14694 <div style="/* insecure input */"></div>
14705 Expansion of multi-line templates in attribute values (bug 6255)
14707 <div style="background: {{identity|#00FF00}}">-</div>
14709 <div style="background: #00FF00">-</div>
14715 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14717 <div style="background:
14720 <div style="background: #00FF00">-</div>
14723 <div style="background:
14728 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14730 <div style="background: #00FF00">-</div>
14732 <div style="background: #00FF00">-</div>
14737 evil <math>-wiki-tags without Extension:Math enabled
14739 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14741 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14745 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14748 Parser hook: empty input
14761 Parser hook: empty input using terminated empty elements
14774 Parser hook: empty input using terminated empty elements (space before)
14787 Parser hook: basic input
14801 Parser hook: case insensitive
14815 Parser hook: case insensitive, redux
14828 Parser hook: nested tags
14832 <tag><tag></tag></tag>
14843 Parser hook: basic arguments
14845 <tag width=200 height = "100" depth = '50' square></tag>
14853 'square' => 'square',
14860 Parser hook: argument containing a forward slash (bug 5344)
14862 <tag filename='/tmp/bla'></tag>
14867 'filename' => '/tmp/bla',
14874 Parser hook: empty input using terminated empty elements (bug 2374)
14887 # </tag> should be output literally since there is no matching tag that begins it
14889 Parser hook: basic arguments using terminated empty elements (bug 2374)
14891 <tag width=200 height = "100" depth = '50' square/>
14901 'square' => 'square',
14910 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14914 Parser hook: static parser hook not inside a comment
14916 <statictag>hello, world</statictag>
14917 <statictag action=flush/>
14925 Parser hook: static parser hook inside a comment
14927 <!-- <statictag>hello, world</statictag> -->
14928 <statictag action=flush/>
14934 # Nested template calls; this case was broken by Parser.php rev 1.506,
14938 Template:One-parameter
14940 (My parameter is: {{{1}}})
14944 Template:Map-one-parameter
14946 {{{{{1}}}|{{{2}}}}}
14950 Nested template calls
14952 {{Map-one-parameter|One-parameter|param}}
14954 <p>(My parameter is: param)
14963 # HTML+Tidy effectively strips out the empty tags completely
14964 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14965 # which Tidy would have done for the PHP parser had there been content inside it.
14967 Sanitizer: Closing of open tags
14969 <s></s><table></table>
14971 <s></s><table></table>
14974 <p><s></s></p><table></table>
14978 Sanitizer: Closing of open but not closed tags
14987 Sanitizer: Closing of closed but not open tags
14996 Sanitizer: Closing of closed but not open table tags
14998 Table not started</td></tr></table>
15000 <p>Table not started</td></tr></table>
15005 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
15007 <span id="æ: v">byte</span>[[#æ: v|backlink]]
15009 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
15013 # In HTML5, the restrictions are that id must contain at least one character,
15014 # and must not contain any space characters.
15016 Sanitizer: Validating the contents of the id attribute (bug 4515)
15020 <br id="" /><br id="a space" />
15025 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
15027 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
15031 <br id="foo" /><br id="foo" />
15033 Something need to be done. foo-2 ?
15037 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
15040 <meta itemprop="hello" content="world">
15041 <meta http-equiv="refresh" content="5">
15042 <meta itemprop="hello" http-equiv="refresh" content="5">
15043 <link itemprop="hello" href="{{SERVER}}">
15044 <link rel="stylesheet" href="{{SERVER}}">
15045 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
15048 <div itemscope="itemscope">
15049 <p> <meta itemprop="hello" content="world" />
15050 <meta http-equiv="refresh" content="5">
15051 <meta itemprop="hello" content="5" />
15053 <link itemprop="hello" href="http://example.org" />
15054 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
15055 <link itemprop="hello" href="http://example.org" />
15061 Language converter: output gets cut off unexpectedly (bug 5757)
15065 this bit is safe: }-
15067 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
15069 then we get cut off here: }-
15071 all additional text is vanished
15073 <p>this bit is safe: }-
15074 </p><p>but if we add a conversion instance: xxx
15075 </p><p>then we get cut off here: }-
15076 </p><p>all additional text is vanished
15081 Self closed html pairs (bug 5487)
15084 <center><font id="bug" />Centered text</center>
15085 <div><font id="bug2" />In div text</div>
15087 <center><font id="bug" />Centered text</center>
15088 <div><font id="bug2" />In div text</div>
15097 Punctuation: nbsp before exclamation
15101 <p>C'est grave !
15106 Punctuation: CSS !important (bug 11874)
15108 <div style="width:50% !important">important</div>
15110 <div style="width:50% !important">important</div>
15115 Punctuation: CSS ! important (bug 11874; with space after)
15117 <div style="width:50% ! important">important</div>
15119 <div style="width:50% ! important">important</div>
15124 HTML bullet list, closed tags (bug 5497)
15137 <ul data-parsoid='{"stx":"html"}'>
15138 <li data-parsoid='{"stx":"html"}'>One</li>
15139 <li data-parsoid='{"stx":"html"}'>Two</li>
15145 HTML bullet list, unclosed tags (bug 5497)
15157 <ul data-parsoid='{"stx":"html"}'>
15158 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15159 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15165 HTML ordered list, closed tags (bug 5497)
15178 <ol data-parsoid='{"stx":"html"}'>
15179 <li data-parsoid='{"stx":"html"}'>One</li>
15180 <li data-parsoid='{"stx":"html"}'>Two</li>
15186 HTML ordered list, unclosed tags (bug 5497)
15199 <ol data-parsoid='{"stx":"html"}'>
15200 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15201 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15207 HTML nested bullet list, closed tags (bug 5497)
15232 HTML nested bullet list, open tags (bug 5497)
15269 HTML nested ordered list, closed tags (bug 5497)
15294 HTML nested ordered list, open tags (bug 5497)
15331 HTML ordered list item with parameters oddity
15333 <ol><li id="fragment">One</li>
15336 <ol><li id="fragment">One</li>
15341 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
15343 bug 5918: autonumbering
15345 [http://first/] [http://second] [ftp://ftp]
15349 [mailto:enclosed@mail.tld With target]
15351 [mailto:enclosed@mail.tld]
15353 mailto:inline@mail.tld
15355 <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>
15356 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
15357 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
15358 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
15359 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
15362 <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>
15363 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
15364 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
15365 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
15366 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
15371 # Security and HTML correctness
15372 # From Nick Jenkins' fuzz testing
15376 Fuzz testing: Parser13
15391 Fuzz testing: Parser14
15396 <h2><a href="#onmouseover.3D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
15397 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15399 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15405 <h2><a href="#onmouseover.3D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
15407 <div id="toc" class="toc">
15408 <div id="toctitle">
15412 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15418 Fuzz testing: Parser14-table
15423 <h2><a href="#a" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
15424 <table style="__TOC__">
15429 <h2><a href="#a" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
15430 <table style="__TOC__">
15437 # Known to produce bogus xml (extra </td>)
15439 Fuzz testing: Parser16
15468 Fuzz testing: Parser21
15471 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15476 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15486 Fuzz testing: Parser22
15488 http://===r:::https://b
15492 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15500 # Known to produce bad XML for now
15502 Fuzz testing: Parser24
15509 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15510 <br style="onmouseover='alert(document.cookie);' " />
15512 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15517 <u class="|">}}}} >
15518 <br style="onmouseover='alert(document.cookie);'" />
15520 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15529 # Note: the current result listed for this is not what the original one was,
15530 # but the original bug was JavaScript injection, which is fixed in any case.
15531 # It's not clear that the original result listed was any more correct than the
15532 # current one. Original result:
15535 # <li class="||">
15536 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15538 Fuzz testing: Parser25 (bug 6055)
15544 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15546 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15551 Fuzz testing: URL adjacent extension (with space, clean)
15553 http://example.com <nowiki>junk</nowiki>
15555 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15558 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
15562 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15564 http://example.com<nowiki>junk</nowiki>
15566 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15569 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
15573 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15575 http://example.com<pre>junk</pre>
15577 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15580 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15585 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre data-parsoid='{"stx":"html"}'>junk</pre>
15589 Fuzz testing: image with bogus manual thumbnail
15591 [[Image:foobar.jpg|thumbnail= ]]
15593 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15596 <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>
15600 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15602 <pre dir=" "></pre>
15604 <pre dir=" "></pre>
15609 Parsing optional HTML elements (Bug 6171)
15614 <td> Some tabular data</td>
15615 <td> More tabular data ...
15616 <td> And yet som tabular data</td>
15622 <td> Some tabular data</td>
15623 <td> More tabular data ...
15624 </td><td> And yet som tabular data</td>
15631 Correct handling of <td>, <tr> (Bug 6171)
15636 <td> Some tabular data</td>
15637 <td> More tabular data ...</td>
15638 <td> And yet som tabular data</td>
15644 <td> Some tabular data</td>
15645 <td> More tabular data ...</td>
15646 <td> And yet som tabular data</td>
15654 Parsing crashing regression (fr:JavaScript)
15658 <p></body></x>
15663 Inline wiki vs wiki block nesting
15669 <p><b>Bold paragraph</b>
15670 </p><p>New wiki paragraph
15674 # FIXME: The current php output is documented
15675 # and desired output is the parsoid target.
15677 Inline HTML vs wiki block nesting
15683 <p><b>Bold paragraph
15684 </p><p>New wiki paragraph</b>
15687 <p><b>Bold paragraph</b>
15688 </p><p>New wiki paragraph
15692 # Original result was this:
15693 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15695 # While that might be marginally more intuitive, maybe, the six-apostrophe
15696 # construct is clearly pathological and the result stated here (which is what
15697 # the parser actually does) is about as reasonable as anything.
15699 Mixing markup for italics and bold
15702 '''bold''''''bold''bolditalics'''''
15704 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15712 Article for special page transclusion test
15716 Special page transclusion
15719 {{Special:Prefixindex/Xyzzyx}}
15721 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15726 Special page transclusion twice (bug 5021)
15729 {{Special:Prefixindex/Xyzzyx}}
15730 {{Special:Prefixindex/Xyzzyx}}
15732 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15733 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15738 Transclusion of default MediaWiki message
15740 {{MediaWiki:Mainpage}}
15747 Transclusion of nonexistent MediaWiki message
15749 {{MediaWiki:Mainpagexxx}}
15751 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15756 Transclusion of MediaWiki message with underscore
15758 {{MediaWiki:history_short}}
15765 Transclusion of MediaWiki message with space
15767 {{MediaWiki:history short}}
15774 Invalid header with following text
15784 Section extraction test (section 0)
15804 Section extraction test (section 1)
15826 Section extraction test (section 2)
15847 Section extraction test (section 3)
15867 Section extraction test (section 4)
15891 Section extraction test (section 5)
15911 Section extraction test (section 6)
15932 Section extraction test (section 7)
15952 Section extraction test (section 8)
15972 Section extraction test (section 9)
15993 Section extraction test (section 10)
16013 Section extraction test (nonexistent section 11)
16032 Section extraction test with bogus heading (section 1)
16037 ==bogus== not a legal section
16041 ==bogus== not a legal section
16045 Section extraction test with bogus heading (section 2)
16050 ==bogus== not a legal section
16057 Section extraction test with comment after heading (section 1)
16069 Section extraction test with comment after heading (section 2)
16081 Section extraction test with bogus <nowiki> heading (section 1)
16086 ==bogus== <nowiki>not a legal section</nowiki>
16090 ==bogus== <nowiki>not a legal section</nowiki>
16094 Section extraction test with bogus <nowiki> heading (section 2)
16099 ==bogus== <nowiki>not a legal section</nowiki>
16106 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16107 # instead of respecting commented sections
16109 Section extraction prefixed by comment (section 1)
16120 Section extraction prefixed by comment (section 2)
16131 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
16132 # instead of respecting HTML-style headings
16134 Section extraction, mixed wiki and html (section 1)
16150 Section extraction, mixed wiki and html (section 2)
16166 # Formerly testing for bug 3342
16168 Section extraction, heading surrounded by <noinclude>
16172 <noinclude>==unmarked==</noinclude>
16178 # Test behavior of bug 19910
16180 Sectiion with all-equals
16185 The line above must have a trailing space
16188 But just in case it doesn't...
16192 But just in case it doesn't...
16196 Section replacement test (section 0)
16227 Section replacement test (section 1)
16256 Section replacement test (section 2)
16286 Section replacement test (section 3)
16317 Section replacement test (section 4)
16344 Section replacement test (section 5)
16375 Section replacement test (section 6)
16405 Section replacement test (section 7)
16436 Section replacement test (section 8)
16467 Section replacement test (section 9)
16496 Section replacement test (section 10)
16526 Section replacement test with initial whitespace (bug 13728)
16530 Preformatted initial line
16534 Preformatted initial line
16541 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16553 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16566 Section extraction, <pre> around bogus header (bug 10309)
16583 Section replacement, <pre> around bogus header (bug 10309)
16585 noxml replace=2,"xxx"
16606 Handling of 
 in URLs
16610 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16613 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16615 a</a></li></ul></li></ul>
16619 Handling of %0A in URLs
16623 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16626 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16630 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16632 5 quotes, code coverage +1 line
16639 <p><b><i></i></b></p>
16642 # same html as previous, but wikitext adjusted to match parsoid html2wt
16643 # note that wt2html and html2html will put the <i> before the <b>
16645 5 quotes, code coverage +1 line w/ nowiki (1)
16647 parsoid=wt2wt,html2wt
16649 '''''<nowiki/>'''''
16654 <p><b><i></i></b></p>
16657 # same as previous, just swapping the <i> and <b>
16659 5 quotes, code coverage +1 line w/ nowiki (2)
16661 '''''<nowiki/>'''''
16666 <p><i><b></b></i></p>
16670 Special:Search page linking.
16674 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16679 {{!}} is a magic word
16681 {{!}} is a magic word there and {{!}} is still a magic word here
16683 <p>| is a magic word there and | is still a magic word here
16686 <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>
16692 title=[[Parser test]]
16697 * {{FULLPAGENAMEE}}
16699 * {{BASEPAGENAMEE}}
16703 * {{ROOTPAGENAMEE}}
16705 * {{TALKPAGENAMEE}}
16706 * {{SUBJECTPAGENAME}}
16707 * {{SUBJECTPAGENAMEE}}
16710 * {{NAMESPACENUMBER}}
16714 * {{SUBJECTSPACEE}}
16715 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16717 <ul><li> Parser test</li>
16718 <li> Parser_test</li>
16719 <li> Parser test</li>
16720 <li> Parser_test</li>
16721 <li> Parser test</li>
16722 <li> Parser_test</li>
16723 <li> Parser test</li>
16724 <li> Parser_test</li>
16725 <li> Parser test</li>
16726 <li> Parser_test</li>
16727 <li> Talk:Parser test</li>
16728 <li> Talk:Parser_test</li>
16729 <li> Parser test</li>
16730 <li> Parser_test</li>
16738 <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>
16741 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16751 image4 |300px| centre
16752 image5.svg| http://///////
16757 <ul class="gallery mw-gallery-traditional">
16758 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16759 <div class="thumb" style="height: 150px;">Image1.png</div>
16760 <div class="gallerytext">
16763 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16764 <div class="thumb" style="height: 150px;">Image2.gif</div>
16765 <div class="gallerytext">
16770 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16771 <div class="thumb" style="height: 150px;">Image3</div>
16772 <div class="gallerytext">
16775 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16776 <div class="thumb" style="height: 150px;">Image4</div>
16777 <div class="gallerytext">
16782 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16783 <div class="thumb" style="height: 150px;">Image5.svg</div>
16784 <div class="gallerytext">
16785 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16789 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16790 <div class="thumb" style="height: 150px;">* image6</div>
16791 <div class="gallerytext">
16799 Gallery (with options)
16801 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16802 File:Nonexistent.jpg|caption
16803 File:Nonexistent.jpg
16804 image:foobar.jpg|some '''caption''' [[Main Page]]
16806 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16809 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16810 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16811 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16812 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16813 <div class="gallerytext">
16818 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16819 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16820 <div class="gallerytext">
16823 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16824 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
16825 <div class="gallerytext">
16826 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16830 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16831 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
16832 <div class="gallerytext">
16835 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16836 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
16837 <div class="gallerytext">
16847 Gallery with link that has fragment
16850 image:foobar.jpg|link=Main_Page
16851 image:foobar.jpg|link=Main_Page#section
16852 image:foobar.jpg|link=Main Page#section|caption
16855 <ul class="gallery mw-gallery-traditional">
16856 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16857 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
16858 <div class="gallerytext">
16861 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16862 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
16863 <div class="gallerytext">
16866 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16867 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
16868 <div class="gallerytext">
16878 Gallery with wikitext inside caption
16881 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16882 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16885 <ul class="gallery mw-gallery-traditional">
16886 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16887 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
16888 <div class="gallerytext">
16889 <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>
16893 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16894 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
16895 <div class="gallerytext">
16896 <p>This is a test template
16905 gallery (with showfilename option)
16907 <gallery showfilename>
16908 File:Nonexistent.jpg|caption
16909 File:Nonexistent.jpg
16910 image:foobar.jpg|some '''caption''' [[Main Page]]
16914 <ul class="gallery mw-gallery-traditional">
16915 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16916 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16917 <div class="gallerytext">
16918 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16923 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16924 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16925 <div class="gallerytext">
16926 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16930 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16931 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
16932 <div class="gallerytext">
16933 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16934 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16938 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16939 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
16940 <div class="gallerytext">
16941 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16950 Gallery (with namespace-less filenames)
16953 File:Nonexistent.jpg
16959 <ul class="gallery mw-gallery-traditional">
16960 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16961 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16962 <div class="gallerytext">
16965 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16966 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16967 <div class="gallerytext">
16970 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16971 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
16972 <div class="gallerytext">
16975 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16976 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
16977 <div class="gallerytext">
16985 HTML Hex character encoding (spells the word "JavaScript")
16987 parsoid=wt2html,wt2wt,html2html
16989 JavaScript
16991 <p>JavaScript
16996 <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>
17000 HTML Hex character encoding bogus encoding (bug 26437 regression check)
17004 <p>&#xsee;&#XSEE;
17007 <p>&#xsee;&#XSEE;</p>
17011 HTML Hex character encoding mixed case
17013 parsoid=wt2html,wt2wt,html2html
17022 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
17026 __FORCETOC__ override
17038 ISBN 978-0-1234-56 789
17040 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
17043 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
17045 <p><a href="./Special:BookSources/9780123456" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
17049 ISBN followed by 5 spaces
17060 ISBN ISBN 1234567890
17062 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17065 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
17075 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
17076 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
17077 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
17080 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
17081 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
17082 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
17086 ISBN with empty prefix (parsoid test)
17090 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17093 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17097 Bug 22905: <abbr> followed by ISBN followed by </a>
17099 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17101 <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>
17104 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
17112 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
17117 Double RFC with a wiki link
17121 <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>
17130 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
17133 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
17137 Centre-aligned image
17139 [[Image:foobar.jpg|centre]]
17141 <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>
17148 [[Image:foobar.jpg|none]]
17150 <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>
17155 Width + Height sized image (using px) (height is ignored)
17157 [[Image:foobar.jpg|640x480px]]
17159 <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>
17164 Width-sized image (using px, no following whitespace)
17166 [[Image:foobar.jpg|640px]]
17168 <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>
17173 Width-sized image (using px, with following whitespace - test regression from r39467)
17175 [[Image:foobar.jpg|640px ]]
17177 <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>
17182 Width-sized image (using px, with preceding whitespace - test regression from r39467)
17184 [[Image:foobar.jpg| 640px]]
17186 <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>
17191 Image with page parameter
17195 [[File:LoremIpsum.djvu|page=2]]
17197 <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>
17200 <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>
17204 Another italics / bold test
17212 # FIXME: The php output seems broken. It's interleaving some open/close tags.
17218 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
17221 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
17226 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
17228 Images with the "|" character in the comment
17230 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
17232 <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>
17235 <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>
17239 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
17241 <html><script>alert(1);</script></html>
17243 <p><html><script>alert(1);</script></html>
17248 HTML with raw HTML ($wgRawHtml==true)
17252 <html><script>alert(1);</script></html>
17254 <p><script>alert(1);</script>
17259 Parents of subpages, one level up
17261 subpage title=[[Subpage test/L1/L2/L3]]
17265 <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>
17271 Parents of subpages, one level up, not named
17273 subpage title=[[Subpage test/L1/L2/L3]]
17277 <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>
17284 Parents of subpages, two levels up
17286 subpage title=[[Subpage test/L1/L2/L3]]
17292 <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
17293 </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>
17298 Parents of subpages, two levels up, without trailing slash or name.
17300 subpage title=[[Subpage test/L1/L2/L3]]
17309 Parents of subpages, two levels up, with lots of extra trailing slashes.
17311 subpage title=[[Subpage test/L1/L2/L3]]
17315 <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>
17320 Subpage test/L1/L2/L3Sibling
17326 Transclusion of a sibling page (one level up)
17328 subpage title=[[Subpage test/L1/L2/L3]]
17337 Transclusion of a child page
17339 subpage title=[[Subpage test/L1/L2]]
17348 Non-transclusion because of too many up levels
17350 subpage title=[[Subpage test/L1/L2/L3]]
17352 {{../../../../More than parent}}
17354 <p>{{../../../../More than parent}}
17359 Definition list code coverage
17365 <dl><dt> title  </dt>
17367 <dt> title </dt>
17373 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17374 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17375 <dt>title</dt><dd> def</dd></dl>
17379 Don't fall for the self-closing div
17381 <div>hello world</div/>
17383 <div>hello world</div>
17392 <p>[[:Template:Msg]]
17401 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
17405 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
17407 Always escape literal '>' in output, not just after '<'
17421 <p>This is a test template
17422 This is a test template
17434 Inclusion of !userCanEdit() content
17438 <h2><a href="#header" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
17444 Out-of-order TOC heading levels
17453 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17455 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17457 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17458 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17461 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17463 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17464 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17470 <h2><a href="#2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
17471 <h6><a href="#6" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
17472 <h3><a href="#3" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
17473 <h1><a href="#1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
17474 <h5><a href="#5" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
17475 <h2><a href="#2_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
17481 ISBN with a dummy number
17491 ISBN with space-delimited number
17495 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17501 ISBN with multiple spaces, no number
17520 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17521 </p><p>ISBN 12345678901
17527 ISBN with trailing year (bug 8110)
17529 ISBN 1-234-56789-0 - 2006
17531 ISBN 1 234 56789 0 - 2006
17533 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17534 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17542 {{anchorencode:foo bar©#%n}}
17544 <p>foo_bar.C2.A9.23.25n
17549 anchorencode trims spaces
17551 {{anchorencode: __pretty__please__}}
17558 anchorencode deals with links
17560 {{anchorencode: [[hello|world]] [[hi]]}}
17567 anchorencode deals with templates
17569 {{anchorencode: {{Foo}} }}
17576 anchorencode encodes like the TOC generator: (bug 18431)
17578 === _ +:.3A%3A&&]] ===
17579 {{anchorencode: _ +:.3A%3A&&]] }}
17582 <h3><a href="#.2B:.3A.253A.26.26.5D.5D" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17583 <p>.2B:.3A.253A.26.26.5D.5D
17588 Bug 6200: blockquotes and paragraph formatting
17609 Bug 8293: Use of center tag ruins paragraph formatting
17630 Parsing of overlapping (improperly nested) inline html tags
17632 <span><s>x</span></s>
17634 <p><span><s>x</span></s></span>
17637 <p><span><s>x</s></span>
17642 ### Language variants related tests
17645 Self-link in language variants
17647 title=[[Dunav]] language=sr
17649 Both [[Dunav]] and [[Дунав]] are names for this river.
17651 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17662 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17664 title=[[Duna]] language=sr
17666 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17668 <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.
17673 Link to a section of a variant of this title shouldn't be parsed as self-link
17675 title=[[Duna]] language=sr
17677 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17679 <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.
17684 Link to pages in language variants
17688 Main Page can be written as [[Маин Паге]]
17690 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17696 Multiple links to pages in language variants
17700 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17702 <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>.
17708 Simple template in language variants
17714 <p>This is a test template
17720 Template with explicit namespace in language variants
17726 <p>This is a test template
17732 Basic test for template parameter in language variants
17736 {{парамтест|param=foo}}
17738 <p>This is a test template with parameter foo
17744 Simple category in language variants
17748 [[Category:МедиаWики Усер'с Гуиде]]
17750 <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>
17767 Don't convert blue categorylinks to another variant (bug 33210)
17771 [[A]][[Category:分类]]
17773 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17778 Stripping -{}- tags (language variants)
17782 Latin proverb: -{Ne nuntium necare}-
17784 <p>Latin proverb: Ne nuntium necare
17790 Prevent conversion with -{}- tags (language variants)
17792 language=sr variant=sr-ec
17794 Latinski: -{Ne nuntium necare}-
17796 <p>Латински: Ne nuntium necare
17802 Prevent conversion of text with -{}- tags (language variants)
17804 language=sr variant=sr-ec
17806 Latinski: -{Ne nuntium necare}-
17808 <p>Латински: Ne nuntium necare
17814 Prevent conversion of links with -{}- tags (language variants)
17816 language=sr variant=sr-ec
17820 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17826 -{}- tags within headlines (within html for parserConvert())
17828 language=sr variant=sr-ec
17832 <h2><a href="#-.7BNaslov.7D-" class="mw-headline-anchor" aria-hidden="true" title="Линк то тхис сецтион">§</a><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>
17838 Explicit definition of language variant alternatives
17840 language=zh variant=zh-tw
17842 -{zh:China;zh-tw:Taiwan}-, not China
17844 <p>Taiwan, not China
17850 Conversion around HTML tags
17852 language=sr variant=sr-ec
17854 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17855 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17858 <span title="ЛаCтин">ски</span>
17864 Explicit session-wise language variant mapping (A flag and - flag)
17866 language=zh variant=zh-tw
17868 Taiwan is not China.
17869 But -{A|zh:China;zh-tw:Taiwan}- is China,
17870 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17871 and -{China}- is China.
17873 <p>Taiwan is not China.
17874 But Taiwan is Taiwan,
17875 (This should be stripped!)
17876 and China is China.
17881 Explicit session-wise language variant mapping (H flag for hide)
17883 language=zh variant=zh-tw
17885 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17888 <p>(This should be stripped!)
17894 Adding explicit conversion rule for title (T flag)
17896 language=zh variant=zh-tw showtitle
17898 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17901 <p>Should be stripped!
17906 Testing that changing the language variant here in the tests actually works
17908 language=zh variant=zh showtitle
17910 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17913 <p>Should be stripped!
17918 Recursive conversion of alt and title attrs shouldn't clear converter state
17920 language=zh variant=zh-cn showtitle
17922 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17923 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17927 Should be stripped<span title="Exclamation">!</span>
17932 Bug 24072: more test on conversion rule for title
17934 language=zh variant=zh-tw showtitle
17936 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17937 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17940 <p>This should be stripped!
17941 This won't take interferes with the title rule.
17946 Partly disable title conversion if variant == main language code
17948 language=zh variant=zh title=[[ZH]] showtitle
17950 -{T|zh-cn:CN;zh-tw:TW}-
17958 Partly disable title conversion if variant == main language code, more
17960 language=zh variant=zh title=[[ZH]] showtitle
17970 Raw output of variant escape tags (R flag)
17972 language=zh variant=zh-tw
17974 Raw: -{R|zh:China;zh-tw:Taiwan}-
17976 <p>Raw: zh:China;zh-tw:Taiwan
17981 Nested using of manual convert syntax
17983 language=zh variant=zh-hk
17985 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17987 <p>Nested: Hello Hong Kong!
17992 Proper conversion of text in external links
17994 language=sr variant=sr-ec
17996 http://www.google.com
17997 gopher://www.google.com
17998 [http://www.google.com http://www.google.com]
17999 [gopher://www.google.com gopher://www.google.com]
18000 [https://www.google.com irc://www.google.com]
18001 [ftp://www.google.com www.google.com/ftp://dir]
18002 [//www.google.com www.google.com]
18004 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18005 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18006 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18007 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18008 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
18009 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
18010 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
18015 Do not convert roman numbers to language variants
18017 language=sr variant=sr-ec
18021 <p>Фридрих IV је цар.
18026 Unclosed language converter markup "-{"
18037 Don't convert raw rule "-{R|=>}-" to "=>"
18048 Don't break link parsing if language converter markup is in the caption.
18050 language=sr variant=sr-ec
18052 [[Main Page|-{R|main page}-]]
18054 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
18058 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18060 Don't break image parsing if language converter markup is in the caption.
18064 [[File:Foobar.jpg|-{R|caption}-]]
18066 <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>
18070 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18072 Don't break list handling if language converter markup is in the item.
18074 language=zh variant=zh-cn
18076 ;-{zh-cn:AAA;zh-tw:BBB}-
18078 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
18085 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18087 Don't break table handling if language converter markup is in the cell.
18089 language=sr variant=sr-ec
18112 Bug 529: Uncovered bullet
18121 # Plain MediaWiki does not remove empty lists, but tidy actually does.
18122 # Templates in Wikipedia rely on this behavior, as tidy has always been
18123 # enabled there. These tests are normally run *without* tidy, so specify the
18124 # full output here.
18125 # To test realistic parsing behavior, apply a tidy-like transformation to both
18126 # the expected output and your parser's output.
18128 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
18130 ******* Foo {{bullet}}
18132 <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>
18138 Bug 529: Uncovered table already at line-start
18161 Bug 529: Uncovered bullet in parser function result
18163 * Foo {{lc:{{bullet}} }}
18171 Bug 5678: Double-parsed template argument
18173 {{lc:{{{1}}}|hello}}
18180 Bug 5678: Double-parsed template invocation
18182 {{lc:{{paramtest {{!}} param = hello }} }}
18184 <p>{{paramtest | param = hello }}
18189 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
18192 title=[[Main Page]]
18194 {{PRVNÍVELKÉ:ěščř}}
18195 {{prvnívelké:ěščř}}
18215 Morwen/13: Unclosed link followed by heading
18222 <h2><a href="#heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
18227 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
18234 <h1><a href="#heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="heading">heading</span></h1>
18239 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
18246 <h2><a href="#heading" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
18261 Paragraphs inside divs (no extra line breaks)
18273 Paragraphs inside divs (extra line break on open)
18288 Paragraphs inside divs (extra line break on close)
18303 Paragraphs inside divs (extra line break on open and close)
18320 Nesting tags, paragraphs on lines which begin with <div>
18322 <div></div><strong>A
18325 <p><strong>A</strong></p>
18326 <p><strong>B</strong></p>
18334 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
18336 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
18338 <blockquote>Line one
18340 Line two</blockquote>
18342 <blockquote>Line one
18343 Line two</blockquote>
18347 <p>Line one Line two</p>
18352 Bug 6200: paragraphs inside blockquotes (extra line break on open)
18357 Line two</blockquote>
18362 Line two</blockquote>
18367 Line two</blockquote>
18371 Bug 6200: paragraphs inside blockquotes (extra line break on close)
18373 <blockquote>Line one
18378 <blockquote>Line one
18391 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
18413 Paragraphs inside blockquotes/divs (no extra line breaks)
18415 <blockquote><div>Line one
18417 Line two</div></blockquote>
18419 <blockquote><div>Line one
18420 Line two</div></blockquote>
18425 Paragraphs inside blockquotes/divs (extra line break on open)
18430 Line two</div></blockquote>
18435 Line two</div></blockquote>
18440 Paragraphs inside blockquotes/divs (extra line break on close)
18442 <blockquote><div>Line one
18445 </div></blockquote>
18447 <blockquote><div>Line one
18450 </div></blockquote>
18455 Paragraphs inside blockquotes/divs (extra line break on open and close)
18461 </div></blockquote>
18467 </div></blockquote>
18472 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18474 wgLinkHolderBatchSize=0
18480 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18481 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18482 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18487 Free external link invading image caption
18489 [[Image:Foobar.jpg|thumb|http://x|hello]]
18491 <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>
18496 Bug 15196: localised external link numbers
18500 [http://en.wikipedia.org/]
18502 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18505 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18509 Multibyte character in padleft
18511 {{padleft:-Hello|7|Æ}}
18518 Multibyte character in padright
18520 {{padright:Hello-|7|Æ}}
18527 formatdate parser function
18529 {{#formatdate:2009-03-24}}
18531 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18536 formatdate parser function, with default format
18538 {{#formatdate:2009-03-24|mdy}}
18540 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18545 Spacing of numbers in formatted dates
18547 {{#formatdate:January 15}}
18549 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18554 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
18556 language=nl title=[[MediaWiki:Common.css]]
18558 {{#formatdate:2009-03-24|dmy}}
18560 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18573 Edit comment with link
18577 I like the [[Main Page]] a lot
18579 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18583 Edit comment with link and link text
18587 I like the [[Main Page|best pages]] a lot
18589 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18593 Edit comment with link and link text with suffix
18597 I like the [[Main Page|best page]]s a lot
18599 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18603 Edit comment with section link (non-local, eg in history list)
18605 comment title=[[Main Page]]
18607 /* External links */ removed bogus entries
18609 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18613 Edit comment with section link and text before it (non-local, eg in history list)
18615 comment title=[[Main Page]]
18617 pre-comment text /* External links */ removed bogus entries
18619 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>
18623 Edit comment with section link (local, eg in diff view)
18625 comment local title=[[Main Page]]
18627 /* External links */ removed bogus entries
18629 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18633 Edit comment with subpage link (bug 14080)
18637 title=[[Subpage test]]
18639 Poked at a [[/subpage]] here...
18641 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18645 Edit comment with subpage link and link text (bug 14080)
18649 title=[[Subpage test]]
18651 Poked at a [[/subpage|neat little page]] here...
18653 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18657 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18660 title=[[Subpage test]]
18662 Poked at a [[/subpage]] here...
18664 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18668 Edit comment with bare anchor link (local, as on diff)
18672 title=[[Main Page]]
18676 <a href="#section">#section</a>
18680 Edit comment with bare anchor link (non-local, as on history)
18683 title=[[Main Page]]
18687 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18691 Anchor starting with underscore
18695 <p><a href="#_ref">One</a>
18700 Id starting with underscore
18702 <div id="_ref"></div>
18704 <div id="_ref"></div>
18709 Space normalisation on autocomment (bug 22784)
18712 title=[[Main Page]]
18714 /* __hello__world__ */
18716 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18720 percent-encoding and + signs in comments (Bug 26410)
18724 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18726 <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>
18729 # Parsoid doesn't support this yet: see bug 73581
18730 # but it *should* omit the 'src' attribute if the image is bad.
18731 # PHP side of tests was disabled in
18732 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
18733 # because of issues in the PHP parserTests infrastructure
18734 # (but the output below is indeed what the PHP side emits)
18736 Bad images - basic functionality
18739 !! DISABLED/html/php
18741 <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>
18745 Bad images - bug 16039: text after bad image disappears
18750 !! DISABLED/html/php
18756 <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>
18761 Verify that displaytitle works (bug #22501) no displaytitle
18765 wgAllowDisplayTitle=true
18766 wgRestrictDisplayTitle=false
18768 this is not the the title
18771 <p>this is not the the title
18776 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18781 wgAllowDisplayTitle=true
18782 wgRestrictDisplayTitle=false
18784 this is not the the title
18785 {{DISPLAYTITLE:whatever}}
18788 <p>this is not the the title
18793 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18798 wgAllowDisplayTitle=true
18799 wgRestrictDisplayTitle=true
18801 this is not the the title
18802 {{DISPLAYTITLE:whatever}}
18805 <p>this is not the the title
18810 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18815 wgAllowDisplayTitle=true
18816 wgRestrictDisplayTitle=true
18818 this is not the the title
18819 {{DISPLAYTITLE:screen}}
18822 <p>this is not the the title
18827 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18832 wgAllowDisplayTitle=false
18834 this is not the the title
18835 {{DISPLAYTITLE:screen}}
18838 <p>this is not the the title
18839 <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>
18844 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18849 wgAllowDisplayTitle=false
18851 this is not the the title
18854 <p>this is not the the title
18859 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18864 wgAllowDisplayTitle=true
18865 wgRestrictDisplayTitle=true
18867 this is not the the title
18868 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18870 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18871 <p>this is not the the title
18876 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18881 wgAllowDisplayTitle=true
18882 wgRestrictDisplayTitle=true
18884 this is not the the title
18885 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18887 <span style="color: red;">s</span>creen
18888 <p>this is not the the title
18893 preload: check <noinclude> and <includeonly>
18897 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18903 preload: check <onlyinclude>
18907 Goodbye <onlyinclude>Hello world</onlyinclude>
18913 preload: can pass tags through if we want to
18917 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18919 <includeonly>Hello world</includeonly>
18923 preload: check that it doesn't try to do tricks
18927 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18929 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18933 Play a bit with r67090 and bug 3158
18935 <div style="width:50% !important"> </div>
18936 <div style="width:50% !important"> </div>
18937 <div style="width:50% !important"> </div>
18938 <div style="border : solid;"> </div>
18940 <div style="width:50% !important"> </div>
18941 <div style="width:50% !important"> </div>
18942 <div style="width:50% !important"> </div>
18943 <div style="border : solid;"> </div>
18946 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18947 <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='{"srcContent":" "}'> </span></div>
18948 <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='{"srcContent":" "}'> </span></div>
18949 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18954 HTML5 data attributes
18956 <span data-foo="bar">Baz</span>
18957 <p data-abc-def_hij="">Quuz</p>
18959 <p><span data-foo="bar">Baz</span>
18961 <p data-abc-def_hij="">Quuz</p>
18966 percent-encoding and + signs in internal links (Bug 26410)
18968 [[User:+%]] [[Page+title%]]
18969 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18970 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
18971 [[%33%45]] [[%33%45+]]
18973 <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>
18974 <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>
18975 <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>
18976 <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>
18979 <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>
18983 Special characters in embedded file links (bug 27679)
18985 [[File:Contains & ampersand.jpg]]
18986 [[File:Does not exist.jpg|Title with & ampersand]]
18988 <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>
18989 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18992 <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>
18993 <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>
18997 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18999 Text's been normalized?
19001 <p>Text's been normalized?
19006 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
19008 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
19010 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
19015 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
19017 [http://www.example.org/ ideograms]
19019 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
19024 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
19026 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
19028 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
19052 Bug 31098 Template which includes system messages which includes the template
19056 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
19057 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
19062 Bug31490 Turkish: ucfirst 'blah'
19073 Bug31490 Turkish: ucfirst 'ix'
19084 Bug31490 Turkish: lcfirst 'BLAH'
19095 Bug31490 Turkish: ucfırst (with a dotless i)
19101 <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>
19106 Bug31490 ucfırst (with a dotless i) with English language
19112 <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>
19117 Bug 26375: TOC with italics
19119 title=[[Main Page]]
19122 == ''Lost'' episodes ==
19124 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19126 <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>
19130 <h2><a href="#Lost_episodes" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19135 Bug 26375: TOC with bold
19137 title=[[Main Page]]
19140 == '''should be bold''' then normal text ==
19142 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19144 <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>
19148 <h2><a href="#should_be_bold_then_normal_text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19153 Bug 33845: Headings become cursive in TOC when they contain an image
19155 title=[[Main Page]]
19158 == Image [[Image:foobar.jpg]] ==
19160 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19162 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
19166 <h2><a href="#Image" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19171 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
19173 title=[[Main Page]]
19176 == <blockquote>Quote</blockquote> ==
19178 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19180 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19184 <h2><a href="#Quote" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19187 <div id="toc" class="toc">
19188 <div id="toctitle">
19192 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19195 <h2><a href="#Quote" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Quote"></span></h2>
19197 <p><span class="mw-headline" id="Quote">Quote</span></p>
19199 <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>
19203 Unclosed tags in TOC
19205 title=[[Main Page]]
19209 <small>Hanc marginis exiguitas non caperet.</small>
19212 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19214 <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>
19218 <h2><a href="#Proof:_2_.3C_3" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19219 <p><small>Hanc marginis exiguitas non caperet.</small>
19225 Multiple tags in TOC
19228 == <i>Foo</i> <b>Bar</b> ==
19230 == <i>Foo</i> <blockquote>Bar</blockquote> ==
19232 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19234 <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>
19235 <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>
19239 <h2><a href="#Foo_Bar" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19240 <h2><a href="#Foo_Bar_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19243 <div id="toc" class="toc">
19244 <div id="toctitle">
19248 <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>
19249 <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>
19252 <h2><a href="#Foo_Bar" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19253 <h2><a href="#Foo_Bar_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
19255 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
19257 <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>
19261 Tags with parameters in TOC
19264 == <sup class="in-h2">Hello</sup> ==
19266 == <sup class="a > b">Evilbye</sup> ==
19268 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19270 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
19271 <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>
19275 <h2><a href="#Hello" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19276 <h2><a href="#b.22.3EEvilbye" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19281 span tags with directionality in TOC
19284 == <span dir="ltr">C++</span> ==
19286 == <span dir="rtl">זבנג!</span> ==
19288 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
19290 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
19292 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
19294 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19296 <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>
19297 <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>
19298 <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>
19299 <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>
19300 <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>
19304 <h2><a href="#C.2B.2B" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19305 <h2><a href="#.D7.96.D7.91.D7.A0.D7.92.21" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19306 <h2><a href="#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19307 <h2><a href="#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19308 <h2><a href="#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19313 Bug 72884: bdi element in ToC
19316 == <bdi>test</bdi> ==
19318 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19320 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
19324 <h2><a href="#test" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="test"><bdi>test</bdi></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19331 == {{int:headline_sample}} ==
19335 Bug 32057: Title needed when expanding <h> nodes.
19337 title=[[Main Page]]
19341 <h2><a href="#Headline_text" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19346 Strip marker in urlencode
19348 {{urlencode:x<nowiki/>y}}
19349 {{urlencode:x<nowiki/>y|wiki}}
19350 {{urlencode:x<nowiki/>y|path}}
19377 Strip marker in formatNum
19379 {{formatnum:1<nowiki/>2}}
19380 {{formatnum:1<nowiki/>2|R}}
19388 Check noCommafy in formatNum
19392 {{formatnum:123456.78}}
19393 {{formatnum:123456.78|NOSEP}}
19401 Wrong option for formatNum (bug 56199)
19403 {{formatnum:1,234.56|Random}}
19404 {{formatnum:1,234.56|EVERYTHING}}
19405 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
19414 Strip marker in grammar
19418 {{grammar:elative|foo<nowiki/>bar}}
19425 Strip marker in padleft
19427 {{padleft:|2|x<nowiki/>y}}
19434 Strip marker in padright
19436 {{padright:|2|x<nowiki/>y}}
19443 Strip marker in anchorencode
19445 {{anchorencode:x<nowiki/>y}}
19452 nowiki inside link inside heading (bug 18295)
19454 ==[[foo|x<nowiki>y</nowiki>z]]==
19456 <h2><a href="#xyz" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19461 new support for bdi element (bug 31817)
19463 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19465 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19470 Ignore pipe between table row attributes
19474 |- id=foo | style='color: red'
19482 <tr id="foo" style="color: red">
19489 Gallery override link with WikiLink (bug 34852)
19492 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19495 <ul class="gallery mw-gallery-traditional">
19496 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19497 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19498 <div class="gallerytext">
19508 Gallery override link with absolute external link (bug 34852)
19511 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19514 <ul class="gallery mw-gallery-traditional">
19515 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19516 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19517 <div class="gallerytext">
19527 Gallery override link with malicious javascript (bug 34852)
19530 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19533 <ul class="gallery mw-gallery-traditional">
19534 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19535 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19536 <div class="gallerytext">
19546 Gallery with invalid title as link (bug 43964)
19549 File:foobar.jpg|link=<
19552 <ul class="gallery mw-gallery-traditional">
19553 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19554 <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" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19555 <div class="gallerytext">
19563 Language parser function
19572 Padleft and padright as substr
19574 {{padleft:|3|abcde}}
19575 {{padright:|3|abcde}}
19583 Special parser function
19585 {{#special:RandomPage}}
19586 {{#special:BaDtItLe}}
19587 {{#special:Foobar}}
19596 Bug 34939 - Case insensitive link parsing ([HttP://])
19598 [HttP://MediaWiki.Org/]
19600 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19603 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19607 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19609 [HttP://MediaWiki.Org/ MediaWiki]
19611 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19616 Bug 34939 - Case insensitive link parsing (HttP://)
19618 HttP://MediaWiki.Org/
19620 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19623 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19641 <h2><a href="#Section_1" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19642 <h2><a href="#Section_2" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19643 <h2><a href="#Section_3" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19644 <h2><a href="#Section_4" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19645 <h2><a href="#Section_5" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><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>
19651 ### Parsoid-specific tests
19652 ### Parsoid-PHP parser incompatibilities
19655 1. SOL-sensitive wikitext tokens as template-args
19657 parsoid=wt2html,wt2wt
19663 <span about="#mwt1" typeof="mw:Transclusion">
19664 </span><ul about="#mwt1"><li>a</li>
19666 <span about="#mwt2" typeof="mw:Transclusion">
19667 </span><ol about="#mwt2"><li>a</li>
19669 <span about="#mwt3" typeof="mw:Transclusion">
19670 </span><dl about="#mwt3"><dd>a</dd>
19674 #### -----------------------------------------------------------------
19675 #### Parsoid-specific functionality tests
19676 #### -----------------------------------------------------------------
19678 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19679 # We know wt2wt will fail, but we expect selser to pass.
19680 # Due to the nature of our testing, wt2wt and selser tests will enter the
19681 # blacklist and we'll catch selser regressions based on changes to the
19682 # blacklist entries for selser tests.
19684 1. Bad treebuilder fixup of formatting elt is cleaned up
19686 parsoid=wt2html,wt2wt
19691 [[Image:Foobar.jpg|right|Test]]
19698 <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>
19705 2. Bad treebuilder fixup of formatting elt is cleaned up
19707 parsoid=wt2html,wt2wt
19709 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19711 <small>[[Image:Foobar.jpg|right|300px]]</small>
19714 <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>
19716 <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>
19719 #### ----------------------------------------------------------------
19720 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19721 #### tags. Parsoid's output for these tags differs from that of the
19723 #### ----------------------------------------------------------------
19726 Ref: 1. ref-location should be replaced with an index span
19731 B <ref name="x">foo</ref>
19735 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
19736 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>
19737 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>
19738 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19739 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
19740 <li id="cite_note-x-2"><span rel="mw:referencedBy"><a href="#cite_ref-x_2-0">↑</a></span> foo</li>
19741 <li id="cite_note-y-3"><span rel="mw:referencedBy"><a href="#cite_ref-y_3-0">↑</a></span></li>
19746 Ref: 2. ref-tags with identical names should all get the same index
19750 A <ref name="x">foo</ref>
19754 <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>
19755 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>
19756 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19757 <li id="cite_note-x-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-x_1-0">1.0</a> <a href="#cite_ref-x_1-1">1.1</a></span> foo</li>
19762 Ref: 3. spaces in ref-names should be ignored
19766 A <ref name="x">foo</ref>
19767 B <ref name=" x " />
19771 <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>
19772 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>
19773 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>
19774 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19775 <li id="cite_note-x-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-x_1-0">1.0</a> <a href="#cite_ref-x_1-1">1.1</a> <a href="#cite_ref-x_1-2">1.2</a></span> foo</li>
19779 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19781 Ref: 4. 'constructor' should be accepted as a valid ref-name
19785 A <ref name="constructor">foo</ref>
19788 <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>
19789 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19790 <li id="cite_note-constructor-1"><span rel="mw:referencedBy"><a href="#cite_ref-constructor_1-0">↑</a></span> foo</li>
19795 Ref: 5. body should accept generic wikitext
19800 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19805 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" 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>
19807 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19808 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</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>
19814 Ref: 6. indent-pres should not be output in ref-body
19826 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" 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>
19828 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19829 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19837 Ref: 7. No p-wrapping in ref-body
19856 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" 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>
19858 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19859 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19874 Ref: 8. transclusion wikitext has lower precedence
19878 A <ref> foo {{echo|</ref> B C}}
19882 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" 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>
19883 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19884 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <span typeof="mw:Nowiki">{{</span>echo|</li>
19889 Ref: 9. unclosed comments should not leak out of ref-body
19893 A <ref> foo <!--</ref> B C
19896 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" 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>
19897 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19898 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <!----></li>
19903 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19907 A <ref> <b> foo </ref> B C
19911 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" 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>
19914 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19915 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></li>
19920 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19928 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B
19929 C <span about="#mwt4" class="reference" id="cite_ref-2" 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>
19930 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19931 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
19932 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
19937 Ref: 12. ref-tags act as trailing newline migration barrier
19941 <!--the newline at the end of this line moves out of the p-tag-->a
19943 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19949 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19952 <p>b<!--the newline at the end of this line stays inside the p-tag--> <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-1">[1]</a></span>
19953 <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-2">[2]</a></span></p>
19956 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19957 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span></li>
19958 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span></li>
19963 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19972 <p><span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> A
19973 <span about="#mwt4" class="reference" id="cite_ref-2" 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>
19974 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19975 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
19976 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
19981 Ref: 14. A nested ref-tag should be emitted as plain text
19985 <ref>foo <ref>bar</ref> baz</ref>
19989 <p><span about="#mwt2" class="reference" id="cite_ref-1" 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>
19991 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19992 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <ref>bar</ref> baz</li>
19997 Ref: 15. ref-tags with identical names should get identical indexes
20001 A1 <ref name="a">foo</ref> A2 <ref name="a" />
20002 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
20006 <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>
20007 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>
20009 <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>
20013 ## We don't bother wt2wt-ing non-standard whitespace
20015 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
20023 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20025 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20026 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
20030 Ref: 17. Generate valid HTML5 id/about attributes
20034 <ref name="a b">foo</ref>
20038 <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>
20041 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
20042 <li id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b_1-0">↑</a></span> foo</li>
20046 Ref: 18. T58916: Extension attributes should be parsed as plain text
20050 <ref name="{{echo|a}}">foo</ref>
20054 <p><span class="reference" id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"{{echo|a}}"}}'><a href="#cite_note-.7B.7Becho.7Ca.7D.7D-1">[1]</a></span>
20057 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
20058 <li id="cite_note-.7B.7Becho.7Ca.7D.7D-1"><span rel="mw:referencedBy"><a href="#cite_ref-.7B.7Becho.7Ca.7D.7D_1-0">↑</a></span> foo</li>
20062 Ref: 19. ref-tags with identical name encodings should get identical indexes
20066 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
20070 <p>1 <span about="#mwt3" class="reference" id="cite_ref-a_.26_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_.26_b-1">[1]</a></span> 2 <span about="#mwt4" class="reference" id="cite_ref-a_.26_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a &amp; b"}}'><a href="#cite_note-a_.26_b-1">[1]</a></span>
20072 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a_.26_b-1" id="cite_note-a_.26_b-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-a_.26_b_1-0">1.0</a> <a href="#cite_ref-a_.26_b_1-1">1.1</a></span> foo</li>
20077 References: 1. references tag without any refs should be handled properly
20083 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
20087 References: 2. references tag with group only outputs references from that group
20091 A <ref group="a">foo</ref>
20092 B <ref group="b">bar</ref>
20095 <references group="a" />
20097 <references group="b" />
20099 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" 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>
20100 B <span about="#mwt4" class="reference" id="cite_ref-2" 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>
20101 C <span class="reference" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"baz"},"attrs":{}}'><a href="#cite_note-3">[1]</a></span></p>
20103 <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">↑</a></span> foo</li>
20105 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3">↑</a></span> baz</li>
20107 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{"group":"b"}}'>
20108 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
20113 References: 3. ref list should be cleared after processing references
20125 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20127 <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">↑</a></span> foo</li>
20130 <p>B <span about="#mwt6" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
20132 <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">↑</a></span> bar</li>
20137 References: 4. only referenced group should be cleared after processing references
20141 A <ref group="a">afoo</ref>
20144 <references group="a" />
20150 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" 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>
20151 B <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bfoo"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
20153 <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">↑</a></span> afoo</li>
20156 <p>C <span about="#mwt8" class="reference" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"cfoo"},"attrs":{}}'><a href="#cite_note-3">[2]</a></span></p>
20158 <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">↑</a></span> bfoo</li><li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3">↑</a></span> cfoo</li>
20163 References: 5. ref tags in references should be processed while ignoring all other content
20168 B <ref name="b">bar</ref>
20171 <ref name="a">foo</ref>
20172 This should just get lost.
20175 <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>
20176 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>
20179 <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='{\"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>
20184 References: 6. <references /> from a transclusion
20188 <ref>Foo</ref> {{echo|<references />}}
20190 <p><span about="#mwt3" class="reference" id="cite_ref-1" 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">↑</a></span> Foo</li></ol>
20194 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
20198 A <ref>foo bar for a</ref>
20199 B <ref group="X" name="b" />
20203 <references group="X">
20204 <ref name="b">foo</ref>
20207 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" 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>
20208 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>
20210 <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">↑</a></span> foo bar for a</li></ol>
20212 <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='{\"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>
20216 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
20220 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
20223 <p>X<span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>"}},"i":0}}]}'><a href="#cite_note-1">[1]</a></span></p>
20224 <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">↑</a></span> foo <b data-parsoid='{"stx":"html"}'>bar</b> and baz boo</li></ol>
20227 # This test only works in wt2html now as the <references /> are always generated
20228 # unless selser is active. Once T72722 is fixed, we should add a changes test
20229 # here to ensure that unrelated changes don't add the new <references /> in
20232 References: 9. Generate missing references list at the end
20237 B <ref group="inexistent">bar</ref>
20239 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"group":"inexistent"}}'><a href="#cite_note-2">[inexistent 1]</a></span></</p>
20240 <ol about="#mwt5" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
20241 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
20243 <ol about="#mwt6" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
20244 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
20249 Entities in ref name
20253 <ref name="test & me">hi</ref>
20256 <p><span about="#mwt2" class="reference" id="cite_ref-test_.26_me_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"hi"},"attrs":{"name":"test &amp; me"}}'><a href="#cite_note-test_.26_me-1">[1]</a></span></p>
20257 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
20258 <li id="cite_note-test_.26_me-1"><span rel="mw:referencedBy"><a href="#cite_ref-test_.26_me_1-0">↑</a></span> hi</li>
20262 # This test is wt2html only because we're permitting the serializer to produce
20263 # dirty diffs, normalizing the unclosed references to the self-closed version.
20265 Generate references for unclosed references tag
20273 <p>a<span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20276 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20277 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
20281 New reference serializes on its own line
20283 parsoid=wt2wt,html2wt
20288 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
20291 #--------- Test stripping of empty nodes in template content ----------
20293 Empty LI and TR nodes should be stripped from template content
20298 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
20302 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
20315 Empty LI and TR nodes should not be stripped from top-level content
20342 Empty TR nodes should not be stripped if they have any attributes set
20344 {{EmptyTRWithHTMLAttrTest}}
20346 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
20347 <tr align="center"></tr>
20348 <tr><td>foo</td></tr>
20349 <tr align="center"></tr>
20350 <tr><td>bar</td></tr>
20354 #### ----------------------------------------------------------------
20355 #### The following section of tests are primarily to test
20356 #### wikitext escaping capabilities of Parsoid. Given that
20357 #### escaping can be done any number of ways, the wikitext (input)
20358 #### is always adjusted to reflect how Parsoid adds nowiki
20361 #### We are marking several tests as parsoid-only since the
20362 #### HTML in the result section is different from what the
20363 #### PHP parser generates for it.
20364 #### ----------------------------------------------------------------
20367 #### --------------- Headings ---------------
20369 #### 1. Nested inside html <h1>=foo=</h1>
20370 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
20371 #### 3. Nested inside html with wikitext split by html tags
20372 #### 4. No escape needed
20373 #### 5. Empty headings <h1></h1>
20374 #### 6. Heading chars in SOL context
20375 #### ----------------------------------------
20377 Headings: 0. Unnested
20381 <nowiki>=foo=</nowiki>
20383 <nowiki> =foo= </nowiki>
20385 <nowiki>=foo=</nowiki>
20387 =foo''a''<nowiki>=</nowiki>
20389 <p><span typeof="mw:Nowiki">=foo=</span></p>
20391 <p><span typeof="mw:Nowiki"> =foo= </span>
20393 <span typeof="mw:Nowiki">=foo=</span></p>
20395 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
20398 # New headings and existing headings are handled differently
20400 Headings: 1. Nested inside html
20408 <h1 data-parsoid=''>=foo=</h1>
20409 <h2 data-parsoid=''>=foo=</h2>
20410 <h3 data-parsoid=''>=foo=</h3>
20411 <h4 data-parsoid=''>=foo=</h4>
20412 <h5 data-parsoid=''>=foo=</h5>
20413 <h6 data-parsoid=''>=foo=</h6>
20421 =<nowiki>=foo=</nowiki>=
20422 ==<nowiki>=foo=</nowiki>==
20423 ===<nowiki>=foo=</nowiki>===
20424 ====<nowiki>=foo=</nowiki>====
20425 =====<nowiki>=foo=</nowiki>=====
20426 ======<nowiki>=foo=</nowiki>======
20431 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
20440 <nowiki>*</nowiki>bar
20446 <nowiki>=bar=</nowiki>
20450 Headings: 3. Nested inside html with wikitext split by html tags
20452 parsoid=html2wt,wt2wt
20454 = ='''bold'''<nowiki>foo=</nowiki> =
20456 <h1>=<b>bold</b>foo=</h1>
20460 Headings: 4a. No escaping needed (testing just h1 and h2)
20485 <h1><i>=</i>foo=</h1>
20489 Headings: 4b. No escaping needed (inside p-tags)
20504 Headings: 5. Empty headings
20516 =====<nowiki/>=====
20518 ======<nowiki/>======
20529 Headings: 6a. Heading chars in SOL context (with trailing spaces)
20533 <nowiki>=a=</nowiki>
20535 <nowiki>=a=</nowiki>
20537 <nowiki>=a=</nowiki>
20539 <nowiki>=a=</nowiki>
20548 Headings: 6b. Heading chars in SOL context (with trailing newlines)
20576 Headings: 6c. Heading chars in SOL context (leading newline break)
20581 <nowiki>=b=</nowiki>
20588 Headings: 6d. Heading chars in SOL context (with interspersed comments)
20592 <!--c0--><nowiki>=a=</nowiki>
20594 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
20596 <p><!--c0-->=a=</p>
20597 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
20601 Headings: 6d. Heading chars in SOL context (No escaping needed)
20611 Headings: 7. Insert a newline between new content and headings
20617 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
20618 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
20628 #### --------------- Lists ---------------
20629 #### 0. Outside nests (*foo, etc.)
20630 #### 1. Nested inside html <ul><li>*foo</li></ul>
20631 #### 2. Inside definition lists
20632 #### 3. Only bullets at start should be escaped
20633 #### 4. No escapes needed
20634 #### 5. No unnecessary escapes
20635 #### 6. Escape bullets in SOL position
20636 #### 7. Escape bullets in a multi-line context
20637 #### ----------------------------------------
20640 Lists: 0. Outside nests
20642 <nowiki>*</nowiki>foo
20644 <nowiki>#</nowiki>foo
20646 <nowiki>;Foo:</nowiki>bar
20655 Lists: 1. Nested inside html
20657 *<nowiki>*foo</nowiki>
20659 *<nowiki>#foo</nowiki>
20661 *<nowiki>:foo</nowiki>
20663 *<nowiki>;foo</nowiki>
20665 #<nowiki>*foo</nowiki>
20667 #<nowiki>#foo</nowiki>
20669 #<nowiki>:foo</nowiki>
20671 #<nowiki>;foo</nowiki>
20673 <ul><li>*foo</li></ul>
20674 <ul><li>#foo</li></ul>
20675 <ul><li>:foo</li></ul>
20676 <ul><li>;foo</li></ul>
20677 <ol><li>*foo</li></ol>
20678 <ol><li>#foo</li></ol>
20679 <ol><li>:foo</li></ol>
20680 <ol><li>;foo</li></ol>
20685 Lists: 2. Inside definition lists
20687 ;<nowiki>;foo</nowiki>
20689 ;<nowiki>:foo</nowiki>
20691 ;<nowiki>:foo</nowiki>
20694 :<nowiki>:foo</nowiki>
20696 <dl><dt>;foo</dt></dl>
20697 <dl><dt>:foo</dt></dl>
20700 <dl><dd>:foo</dd></dl>
20705 Lists: 3. Only bullets at start of text should be escaped
20707 *<nowiki>*foo*bar</nowiki>
20709 *<nowiki>*foo</nowiki>''it''*bar
20711 <ul><li>*foo*bar</li></ul>
20712 <ul><li>*foo<i>it</i>*bar</li></ul>
20717 Lists: 4. No escapes needed
20738 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20742 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20748 Lists: 5. No unnecessary escapes
20750 * bar <span><nowiki>[[foo]]</nowiki></span>
20752 * =bar <span><nowiki>[[foo]]</nowiki></span>
20754 * [[bar <span><nowiki>[[foo]]</nowiki></span>
20756 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
20758 * =bar <span>foo]]</span>=
20764 <ul><li> bar <span>[[foo]]</span></li></ul>
20765 <ul><li> =bar <span>[[foo]]</span></li></ul>
20766 <ul><li> [[bar <span>[[foo]]</span></li></ul>
20767 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
20768 <ul><li> =bar <span>foo]]</span>=</li></ul>
20769 <ul><li> <s></s>: a</li></ul>
20770 <ul><li> <i>* foo</i></li></ul>
20775 Lists: 6. Escape bullets in SOL position
20779 <p><!--cmt-->*foo</p>
20781 <!--cmt--><nowiki>*</nowiki>foo
20785 Lists: 7. Escape bullets in a multi-line context
20788 <nowiki>*</nowiki>b
20796 Lists: 8. Escape colons only if not present in tags
20800 <dl><dt>a:b<i>c:d</i></dt></dl>
20802 ; <nowiki>a:b</nowiki>''c:d''
20805 #### --------------- HRs ---------------
20806 #### 1. Single line
20807 #### -----------------------------------
20810 HRs: 1. Single line
20812 ----<nowiki>----</nowiki>
20824 #### --------------- Tables ---------------
20825 #### 1a. Simple example
20826 #### 1b. No escaping needed (!foo)
20827 #### 1c. No escaping needed (|foo)
20828 #### 1d. No escaping needed (|}foo)
20830 #### 2a. Nested in td (<td>foo|bar</td>)
20831 #### 2b. Nested in td (<td>foo||bar</td>)
20832 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20834 #### 3a. Nested in th (<th>foo!bar</th>)
20835 #### 3b. Nested in th (<th>foo!!bar</th>)
20836 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20840 #### 4c. No escaping needed
20841 #### --------------------------------------
20844 Tables: 1a. Simple example
20855 Tables: 1b. No escaping needed
20864 Tables: 1c. No escaping needed
20873 Tables: 1d. No escaping needed
20882 Tables: 2a. Nested in td
20887 <td>foo|bar</td></tr>
20888 <tr><td>x<div>a|b</div></td>
20892 |<nowiki>foo|bar</nowiki>
20894 |x<div><nowiki>a|b</nowiki></div>
20910 Tables: 2b. Nested in td
20916 <td>a<i>b||c</i></td>
20917 <td>a<i><div>b||c</div></i></td>
20918 </tr></tbody></table>
20921 |<nowiki>foo||bar</nowiki>
20922 |a''<nowiki>b||c</nowiki>''
20923 |a''<div><nowiki>b||c</nowiki></div>''
20932 <td>a<i><div>b||c</div></i>
20938 Tables: 2c. Nested in td -- no escaping needed
20954 Tables: 3a. Nested in th
20970 Tables: 3b. Nested in th
20975 <tr><th>foo!!bar</th>
20976 <th><i>foo|bar</i></th>
20977 <th><i>foo!!bar</i></th>
20978 <th><i><span>foo!!bar</span></i></th>
20979 </tr></tbody></table>
20982 !<nowiki>foo!!bar</nowiki>
20983 !''<nowiki>foo|bar</nowiki>''
20984 !''<nowiki>foo!!bar</nowiki>''
20985 !''<span><nowiki>foo!!bar</nowiki></span>''
20994 <th><i>foo!!bar</i>
20996 <th><i><span>foo!!bar</span></i>
21002 Tables: 3c. Nested in th
21007 <tr><th>foo||bar</th>
21008 <th><span typeof="mw:Nowiki">foo||bar</span></th>
21009 </tr></tbody></table>
21012 !<nowiki>foo||bar</nowiki>
21013 !<nowiki>foo||bar</nowiki>
21026 Tables: 4a. Escape -
21045 |<nowiki>-bar</nowiki>
21050 Tables: 4b. Escape +
21069 |<nowiki>+bar</nowiki>
21074 Tables: 4c. No escaping needed
21117 <tr><td>foo-bar</td><td>foo+bar</td></tr>
21118 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
21124 <div>a|b</div></td>
21129 Tables: 4d. No escaping needed
21139 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
21148 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
21149 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
21150 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
21155 Tables: Digest broken attributes on table and tr tag
21171 #### --------------- Links ----------------
21172 #### 1. Quote marks in link text
21173 #### 2. Wikilinks: Escapes needed
21174 #### 3. Wikilinks: No escapes needed
21175 #### 4. Extlinks: Escapes needed
21176 #### 5. Extlinks: No escapes needed
21177 #### --------------------------------------
21179 Links 1. WikiLinks: No escapes needed
21183 [[Foo|x [Foobar] x]]
21185 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
21186 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
21187 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
21190 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
21191 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
21192 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
21196 Links 2. WikiLinks: Escapes needed
21200 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
21201 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
21202 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
21203 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
21204 <a href="Foo" rel="mw:WikiLink">|Bar</a>
21205 <a href="Foo" rel="mw:WikiLink">]]bar</a>
21206 <a href="Foo" rel="mw:WikiLink">[[bar</a>
21207 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
21208 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
21209 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
21211 [[Foo|<nowiki>Foobar]</nowiki>]]
21212 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
21213 [[Foo|<nowiki>[[Bar]]</nowiki>]]
21214 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
21215 [[Foo|<nowiki>|Bar</nowiki>]]
21216 [[Foo|<nowiki>]]bar</nowiki>]]
21217 [[Foo|<nowiki>[[bar</nowiki>]]
21218 [[Foo|<nowiki>x [[ y</nowiki>]]
21219 [[Foo|<nowiki>x ]] y</nowiki>]]
21220 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
21222 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
21223 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
21224 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
21225 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
21226 <a href="/wiki/Foo" title="Foo">|Bar</a>
21227 <a href="/wiki/Foo" title="Foo">]]bar</a>
21228 <a href="/wiki/Foo" title="Foo">[[bar</a>
21229 <a href="/wiki/Foo" title="Foo">x [[ y</a>
21230 <a href="/wiki/Foo" title="Foo">x ]] y</a>
21231 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
21236 Links 3. WikiLinks: No escapes needed
21241 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
21242 <a href="/wiki/Foo" title="Foo">foo|bar</a>
21245 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
21246 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
21250 Links 4. ExtLinks: Escapes needed
21254 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
21255 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
21256 <p>[http://google.com]</p>
21257 <p>[http://google.com google]</p>
21259 [http://google.com <nowiki>[google]</nowiki>]
21260 [http://google.com <nowiki>google]</nowiki>]
21262 <nowiki>[http://google.com]</nowiki>
21264 <nowiki>[http://google.com google]</nowiki>
21267 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
21268 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
21269 </p><p>[http://google.com]
21270 </p><p>[http://google.com google]
21275 Links 5. ExtLinks: No escapes needed
21277 [http://google.com [google]
21279 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
21282 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
21286 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
21288 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
21289 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
21290 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
21291 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
21292 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
21293 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
21294 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21295 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
21296 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21297 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
21298 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
21299 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
21300 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
21303 x<nowiki/>http://example.com<nowiki/>y
21304 http://example.com<nowiki/>?x
21305 http://example.com<nowiki/>&x
21306 http://example.com<nowiki/>'x
21307 http://example.com<nowiki/>,x
21308 http://example.com<nowiki/>.x
21309 http://example.com<nowiki/>;x
21310 http://example.com<nowiki/>:x
21311 http://example.com<nowiki/>;x
21312 http://example.com<nowiki/>!x
21313 http://example.com<nowiki/>=x
21314 http://example.com<nowiki/>(x)
21315 http://example.com(x<nowiki/>)
21319 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21322 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
21324 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
21325 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
21326 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
21327 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
21328 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
21334 "http://example.com"
21335 (http://example.com)
21336 (http://example.com) foo
21337 http://example.com,
21338 http://example.com, foo
21341 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
21343 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
21344 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
21345 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
21346 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
21347 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
21352 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21354 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
21355 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
21357 http://example.com.,;:!?\
21358 -http://example.com:
21360 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
21361 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
21366 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
21368 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
21369 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
21370 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
21374 X<nowiki/>RFC 123<nowiki/>y
21378 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
21380 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
21381 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
21382 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
21389 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
21390 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
21391 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
21396 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
21398 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
21399 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21400 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21404 X<nowiki/>PMID 123<nowiki/>y
21408 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
21410 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
21411 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
21412 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
21419 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
21420 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
21421 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
21426 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
21428 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
21429 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
21430 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
21433 ISBN 1234567890<nowiki/>1
21434 ISBN 1234567890<nowiki/>x
21435 a<nowiki/>ISBN 1234567890<nowiki/>b
21439 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
21441 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
21445 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
21450 Links 14. Protect link-like plain text. (Parsoid bug T78425)
21454 <p>this is not a link: http://example.com
21457 this is not a link: <nowiki>http://example.com</nowiki>
21461 Links 15. Link trails can't become link prefixes.
21465 [[Söfnuður]]-[[00]]
21467 <p><a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">Söfnuður-</a><a href="/wiki/00" title="00">00</a>
21470 <p><a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður" data-parsoid='{"stx":"simple","tail":"-"}'>Söfnuður-</a><a rel="mw:WikiLink" href="00" title="00">00</a></p>
21473 #### --------------- Quotes ---------------
21474 #### 1. Quotes inside <b> and <i>
21475 #### 2. Link fragments separated by <i> and <b> tags
21476 #### 3. Link fragments inside <i> and <b>
21477 #### 4. No escaping needed
21478 #### --------------------------------------
21480 1a. Quotes inside <b> and <i>
21482 parsoid=html2wt,wt2wt
21485 ''<nowiki>''foo''</nowiki>''
21486 ''<nowiki>'''foo'''</nowiki>''
21488 '''<nowiki/>'foo''''
21489 '''<nowiki>''foo''</nowiki>'''
21490 '''<nowiki>'''foo'''</nowiki>'''
21491 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
21492 '''foo'''<nowiki/>'s
21498 '''foo'''<nowiki/>'
21499 ''''foo'''<nowiki/>'
21500 ''fools'<span> errand</span>''
21501 ''<span>fool</span>'s errand''
21502 '<nowiki/>''foo'' bar '''baz''
21503 a|!*#-:;+-~[]{}b'''x''
21512 <b>foo'<i>bar'</i>baz</b>
21521 <i>fools'<span> errand</span></i>
21522 <i><span>fool</span>'s errand</i>
21523 '<i>foo</i> bar '<i>baz</i>
21524 a|!*#-:;+-~[]{}b'<i>x</i>
21529 1b. Quotes inside <b> and <i> with other tags on same line
21531 parsoid=html2wt,wt2wt
21533 '''a'' foo ''[[bar]]''
21534 ''a''' foo ''[[bar]]''
21535 ''a''' foo '''{{echo|[[bar]]}}'''
21536 [[foo]] x'''[[bar]]''
21537 '''foo'' <ref>test</ref>
21538 '''foo'' <div title="name">test</div>
21539 '''foo'' and <br> bar
21542 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21543 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21544 <i>a'</i> foo <b><a rel="mw:WikiLink" href="Bar" title="Bar" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[bar]]"}},"i":0}}]}'>bar</a></b>
21545 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
21546 '<i>foo</i> <span class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"test"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
21547 '<i>foo</i> <div title="name">test</div>
21548 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
21549 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
21550 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> test</li>
21555 2. Link fragments separated by <i> and <b> tags
21557 [[''foo''<nowiki>hello]]</nowiki>
21559 [['''foo'''<nowiki>hello]]</nowiki>
21561 <p>[[<i>foo</i>hello]]
21562 </p><p>[[<b>foo</b>hello]]
21566 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
21567 # this is one of the shortcomings of this format
21569 3. Link fragments inside <i> and <b>
21571 ''[[foo''<nowiki>]]</nowiki>
21573 '''[[foo'''<nowiki>]]</nowiki>
21576 </p><p><b>[[foo</b>]]
21581 4. No escaping needed
21583 '<span>''bar''</span>'
21584 '<span>'''bar'''</span>'
21587 <p>'<span><i>bar</i></span>'
21588 '<span><b>bar</b></span>'
21593 #### ----------- Paragraphs ---------------
21594 #### 1. No unnecessary escapes
21595 #### --------------------------------------
21598 1. No unnecessary escapes
21600 bar <span><nowiki>[[foo]]</nowiki></span>
21602 =bar <span><nowiki>[[foo]]</nowiki></span>
21604 [[bar <span><nowiki>[[foo]]</nowiki></span>
21606 ]]bar <span><nowiki>[[foo]]</nowiki></span>
21608 =bar <span>foo]]</span><nowiki>=</nowiki>
21610 <p>bar <span>[[foo]]</span>
21611 </p><p>=bar <span>[[foo]]</span>
21612 </p><p>[[bar <span>[[foo]]</span>
21613 </p><p>]]bar <span>[[foo]]</span>
21614 </p><p>=bar <span>foo]]</span>=
21618 #### ----------------------- PRE --------------------------
21619 #### 1. Leading whitespace in SOL context should be escaped
21620 #### ------------------------------------------------------
21622 1. Leading whitespace in SOL context should be escaped
21626 <nowiki> </nowiki>a
21628 <nowiki> </nowiki> a
21630 <nowiki> </nowiki>a(tab)
21632 <nowiki> </nowiki> a
21634 <nowiki> </nowiki> a
21637 <nowiki> </nowiki>b
21640 <nowiki> </nowiki>b
21643 <nowiki> </nowiki> b
21649 <p><!--cmt--> a</p>
21659 2. Leading whitespace in non-indent-pre contexts should not be escaped
21667 <p>foo <span about="#mwt2" class="reference" id="cite_ref-1" 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>
21668 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
21669 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <i>a</i> b</li>
21674 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
21693 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
21697 [[File:Foobar.jpg|thumb|caption]]
21700 <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>
21704 5. Nowiki escaping should account for indent-pres
21713 #### --------------- Behavior Switches --------------------
21715 1. Valid behavior switches should be escaped
21722 <nowiki>__TOC__</nowiki>
21723 ''<nowiki>__TOC__</nowiki>''
21727 2. Invalid behavior switches should not be escaped
21738 #### --------------- HTML tags ---------------
21741 #### 3. multi-line html tag
21742 #### 4. extension tags
21743 #### -----------------------------------------
21749 <a href="http://google.com">google</a>
21751 <a href="http://google.com">google</a>
21757 * <nowiki><div>foo</div></nowiki>
21758 * <nowiki><div style="color:red">foo</div></nowiki>
21759 * <nowiki><td></nowiki>
21761 <ul><li> <div>foo</div></li>
21762 <li> <div style="color:red">foo</div></li>
21763 <li> <td></li></ul>
21768 3. multi-line html tag
21783 <nowiki><ref>foo</ref></nowiki>
21785 <nowiki><ref>bar</nowiki>
21787 baz<nowiki></ref></nowiki>
21789 <p><ref>foo</ref>
21790 </p><p><ref>bar
21791 </p><p>baz</ref>
21795 #### --------------- Others ---------------
21799 <nowiki>foo</nowiki>
21801 <p><nowiki>foo</nowiki>
21805 ## The quote-char in the input is necessary for triggering the bug
21807 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
21809 parsoid=wt2wt,html2wt
21818 Tag-like HTML structures are passed through as text
21840 </p><p>1<d e>f
21845 # This was a bug in the PHP parser (see bug 17663 and its dups,
21846 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
21848 Tag names followed by punctuation should not be recognized as tags
21852 <p><s.ome> text
21857 HTML tag with necessary entities in attributes
21859 <span title="&amp;">foo</span>
21861 <p><span title="&amp;">foo</span>
21866 HTML tag with 'unnecessary' entity encoding in attributes
21868 <span title="&">foo</span>
21870 <p><span title="&">foo</span>
21875 HTML tag with broken attribute value quoting
21877 <span title="Hello world>Foo</span>
21879 <p><span>Foo</span>
21882 <p><span title="Hello world">Foo</span>
21887 Parsoid-only: HTML tag with broken attribute value quoting
21891 <span title="Hello world>Foo</span>
21893 <p><span title="Hello world">Foo</span>
21898 Table with broken attribute value quoting
21901 | title="Hello world|Foo
21912 <td title="Hello world">Foo
21918 Table with broken attribute value quoting on consecutive lines
21921 | title="Hello world|Foo
21922 | style="color:red|Bar
21935 <td title="Hello world">Foo
21936 </td><td style="color: red">Bar
21937 </td></tr></tbody></table>
21942 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21952 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21962 Accept empty td cell attribute
21965 | align="center" | foo || |
21970 <td align="center"> foo </td>
21977 Non-empty attributes in th-cells
21980 ! Foo !! style="color: red" | Bar
21986 <th style="color: red"> Bar
21992 Accept empty attributes in th-cells
22007 Empty table rows go away
22028 ### Parsoid-centric tests for testing RTing of inter-element separators
22029 ### Edge cases not tested by existing parser tests and specific to
22030 ### Parsoid-specific serialization strategies.
22034 RT-ed inter-element separators should be valid separators
22046 # Parsoid-only since PHP parser relies on Tidy for correct output
22048 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
22062 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
22063 <p>bar</p></small></td></tr>
22067 <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>
22072 Empty TD followed by TD with tpl-generated attribute
22077 |{{echo|style='color:red'}}|foo
22091 Indented table with an empty td
22109 ## We have some newline diffs RT-ing this edge case
22110 ## and it is not important enough -- we seem to be emitting
22111 ## at most 2 newlines after a </tr> and this is unrelated to
22112 ## the issue from T85627 that this is testing.
22114 Indented table with blank lines in between (T85627)
22133 Indented block & table
22147 <div data-parsoid='{"stx":"html"}'>foo</div>
22149 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
22154 Indent and comment before table row
22169 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
22170 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
22174 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
22176 Empty TR followed by a template-generated TR
22182 {{echo|<tr><td>foo</td></tr>}}
22188 <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}}]}'>
22193 ## PHP and parsoid output differ for this, and since this is primarily
22194 ## for testing Parsoid's serializer, marking this Parsoid only
22196 Empty TR followed by mixed-ws-comment line should RT correctly
22212 <!--c--> </tr><!--d-->
22218 Multi-line image caption generated by templates with/without trailing newlines
22220 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
22221 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
22223 <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>
22224 <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>
22228 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
22232 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
22234 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
22236 <includeonly>foo</includeonly>
22244 ## PHP emits broken html for this, and since this is primarily
22245 ## a Parsoid serializer test, marking this Parsoid only
22247 Improperly nested inline or quotes tags with whitespace in between
22251 <span> <s>x</span> </s>
22254 <p><span> <s>x</s></span><s> </s>
22255 <b> <i>x</i></b><i> </i>
22260 Encapsulate protected attributes from wt
22264 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
22266 <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>
22270 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
22271 ## Having nested or stray pre tags results in the attempt to add duplicates,
22272 ## causing an assertion fail. This test tries to prevent that situation.
22274 Ensure ParagraphWrapper can deal with stray closing pre tags
22284 1. Ensure fostered text content is wrapped in element nodes
22288 <table>hi</table><table>ho</table>
22297 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
22299 parsoid=wt2html,wt2wt
22308 <tbody><tr><td> a</td></tr>
22313 Encapsulation properly handles null DSR information from foster box
22315 parsoid=wt2html,wt2wt
22317 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
22319 <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>
22323 1. Encapsulate foster-parented transclusion content
22325 parsoid=wt2wt,wt2html
22327 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
22329 <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>
22339 2. Encapsulate foster-parented transclusion content
22341 parsoid=wt2wt,wt2html
22343 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
22345 <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>
22356 3. Encapsulate foster-parented transclusion content
22358 parsoid=wt2wt,wt2html
22360 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22362 <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>"]}">
22375 4. Encapsulate foster-parented transclusion content
22377 parsoid=wt2wt,wt2html
22379 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22381 <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>"]}">
22394 5. Encapsulate foster-parented transclusion content
22396 parsoid=wt2wt,wt2html
22398 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
22400 <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>
22415 6. Encapsulate foster-parented transclusion content
22417 parsoid=wt2wt,wt2html
22419 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
22421 <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>
22437 7. Encapsulate foster-parented transclusion content
22439 parsoid=wt2wt,wt2html
22441 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
22443 <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>
22454 8. Encapsulate foster-parented transclusion content
22456 parsoid=wt2wt,wt2html
22459 }}{|{{echo|style='color:red'}}
22464 <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>
22474 9. Encapsulate foster-parented transclusion content
22476 parsoid=wt2wt,wt2html
22478 <table>{{echo|hi</table>hello}}
22480 <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>
22484 Table in fosterable position
22486 parsoid=wt2html,wt2wt
22495 <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">
22497 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
22503 # Parsoid only for bug 64747
22505 Properly encapsulate empty-content transclusions in fosterable positions
22513 <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":["","","",""]}]]}'>
22519 Support <object> element with .data attribute
22523 <object data="test.swf"></object>
22525 <object data="test.swf"></object>
22529 Don't block XML namespace declaration
22531 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
22533 <p><span>MediaWiki</span>
22536 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
22539 # -----------------------------------------------------------------
22540 # The following section of tests are primarily to spec requirements
22541 # around serialization of new/edited content.
22543 # All these tests are marked Parsoid html2wt and html2html only
22544 # ----------------------------------------------------------------
22546 # 'mi' is a localinterwiki prefix as well as a language
22548 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
22552 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
22558 New wiki links (href variations)
22562 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22563 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
22564 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
22565 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
22570 [[Toxine bactérienne]]
22574 New wiki links (content string variations)
22578 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22579 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
22580 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
22584 [[Foo_bar|./Foo_bar]]
22588 New category links (href variations)
22592 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
22593 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
22594 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
22596 [[Category:Toxine bactérienne]]
22597 [[Category:Toxine bactérienne]]
22598 [[Category:Toxine bactérienne]]
22602 New sol transparent links don't need indent-pre nowiki protection
22607 <link rel="mw:PageProp/redirect" href="./Main_Page">
22608 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
22609 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
22611 #WEITERLEITUNG [[Main Page]]
22612 <!-- this is good --> [[Category:Good]]
22613 <!-- this is great --> [[Kategorie:Great]]
22617 New interlanguage links (href variations)
22621 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
22622 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
22623 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
22625 [[es:Toxine bactérienne]]
22626 [[es:Toxine_bactérienne]]
22627 [[es:Toxine_bactérienne]]
22631 Image: Modifying size of an image (1)
22634 "modes": ["wt2wt"],
22636 ["img[height]", "attr", "height", "22"],
22637 ["img[width]", "attr", "width", "200"]
22641 [[Image:Foobar.jpg|230x230px]]
22643 [[Image:Foobar.jpg|200x200px]]
22647 Image: Modifying size of an image (2)
22650 "modes": ["wt2wt"],
22652 ["img[height]", "attr", "height", "100"],
22653 ["img[width]", "attr", "width", "500"]
22657 [[Image:Foobar.jpg|230x230px]]
22659 [[Image:Foobar.jpg|500x500px]]
22662 # Change in size is ignored so long as class='mw-default-size'
22664 Image: Modifying size of an image (3)
22667 "modes": ["wt2wt"],
22669 ["figure[class]", "removeClass", "mw-default-size"],
22670 ["figure img", "attr", "height", "19"],
22671 ["figure img", "attr", "width", "170"]
22675 [[Image:Foobar.jpg|thumb]]
22677 [[Image:Foobar.jpg|thumb|170x170px]]
22681 Image: Modifying alignment of an image (bug 48665)
22684 "modes": ["wt2wt"],
22686 ["figure[class]", "removeClass", "mw-halign-right"],
22687 ["figure[class]", "addClass", "mw-halign-left"]
22691 [[Image:Foobar.jpg|thumb|caption|right]]
22693 [[Image:Foobar.jpg|thumb|caption|left]]
22697 Image: Modifying mw-default-size of an frameless image (bug 62805)
22700 "modes": ["wt2wt"],
22702 ["figure.mw-default-size", "removeClass", "mw-default-size"]
22706 [[Image:Foobar.jpg|frameless|right]]
22708 [[Image:Foobar.jpg|frameless|right|220x220px]]
22712 Image: Modifying valign of an image (bug 49221)
22715 "modes": ["wt2wt"],
22717 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
22718 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
22722 [[File:Foobar.jpg|20px|middle]]
22724 [[File:Foobar.jpg|20px|text-top]]
22728 Image: Modifying alt attribute of an image (bug 56400)
22731 "modes": ["wt2wt"],
22733 ["img[alt]", "attr", "alt", "some alternate edited text"]
22737 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
22739 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
22743 Image: Modifying caption of an image
22746 "modes": ["wt2wt"],
22748 ["figcaption", "text", "new caption"]
22752 [[Image:Foobar.jpg|thumb|original caption]]
22754 [[Image:Foobar.jpg|thumb|new caption]]
22758 Image: empty alt attribute (bug 48924)
22762 [[File:Foobar.jpg|thumb|alt=|bar]]
22764 <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>
22768 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
22773 #<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>
22775 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
22779 Image: Block level image should have \n before and after
22782 [[File:Foobar.jpg|right|thumb|150x150px]]
22786 <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>
22791 Image: New block level image should have \n before and after (existing content)
22794 [[File:Foobar.jpg|right|thumb|150x150px]]
22798 <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>
22803 Image: upright option (parsoid)
22807 [[File:Foobar.jpg|thumb|upright|caption]]
22808 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
22809 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
22811 <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>
22812 <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>
22813 <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>
22817 Image: upright option is ignored on inline and frame images (parsoid)
22821 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
22823 <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>
22827 Image: from basic HTML (1)
22831 <span typeof="mw:Image">
22832 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22835 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22839 Image: from basic HTML (2)
22843 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22845 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22849 Image: from basic HTML (3)
22853 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
22855 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
22859 Image: from basic HTML (4)
22863 <img src="File:Foobar.jpg">
22865 [[File:Foobar.jpg|link=]]
22869 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
22874 <li><p>foo</p></li>
22881 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
22885 <ul> <li>foo</li></ul>
22891 Don't strip leading whitespace when handling indent-pre suppressing tags
22896 <tr><td> indented row</td></tr>
22899 <b>This is very bold of you!</b>
22902 indented cell (no pre-wrapping!)
22912 '''This is very bold of you!'''
22916 indented cell (no pre-wrapping!)
22924 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
22929 <nowiki> </nowiki><span>bar</span>
22932 <nowiki> </nowiki></span>bar2
22935 <nowiki> </nowiki><span>bar</span>
22938 <nowiki> </nowiki><span>foo</span>
22956 Lists: Add space after bullets
22963 <li><span> baz</span></li>
22968 * <span> baz</span>
22972 Lists: Dont insert newlines in a serialized list item.
22976 <ul><li>a<br>b</li><li>c</li></ul>
22983 Headings: Add space before/after == (Bug 51744)
22990 <h2><span> baz</span></h2>
22998 == <span> baz</span> ==
23002 Headings: Force metas to serialize before/after
23006 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
23007 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
23009 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
23017 <!--foo--> [[Category:A3]]
23022 Parsoid: Serialize positional parameters with = in them as named parameter
23026 <p about="#mwt1" typeof="mw:Transclusion"
23027 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
23029 <p about="#mwt1" typeof="mw:Transclusion"
23030 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
23032 <!--Orig params with data-parsoid has heuristics for handling = chars-->
23033 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
23034 <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>
23038 {{echo|1 = f=oo|2 = bar}}
23040 <!--Orig params with data-parsoid has heuristics for handling = chars-->
23041 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
23042 {{echo|<nowiki>f=oo</nowiki>|bar}}
23046 Parsoid: Serialize positional parameters with = in extlink as named parameter
23050 <p><a rel="mw:ExtLink" href="http://stuff?is=ok" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://stuff?is=ok"}},"i":0}}]}'>http://stuff?is=ok</a></p>
23052 {{echo|1 = http://stuff?is=ok}}
23056 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
23060 <div>a<p>b</p></div>
23081 Substrings resembling wikitext in hrefs should not get nowiki escapes
23085 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
23090 #-----------------------------
23091 # I/B quote minimization tests
23092 #-----------------------------
23095 1. I/B quote minimization: wikitext-only tags should be combined
23099 <p><i>A</i><i>B</i></p>
23100 <p><b>A</b><b>B</b></p>
23101 <p><i>A</i><b><i>B</i></b></p>
23102 <p><b>A</b><i><b>B</b></i></p>
23103 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
23104 <p><i><b>A</b></i><i><b>B</b></i></p>
23105 <p><i><b>A</b></i><b><i>B</i></b></p>
23106 <p><b><i>A</i></b><i><b>B</b></i></p>
23126 2. I/B quote minimization: wikitext and html tags should not be combined
23130 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
23131 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
23135 ''A''<nowiki/>'''<i>B</i>'''
23139 3. I/B quote minimization: templated content stops minimization
23143 <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>
23144 <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>
23146 ''A''{{echo|''B''}}
23148 ''A''{{echo|'''''B'''''}}
23152 4. I/B quote minimization: new content should be mimimized with adjacent old content
23156 <p><i>A</i><i>B</i></p>
23157 <p><b>A</b><b>B</b></p>
23158 <p><i>A</i><b><i>B</i></b></p>
23168 5a. Merge adjacent quote nodes if they've been edited
23171 "modes": ["wt2wt"],
23173 ["p", "contents", "remove", ":contains('b')"]
23183 5b. Merge adjacent quote nodes if they've been edited
23186 "modes": ["wt2wt"],
23192 ''a''<span id="x">b</span>''c''
23197 #------------------------------------
23198 # End of I/B quote minimization tests
23199 #------------------------------------
23202 Bug 54262: New entities
23208 <span typeof="mw:Entity"> </span>
23211 ## Note that there is no wikitext output for 'unknownproperty' ##
23212 ## Unknown magic words are silently dropped ##
23219 <meta property='mw:PageProp/toc' />
23220 <meta property='mw:PageProp/notoc' />
23221 <meta property='mw:PageProp/forcetoc' />
23222 <meta property='mw:PageProp/index' />
23223 <meta property='mw:PageProp/noindex' />
23224 <meta property='mw:PageProp/nogallery' />
23225 <meta property='mw:PageProp/noeditsection' />
23226 <meta property='mw:PageProp/notitleconvert' />
23227 <meta property='mw:PageProp/nocontentconvert' />
23228 <meta property='mw:PageProp/unknownproperty' />
23238 __NOCONTENTCONVERT__
23242 Consecutive <pre>s should not get merged
23244 parsoid=html2wt,html2html
23246 <pre>a</pre><pre>b</pre>
23274 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
23278 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
23280 [[Special:BookSources/1234567890|ISBN 1234567895]]
23284 Edited RFC links not serializable as RFC links should serialize as extlinks
23288 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
23290 [//tools.ietf.org/html/rfc123 New RFC]
23294 Edited PMID links not serializable as PMID links should serialize as extlinks
23298 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
23300 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
23304 WTS of autolinks with trailing/surrounding context
23308 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
23309 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
23310 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
23311 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
23312 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
23313 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
23315 http://cscott.net<nowiki/>'''foo'''
23317 http://cscott.net<b>foo</b>
23319 '''http://cscott.net<nowiki/>'''
23321 '''http://cscott.net '''
23323 '''http://cscott.net<nowiki/>x'''
23325 http://cscott.net<nowiki/>x
23329 WTS of autolinks with nowikis (round-trip)
23331 x<nowiki/>http://cscott.net<nowiki/>x
23333 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
23336 # this is the "easy" test because it leaves in place all the
23337 # data-parsoid information indicating this is an autolink
23339 WTS of autolinks with escapes (editing)
23342 "modes": ["wt2wt"],
23344 [ "meta", "remove" ]
23348 x<nowiki/>http://cscott.net<nowiki/>x
23350 x<nowiki/>http://cscott.net<nowiki/>x
23354 Edited Redirect link should emit a non-piped wikitext link
23358 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
23364 T75121: Infer extension name from typeOf if data-mw is not present
23368 <div typeOf="mw:Extension/foo"></div>
23373 # -----------------------------------------------------------------
23374 # End of section for Parsoid-only html2wt tests for serialization
23376 # -----------------------------------------------------------------
23383 Try for 100% code coverage