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 <blockquote|>a</blockquote>
1214 <b→> doesn't terminate </b→>
1216 <bä> doesn't terminate </bä>
1218 <boo> doesn't terminate </boo>
1220 <s.foo> doesn't terminate </s.foo>
1224 <p><blockquote|>a</blockquote>
1225 </p><p><b→> doesn't terminate </b→>
1226 </p><p><bä> doesn't terminate </bä>
1227 </p><p><boo> doesn't terminate </boo>
1228 </p><p><s.foo> doesn't terminate </s.foo>
1229 </p><p><sub-ID#1>
1233 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1234 # If the non-word-character tag made it through the sanitizer, tidy
1235 # would munge it up.
1237 Non-word characters don't terminate tag names + tidy
1239 <blockquote|>a</blockquote>
1241 <b→> doesn't terminate </b→>
1243 <bä> doesn't terminate </bä>
1245 <boo> doesn't terminate </boo>
1247 <s.foo> doesn't terminate </s.foo>
1251 <p><blockquote|>a</p>
1252 <p><b→> doesn't terminate </b→></p>
1253 <p><bä> doesn't terminate </bä></p>
1254 <p><boo> doesn't terminate </boo></p>
1255 <p><s.foo> doesn't terminate </s.foo></p>
1256 <p><sub-ID#1></p>
1260 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1261 ### This checks that HTML5 tags (with non-word characters in the tag
1262 ### name) make it safely through the parser -- the Sanitizer will
1263 ### munge them later, as it should.
1266 Non-word characters are valid in extension tags (T19663)
1279 Isolated close tags should be treated as literal text (bug 52760)
1285 <p><s.foo>s</p>
1289 ### Special characters
1293 Bare pipe character (bug 52363)
1302 Bare pipe character from a template (bug 52363)
1311 ### <nowiki> test cases
1315 <nowiki> unordered list
1317 <nowiki>* This is not an unordered list item.</nowiki>
1319 <p>* This is not an unordered list item.
1326 <nowiki>Lorem ipsum dolor
1334 <p>Lorem ipsum dolor
1347 :There is not nowiki.
1348 :There is <nowiki>nowiki</nowiki>.
1350 #There is not nowiki.
1351 #There is <nowiki>nowiki</nowiki>.
1353 *There is not nowiki.
1354 *There is <nowiki>nowiki</nowiki>.
1356 <dl><dd>There is not nowiki.</dd>
1357 <dd>There is nowiki.</dd></dl>
1358 <ol><li>There is not nowiki.</li>
1359 <li>There is nowiki.</li></ol>
1360 <ul><li>There is not nowiki.</li>
1361 <li>There is nowiki.</li></ul>
1366 Entities inside <nowiki>
1368 <nowiki><</nowiki>
1375 Entities inside template parameters
1381 <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>
1385 Properly escape nowiki when combined with other wiki markup
1389 <p>* </nowiki> tag</p>
1391 <nowiki>* </nowiki></nowiki> tag
1398 Comments and Indent-Pre
1400 <!-- comment 1 --> asdf
1402 <!-- comment 1 --> asdf
1405 <!-- comment 1 --> asdf
1406 <!-- comment 2 -->xyz
1408 <!-- comment 1 --> asdf
1409 <!-- comment 2 --> xyz
1465 asdf<!-- comment 1 -->jkl
1475 <!-- foo --> b <!-- bar -->
1489 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1495 Comment semantics and delimiters
1497 <!-- --><!----><!-----><!------>
1503 Comment semantics and delimiters, redux
1505 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1506 -- foo -- funky huh? ... -->
1512 Comment semantics and delimiters: directors cut
1514 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1515 everything starting with < followed by !-- until the first -- and > we see,
1516 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1524 Comment semantics: nesting
1526 <!--<!-- no, we're not going to do anything fancy here -->-->
1533 Comment semantics: unclosed comment at end
1535 <!--This comment will run out to the end of the document
1540 # Bug 58184: document parsoid's behaviour
1542 Suppress comment closing tag in lenient browsers
1544 parsoid=wt2html,html2html
1546 <!-- Browsers--!> think this is closed -->
1550 <!-- Browsers--¡> think this is closed -->
1554 Comment in template title
1563 Comment on its own line post-expand
1575 Comment on its own line post-expand with non-significant whitespace
1587 Multiple comments should still parse as SOL-transparent
1589 parsoid=wt2html,wt2wt
1592 <!--c2--><!--c3--><!--c4-->*b
1603 ### paragraph wrapping tests
1618 Block tag on one line (<div>)
1634 Block tag on one line (<blockquote>)
1636 a <blockquote>foo</blockquote>
1640 a <blockquote>foo</blockquote>
1652 Block tag on both lines (<div>)
1669 Block tag on both lines (<blockquote>)
1671 a <blockquote>foo</blockquote>
1673 b <blockquote>foo</blockquote>
1675 a <blockquote>foo</blockquote>
1676 b <blockquote>foo</blockquote>
1690 Multiple lines without block tags
1714 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1715 # So, we have a separate section for Parsoid. We don't want
1716 # to mimic this stripping behavior in Parsoid. It affects
1717 # editing experience and also requires us to maintain additional
1720 Empty lines between lines with block tags
1758 <div data-parsoid='{"stx":"html"}'></div>
1761 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1764 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1766 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1769 <div data-parsoid='{"stx":"html"}'>e</div>
1772 ## PHP parser emits output which is broken
1774 Unclosed HTML p-tags should be handled properly
1787 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1792 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1793 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1796 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
1800 a [[Category:A1]] [[Category:A2]]
1805 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1809 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
1815 <link href="Category:A1"/><p>a</p>
1819 ### Preformatted text
1828 And a [[Main Page|link]]
1834 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1839 Tabs don't trigger preformatted text
1843 This is preformatted text.
1849 <pre>This is preformatted text.
1855 Ident preformatting with inline content
1866 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1883 Regression with preformatted in <center>
1897 Bug 52763: Preformatted in <blockquote>
1903 indented cell (no pre-wrapping!)
1913 <p> indented cell (no pre-wrapping!)
1921 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1938 Bug 15491: <ins>/<del> in blockquote
1941 Foo <del>bar</del> <ins>baz</ins> quux
1945 <p>Foo <del>bar</del> <ins>baz</ins> quux
1951 # Note that the p-wrapping is newline sensitive, which could be
1952 # considered a bug: tidy will wrap only the 'Foo' in the example
1953 # below in a <p> tag. (see comment 23-25 of bug #6200)
1955 Bug 15491: <ins>/<del> in blockquote (2)
1957 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1960 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1966 <del>bar</del> <ins>baz</ins> quux</blockquote>
1970 <pre> with attributes (bug 3202)
1972 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1974 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1979 <pre> with width attribute (bug 3202)
1981 <pre width="8">Narrow screen goodies</pre>
1983 <pre width="8">Narrow screen goodies</pre>
1988 <pre> with forbidden attribute (bug 3202)
1990 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1992 <pre width="8">Narrow screen goodies</pre>
1997 Entities inside <pre>
2006 <pre> with forbidden attribute values (bug 3202)
2008 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2010 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2015 <nowiki> inside <pre> (bug 13238)
2023 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2031 <pre><nowiki>Foo</nowiki></pre>
2036 <nowiki> and <pre> preference (first one wins)
2067 </pre> inside nowiki
2069 <nowiki></pre></nowiki>
2075 # Parsoid doesn't strip empty tags, like Tidy does.
2077 Empty pre; pre inside other HTML tags (bug 54946)
2079 parsoid=wt2html,wt2wt
2110 HTML pre followed by indent-pre
2125 <p><pre>foo</pre></p>
2127 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2131 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2139 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2149 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2161 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2182 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2186 {{echo| foo}}{{echo| bar}}
2191 {{echo|<!--cmt--> foo}}
2193 <!--cmt-->{{echo| foo}}
2195 {{echo|{{echo| }}bar}}
2213 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2250 Things that look like <pre> tags aren't treated as such
2252 Barack Obama <President> of the United States
2253 <President></President>
2255 <p>Barack Obama <President> of the United States
2256 <President></President>
2260 ## PHP parser discards the "<pre " string
2262 Handle broken pre-like tags (bug 64025)
2266 {{echo|<pre <pre>x</pre>}}
2268 <table><pre </table>
2271 <table><pre></pre></table>
2274 <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>
2283 Parsoid: handle pre with space after attribute
2287 <pre style="width:50%;" >{{echo|foo}}</pre>
2289 <pre style="width:50%;">{{echo|foo}}</pre>
2292 # TODO / maybe: fix wt2wt for this
2294 Parsoid: Don't paragraph-wrap fosterable content
2320 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2348 #--------------------------------------------------------------------
2349 # Transclusion parameter whitespace stripping tests
2350 # Behavior is different for positional and named parameters
2351 #--------------------------------------------------------------------
2353 Templates: Strip leading and trailing whitespace from named-param values
2357 {{echo|1= {{echo|b}} }}
2370 <ul><li> d</li></ul>
2375 Templates: Don't strip whitespace from positional-param values
2379 {{echo|{{echo|b}} }}
2411 <ul><li> f</li></ul>
2419 Templates: Handle empty comment-and-ws-only lines correctly
2422 <!--should be ignored-->
2423 <!--should be ignored as well-->
2432 Templates: Handle comments in the target
2435 <!-- should be ignored -->
2438 {{echo<!-- should be ignored -->
2441 {{echo<!-- should be ignored -->|foo}}
2443 {{<!-- should be ignored -->echo|foo}}
2445 <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>
2447 <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>
2449 <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>
2451 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2455 Templates: Handle comments in parameter names (bug 67657)
2458 <!-- should be ignored -->
2462 <!-- should be ignored -->
2465 {{echo|1<!-- should be ignored --> = foo}}
2467 {{echo|<!-- should be ignored -->1 = foo}}
2469 <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>
2471 <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>
2473 <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>
2475 <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>
2479 Templates: Other wikitext in parameter names (bug 67657)
2483 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2489 #--------------------------------------------------------------------
2490 # Transclusion parameter escaping tests
2491 #--------------------------------------------------------------------
2493 Templates: Parsoid parameter escaping test 1
2497 {{echo|[foo]|{{echo|[bar]}}}}
2499 <p about="#mwt1" typeof="mw:Transclusion"
2500 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2504 Parsoid: Pipes in external links in template parameter
2508 {{echo|[{{echo|http://example.com}} link]}}
2510 <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>
2514 Parsoid: pipe in transclusion parameter
2518 {{echo|http://foo.com/a|b}}
2520 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2521 typeof="mw:Transclusion"
2522 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>
2526 Parsoid: Pipe in external link target and content in template parameter
2528 parsoid=html2wt,wt2wt
2530 {{echo|[http://foo.com/a|b a|b]}}
2532 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2533 typeof="mw:Transclusion"
2534 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2535 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2539 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2543 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2545 <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>
2549 Templates: Don't escape already nowiki-escaped text in template parameters
2551 parsoid=html2wt,wt2wt
2553 {{echo|foo<nowiki>|</nowiki>bar}}
2554 {{echo|<nowiki><div></nowiki>}}
2555 {{echo|<nowiki></nowiki>}}
2557 <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>
2558 <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>
2559 <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>
2565 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2567 parsoid=html2wt,wt2wt
2569 {{echo|{{echo|1=bar}}}}
2571 <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>
2576 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2582 <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>
2587 Templates: Preserve blank parameter names
2594 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2598 ### Parsoid-centric tests for testing RT edge cases for pre
2602 1a. Indent-Pre and Comments
2615 1b. Indent-Pre and Comments
2628 1c. Indent-Pre and Comments
2641 1d. Indent-Pre and Comments
2642 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2655 2a. Indent-Pre and tables
2676 2b. Indent-Pre and tables
2692 2c. Indent-Pre and tables (bug 42252)
2709 2d. Indent-Pre and tables
2726 <tbody><tr><td> b</td></tr>
2731 2e. Indent-Pre and table-line syntax
2744 2f. Indent-pre started by table-line syntax
2763 3a. Indent-Pre and block tags (single-line html)
2767 c <blockquote> foo </blockquote>
2772 c <blockquote> foo </blockquote>
2773 <pre><span> foo </span>
2776 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2777 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2778 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2779 <pre><span> foo </span>
2796 3b. Indent-Pre and block tags (multi-line html)
2801 <pre>a <span>foo</span>
2806 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2807 b <div data-parsoid='{"stx":"html"}'> foo </div>
2817 3c. Indent-Pre and block tags (pre-content on separate line)
2881 4. Indent-Pre and extension tags
2887 a <ul class="gallery mw-gallery-traditional">
2888 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2889 <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>
2890 <div class="gallerytext">
2897 <ul class="gallery mw-gallery-traditional">
2898 <li class="gallerybox" style="width: 155px">
2899 <div style="width: 155px">
2900 <div class="thumb" style="width: 150px;">
2901 <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>
2903 <div class="gallerytext"></div>
2910 Table wikitext syntax outside wiki-tables
2913 ! not a table heading
2916 | class="foo bar" | baz
2923 ! not a table heading
2926 | class="foo bar" | baz
2935 Render paragraphs when indent-pre is suppressed in blocklevels
2952 4. Multiple spaces at start-of-line
2970 ## NOTE: the leading white-space chars on empty line are significant
2972 5a. White-space in indent-pre
2984 ## NOTE: the leading white-space chars on empty line are significant
2986 5b. White-space in indent-pre
3005 5c. White-space in indent-pre
3018 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3041 7a. Indent-pre and category links
3043 parsoid=wt2html,wt2wt
3045 [[Category:foo]] <!-- No pre-wrapping -->
3046 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3048 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3049 <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 -->
3053 7b. Indent-pre and category links
3055 parsoid=wt2html,wt2wt
3058 [[Category:foo]] {{echo|b}}
3061 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
3062 <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>
3066 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3070 HTML-pre: 1. embedded newlines
3104 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3106 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3110 <pre data-parsoid='{"stx":"html"}'>
3115 <pre data-parsoid='{"stx":"html"}'>
3123 HTML-pre: big spaces
3160 <pre data-parsoid='{"stx":"html"}'>
3179 HTML-pre: 2: indented text
3192 HTML-pre: 3: other wikitext
3213 ### Definition lists
3220 <dl><dt> name </dt>
3221 <dd> Definition</dd></dl>
3226 Definition list for indentation only
3230 <dl><dd> Indented text</dd></dl>
3235 Definition list with no space
3240 <dd>Definition</dd></dl>
3245 Definition list with URL link
3247 ; http://example.com/ : definition
3249 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3250 <dd> definition</dd></dl>
3255 Definition list with bracketed URL link
3257 ;[http://www.example.com/ Example]:Something about it
3259 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3260 <dd>Something about it</dd></dl>
3265 Definition list with wikilink containing colon
3267 ; [[Help:FAQ]]: The least-read page on Wikipedia
3269 <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>
3270 <dd> The least-read page on Wikipedia</dd></dl>
3274 # At Brion's and JeLuF's insistence... :)
3276 Definition list with news link containing colon
3278 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3280 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3281 <dd> This isn't even a real newsgroup!</dd></dl>
3284 <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>
3288 Malformed definition list with colon
3290 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3292 <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>
3297 Definition lists: colon in external link text
3299 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3301 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3302 <dd> OK, I made that up</dd></dl>
3307 Definition lists: colon in HTML attribute
3309 ;<b style="display: inline">bold</b>
3311 <dl><dt><b style="display: inline">bold</b></dt></dl>
3316 Definition lists: self-closed tag
3318 ;one<br/>two : two-line fun
3320 <dl><dt>one<br />two </dt>
3321 <dd> two-line fun</dd></dl>
3326 Bug 11748: Literal closing tags
3330 <dd>test test test test test</dd>
3332 <dd>test test test test test</dd>
3337 <dd>test test test test test</dd>
3339 <dd>test test test test test</dd>
3345 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3348 ; term : description
3353 <dl><dt> term </dt>
3354 <dd> description</dd></dl>
3355 <ul><li> unordered</li></ul>
3362 Definition list with empty definition and following paragraph
3374 Nested definition lists using html syntax
3383 Definition Lists: No nesting: Multiple dd's
3396 Definition Lists: Indentation: Regular
3404 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3409 Definition Lists: Indentation: Missing 1st level
3415 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3420 Definition Lists: Indentation: Multi-level indent
3424 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3429 Definition Lists: Hacky use to indent tables
3436 should be left alone
3438 <dl><dd><dl><dd><table>
3443 </td></tr></table></dd></dl></dd></dl>
3445 should be left alone
3450 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3458 should be left alone
3461 <dl><dd><dl><dd><table><tr>
3464 </tr></table><!-- bar --></dd></dl></dd></dl>
3466 should be left alone</p>
3470 Definition Lists: Hacky use to indent tables, with comment before table
3476 <dl><dd><dl><dd><!-- foo --><table><tr>
3478 </tr></table></dd></dl></dd></dl>
3483 Definition Lists: Hacky use to indent tables (WS-insensitive)
3492 <dd> <table><tr><td>a</td></tr></table> </dd>
3495 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3496 ## as an empty dt item. It also ignores all but the last ";" when followed
3497 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3498 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3501 ## Ex: ";;t2 ::d2" is transformed into:
3513 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3514 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3525 ## All Parsoid only definition list tests have this difference.
3527 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3528 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3531 Table / list interaction: indented table with lists in table contents
3546 <ul><li> b</li></ul>
3550 <ul><li> d</li></ul>
3551 </td></tr></table></dd></dl>
3556 Table / list interaction: lists nested in tables nested in indented lists
3579 </td></tr></table></dd></dl>
3586 Definition Lists: Nesting: Multi-level (Parsoid only)
3616 Definition Lists: Nesting: Test 2 (Parsoid only)
3636 Definition Lists: Nesting: Test 3 (Parsoid only)
3664 Definition Lists: Nesting: Test 4
3669 <dl><dd><dl><dd><dl><dt>t3</dt>
3670 <dd>d3</dd></dl></dd></dl></dd></dl>
3675 ## The Parsoid team believes the following three test exposes a
3676 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3677 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3678 ## It also exposes a "misfeature" in tidy, which doesn't like
3679 ## <dl> tags with a single <dt> child; it converts the <dt> into
3680 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3682 Definition Lists: Mixed Lists: Test 1
3688 <dl><dd><dl><dt><ul><li> foo</li>
3689 <li> bar</li></ul></dt></dl>
3690 <dl><dt> baz</dt></dl></dd></dl>
3725 Definition Lists: Mixed Lists: Test 2
3730 <ul><li><dl><dd> d1</dd>
3731 <dd> d2</dd></dl></li></ul>
3737 Definition Lists: Mixed Lists: Test 3
3742 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3743 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3749 Definition Lists: Mixed Lists: Test 4
3754 <ul><li><dl><dt>d1 </dt>
3757 <dd>d4</dd></dl></li></ul>
3763 Definition Lists: Mixed Lists: Test 5
3769 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3775 Definition Lists: Mixed Lists: Test 6
3780 <ol><li><ul><li><dl><dd>d1
3781 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3787 Definition Lists: Mixed Lists: Test 7
3792 <dl><dd><ul><li> d1</li>
3793 <li> d2</li></ul></dd></dl>
3799 Definition Lists: Mixed Lists: Test 8
3804 <dl><dd><ul><li> d1</li></ul>
3805 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3811 Definition Lists: Mixed Lists: Test 9
3815 <ul><li><dl><dt>foo </dt>
3816 <dd>bar</dd></dl></li></ul>
3822 Definition Lists: Mixed Lists: Test 10
3826 <ul><li><ol><li><dl><dt>foo </dt>
3827 <dd>bar</dd></dl></li></ol></li></ul>
3831 # The Parsoid team disagrees with the PHP parser's seemingly-random
3832 # rules regarding dd/dt on the next two tests. Parsoid is more
3833 # consistent, and recognizes the shared nesting and keeps the
3834 # still-open tags around until the nesting is complete.
3835 # (And tidy again converts <dt> to <dd> before 'bar'.)
3838 Definition Lists: Mixed Lists: Test 11
3843 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3844 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3845 <dl><dt>boo </dt>
3846 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3901 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3902 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3906 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3907 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3916 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
3918 Definition Lists: Weird Ones: Test 1
3920 *#;*::;; foo : bar (who uses this?)
3922 <ul><li><ol><li><dl><dt> foo </dt>
3923 <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>
3942 <dt>bar (who uses this?)</dt>
3974 <dt> foo<span typeof="mw:Placeholder"> </span></dt>
3975 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3987 Definition Lists: colons occurring in tags
4004 <dt><span>a:b</span></dt>
4022 Definition Lists: colons and tables 1
4034 </td></tr></table></dd></dl>
4038 </td></tr></table></dd></dl>
4042 # Parsoid's output (as documented below) differs from php's in this case.
4043 # This is probably a bug. If we fixup parsoid to match php's output, the
4044 # above test should pass and the below test case can be removed. It is
4045 # unclear which output is more desirable.
4048 Definition Lists: colons and tables 2
4060 </td></tr></table></dd>
4064 </td></tr></table></dd></dl>
4072 External links: non-bracketed
4074 Non-bracketed: http://example.com
4076 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4080 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4082 External links: numbered
4084 Numbered: [http://example.com]
4085 Numbered: [http://example.net]
4086 Numbered: [http://example.com]
4088 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4089 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4090 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4093 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4094 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4095 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4099 External links: specified text
4101 Specified text: [http://example.com link]
4103 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4108 External links: trail
4110 Linktrails should not work for external links: [http://example.com link]s
4112 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4117 External links: dollar sign in URL
4119 http://example.com/1$2345
4121 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4125 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4127 External links: dollar sign in URL (autonumber)
4129 [http://example.com/1$2345]
4131 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4134 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4138 External links: open square bracket forbidden in URL (bug 4377)
4140 parsoid=wt2html,wt2wt,html2html
4142 http://example.com/1[2345
4144 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4147 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4151 External links: open square bracket forbidden in URL (named) (bug 4377)
4153 parsoid=wt2html,html2html
4155 [http://example.com/1[2345]
4157 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4160 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4163 # parsoid adds a space before the link name
4165 External links: open square bracket forbidden in URL (named) (bug 4377)
4168 [http://example.com/1 [2345]
4170 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4175 External links: nowiki in URL link text (bug 6230)
4177 [http://example.com/ <nowiki>''example site''</nowiki>]
4179 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4184 External links: newline forbidden in text (bug 6230 regression check)
4186 [http://example.com/ first
4189 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4195 External links: Pipe char between url and text
4197 [http://example.com | link]
4199 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4204 External links: protocol-relative URL in brackets
4206 [//example.com/ Test]
4208 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4212 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4214 External links: protocol-relative URL in brackets without text
4218 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4221 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4225 External links: protocol-relative URL in free text is left alone
4229 <p>//example.com/Foo
4234 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4236 foo//example.com/Foo
4238 <p>foo//example.com/Foo
4243 External links: with no contents
4245 [http://en.wikipedia.org/wiki/Foo]
4247 [[wikipedia:Foo|Bar]]
4249 [[wikipedia:Foo|<span>Bar</span>]]
4251 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4252 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4253 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4256 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4257 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4258 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4262 External links: Free with trailing punctuation
4272 http://example.com/url_with_(brackets)
4273 (http://example.com/url_without_brackets)
4274 http://example.com/url_with_entity
4275 http://example.com/url_with_entity 
4276 http://example.com/url_with_entity 
4277 http://example.com/url_with_entity<
4278 http://example.com/url_with_entity<
4279 http://example.com/url_with_entity<
4281 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4282 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4283 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4284 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4285 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4286 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4287 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4288 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4289 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4290 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4291 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4292 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4293 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4294 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4295 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4296 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4299 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4300 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4301 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4302 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4303 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4304 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4305 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4306 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4307 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4308 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4309 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4310 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4311 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4312 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4313 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4314 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4318 External links: No preceding word characters allowed (bug 65278)
4320 NOPEhttp://example.com
4321 N0http://example.com
4322 ok:http://example.com
4323 ok-http://example.com
4325 <p>NOPEhttp://example.com
4326 N0http://example.com
4327 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4328 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4335 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4337 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4342 External image from https
4344 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4346 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4351 External image (when not allowed)
4353 wgAllowExternalImages=0
4355 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4357 <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>
4362 Link to non-http image, no img tag
4364 Link to non-http image, no img tag: ftp://example.com/test.jpg
4366 <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>
4371 External links: terminating separator
4373 Terminating separator: http://example.com/thing,
4375 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4380 External links: intervening separator
4382 Intervening separator: http://example.com/1,2,3
4384 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4389 External links: old bug with URL in query
4391 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4393 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4398 External links: old URL-in-URL bug, mixed protocols
4400 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4402 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4407 External links: URL in text
4409 URL in text: [http://example.com http://example.com]
4411 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4416 External links: Clickable images
4418 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4420 <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>
4423 <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>
4427 External links: raw ampersand
4429 Old & use: http://x&y
4431 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4436 External links: encoded ampersand
4438 Old & use: http://x&y
4440 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4443 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4447 External links: encoded equals (bug 6102)
4449 http://example.com/?foo=bar
4451 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4454 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4458 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4459 ## does it number them. As discussed in bug 53505, we can identify
4460 ## autonumbered links via CSS.
4464 External links: [raw ampersand]
4466 Old & use: [http://x&y]
4468 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4471 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4474 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4475 # mode will return the [raw ampersand] wikitext
4477 External links: [encoded ampersand]
4479 parsoid=wt2html,wt2wt,html2html
4481 Old & use: [http://x&y]
4483 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4486 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4490 External links: [raw equals]
4492 [http://example.com/?foo=bar]
4494 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4497 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4500 # note that parsoid html is identical to [raw equals] case; so html2wt
4501 # mode will return the [raw equals] wikitext
4503 External links: [encoded equals] (bug 6102)
4505 parsoid=wt2html,wt2wt,html2html
4507 [http://example.com/?foo=bar]
4509 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4512 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4515 # xxx parsoid strips the IDN character, so the round-trip tests will
4516 # obviously fail and are disabled. --cscott
4518 External links: [IDN ignored character reference in hostname; strip it right off]
4520 parsoid=wt2html,wt2wt,html2html
4522 [http://e‌xample.com/]
4524 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4527 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4530 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4531 # Where an external link could easily circumvent the sanitization of the text of
4532 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4533 # test demands a higher standard. That's a bit strange.
4537 # http://example.com -> [http://example.com|http://example.com]
4538 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4540 # The first example is sanitized, but the second is not. Any security benefits
4541 # from this production are trivial to circumvent. Either remove this test and
4542 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4543 # the test accordingly.
4547 # xxx parsoid strips the IDN character, so the round-trip tests will
4548 # obviously fail and are disabled. --cscott
4550 External links: IDN ignored character reference in hostname; strip it right off
4552 parsoid=wt2html,html2html
4554 http://e‌xample.com/
4556 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4559 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4563 External links: www.jpeg.org (bug 554)
4567 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4571 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4573 External links: URL within URL (original bug 2)
4575 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4577 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4580 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4584 BUG 361: URL inside bracketed URL
4586 [http://www.example.com/foo http://www.example.com/bar]
4588 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4593 BUG 361: URL within URL, not bracketed
4595 http://www.example.com/foo?=http://www.example.com/bar
4597 <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>
4602 BUG 289: ">"-token in URL-tail
4604 http://www.example.com/<hello>
4606 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4611 BUG 289: literal ">"-token in URL-tail
4613 http://www.example.com/<b>html</b>
4615 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4618 <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>
4622 BUG 289: ">"-token in bracketed URL
4624 [http://www.example.com/<hello> stuff]
4626 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4631 BUG 289: literal ">"-token in bracketed URL
4633 [http://www.example.com/<b>html</b> stuff]
4635 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4640 BUG 289: literal double quote at end of URL
4642 http://www.example.com/"hello"
4644 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4649 BUG 289: literal double quote in bracketed URL
4651 [http://www.example.com/"hello" stuff]
4653 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4658 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4660 [http://www.example.com test]
4662 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4667 External links: link text with spaces
4669 [http://www.example.com a b c]
4670 [http://www.example.com ''a'' ''b'']
4672 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4673 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4678 External links: wiki links within external link (Bug 3695)
4680 [http://example.com [[wikilink]] embedded in ext link]
4682 <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>
4685 <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>
4689 BUG 787: Links with one slash after the url protocol are invalid
4693 [http:/example.com title]
4695 <p>http:/example.com
4696 </p><p>[http:/example.com title]
4701 Bracketed external links with template-generated invalid target
4703 [{{echo|http:/example.com}} title]
4705 <p>[http:/example.com title]
4710 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4712 ''[http://example.com text'']
4713 [http://example.com '''text]'''
4714 ''Something [http://example.com in italic'']
4715 ''Something [http://example.com mixed''''', even bold]'''
4716 '''''Now [http://example.com both''''']
4718 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4719 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4720 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4721 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4722 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4728 Bug 4781: %26 in URL
4730 http://www.example.com/?title=AT%26T
4732 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4735 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4738 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
4739 # % is actually legal in HTML5. Any change in output would need testing though.
4741 Bug 4781, 5267: %25 in URL
4743 http://www.example.com/?title=100%25_Bran
4745 <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>
4748 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4752 Bug 4781, 5267: %28, %29 in URL
4754 http://www.example.com/?title=Ben-Hur_%281959_film%29
4756 <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>
4759 <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>
4764 Bug 4781: %26 in autonumber URL
4766 [http://www.example.com/?title=AT%26T]
4768 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4771 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4775 Bug 4781, 5267: %26 in autonumber URL
4777 [http://www.example.com/?title=100%25_Bran]
4779 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4782 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4786 Bug 4781, 5267: %28, %29 in autonumber URL
4788 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4790 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4793 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4798 Bug 4781: %26 in bracketed URL
4800 [http://www.example.com/?title=AT%26T link]
4802 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4805 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4809 Bug 4781, 5267: %25 in bracketed URL
4811 [http://www.example.com/?title=100%25_Bran link]
4813 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4818 Bug 4781, 5267: %28, %29 in bracketed URL
4820 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4822 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4825 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4829 External link containing a period in the anchor. (bug 63947)
4831 [//foo.org/bar#baz. bang]
4833 [//foo.org/bar. bang]
4835 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4836 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4839 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4840 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4844 External link containing a single quote. (bug 63947)
4848 [//foo.org/bar'baz bang]
4850 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4851 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4854 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4855 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4860 External link containing a period in the anchor. (bug 63947)
4862 [//foo.org/bar#baz. bang]
4864 [//foo.org/bar. bang]
4866 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4867 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4870 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4871 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4875 External link containing a single quote. (bug 63947)
4879 [//foo.org/bar'baz bang]
4881 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4882 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4885 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4886 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4891 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4893 Some [http://example.com/ pretty ''italics'' and stuff]!
4895 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4900 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4902 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4904 <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>
4909 External link containing double-single-quotes with no space separating the url from text in italics
4911 [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]].]
4913 <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>
4916 <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>
4918 <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>
4922 External link with comments in link text
4924 [http://www.google.com Google <!-- comment -->]
4926 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4931 URL-encoding in URL functions (single parameter)
4933 {{localurl:Some page|amp=&}}
4935 <p>/index.php?title=Some_page&amp=&
4940 URL-encoding in URL functions (multiple parameters)
4942 {{localurl:Some page|q=?&=&}}
4944 <p>/index.php?title=Some_page&q=?&amp=&
4951 http://example.com/index.php?foozoid%5B%5D=bar
4953 http://example.com/index.php?foozoid[]=bar
4955 <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>
4956 </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>
4959 <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>
4961 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4965 IPv6 urls (bug 21261)
4969 http://[2404:130:0:1000::187:2]/index.php
4971 <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>
4976 Non-extlinks in brackets
4985 [{{echo|foo}} ''bar'']
4986 [{{echo|foo}}l's] errand
4987 [{{echo|foo}}l's errand]
4989 [url=http://example.com]
5002 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5007 Percent encoding in external links
5009 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5011 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5014 <p><a rel="mw:ExtLink"
5015 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5019 Use url link syntax for links where the content is equal the link target
5023 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5026 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5030 Parenthesis in external links, especially URL links
5034 http://example.com/test)
5036 http://example.com/(test)
5038 http://example.com/((test)
5040 (http://example.com/(test))
5042 (http://example.com/(test)))))
5044 http://example.com/a)b
5046 [http://example.com) foo]
5048 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5049 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5050 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5051 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5052 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5053 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5054 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5055 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5058 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5059 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5060 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5061 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5062 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5063 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5064 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5065 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5069 Parenthesis in external links, w/ transclusion or comment
5071 (http://example.com/{{echo|hi}})
5073 (http://example.com<!-- hi -->)
5075 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5076 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5079 <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>
5081 <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>
5085 Replace invalid link targets when serializing
5089 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
5091 [[MediaWiki:Badtitletext|Manual]]
5101 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5103 Normal text. '''''Bold italic text.''''' Normal text.
5105 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5106 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5111 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5112 # parser strips. The wikitext contains just the first half of the bold
5115 Unclosed and unmatched quotes
5117 '''''Bold italic text '''with bold deactivated''' in between.'''''
5119 '''''Bold italic text ''with italic deactivated'' in between.'''''
5123 ..spanning two paragraphs (should not work).'''
5125 '''Bold tag left open
5127 ''Italic tag left open
5131 <!-- Unmatching number of opening, closing tags: -->
5132 '''This year''''s election ''should'' beat '''last year''''s.
5134 ''Tom'''s car is bigger than ''Susan'''s.
5136 Plain ''italic'''s plain
5138 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5139 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5140 </p><p><b>Bold text..</b>
5141 </p><p>..spanning two paragraphs (should not work).
5142 </p><p><b>Bold tag left open</b>
5143 </p><p><i>Italic tag left open</i>
5145 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5146 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5147 </p><p>Plain <i>italic'</i>s plain
5150 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5151 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5152 </p><p><b>Bold text..</b>
5153 </p><p>..spanning two paragraphs (should not work).<b></b>
5154 </p><p><b>Bold tag left open</b>
5155 </p><p><i>Italic tag left open</i>
5157 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5158 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5159 </p><p>Plain <i>italic'</i>s plain
5166 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5169 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5170 # is the bare minimum required by the spec, see:
5171 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5172 # Parsoid team replies: empty table tags are legal in HTML5
5174 A table with no data.
5187 A table with stray table end tags on start tag line (wt2html)
5191 {|style="color: red;"|}
5193 {|style="color: red;" |}
5197 {|style="color: red;"|} id="foo"
5201 {|style="color: red;" |} id="foo"
5205 <table style="color: red;"></table>
5207 <table style="color: red;">
5213 <table style="color: red;" id="foo">
5219 <table style="color: red;" id="foo">
5228 A table with no data (take 2)
5236 # A table with nothing but a caption is invalid XHTML, we might want to render
5237 # this as <p>caption</p>
5238 # Parsoid team replies: table with only a caption is legal in HTML5
5240 A table with nothing but a caption
5248 </caption><tr><td></td></tr></table>
5251 <table><caption> caption</caption></table>
5255 A table with caption with default-spaced attributes and a table row
5258 |+ style="color: red;" | caption1
5264 <caption style="color: red;"> caption1
5273 A table with captions with non-default spaced attributes and a table row
5276 |+style="color: red;"|caption2
5277 |+ style="color: red;"| caption3
5283 <caption style="color: red;">caption2
5285 <caption style="color: red;"> caption3
5294 Table td-cell syntax variations
5298 | foo bar foo || baz
5299 | style='color:red;' | baz
5300 | style='color:red;' || baz
5307 <td> foo bar foo </td>
5310 <td style="color:red;"> baz
5312 <td> style='color:red;' </td>
5340 Simple table but with multiple dashes for row wikitext
5358 Multiplication table
5360 {| border="1" cellpadding="2"
5361 |+Multiplication table
5363 ! × !! 1 !! 2 !! 3
5381 <table border="1" cellpadding="2">
5382 <caption>Multiplication table
5429 Accept "||" in table headings
5444 Accept "!!" in table data
5458 <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>
5463 Accept "||" in indented table headings
5473 </th></tr></table></dd></dl>
5478 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5495 Accept "| !" at start of line in tables (ignore !-attribute)
5499 | !style="color:red" | bar
5511 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 +/-
5515 |style='color:red;'|+1
5516 |style='color:blue;'|-1
5528 <td style="color:red;">+1
5530 <td style="color:blue;">-1
5554 |rowspan=2| Cell 2, row 1 (and 2)
5565 <td rowspan="2"> Cell 2, row 1 (and 2)
5583 {| bgcolor=#ABCDEF border=2
5588 |the original table again
5596 <table bgcolor="#ABCDEF" border="2">
5604 <td>the original table again
5610 Invalid attributes in table cell (bug 1830)
5623 # The "|}" to close the table is missing from the input, so parsoid's
5624 # *2wt modes will fail.
5626 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5628 parsoid=wt2html,html2html
5631 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5635 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5636 <td>]" onmouseover="alert(document.cookie)">test
5644 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5647 # FIXME: The php output is broken.
5649 ! and || in td attributes should not be parsed as <th>/<td>
5652 | style="color: red !important;" data-contrived="put this here ||" | foo
5657 <td> style="color: red !important;" data-contrived="put this here </td>
5663 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
5668 Indented table markup mixed with indented pre content (proposed in bug 6200)
5673 Text that should be rendered preformatted
5681 <pre>Text that should be rendered preformatted
5690 1. Template-generated table cell attributes and cell content
5695 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
5696 |align=center {{table_attribs}}
5697 | <!--foo--> align=center <!--bar--> {{table_attribs}}
5702 <td style="color:red;">Foo
5704 <td style="color:red;">Foo
5706 <td style="color:red;">Foo
5708 <td align="center" style="color:red;">Foo
5710 <td align="center" style="color:red;">Foo
5716 2. Template-generated table cell attributes and cell content
5719 |{{table_attribs_2}}
5724 <td style="color:red;">Foo
5732 <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>
5733 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
5738 3. Template-generated table cell attributes and cell content
5741 !align=center {{table_header_cells}}
5743 |align=center {{table_cells}}
5748 <th align="center" style="color:red;">Foo</th>
5749 <th style="color:red;"><i>Bar</i></th>
5750 <th style="color:brown;"><i>Foo</i> and Baz
5753 <td align="center" style="color:red;">Foo</td>
5754 <td style="color:red;"><i>Bar</i></td>
5755 <td style="color:brown;"><i>Foo</i> and Baz
5760 <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>
5761 <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>
5766 Table with row followed by newlines and table heading
5784 Table with empty line following the start tag
5801 # FIXME: Preserve the attribute properly (with an empty string as value) in
5802 # the PHP parser. Parsoid implements the behavior below.
5804 Table attributes with empty value
5814 </td></tr></tbody></table>
5819 Wikitext table with a lot of comments
5842 Wikitext table with double-line table cell
5859 Table cell with a single comment
5876 Table-cell after a comment-only-empty-line
5893 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5895 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5901 Build table with {{!}}
5903 {{{!}} class="wikitable"
5906 {{!}}- style="color:red;"
5907 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5910 <table class="wikitable">
5916 <tr style="color:red;">
5918 <td style="color:red;"> second data
5924 Build table with pipe as data
5926 {| class="wikitable"
5929 |- style="color:red;"
5930 | data || style="color:red;" | second data
5932 | style="color:red;" | data with | || style="color:red;" | second data with |
5934 || data with | ||| second data with |
5937 <table class="wikitable">
5943 <tr style="color:red;">
5945 <td style="color:red;"> second data
5948 <td style="color:red;"> data with | </td>
5949 <td style="color:red;"> second data with |
5952 <td> data with | </td>
5953 <td> second data with |
5959 Build table with wikilink
5961 {| class="wikitable"
5962 ! header || second header
5963 |- style="color:red;"
5964 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
5966 | data || second data [[Main Page|link|text with pipe]]
5969 <table class="wikitable">
5974 <tr style="color:red;">
5975 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
5976 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
5980 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
5985 # The expected HTML structure in this test is debatable. The PHP parser does
5986 # not parse this kind of table at all. The main focus for Parsoid is on
5987 # round-tripping, so this output is ok for now. TODO: revisit!
5989 Wikitext table with html-syntax row
5999 <td>foo</td></tr></tbody></table>
6002 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6003 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6004 ## PHP parser, which tidy then compounds by fostering the content
6005 ## entirely out of the table. Parsoid recognizes the table context
6006 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6007 ## depends on PHP's treatment of broken table markup!
6009 Implicit <td> after a |-
6011 parsoid=wt2html,html2html
6031 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6033 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6035 parsoid=wt2html,html2html
6068 <tr><td><pre>a</pre></td></tr>
6069 <tr><td> b</td></tr>
6074 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6075 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6077 Lists should be recognized in an implicit <td> context
6079 parsoid=wt2html,html2html
6106 Parsoid: Round-trip tables directly followed by content (bug 51219)
6108 parsoid=wt2html,wt2wt
6133 Parsoid: Default to a newline after tables in new content (bug 51219)
6138 <tr><td>foo</td></tr></tbody></table> bar
6140 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6145 <nowiki> </nowiki>bar
6153 Parsoid: newline inducing block nodes don't suppress <nowiki>
6165 Parsoid: Row-syntax table headings followed by comment & table cells
6167 parsoid=wt2html,wt2wt
6171 <!-- foo --> || baz || quux
6185 <tbody><tr><th> foo </th><th> bar
6186 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6191 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6194 Parsoid: Recover better from broken table attributes
6214 <p>foo</p></td></tr>
6219 Strip unsupported table tags
6267 Testing serialization after deletion of table cells
6278 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
6291 Plain link, capitalized
6295 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6300 Plain link, uncapitalized
6304 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6311 [[Main Page|The Main Page]]
6313 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6318 Piped link with comment in link text
6320 [[Main Page|The Main<!--front--> Page]]
6322 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6327 Piped link with multiple pipe characters in link text
6329 [[Main Page||The|Main|Page|]]
6331 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6334 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6342 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6347 Broken link with fragment
6349 [[Zigzagzogzagzig#zug]]
6351 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6356 Special page link with fragment
6358 [[Special:Version#anchor]]
6360 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6365 Nonexistent special page link with fragment
6367 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6369 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6376 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6378 <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>
6385 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6387 <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>!!!
6398 Bug 43661: Piped links with identical prefixes
6400 [[prefixed article|prefixed articles with spaces]]
6402 [[prefixed article|prefixed articlesaoeu]]
6404 [[Main Page|Main Page test]]
6406 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6407 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6408 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6414 Link with HTML entity in suffix / tail
6416 [[Main Page]]", [[Main Page]]a
6418 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6421 <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>
6425 Link with 3 brackets
6434 Link with 4 brackets
6438 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6443 Piped link with 3 brackets
6445 [[[main page|the main page]]]
6447 <p>[[[main page|the main page]]]
6452 Piped link with extlink-like text
6455 [[Main Page|This is a [bar]]]
6457 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6458 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6461 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6462 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6466 Link with multiple pipes
6468 [[Main Page|The|Main|Page]]
6470 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6474 # Note that parsoid does not munge anchor text; all non-space
6475 # characters are valid in HTML5 ids.
6477 Anchor containing a #. (bug 63430)
6479 [[Main Page#And#Link]]
6481 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6484 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6490 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6492 <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>
6497 Link with space in namespace
6499 [[User talk:Foo bar]]
6501 <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>
6506 MemoryAlpha:AlphaTest
6508 This is an article in the MemoryAlpha namespace
6509 (which shadows the memoryalpha interwiki link).
6513 Namespace takes precedence over interwiki link (bug 51680)
6515 [[MemoryAlpha:AlphaTest]]
6517 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6521 # The previous test doesn't work correctly in html2*, due to not recognizing the
6522 # link as an internal one. This one checks for the correct behavior.
6524 Link to namespace preferred over interwiki with correct rel attribute
6526 parsoid=html2wt,html2html
6528 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
6530 [[MemoryAlpha:AlphaTest]]
6534 Piped link to namespace
6536 [[Meta:Disclaimers|The disclaimers]]
6538 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6545 [[Usually caused by a typo (oops}]]
6547 <p>[[Usually caused by a typo (oops}]]
6554 Just a test of an article title containing a percent.
6558 Link containing % (not as a hex sequence)
6562 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6565 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6568 # note that the parsoid HTML is identical to the previous test output,
6569 # so the previous test ensures that the html2wt mode will generate the
6570 # "not as a hex sequence" wikitext.
6572 Link containing % as a single hex sequence interpreted to char
6574 parsoid=wt2wt,wt2html,html2html
6578 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6581 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6585 Link containing % as a double hex sequence interpreted to hex sequence
6589 <p>[[7%2525 Solution]]
6593 # note that parsoid does not munge anchor text; all non-space
6594 # characters are valid in HTML5 anchors.
6596 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6597 Example for such a section: == < ==
6599 [[%23%3c]][[%23%3e]]
6601 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6604 <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>
6608 Link containing "<#" and ">#" as a hex sequences
6610 [[%3c%23]][[%3e%23]]
6612 <p>[[%3c%23]][[%3e%23]]
6617 Link containing an equals sign
6619 [[Special:BookSources/isbn=4-00-026157-6]]
6621 <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>
6624 <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>
6630 Just a test of an article title containing a tilde.
6633 # note that links containing signatures, like [[Foo~~~~]], are
6634 # massaged by the pre-save transform (PST) and so the tildes are never
6635 # seen by the parser.
6637 Link containing a tilde
6641 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6644 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6648 Link containing double-single-quotes '' (bug 4598)
6650 [[Lista d''e paise d''o munno]]
6652 <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>
6655 <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>
6659 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6661 Some [[Link|pretty ''italics'' and stuff]]!
6663 <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>!
6666 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6670 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6672 ''Some [[Link|pretty ''italics'' and stuff]]!''
6674 <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>
6679 Link with double quotes in title part (literal) and alternate part (interpreted)
6681 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
6685 [[''Pentecoste''|Pentecoste]]
6687 [[''Pentecoste''|''Pentecoste'']]
6689 <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>
6690 </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>
6691 </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>
6692 </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>
6695 <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>
6696 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6697 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6698 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6702 Broken image links with HTML captions (bug 39700)
6704 [[File:Nonexistent|<script></script>]]
6705 [[File:Nonexistent|100x100px|<script></script>]]
6706 [[File:Nonexistent|<]]
6707 [[File:Nonexistent|a<i>b</i>c]]
6709 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6710 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6711 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6712 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6715 <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>
6716 <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>
6717 <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>
6718 <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>
6724 [[http://www.example.com]]
6726 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6729 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6733 Plain link to URL with link text
6735 [[http://www.example.com Link text]]
6737 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6742 Plain link to protocol-relative URL
6744 [[//www.example.com]]
6746 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6749 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6753 Plain link to protocol-relative URL with link text
6755 [[//www.example.com Link text]]
6757 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6762 Plain link to page with question mark in title
6768 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6769 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6774 # I'm fairly sure the expected result here is wrong.
6775 # We want these to be URL links, not pseudo-pages with URLs for titles....
6776 # However the current output is also pretty screwy.
6779 # I'm changing it to match the current output--it arguably makes more
6780 # sense in the light of the test above. Old expected result was:
6781 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6783 # But I think this test is bordering on "garbage in, garbage out" anyway.
6788 Piped link to URL: [[http://www.example.com|an example URL]]
6790 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6793 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6797 BUG 2: [[page|http://url/]] should link to page, not http://url/
6799 [[Main Page|http://url/]]
6801 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6804 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6807 # Parsoid does not mark self-links, by design.
6809 BUG 337: Escaped self-links should be bold
6813 [[Bug462]] [[Bug462]]
6815 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6818 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6820 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6824 Self-link to section should not be bold
6828 [[Main Page#section]]
6830 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6841 Self-link to numeric title
6847 <p><strong class="selflink">0</strong>
6852 Link to numeric-equivalent title
6858 <p><a href="/wiki/00" title="00">00</a>
6863 <nowiki> inside a link
6865 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6867 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6872 Non-breaking spaces in title
6874 [[ Main Page ]]
6876 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6881 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6887 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6892 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6898 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6903 Internal link with en linktrail: no apostrophes (bug 27473)
6909 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6914 Internal link with ca linktrail with apostrophes (bug 27473)
6920 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6925 Internal link with kaa linktrail with apostrophes (bug 27473)
6931 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6936 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6938 [[User:Foo/Test/63636:Bar|Test]]
6940 <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>
6943 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6947 Purely hash wikilink
6949 title=[[User:test/123]]
6953 <p><a href="#a">b</a>
6956 <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>
6960 1. Interaction of linktrail and template encapsulation
6966 <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>
6970 2. Interaction of linktrail and template encapsulation
6974 {{echo|Some [[Fool]]}}s
6976 <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>
6980 3. Interaction of linktrail and template encapsulation
6984 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6986 <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>
6996 Internal link with is link prefix
7000 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7002 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7013 Internal link with is link trail and link prefix
7017 [[mótmælendatrú|xxx]]ar
7019 mótmælenda[[söfnuður]]
7020 mótmælenda[[söfnuður|söfnuðir]]
7021 mótmælenda[[söfnuður|söfnuðir]]xxx
7023 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7024 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7025 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7026 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7027 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7032 Parsoid link trail escaping
7034 parsoid=html2wt,html2html
7036 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7042 Parsoid link prefix escaping
7045 parsoid=html2wt,html2html
7047 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7049 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7053 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7061 [http://wp.org ''foo'']
7063 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7064 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7065 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7066 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7071 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7075 [[Foo|{{echo|a}} b {{echo|c}}]]
7077 <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>
7081 Link with angle bracket after anchor
7085 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7088 <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>
7092 ### Interwiki links (see maintenance/interwiki.sql)
7096 Inline interwiki link
7098 parsoid=wt2html,wt2wt,html2html
7100 [[MeatBall:SoftSecurity]]
7102 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7105 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7109 Inline interwiki link with empty title (bug 2372)
7111 parsoid=wt2html,wt2wt,html2html
7115 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7118 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7122 Interwiki link encoding conversion (bug 1636)
7124 *[[Wikipedia:ro:Olteniţa]]
7125 *[[Wikipedia:ro:Olteniţa]]
7127 <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>
7128 <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>
7132 <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>
7133 <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>
7138 Interwiki link with fragment (bug 2130)
7140 [[MeatBall:SoftSecurity#foo]]
7142 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7146 # Ideally the wikipedia: prefix here should be proto-relative too
7147 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7148 # define the 'en' prefix, and originally the test used 'wikipedia',
7149 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7152 Different interwiki prefixes mapping to the same URL
7160 [[:wikipedia:Foo|Foo]]
7162 [[wikipedia:en:Foo]]
7164 [[:wikipedia:en:Foo]]
7168 <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>
7170 <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>
7172 <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>
7174 <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>
7176 <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>
7178 <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>
7180 <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>
7184 Interwiki links that cannot be represented in wiki syntax
7187 [[meatball:ok#foo|ok with fragment]]
7188 [[meatball:ok_as_well?|ok ending with ? mark]]
7189 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7190 [http://de.wikipedia.org/wiki/#foo is just fragment]
7193 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7194 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7195 <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>
7196 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7197 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7200 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7201 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7202 <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>
7203 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7204 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7208 Interwiki links: trail
7210 [[wikipedia:Foo|Ba]]r
7212 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7215 <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>
7219 Local interwiki link
7221 parsoid=wt2html,wt2wt,html2html
7223 [[local:Template:Foo]]
7225 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7228 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7231 # Parsoid does not mark self-links, by design.
7233 Local interwiki link: self-link to current page
7236 parsoid=wt2html,wt2wt,html2html
7240 <p><strong class="selflink">local:Main Page</strong>
7243 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7247 Local interwiki link: prefix only (bug 64167)
7249 parsoid=wt2html,wt2wt,html2html
7253 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7256 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7260 Local interwiki link: with additional interwiki prefix (bug 61357)
7262 parsoid=wt2html,wt2wt,html2html
7264 [[local:meatball:Hello]]
7266 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7269 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7273 Multiple local interwiki link prefixes
7275 [[local:local:local:local:mi:local:Foo]]
7277 parsoid=wt2html,wt2wt,html2html
7279 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7282 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7286 ### Interlanguage links
7287 ### Language links (so that searching for '### language' matches..)
7293 parsoid=wt2html,wt2wt,html2html
7301 <p>Blah blah blah</p>
7302 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7306 Interlanguage link with spacing
7308 parsoid=wt2html,wt2wt,html2html
7316 <p>Blah blah blah</p>
7317 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7321 Double interlanguage link
7323 parsoid=wt2html,wt2wt,html2html
7332 <p>Blah blah blah</p>
7333 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7334 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7338 Interlanguage link variations
7340 parsoid=wt2html,wt2wt,html2html
7351 <p>Blah blah blah</p>
7352 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7353 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7354 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7355 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7359 Interlanguage link, with prefix links
7369 <p>Blah blah blah</p>
7370 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7374 Double interlanguage link, with prefix links (bug 8897)
7385 <p>Blah blah blah</p>
7386 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7387 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7391 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7399 <p>Blah blah blah</p>
7400 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7404 Parsoid-specific test: Wikilinks with should RT properly
7410 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7415 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7419 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7420 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7422 He&nbsp;llo [[Foo|He&nbsp;llo]]
7424 He&nbsp;llo [[He&nbsp;llo]]
7428 Parsoid: handle constructor well
7434 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7435 </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>
7438 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7440 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7449 # Note that `ko` isn't a known interlanguage prefix
7451 Parsoid: recognize interlanguage links without a target page
7461 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7463 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7466 # Note that `ko` isn't a known interwiki prefix
7468 Parsoid: recognize interwiki links without a target page
7470 parsoid=wt2html,wt2wt,html2html
7476 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7477 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7480 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7481 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7485 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7489 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7492 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7496 Interlanguage link with preceding local interwiki link (bug 68085)
7498 parsoid=wt2html,wt2wt,html2html
7501 [[local:es:Spanish]]
7504 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7508 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7512 Looks like an interlanguage link, but is actually a local interwiki
7514 parsoid=wt2html,wt2wt,html2html
7520 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7524 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7528 ### Redirects, Parsoid-only
7531 1. Simple redirect to page
7535 #REDIRECT [[Main Page]]
7537 <link rel="mw:PageProp/redirect" href="./Main_Page">
7540 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7542 2. Other redirect variants
7544 parsoid=wt2html,wt2wt
7546 #REDIRECT [[Main_Page]]
7547 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7549 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7555 parsoid=wt2html,wt2wt
7560 <li>REDIRECT [[]]</li></ol>
7564 Optional colon in #REDIRECT
7566 # the colon is archaic syntax. we support it for wt2html, but we
7567 # don't care that it roundtrips back to the modern syntax.
7568 parsoid=wt2html,html2html
7570 #REDIRECT:[[Main Page]]
7572 <link rel="mw:PageProp/redirect" href="./Main_Page">
7576 Whitespace in #REDIRECT with optional colon
7578 # the colon and gratuitous whitespace is archaic syntax. we support
7579 # it for wt2html, but we don't care that it roundtrips back to the
7580 # modern syntax (without extra whitespace)
7581 parsoid=wt2html,html2html
7588 <link rel="mw:PageProp/redirect" href="./Main_Page">
7592 Piped link in #REDIRECT
7594 # content after piped link is ignored. we support this syntax,
7595 # but don't care that the piped link is lost when we roundtrip this.
7598 #REDIRECT [[Main Page|bar]]
7600 <link rel="mw:PageProp/redirect" href="./Main_Page">
7604 Redirect to category
7608 #REDIRECT [[Category:Foo]]
7610 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7614 Redirect to category with URL encoding
7618 #REDIRECT [[Category%3AFoo]]
7620 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7624 Redirect to category page
7626 parsoid=wt2html,html2html
7628 #REDIRECT [[:Category:Foo]]
7630 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7634 Redirect to image page (1)
7638 #REDIRECT [[File:Wiki.png]]
7640 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7644 Redirect to image page (2)
7648 #REDIRECT [[Image:Wiki.png]]
7650 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7654 Redirect to language
7658 #REDIRECT [[en:File:Wiki.png]]
7660 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7664 Redirect to interwiki
7668 #REDIRECT [[meatball:File:Wiki.png]]
7670 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7674 Non-English #REDIRECT
7679 #TILVÍSUN [[Main Page]]
7681 <link rel="mw:PageProp/redirect" href="./Main_Page">
7689 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7709 Broken br tag sanitization
7717 # TODO: Fix html2html mode (bug 51055)!
7719 Parsoid: Broken br tag recognition
7732 Incorrecly removing closing slashes from correctly formed XHTML
7734 <br style="clear:both;" />
7736 <p><br style="clear:both;" />
7741 Failing to transform badly formed HTML into correct XHTML
7743 <br style="clear: left;">
7744 <br style="clear: right;">
7745 <br style="clear: both;">
7747 <p><br style="clear: left;" />
7748 <br style="clear: right;" />
7749 <br style="clear: both;" />
7753 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
7754 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
7756 Handling html with a div self-closing tag
7765 <p><div title />
7769 <p><div title=bar />
7770 <div title=bar/>
7772 <div title="bar/"></div>
7776 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7777 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7778 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
7779 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7780 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7781 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
7785 Handling html with a br self-closing tag
7794 <p><br title="title" />
7795 <br title="title" />
7812 Horizontal ruler (should it add that extra space?)
7827 Horizontal ruler -- 4+ dashes render hr
7836 Horizontal ruler -- eats additional dashes on the same line
7845 Horizontal ruler -- does not collapse dashes on consecutive lines
7856 Horizontal ruler -- <4 dashes render as plain text
7865 Horizontal ruler -- Supports content following dashes on same line
7877 ### Block-level elements
7886 <ul><li>Common list</li>
7888 <li>item 3</li></ul>
7899 <ol><li>Numbered list</li>
7901 <li> item 3</li></ol>
7915 ***#Number on level 4
7917 **#Number on level 3
7918 **#Number on level 3
7922 #** Level 3, but ordered
7925 <ol><li> with numbers</li></ol>
7926 <ul><li> and bullets</li></ul>
7927 <ol><li> and numbers</li></ol></li>
7929 <ul><li>bullet level 2
7930 <ul><li>bullet level 3
7931 <ol><li>Number on level 4</li></ol></li></ul></li>
7933 <ol><li>Number on level 3</li>
7934 <li>Number on level 3</li></ol></li></ul>
7935 <ol><li>number level 2</li></ol></li>
7937 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7938 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7949 <ul><li>bar</li></ul></li></ul>
7959 <ul><li><ul><li>foo</li></ul></li>
7965 Nested lists 3 (first element empty)
7971 <ul><li>bar</li></ul></li></ul>
7976 Nested lists 4 (first element empty)
7981 <ul><li><ul><li></li></ul></li>
7987 Nested lists 5 (both elements empty)
7992 <ul><li><ul><li></li></ul></li>
7998 Nested lists 6 (both elements empty)
8004 <ul><li></li></ul></li></ul>
8009 Nested lists 7 (skip initial nesting levels)
8013 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8018 Nested lists 8 (multiple nesting transitions)
8026 <ul><li><ul><li> bar</li></ul></li>
8027 <li> baz</li></ul></li>
8033 1. Lists with start-of-line-transparent tokens before bullets: Comments
8046 2. Lists with start-of-line-transparent tokens before bullets: Template close
8051 <ul><li>foo bar</li>
8057 List items are not parsed correctly following a <pre> block (bug 785)
8063 <ul><li> <pre>foo</pre></li>
8064 <li> <pre>bar</pre></li>
8070 List items from template
8081 * notSOL{{inner list}}
8084 <ul><li> item 1</li>
8085 <li> item 2</li></ul>
8086 <ul><li> item 0</li>
8088 <li> item 2</li></ul>
8089 <ul><li> item 0</li>
8092 <li> item 2</li></ul>
8097 List interrupted by empty line or heading
8105 <ul><li> foo</li></ul>
8106 <ul><li><ul><li> bar</li></ul></li></ul>
8107 <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>
8108 <ul><li> Another list item</li></ul>
8113 Multiple list tags generated by templates
8134 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8137 <!--This line will NOT split the list-->
8139 <!--This line will NOT split the list either-->
8141 <!--foo--> <!----> <!--This line NOT split the list either-->
8152 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8155 <!--This line will NOT split the list-->
8157 <!--This line will NOT split the list either-->
8159 <!--foo--> <!----> <!--This line NOT split the list
8172 (The PHP parser relies on Tidy for the hack)
8174 parsoid=wt2html,wt2wt
8178 * {{echo|<li>templated li-hack}}
8179 * <!--foo--> <li> unsupported li-hack with preceding comments
8182 <li><li>not a li-hack
8189 <li>templated li-hack</li>
8190 <li>unsupported li-hack with preceding comments</li>
8193 <li>not a li-hack</li>
8198 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8225 Parsoid: Test of whitespace serialization with Templated bullets
8232 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8236 # ------------------------------------------------------------------------
8237 # The next set of tests are about Parsoid's ability to handle badly nested
8238 # tags (parse, minimize scope of fixup, and roundtrip back)
8239 # ------------------------------------------------------------------------
8242 Unbalanced closing block tags break a list
8243 (php parser relies on Tidy to fix up)
8261 # Parsoid fails this test, but it might be tricky to support properly.
8264 Unbalanced closing non-block tags don't break a list
8265 (php parser relies on Tidy to fix up)
8272 <li><span>a</span></li>
8273 <li><span>b</span></li>
8287 Unclosed formatting tags that straddle lists are closed and reopened
8288 (php parser relies on Tidy to fix up)
8290 parsoid=wt2html,wt2wt,html2html
8300 <ol><li> <s> a</s></li>
8301 <li><s> b </s></li></ol>
8304 # Parsoid fails this test, but it might be tricky to support properly.
8307 List embedded in a non-block tag
8308 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
8315 <li><small>foo</small></li>
8326 Table with missing opening <tr> tag
8328 parsoid=wt2html,wt2wt
8346 # Note that the current date is hard-coded as
8347 # 1970-01-01T00:02:03Z (a Thursday)
8348 # when running parser tests. The timezone is also fixed to GMT, so
8349 # local date will be identical to current date.
8352 Magic Word: {{CURRENTDAY}}
8361 Magic Word: {{CURRENTDAY2}}
8370 Magic Word: {{CURRENTDAYNAME}}
8379 Magic Word: {{CURRENTDOW}}
8388 Magic Word: {{CURRENTMONTH}}
8397 Magic Word: {{CURRENTMONTH1}}
8406 Magic Word: {{CURRENTMONTHABBREV}}
8408 {{CURRENTMONTHABBREV}}
8415 Magic Word: {{CURRENTMONTHNAME}}
8417 {{CURRENTMONTHNAME}}
8424 Magic Word: {{CURRENTMONTHNAMEGEN}}
8426 {{CURRENTMONTHNAMEGEN}}
8433 Magic Word: {{CURRENTTIME}}
8442 Magic Word: {{CURRENTHOUR}}
8451 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8460 Magic Word: {{CURRENTYEAR}}
8469 Magic Word: {{CURRENTTIMESTAMP}}
8471 {{CURRENTTIMESTAMP}}
8478 Magic Words LOCAL (UTC)
8482 * {{LOCALMONTHNAME}}
8483 * {{LOCALMONTHNAMEGEN}}
8484 * {{LOCALMONTHABBREV}}
8493 * {{LOCALTIMESTAMP}}
8508 <li> 19700101000203</li></ul>
8513 Magic Word: {{FULLPAGENAME}}
8515 title=[[User:Ævar Arnfjörð Bjarmason]]
8519 <p>User:Ævar Arnfjörð Bjarmason
8524 Magic Word: {{FULLPAGENAMEE}}
8526 title=[[User:Ævar Arnfjörð Bjarmason]]
8530 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8535 Magic Word: {{TALKSPACE}}
8537 title=[[User:Ævar Arnfjörð Bjarmason]]
8546 Magic Word: {{TALKSPACE}}, same namespace
8548 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8557 Magic Word: {{TALKSPACE}}, main namespace
8559 title=[[Parser Test]]
8568 Magic Word: {{TALKSPACEE}}
8570 title=[[User:Ævar Arnfjörð Bjarmason]]
8579 Magic Word: {{SUBJECTSPACE}}
8581 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8590 Magic Word: {{SUBJECTSPACE}}, same namespace
8592 title=[[User:Ævar Arnfjörð Bjarmason]]
8601 Magic Word: {{SUBJECTSPACE}}, main namespace
8603 title=[[Parser Test]]
8611 Magic Word: {{SUBJECTSPACEE}}
8613 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8622 Magic Word: {{NAMESPACE}}
8624 title=[[User:Ævar Arnfjörð Bjarmason]]
8633 Magic Word: {{NAMESPACEE}}
8635 title=[[User:Ævar Arnfjörð Bjarmason]]
8644 Magic Word: {{NAMESPACENUMBER}}
8646 title=[[User:Ævar Arnfjörð Bjarmason]]
8655 Magic Word: {{SUBPAGENAME}}
8657 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8666 Magic Word: {{SUBPAGENAMEE}}
8668 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8677 Magic Word: {{ROOTPAGENAME}}
8679 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8683 <p>Ævar Arnfjörð Bjarmason
8688 Magic Word: {{ROOTPAGENAMEE}}
8690 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8694 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8699 Magic Word: {{BASEPAGENAME}}
8701 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8705 <p>Ævar Arnfjörð Bjarmason
8710 Magic Word: {{BASEPAGENAMEE}}
8712 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8716 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8721 Magic Word: {{TALKPAGENAME}}
8723 title=[[User:Ævar Arnfjörð Bjarmason]]
8727 <p>User talk:Ævar Arnfjörð Bjarmason
8732 Magic Word: {{TALKPAGENAMEE}}
8734 title=[[User:Ævar Arnfjörð Bjarmason]]
8738 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8743 Magic Word: {{SUBJECTPAGENAME}}
8745 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8749 <p>User:Ævar Arnfjörð Bjarmason
8754 Magic Word: {{SUBJECTPAGENAMEE}}
8756 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8758 {{SUBJECTPAGENAMEE}}
8760 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8765 Magic Word: {{NUMBEROFFILES}}
8774 Magic Word: {{PAGENAME}}
8776 title=[[User:Ævar Arnfjörð Bjarmason]]
8780 <p>Ævar Arnfjörð Bjarmason
8785 Magic Word: {{PAGENAME}} with metacharacters
8787 title=[['foo & bar = baz']]
8791 <p><i>'foo & bar = baz'</i>
8794 <p><i>'foo & bar = baz'</i></p>
8798 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8800 title=[[*RFC 1234 http://example.com/]]
8804 <p>*RFC 1234 http://example.com/
8807 <p>*RFC 1234 http://example.com/</p>
8811 Magic Word: {{PAGENAMEE}}
8813 title=[[User:Ævar Arnfjörð Bjarmason]]
8817 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8822 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8824 title=[[*RFC 1234 http://example.com/]]
8828 <p>*RFC_1234_http://example.com/
8831 <p>*RFC_1234_http://example.com/</p>
8835 Magic Word: {{REVISIONID}}
8844 Magic Word: {{SCRIPTPATH}}
8853 Magic Word: {{STYLEPATH}}
8862 Magic Word: {{SERVER}}
8866 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8871 Magic Word: {{SERVERNAME}}
8880 Magic Word: {{SITENAME}}
8889 Case-sensitive magic words, when cased differently, should just be template transclusions
8896 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8897 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8898 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8899 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8904 Case-insensitive magic words should still work with weird casing.
8914 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8918 # From plwiki:PLOS_ONE
8920 Parsoid: Page property magic word with magic word contents
8922 {{DISPLAYTITLE:''{{PAGENAME}}''}}
8924 <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>"}]]}'/>
8928 Parsoid: Template-generated DISPLAYTITLE
8930 {{{{echo|DISPLAYTITLE}}:Foo}}
8932 <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}}]}'/>
8936 Namespace 1 {{ns:1}}
8945 Namespace 1 {{ns:01}}
8954 Namespace 0 {{ns:0}} (bug 4783)
8962 Namespace 0 {{ns:00}} (bug 4783)
8970 Namespace -1 {{ns:-1}}
8979 Namespace User {{ns:User}}
8988 Namespace User talk {{ns:User_talk}}
8997 Namespace User talk {{ns:uSeR tAlK}}
9006 Namespace File {{ns:File}}
9015 Namespace File {{ns:Image}}
9024 Namespace (lang=de) Benutzer {{ns:User}}
9035 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9041 <p>Benutzer Diskussion
9049 {{urlencode:hi world?!}}
9050 {{urlencode:hi world?!|WIKI}}
9051 {{urlencode:hi world?!|PATH}}
9052 {{urlencode:hi world?!|QUERY}}
9062 Magic Word: prioritize type info over data-parsoid
9066 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9072 Magic Word: serialize on separate line (parsoid)
9074 parsoid=wt2wt,html2wt
9080 foo<meta property="mw:PageProp/notoc"/>bar
9084 Magic Word: rt non-english wikis
9091 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9098 Magic links: internal link to RFC (bug 479)
9102 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9107 Magic links: RFC (bug 479)
9111 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9116 Magic links: RFC (bug 65278)
9118 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9120 <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.
9125 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9127 RFC      822
9131 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9138 Magic links: ISBN (bug 1937)
9142 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9147 Magic links: ISBN (bug 65278)
9149 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9151 <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.
9154 <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>
9158 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9160 ISBN      978 0 316 09811 3
9166 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9175 Magic links: PMID incorrectly converts space to underscore
9179 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9184 Magic links: PMID (bug 65278)
9186 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9188 <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.
9193 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9195 PMID      1234
9199 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9210 Nonexistent template
9212 {{thistemplatedoesnotexist}}
9214 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9219 Template with invalid target containing tags
9221 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9223 <p>{{a<b>b</b>|foo|a=b|a = b}}
9228 Template with invalid target containing unclosed tag
9230 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9232 <p>{{a<b>|foo|a=b|a = b}}</b>
9237 Template with invalid target containing wikilink
9241 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9244 <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>
9248 Template with just whitespace in it, bug #68421
9252 <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>
9258 This is a test template
9266 <p>This is a test template
9271 Template with explicit namespace
9275 <p>This is a test template
9283 This is a test template with parameter {{{param}}}
9289 {{paramtest|param=foo}}
9291 <p>This is a test template with parameter foo
9296 Template:paramtestnum
9302 Template unnamed parameter
9304 {{paramtestnum|Main Page|the main page}}
9306 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9311 Template:templatesimple
9317 Template:templateredirect
9319 #redirect [[Template:templatesimple]]
9323 Template:templateasargtestnum
9329 Template:templateasargtest
9331 {{template{{{templ}}}}}
9335 Template:templateasargtest2
9341 Template with template name as unnamed argument
9343 {{templateasargtestnum|templatesimple}}
9350 Template with template name as argument
9352 {{templateasargtest|templ=simple}}
9359 Template with template name as argument (2)
9361 {{templateasargtest2|templ=templatesimple}}
9368 Template:templateasargtestdefault
9370 {{{{{templ|templatesimple}}}}}
9380 Template with default value
9382 {{templateasargtestdefault}}
9389 Template with default value (value set)
9391 {{templateasargtestdefault|templ=templa}}
9400 {{templateredirect}}
9407 Template with argument in separate line
9409 {{ templateasargtest |
9417 Template with complex template as argument
9420 param ={{ templateasargtest |
9423 <p>This is a test template with parameter (test)
9428 Template with thumb image (with link in description)
9430 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9432 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>
9435 <p>This is a test template with parameter</p>
9436 <div class="thumb tright">
9437 <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>
9438 <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>
9442 <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>
9446 Template:complextemplate
9448 {{{1}}} {{paramtest|
9449 param ={{{param}}}}}
9453 Template with complex arguments
9456 param ={{ templateasargtest |
9457 templ = simple }}|[[Template:complextemplate|link]]}}
9459 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9464 BUG 553: link with two variables in a piped link
9467 |[[{{{1}}}|{{{2}}}]]
9472 <td>[[{{{1}}}|{{{2}}}]]
9478 Magic variable as template parameter
9480 {{paramtest|param={{SITENAME}}}}
9482 <p>This is a test template with parameter MediaWiki
9489 [[{{{param}}}|link]]
9493 Template parameter as link source
9495 {{linktest|param=Main Page}}
9497 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9504 including another template, {{paramtest|param={{{arg}}}}}
9508 Template passing argument to another template
9510 {{paramtest2|arg='hmm'}}
9512 <p>including another template, This is a test template with parameter 'hmm'
9523 Template as link source
9527 [[{{linktest2}}|Main Page]]
9529 [[{{linktest2}}]]Page
9531 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9532 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9533 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9551 Template infinite loop
9555 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9560 Template from main namespace
9579 BUG 529: Template with table, not included at beginning of line
9598 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9618 BUG 41: Template parameters shown as broken links
9627 Template with targets containing wikilinks
9631 {{[[{{echo|foo}}]]}}
9633 {{{{echo|[[foo}}]]}}
9635 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9636 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9644 ''None'' of '''this''' should be
9646 but rather passed unmodified
9653 # hmm, fix this or just deprecate msgnw and document its behavior?
9657 {{msgnw:MSGNW test}}
9659 <p>''None'' of '''this''' should be
9661  but rather passed unmodified
9662 {{test}}
9672 {{int:youhavenewmessages|lots of money|not!}}
9674 <p>You have lots of money (not!).
9681 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9685 <includeonly> and <noinclude> being included
9696 <onlyinclude>Foo</onlyinclude>bar
9700 <onlyinclude> being included
9712 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9716 <onlyinclude> and <includeonly> being included
9725 <includeonly> and <noinclude> on a page
9727 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9734 Un-closed <noinclude>
9741 <onlyinclude> on a page
9743 <onlyinclude>Foo</onlyinclude>bar
9750 Un-closed <onlyinclude>
9757 Self-closed noinclude, includeonly, onlyinclude tags
9768 Unbalanced includeonly and noinclude tags
9772 |b</noinclude></noinclude>
9773 |c</noinclude></includeonly>
9774 |d</includeonly></includeonly>
9783 <td>c</includeonly>
9785 <td>d</includeonly></includeonly>
9791 Template:Includeonly section
9794 ==Includeonly section==
9800 Bug 6563: Edit link generation for section shown by <includeonly>
9802 {{includeonly section}}
9804 <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>
9805 <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>
9809 # Uses same input as the contents of [[Template:Includeonly section]]
9811 Bug 6563: Section extraction for section shown by <includeonly>
9816 ==Includeonly section==
9824 Bug 6563: Edit link generation for section suppressed by <includeonly>
9827 ==Includeonly section==
9831 <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>
9836 Bug 6563: Section extraction for section suppressed by <includeonly>
9841 ==Includeonly section==
9849 Un-closed <includeonly>
9856 Includes and comments at SOL
9858 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9865 <includeonly>can have stuff</includeonly>=== here ===
9868 <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>
9873 <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>
9876 <!-- 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>
9878 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9880 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9883 <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>
9887 # TODO: test with DOM fragment reuse!
9889 Parsoid: DOM fragment reuse
9891 parsoid=wt2wt,wt2html
9893 a{{echo|b<table></table>c}}d
9905 <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>
9907 <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">
9908 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9909 </span><p about="#mwt2">cd</p>
9911 <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">
9913 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9915 </span><p about="#mwt3">b</p>
9919 Parsoid: Merge double tds (bug 50603)
9928 <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>
9933 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9943 <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}}]}'>
9945 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9951 ### <includeonly> and <noinclude> in attributes
9954 0. includeonly around the entire attribute
9956 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9958 <p><span id="v2">bar</span>
9963 1. includeonly in html attr key
9965 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9967 <p><span id="foo">bar</span>
9972 2. includeonly in html attr value
9974 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9975 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9977 <p><span id="v1">bar</span>
9978 <span id="v1">bar</span>
9983 3. includeonly in part of an attr value
9985 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9987 <p><span style="color:red;">bar</span>
9992 4. includeonly in table attributes
10016 ### Token Stream Patcher tests
10018 ### These tests won't always pass wt2wt and other modes because
10019 ### on serialization, the table will be output on a new line.
10020 ### For now, we are blacklisting them, and using this to test selser.
10024 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10026 parsoid=wt2html,wt2wt
10028 {{echo|}}{| width = '100%'
10032 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10033 <tbody><tr><td>foo</td></tr>
10038 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10040 parsoid=wt2html,wt2wt
10042 <includeonly>a</includeonly>{| {{{b}}}
10046 <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}}}":""}}'>
10047 <tbody><tr><td>c</td></tr>
10053 ### Testing parsing of templates where a template arg
10054 ### has the same name as the template itself.
10060 {{{quote|{{{1}}}}}}
10064 Templates: Template Name/Arg clash: 1. Use of positional param
10073 Templates: Template Name/Arg clash: 2. Use of named param
10075 {{quote|quote=foo}}
10082 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10091 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10095 Templates: 1. Simple use
10104 Templates: 2. Inside a block tag
10106 <div>{{echo|Foo}}</div>
10107 <blockquote>{{echo|Foo}}</blockquote>
10110 <blockquote>Foo</blockquote>
10120 Templates: P-wrapping: 1a. Templates on consecutive lines
10131 Templates: P-wrapping: 1b. Templates on consecutive lines
10145 Templates: P-wrapping: 1c. Templates on consecutive lines
10148 {{echo|bar}} <div>baz</div>
10161 Templates: P-wrapping: 1d. Template preceded by comment-only line
10170 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10174 Templates: Inline Text: 1. Multiple template uses
10176 {{echo|Foo}}bar{{echo|baz}}
10183 Templates: Inline Text: 2. Back-to-back template uses
10185 {{echo|Foo}}{{echo|bar}}
10192 Templates: Block Tags: 1. Multiple template uses
10194 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10196 <div>Foo</div><div>bar</div><div>baz</div>
10201 Templates: Block Tags: 2. Back-to-back template uses
10203 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10205 <div>Foo</div><div>bar</div>
10209 # This is an edge case relating to paragraph wrapping.
10211 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10216 <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
10221 Templates: Links: 1. Simple example
10223 {{echo|[[Foo|bar]]}}
10225 <p><a href="/wiki/Foo" title="Foo">bar</a>
10230 Templates: Links: 2. Generation of link href
10232 [[{{echo|Foo}}|bar]]
10234 <p><a href="/wiki/Foo" title="Foo">bar</a>
10239 Templates: Links: 3. Generation of part of a link href
10241 [[Fo{{echo|o}}|bar]]
10243 [[Foo{{echo|bar}}]]
10245 [[Foo{{echo|bar}}baz]]
10247 [[Foo{{echo|bar}}|bar]]
10249 [[:Foo{{echo|bar}}]]
10251 [[:Foo{{echo|bar}}|bar]]
10253 <p><a href="/wiki/Foo" title="Foo">bar</a>
10254 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10255 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10256 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10257 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10258 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10263 Templates: Links: 4. Multiple templates generating link href
10265 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10267 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10272 Templates: Links: 5. Generation of link text
10274 [[Foo|{{echo|bar}}]]
10276 <p><a href="/wiki/Foo" title="Foo">bar</a>
10281 Templates: Links: 5. Nested templates (only outermost template should be marked)
10283 {{echo|[[{{echo|Foo}}|bar]]}}
10285 <p><a href="/wiki/Foo" title="Foo">bar</a>
10290 Templates: HTML Tag: 1. Generation of HTML attr. key
10292 <div {{echo|style}}="color:red;">foo</div>
10294 <div style="color:red;">foo</div>
10299 Templates: HTML Tag: 2. Generation of HTML attr. value
10301 <div style={{echo|'color:red;'}}>foo</div>
10303 <div style="color:red;">foo</div>
10308 Templates: HTML Tag: 3. Generation of HTML attr key and value
10310 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10312 <div style="color:red;">foo</div>
10317 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10319 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10321 <div title="This is a long title with just one piece templated">foo</div>
10326 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10328 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10330 <div title="This is a long title with just one piece templated">foo</div>
10335 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10337 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10339 <div title="This is a long title with just one piece templated">foo</div>
10343 # SSS FIXME: While it is great we added support for all this,
10344 # do we want to make this part of the spec? Maybe we want to
10345 # deprecate this kind of usage in the future?
10347 Templates: HTML Tag: 7. Generation of partial attribute key string
10349 <div st{{echo|yle}}="color:red;">foo</div>
10351 <div style="color:red;">foo</div>
10356 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10358 <div {{echo|1=id="v1"}}>bar</div>
10360 <div id="v1">bar</div>
10365 Templates: HTML Tag: 9. Multiple template-generated attributes
10367 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10369 <div id="v1" title="foo">bar</div>
10374 Templates: Support for templates generating attributes and content
10376 {| {{mixed_attr_content_template}}
10381 <table style="color:red;" title="T48811">
10391 <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|}"]}'>
10400 Templates: HTML Tables: 1. Generating start of a HTML table
10402 {{echo|<table><tr><td>foo</td>}}</tr></table>
10404 <table><tr><td>foo</td></tr></table>
10409 Templates: HTML Tables: 2a. Generating middle of a HTML table
10411 <table><tr>{{echo|<td>foo</td>}}</tr></table>
10413 <table><tr><td>foo</td></tr></table>
10418 Templates: HTML Tables: 2b. Generating middle of a HTML table
10420 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10422 <table><tr><td>foo</td></tr></table>
10427 Templates: HTML Tables: 3. Generating end of a HTML table
10429 <table><tr>{{echo|<td>foo</td></tr></table>}}
10431 <table><tr><td>foo</td></tr></table>
10436 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10438 {{echo|<table>}}<tr><td>foo</td></tr></table>
10440 <table><tr><td>foo</td></tr></table>
10445 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10447 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10449 <table><tr><td>foo</td></tr></table>
10454 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10456 <table><tr>{{echo|<td>}}foo</td></tr></table>
10458 <table><tr><td>foo</td></tr></table>
10463 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10465 <table><tr><td>foo{{echo|</td>}}</tr></table>
10467 <table><tr><td>foo</td></tr></table>
10472 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10474 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10476 <table><tr><td>foo</td></tr></table>
10481 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10483 <table><tr><td>foo</td></tr>{{echo|</table>}}
10485 <table><tr><td>foo</td></tr></table>
10490 Templates: HTML Tables: 5. Proper fostering of categories from inside
10492 parsoid=wt2html,wt2wt
10494 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10495 <!--Two categories (Bug 50330)-->
10496 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10498 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10499 <!--Two categories (Bug 50330)-->
10500 <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>
10504 Templates: Wiki Tables: 1a. Fostering of entire template content
10512 <tr><td></td></tr></table>
10524 Templates: Wiki Tables: 1b. Fostering of entire template content
10537 <tr><td></td></tr></table>
10551 Templates: Wiki Tables: 2. Fostering of partial template content
10561 <tr><td></td></tr></table>
10574 Templates: Wiki Tables: 3. td-content via multiple templates
10577 {{echo|{{pipe}}a}}{{echo|b}}
10588 Templates: Wiki Tables: 4. Templated tags, no content
10594 <tr><td></td></tr></table>
10599 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10613 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10627 Templates: Lists: Multi-line list-items via templates
10629 *{{echo|a {{nonexistent|
10631 *{{echo|b {{nonexistent|
10634 <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>
10635 <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>
10640 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10642 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10644 <p><i>ab</i>c<i>d</i>e
10649 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10650 (PHP parser generates misnested html)
10652 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10654 <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>
10658 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10659 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10661 parsoid=wt2html,wt2wt
10663 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10665 <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>
10666 <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>
10667 <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>
10671 Templates: Ugly nesting: 4. Divs opened/closed across templates
10673 a<div>b{{echo|c</div>d}}e
10684 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10690 |{{echo|foo</table>}}
10694 <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|}"]}'>
10698 <td>foo</td></tr></tbody></table><span about="#mwt1">
10699 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10704 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10714 <td>1. {{echo|foo </table>}}</td>
10716 <td>2. {{echo|baz </table>}}</td>
10729 <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>"]}'>
10734 <td>1. foo </td></tr></tbody></table></td>
10736 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10737 </span><span about="#mwt2">
10738 </span><span about="#mwt2">
10739 </span><span about="#mwt2">abc</span><span about="#mwt2">
10740 </span><span about="#mwt2">
10741 </span><span about="#mwt2">
10742 </span><span about="#mwt2">
10743 </span><span about="#mwt2">
10744 </span><span about="#mwt2">
10745 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10746 </span><span about="#mwt2">
10751 Templates: Ugly templates: 3. newline-only template parameter
10760 # This looks like a bug: a single newline triggers p/br for some reason.
10762 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10771 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10772 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10774 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10780 <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
10781 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10785 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10786 # that are "identical" and generate nesting cycles in the algorithm
10788 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10790 {{echo|<table><tr><td><table>}}
10794 <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"}'>
10795 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10796 </table></td></tr></tbody></table>
10800 Parser Functions: 1. Simple example
10809 Parser Functions: 2. Nested use (only outermost should be marked up)
10818 ### Pre-save transform tests
10821 pre-save transform: subst:
10827 This is a test template
10831 pre-save transform: normal template
10841 pre-save transform: nonexistent template
10845 {{thistemplatedoesnotexist}}
10847 {{thistemplatedoesnotexist}}
10852 pre-save transform: subst magic variables
10861 # This is bug 89, which I fixed. -- wtm
10863 pre-save transform: subst: templates with parameters
10867 {{subst:paramtest|param="something else"}}
10869 This is a test template with parameter "something else"
10873 Template:nowikitest
10875 <nowiki>'''not wiki'''</nowiki>
10879 pre-save transform: nowiki in subst (bug 1188)
10883 {{subst:nowikitest}}
10885 <nowiki>'''not wiki'''</nowiki>
10890 Template:commenttest
10892 This template has <!-- a comment --> in it.
10896 pre-save transform: comment in subst (bug 1936)
10900 {{subst:commenttest}}
10902 This template has <!-- a comment --> in it.
10906 pre-save transform: unclosed tag
10910 <nowiki>'''not wiki'''
10912 <nowiki>'''not wiki'''
10916 pre-save transform: mixed tag case
10920 <NOwiki>'''not wiki'''</noWIKI>
10922 <NOwiki>'''not wiki'''</noWIKI>
10926 pre-save transform: unclosed comment in <nowiki>
10930 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10932 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10935 # Leading @ in this template definition works around a limitation
10936 # in parsoid's parserTests which otherwise strips the <span> from the
10937 # result (confusing it for a template wrapper)
10941 @<span onmouseover="alert('crap')">Oh no</span>
10945 (confirming safety of fix for subst bug 1936)
10947 {{Template:dangerous}}
10949 <p>@<span>Oh no</span>
10954 pre-save transform: comment containing gallery (bug 5024)
10958 <!-- <gallery>data</gallery> -->
10960 <!-- <gallery>data</gallery> -->
10964 pre-save transform: comment containing extension
10968 <!-- <tag>data</tag> -->
10970 <!-- <tag>data</tag> -->
10974 pre-save transform: comment containing nowiki
10978 <!-- <nowiki>data</nowiki> -->
10980 <!-- <nowiki>data</nowiki> -->
10984 pre-save transform: <noinclude> in subst (bug 3298)
10994 pre-save transform: <onlyinclude> in subst (bug 3298)
10998 {{subst:Includes2}}
11006 {{<includeonly>subst:</includeonly>Includes}}
11010 Template:SafeSubstTest
11012 {{<includeonly>safesubst:</includeonly>Includes}}
11016 bug 22297: safesubst: works during PST
11020 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11026 bug 22297: safesubst: works during normal parse
11035 subst: does not work during normal parse
11039 <p>{{subst:Includes}}
11044 pre-save transform: context links ("pipe trick")
11048 [[Article (context)|]]
11051 [[Bar:Article (context)|]]
11052 [[:Bar:Article (context)|]]
11054 [[|Article (context)]]
11058 [[Article (context)|Article]]
11059 [[Bar:Article|Article]]
11060 [[:Bar:Article|Article]]
11061 [[Bar:Article (context)|Article]]
11062 [[:Bar:Article (context)|Article]]
11064 [[Article (context)]]
11065 [[Bar:X (Y) Z|X (Y) Z]]
11066 [[:Bar:X (Y) Z|X (Y) Z]]
11070 pre-save transform: context links ("pipe trick") with interwiki prefix
11074 [[interwiki:Article|]]
11075 [[:interwiki:Article|]]
11076 [[interwiki:Bar:Article|]]
11077 [[:interwiki:Bar:Article|]]
11079 [[interwiki:Article|Article]]
11080 [[:interwiki:Article|Article]]
11081 [[interwiki:Bar:Article|Bar:Article]]
11082 [[:interwiki:Bar:Article|Bar:Article]]
11086 pre-save transform: context links ("pipe trick") with parens in title
11088 pst title=[[Somearticle (context)]]
11092 [[Article (context)|Article]]
11096 pre-save transform: context links ("pipe trick") with comma in title
11098 pst title=[[Someplace, Somewhere]]
11101 [[Otherplace, Elsewhere|]]
11102 [[Otherplace, Elsewhere, Anywhere|]]
11104 [[Otherplace, Somewhere|Otherplace]]
11105 [[Otherplace, Elsewhere|Otherplace]]
11106 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11110 pre-save transform: context links ("pipe trick") with parens and comma
11112 pst title=[[Someplace (IGNORED), Somewhere]]
11115 [[Otherplace (place), Elsewhere|]]
11117 [[Otherplace, Somewhere|Otherplace]]
11118 [[Otherplace (place), Elsewhere|Otherplace]]
11122 pre-save transform: context links ("pipe trick") with comma and parens
11124 pst title=[[Who, me? (context)]]
11127 [[Me, Myself, and I (1937 song)|]]
11129 [[Yes, you. (context)|Yes, you.]]
11130 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11134 pre-save transform: context links ("pipe trick") with namespace
11136 pst title=[[Ns:Somearticle]]
11140 [[Ns:Article|Article]]
11144 pre-save transform: context links ("pipe trick") with namespace and parens
11146 pst title=[[Ns:Somearticle (context)]]
11150 [[Ns:Article (context)|Article]]
11154 pre-save transform: context links ("pipe trick") with namespace and comma
11156 pst title=[[Ns:Somearticle, Context, Whatever]]
11160 [[Ns:Article, Context, Whatever|Article]]
11164 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11166 pst title=[[Ns:Somearticle, Context (context)]]
11170 [[Ns:Article (context)|Article]]
11174 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11176 pst title=[[Ns:Somearticle (IGNORED), Context]]
11180 [[Ns:Article, Context|Article]]
11184 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11188 [[Article(context)|]]
11189 [[Bar:Article(context)|]]
11190 [[:Bar:Article(context)|]]
11191 [[|Article(context)]]
11195 [[Article(context)|Article]]
11196 [[Bar:Article(context)|Article]]
11197 [[:Bar:Article(context)|Article]]
11198 [[Article(context)]]
11199 [[Bar:X(Y)Z|X(Y)Z]]
11200 [[:Bar:X(Y)Z|X(Y)Z]]
11204 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11208 [[Article (context)|]]
11209 [[Bar:Article (context)|]]
11210 [[:Bar:Article (context)|]]
11211 [[|Article (context)]]
11215 [[Article (context)|Article]]
11216 [[Bar:Article (context)|Article]]
11217 [[:Bar:Article (context)|Article]]
11218 [[Article (context)]]
11219 [[Bar:X (Y) Z|X (Y) Z]]
11220 [[:Bar:X (Y) Z|X (Y) Z]]
11224 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11228 [[Article(context)|]]
11229 [[Bar:Article(context)|]]
11230 [[:Bar:Article(context)|]]
11231 [[|Article(context)]]
11235 [[Article(context)|Article]]
11236 [[Bar:Article(context)|Article]]
11237 [[:Bar:Article(context)|Article]]
11238 [[Article(context)]]
11239 [[Bar:X(Y)Z|X(Y)Z]]
11240 [[:Bar:X(Y)Z|X(Y)Z]]
11244 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11248 [[Article (context), context|]]
11249 [[Article (context),context|]]
11250 [[Bar:Article (context), context|]]
11251 [[Bar:Article (context),context|]]
11252 [[:Bar:Article (context), context|]]
11253 [[:Bar:Article (context),context|]]
11255 [[Article (context), context|Article]]
11256 [[Article (context),context|Article]]
11257 [[Bar:Article (context), context|Article]]
11258 [[Bar:Article (context),context|Article]]
11259 [[:Bar:Article (context), context|Article]]
11260 [[:Bar:Article (context),context|Article]]
11264 pre-save transform: trim trailing empty lines
11268 Empty lines are trimmed
11274 Empty lines are trimmed
11278 pre-save transform: Signature expansion
11283 * <noinclude>~~~</noinclude>
11284 * <includeonly>~~~</includeonly>
11285 * <onlyinclude>~~~</onlyinclude>
11287 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11288 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11289 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11290 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11295 pre-save transform: Signature expansion in nowiki tags (bug 93)
11301 <nowiki>~~~~</nowiki>
11303 <includeonly><nowiki>~~~~</nowiki></includeonly>
11305 <noinclude><nowiki>~~~~</nowiki></noinclude>
11307 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11309 {{subst:Foo}} shall be converted to FOO
11311 As well as inside noinclude/onlyinclude
11312 <noinclude>{{subst:Foo}}</noinclude>
11313 <onlyinclude>{{subst:Foo}}</onlyinclude>
11315 But not inside includeonly
11316 <includeonly>{{subst:Foo}}</includeonly>
11320 <nowiki>~~~~</nowiki>
11322 <includeonly><nowiki>~~~~</nowiki></includeonly>
11324 <noinclude><nowiki>~~~~</nowiki></noinclude>
11326 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11328 FOO shall be converted to FOO
11330 As well as inside noinclude/onlyinclude
11331 <noinclude>FOO</noinclude>
11332 <onlyinclude>FOO</onlyinclude>
11334 But not inside includeonly
11335 <includeonly>{{subst:Foo}}</includeonly>
11339 Parsoid: Recognize nowiki with trailing space in tags
11343 <nowiki ><div>[[foo]]</nowiki >
11351 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11358 Parsoid: Recognize nowiki with odd capitalization
11362 <noWikI ><div>[[foo]]</Nowiki >
11364 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11369 Parsoid: Escape nowiki with trailing space in tags
11373 <p><nowiki > foo </nowiki ></p>
11374 <p>a<nowiki />b</p>
11375 <p>c<nowiki/ >d</p>
11377 <nowiki > foo </nowiki >
11385 Parsoid: Escape weird noWikI capitalizations
11389 <p><noWikI > foo </NoWikI ></p>
11391 <noWikI > foo </NoWikI >
11395 ### Message transform tests
11398 message transform: magic variables
11408 message transform: should not transform wiki markup
11418 message transform: <noinclude> in transcluded template (bug 4926)
11428 message transform: <onlyinclude> in transcluded template (bug 4926)
11438 {{#special:}} page name, known
11442 {{#special:Recentchanges}}
11444 Special:RecentChanges
11448 {{#special:}} page name with subpage, known
11452 {{#special:Recentchanges/param}}
11454 Special:RecentChanges/param
11458 {{#special:}} page name, unknown
11462 {{#special:foobar nonexistent}}
11464 Special:Foobar nonexistent
11468 {{#speciale:}} page name, known
11472 {{#speciale:Recentchanges}}
11474 Special:RecentChanges
11478 {{#speciale:}} page name with subpage, known
11482 {{#speciale:Recentchanges/param}}
11484 Special:RecentChanges/param
11488 {{#speciale:}} page name, unknown
11492 {{#speciale:foobar nonexistent}}
11494 Special:Foobar_nonexistent
11500 ### For Parsoid-specific tests, see
11501 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11506 parsoid=wt2html,wt2wt,html2html
11508 [[Image:foobar.jpg]]
11510 <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>
11513 <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>
11517 Simple image (using File: namespace, now canonical)
11519 [[File:Foobar.jpg]]
11521 <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>
11524 <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>
11528 Right-aligned image
11530 [[File:Foobar.jpg|right]]
11532 <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>
11535 <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>
11541 [[File:Foobar.jpg|right|Caption text]]
11543 <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>
11546 <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>
11550 Image with caption, bug 53312 #1
11552 [[File:Foobar.jpg|right|Caption page stuff]]
11554 <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>
11557 <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>
11561 Image with caption, bug 53312 #2
11563 [[File:Foobar.jpg|right|Caption page=]]
11565 <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>
11568 <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>
11572 Image with caption, bug 53312 #3
11574 [[File:Foobar.jpg|right|Caption page=stuff]]
11576 <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>
11579 <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>
11583 Allow empty links in image captions (Bug 60753)
11587 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11592 <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>
11595 <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>
11597 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11598 </figcaption></figure>
11602 Titles in unlinked images (T23454)
11604 [[File:Foobar.jpg|link=|stuff]]
11606 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
11611 Link with empty target
11620 Image with link trail
11622 Linktrails should not work for images: [[File:Foobar.jpg]]s
11624 <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
11627 <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>
11631 Image with empty attribute
11633 parsoid=wt2html,wt2wt,html2html
11635 [[File:Foobar.jpg|right||Caption text]]
11637 <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>
11640 <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>
11644 1. Block image with individual attributes from templates
11646 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11648 <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>
11651 <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>
11655 2. Block Image with individual attributes from templates
11657 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11659 <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>
11662 <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>
11666 3. Inline image with individual attributes from templates
11668 [[File:Foobar.jpg|{{echo|50px}}]]
11670 <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>
11673 <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>
11676 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11677 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11679 Image with multiple attributes from the same template
11681 [[File:Foobar.jpg|{{image_attribs}}]]
11683 <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>
11686 <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>
11690 Image with link tails
11694 123[[File:Foobar.jpg]]456
11695 123[[File:Foobar.jpg|right]]456
11696 123[[File:Foobar.jpg|thumb]]456
11698 <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
11700 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
11701 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
11704 <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>
11706 <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>
11708 <div class="thumb tright">
11709 <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>
11710 <div class="thumbcaption">
11711 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11717 <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>
11718 <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>
11719 <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>
11723 Image with multiple captions -- only last one is accepted
11725 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11727 <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>
11730 <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>
11734 Image with multiple widths -- use last
11736 [[File:Foobar.jpg|200px|300px|caption]]
11738 <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>
11741 <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>
11745 Image with multiple alignments -- use first (bug 48664)
11749 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11751 [[File:Foobar.jpg|middle|text-top|caption]]
11753 <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>
11754 <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>
11757 <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>
11758 <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>
11762 Image with width attribute at different positions
11764 [[File:Foobar.jpg|200px|right|Caption]]
11765 [[File:Foobar.jpg|right|200px|Caption]]
11766 [[File:Foobar.jpg|right|Caption|200px]]
11768 <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>
11769 <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>
11770 <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>
11773 <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>
11774 <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>
11775 <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>
11778 # a sad bit of backward-compatibility
11780 Image with size specified with pxpx (bug 13500, 51628)
11782 parsoid=wt2html,wt2wt,html2html
11784 [[File:Foobar.jpg|20pxpx]]
11785 [[File:Foobar.jpg|200x20pxpx]]
11787 <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>
11788 <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>
11791 <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>
11795 Image with link parameter, wiki target
11797 [[File:Foobar.jpg|link=Main Page]]
11799 <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>
11802 <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>
11805 # parsoid bug 49293 (part 1)
11807 Image with link parameter, URL target
11809 [[File:Foobar.jpg|link=http://example.com/]]
11811 <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>
11814 <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>
11817 # parsoid bug 49293 (part 2)
11819 Image with link parameter, protocol-less URL target
11821 [[File:Foobar.jpg|link=//example.com/]]
11823 <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>
11826 <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>
11830 Image with link parameter, wgExternalLinkTarget
11832 [[Image:foobar.jpg|link=http://example.com/]]
11834 wgExternalLinkTarget='foobar'
11836 <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>
11841 Image with link parameter, wgNoFollowLinks set to false
11843 [[Image:foobar.jpg|link=http://example.com/]]
11845 wgNoFollowLinks=false
11847 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11852 Image with link parameter, wgNoFollowDomainExceptions
11854 [[Image:foobar.jpg|link=http://example.com/]]
11856 wgNoFollowDomainExceptions='example.com'
11858 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11863 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11865 [[Image:foobar.jpg|link=http://example.com/|Title]]
11867 wgExternalLinkTarget='foobar'
11869 <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>
11874 Image with empty link parameter
11876 [[File:Foobar.jpg|link=]]
11878 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11881 <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>
11885 Image with link parameter (wiki target) and unnamed parameter
11887 [[File:Foobar.jpg|link=Main_Page|Title]]
11889 <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>
11892 <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>
11896 Image with link parameter (URL target) and unnamed parameter
11898 [[File:Foobar.jpg|link=http://example.com/|Title]]
11900 <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>
11903 <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>
11907 Thumbnail image with link parameter
11910 parsoid=wt2html,wt2wt,html2html
11912 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11914 <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>
11917 <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>
11921 Manually-specified thumbnail image
11925 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11927 <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>
11930 <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>
11934 Manually-specified thumbnail image with explicit link to wiki page
11937 parsoid=wt2html,wt2wt,html2html
11939 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11941 <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>
11944 <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>
11948 Manually-specified thumbnail image with explicit link to url
11951 parsoid=wt2html,wt2wt,html2html
11953 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11955 <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>
11958 <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>
11962 Manually-specified thumbnail image with explicit no link
11965 parsoid=wt2html,wt2wt,html2html
11967 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11969 <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>
11972 <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>
11976 Manually-specified thumbnail image with explicit link and alt text
11979 parsoid=wt2html,wt2wt,html2html
11981 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11983 <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>
11986 <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>
11990 Image with frame and link
11992 parsoid=wt2html,wt2wt,html2html
11994 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11996 <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>
11999 <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>
12003 Image with frame and link and explicit alt
12005 parsoid=wt2html,wt2wt,html2html
12007 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12009 <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>
12012 <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>
12016 Image with wiki markup in implicit alt
12018 parsoid=wt2html,wt2wt,html2html
12020 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12022 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12024 <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>
12025 </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>
12028 <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>
12029 <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>
12032 ###################
12033 # Conflicting image format options.
12034 # First option specified should 'win'.
12035 # All three cases in each test should be identical.
12038 Image with 'frameless' first.
12040 parsoid=wt2html,wt2wt,html2html
12042 [[File:Foobar.jpg|frameless|caption]]
12044 [[File:Foobar.jpg|frameless|frame|caption]]
12046 [[File:Foobar.jpg|frameless|thumb|caption]]
12048 <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>
12049 </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>
12050 </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>
12053 <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>
12054 <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>
12055 <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>
12059 Image with 'frame' first.
12061 parsoid=wt2html,wt2wt,html2html
12063 [[File:Foobar.jpg|frame|caption]]
12064 [[File:Foobar.jpg|frame|frameless|caption]]
12065 [[File:Foobar.jpg|frame|thumb|caption]]
12067 <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>
12068 <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>
12069 <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>
12072 <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>
12073 <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>
12074 <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>
12078 Image with 'thumb' first.
12080 parsoid=wt2html,wt2wt,html2html
12082 [[File:Foobar.jpg|thumb|caption]]
12083 [[File:Foobar.jpg|thumb|frameless|caption]]
12084 [[File:Foobar.jpg|thumb|frame|caption]]
12086 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
12087 <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>
12088 <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>
12091 <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>
12092 <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>
12093 <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>
12096 ###################
12098 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12099 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12100 # Foobar has actual size of 1941x220
12101 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12102 # a scalable format.
12103 # 2. Framed images always ignore size options; always render at default size.
12104 # 3. "Unspecified format" and border are the only types which can be
12108 Image: "unspecified format" and border enlarge
12110 parsoid=wt2html,wt2wt,html2html
12112 [[File:Foobar.jpg|2000px]]
12114 [[File:Foobar.jpg|border|2000px]]
12116 <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>
12117 </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>
12120 <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>
12121 <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>
12125 Image: "unspecified format" and border reduce
12127 parsoid=wt2html,wt2wt,html2html
12129 [[File:Foobar.jpg|1000px]]
12131 [[File:Foobar.jpg|border|1000px]]
12133 <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>
12134 </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>
12137 <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>
12138 <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>
12142 Image: thumbs reduce
12144 parsoid=wt2html,wt2wt,html2html
12146 [[File:Foobar.jpg|thumb|50px]]
12148 <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>
12151 <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>
12155 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12157 parsoid=wt2html,wt2wt,html2html
12159 [[File:Foobar.jpg|thumb|2000px]]
12161 [[File:Foobar.svg|thumb|2000px]]
12163 <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>
12164 <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>
12167 <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>
12168 <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>
12172 Image: frameless can reduce in size
12174 parsoid=wt2html,wt2wt,html2html
12176 [[File:Foobar.jpg|frameless|50px]]
12178 <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>
12181 <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>
12185 Image: bitmap frameless can't be enlarged past original size, but vector can
12187 parsoid=wt2html,wt2wt,html2html
12189 [[File:Foobar.jpg|frameless|2000px]]
12191 [[File:Foobar.svg|frameless|2000px]]
12193 <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>
12194 </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>
12197 <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>
12198 <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>
12202 Image: framed images are always unscaled.
12204 parsoid=wt2html,wt2wt,html2html
12206 [[File:Foobar.jpg|frame]]
12208 [[File:Foobar.jpg|frame|50px]]
12210 [[File:Foobar.jpg|frame|50x50px]]
12212 [[File:Foobar.jpg|frame|2000px]]
12214 <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>
12215 <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>
12216 <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>
12217 <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>
12220 <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>
12221 <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>
12222 <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>
12223 <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>
12226 ###################
12229 Link to image page- image page normally doesn't exists, hence edit link
12230 Add test with existing image page
12231 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12235 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12240 bug 18784 Link to non-existent image page with caption should use caption as link text
12242 [[:Image:test|caption]]
12244 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12249 Frameless image caption with a free URL
12251 [[File:Foobar.jpg|http://example.com]]
12253 <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>
12256 <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>
12260 Thumbnail image caption with a free URL
12264 [[File:Foobar.jpg|thumb|http://example.com]]
12266 <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>
12269 <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>
12273 Thumbnail image caption with a free URL and explicit alt
12276 parsoid=wt2html,wt2wt,html2html
12278 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12280 <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>
12283 <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>
12287 SVG thumbnails with no language set
12290 [[File:Foobar.svg|thumb|caption]]
12292 <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>
12295 <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>
12299 SVG thumbnails with language de
12301 parsoid=wt2html,wt2wt,html2html
12303 [[File:Foobar.svg|thumb|caption|lang=de]]
12305 <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>
12308 <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>
12312 SVG thumbnails with invalid language code
12314 parsoid=wt2html,wt2wt,html2html
12316 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12318 <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>
12321 <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>
12325 BUG 1887: A ISBN with a thumbnail
12327 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12329 <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>
12332 <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>
12336 BUG 1887: A RFC with a thumbnail
12338 [[File:Foobar.jpg|thumb|This is RFC 12354]]
12340 <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>
12343 <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>
12347 BUG 1887: A mailto link with a thumbnail
12349 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
12351 <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>
12354 <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>
12357 # Pending resolution to bug 368
12359 BUG 648: Frameless image caption with a link
12361 [[File:Foobar.jpg|text with a [[link]] in it]]
12363 <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>
12366 <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>
12370 BUG 648: Frameless image caption with a link (suffix)
12372 [[File:Foobar.jpg|text with a [[link]]foo in it]]
12374 <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>
12377 <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>
12381 BUG 648: Frameless image caption with an interwiki link
12383 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
12385 <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>
12388 <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>
12392 BUG 648: Frameless image caption with a piped interwiki link
12394 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
12396 <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>
12399 <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>
12403 Escape HTML special chars in image alt text
12405 [[File:Foobar.jpg|& < > "]]
12407 <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>
12410 <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>
12414 BUG 499: Alt text should have Ӓ, not &1234;
12416 [[File:Foobar.jpg|♀]]
12418 <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>
12421 <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>
12425 Broken image caption with link
12427 parsoid=wt2html,wt2wt,html2html
12429 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
12431 <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.
12434 <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>
12438 Image caption containing another image
12440 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12442 <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>
12445 <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>
12449 Image: caption containing a newline
12451 [[File:Foobar.jpg|This
12454 <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>
12457 <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>
12461 Image: caption containing leading space
12462 (The leading space should not trigger nowiki escaping in wt2wt mode)
12464 [[File:Foobar.jpg|thumb| bar]]
12466 <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>
12469 <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>
12473 Image: caption containing a table
12475 parsoid=wt2html,wt2wt,html2html
12477 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12483 and some more text.]]
12485 <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>
12488 <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
12491 <tr><th>Foo </th><th>Bar</th></tr>
12494 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12498 Bug 3090: External links other than http: in image captions
12500 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12502 <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>
12505 <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>
12511 parsoid=wt2html,wt2wt,html2html
12513 [[Image:foobar.jpg|a|class=b]]
12515 <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>
12518 <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>
12522 Localized image handling (1).
12524 parsoid=wt2html,wt2wt,html2html
12527 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12529 <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>
12532 <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>
12536 Localized image handling (2).
12539 parsoid=wt2html,wt2wt,html2html
12542 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12544 <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>
12547 <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>
12551 "border", "frameless" and "class" attributes on an image.
12554 parsoid=wt2html,wt2wt,html2html
12556 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12558 <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>
12561 <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>
12564 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12566 Invalid image attributes (bug 62500)
12569 parsoid=wt2html,wt2wt,html2html
12571 [[File:Foobar.jpg|thumb|float|left|caption]]
12573 [[File:Foobar.jpg|thumb|righ|caption]]
12575 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12577 <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>
12578 <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>
12579 <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>
12582 <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>
12583 <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>
12584 <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>
12590 #REDIRECT [[File:Barfoo.jpg]]
12593 # FIXME: Parsoid should run this test -- but we'd need to teach the
12594 # mockAPI about the redirected Barfoo.jpg image.
12598 [[Image:Barfoo.jpg]]
12600 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12605 Missing image with uploads disabled
12609 [[File:Foobaz.jpg]]
12611 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12614 <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>
12617 # Parsoid-specific testing for images
12618 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12619 # Currently imperfect due to a flaw in the Parsoid testrunner
12621 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12625 Parsoid-specific image handling - simple image with size and middle alignment
12627 [[File:Foobar.jpg|middle|50px]]
12629 <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>
12633 Parsoid-specific image handling - simple image with size, middle alignment,
12634 non-standard namespace alias
12636 parsoid=wt2wt,wt2html,html2html
12638 [[Image:Foobar.jpg|middle|50px]]
12640 <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>
12644 Parsoid-specific image handling - simple image with size and middle alignment
12647 [[File:Foobar.jpg|50px|middle]]
12649 <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>
12653 Parsoid-specific image handling - simple image with size and middle alignment
12654 and non-standard namespace name
12656 parsoid=wt2html,wt2wt,html2html
12658 [[Image:Foobar.jpg|50px|middle]]
12660 <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>
12664 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12666 [[File:Foobar.jpg|500x10px|baseline|caption]]
12668 <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>
12672 Parsoid-specific image handling - simple image with border and size spec
12674 [[File:Foobar.jpg|50px|border|caption]]
12676 <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>
12680 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12682 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12684 <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>
12688 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12691 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12693 <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>
12697 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12699 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12701 <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>
12705 Parsoid-specific image handling - thumbnail with specific size, halign,
12706 valign, and caption (existing content)
12708 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12710 <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>
12714 Parsoid-specific image handling - framed image with specific size and caption
12717 parsoid=wt2html,wt2wt,html2html
12719 [[File:Foobar.jpg|frame|500x50px|caption]]
12721 <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>
12725 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12728 parsoid=wt2html,wt2wt,html2html
12730 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12732 <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>
12736 Parsoid-specific image handling - frameless image with specific size, border, and caption
12738 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12740 <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>
12744 Parsoid-specific image handling - simple image with a formatted caption
12746 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12748 <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>
12752 Parsoid-specific image handling - caption with a template in it
12754 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12756 <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>
12760 Parsoid-specific image handling - caption with unbalanced tags in it
12762 parsoid=wt2html,wt2wt,html2html
12765 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12769 <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>
12774 Parsoid-specific image handling - empty caption (1)
12776 parsoid=wt2html,wt2wt
12778 [[File:Foobar.jpg|thumb|]]
12780 <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>
12783 # empty captions don't get serialized unless we're in the "round trip" case
12785 Parsoid-specific image handling - empty caption (2)
12789 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12790 <a href="File:Foobar.jpg">
12791 <img resource="./File:Foobar.jpg"
12792 src="//example.com/images/3/3a/Foobar.jpg"
12793 height="25" width="220"/>
12795 <figcaption></figcaption>
12798 [[File:Foobar.jpg|thumb]]
12802 Parsoid-specific image handling - whitespace caption
12804 [[File:Foobar.jpg|thumb| ]]
12806 <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>
12810 Parsoid-specific image handling - lang option
12813 [[File:Foobar.svg|lang=de|caption]]
12817 <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>
12826 Subpage test/subpage
12834 subpage title=[[Subpage test]]
12838 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12843 Subpage noslash link
12845 subpage title=[[Subpage test]]
12849 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12854 Subpage test/1/2/subpage
12860 Relative subpage noslash link
12862 parsoid=wt2wt,wt2html,html2html
12863 subpage title=[[Subpage test/1/2/3/4]]
12869 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
12870 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
12873 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
12874 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12878 Parsoid: dot-slash prefixed wikilinks
12888 </p><p>[[././baz/]]
12893 </p><p>[[././baz/]]
12898 Render invalid page names as plain text (bug 51090)
12911 [[{{echo|./../foo}}|bar]]
12912 [[{{echo|foo/.}}|bar]]
12913 [[{{echo|foo/..}}|bar]]
12914 [[{{echo|foo~~~~bar}}]]
12915 [[{{echo|foo>bar}}]]
12916 [[{{echo|foo././bar}}]]
12917 [[{{echo|foo{bar}}]]
12918 [[{{echo|foo}bar}}]]
12919 [[{{echo|foo[bar}}]]
12920 [[{{echo|foo]bar}}]]
12921 [[{{echo|foo<bar}}]]
12923 <p>[[./../foo|bar]]
12933 </p><p>[[./../foo|bar]]
12946 <p>[[./../foo|bar]]
12957 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12958 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12959 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12960 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12961 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12962 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12963 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12964 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12965 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12966 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12967 [[<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>
12975 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12980 BUG 561: {{/Subpage}}
12982 subpage title=[[Page]]
12986 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12994 Category:MediaWiki User's Guide
13002 [[:Category:MediaWiki User's Guide]]
13004 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13013 [[Category: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 PAGESINCATEGORY invalid title fatal (r33546 fix)
13021 {{PAGESINCATEGORY:<bogus>}}
13028 Category with different sort key
13032 [[Category:MediaWiki User's Guide|Foo]]
13034 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13038 Category with identical sort key
13042 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13044 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13048 Category with empty sort key
13053 [[Category:MediaWiki User's Guide|]]
13055 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13059 Category with empty sort key and parentheses
13064 [[Category:Foo (bar)|]]
13066 [[Category:Foo (bar)|Foo]]
13070 Category with link tail
13075 123[[Category:Foo]]456
13077 123[[Category:Foo]]456
13081 Category with template
13086 [[Category:{{echo|Foo}}]]
13088 [[Category:{{echo|Foo}}]]
13092 Category with template in sort key
13097 [[Category:Foo|{{echo|Bar}}]]
13099 [[Category:Foo|{{echo|Bar}}]]
13103 Category with template in sort key and title
13108 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13110 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13114 Category / paragraph interactions
13116 Foo [[Category:Baz]] Bar
13118 Foo [[Category:Baz]]
13126 [[Category:Baz]] Bar
13139 {{echo|[[Category:Baz]]}}
13154 Parsoid: Serialize link to category page with colon escape
13160 [[:Category:Foo|Bar]]
13163 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13164 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13169 Parsoid: Link prefix/suffixes aren't applied to category links
13171 parsoid=wt2html,wt2wt,html2html
13176 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
13180 Parsoid: Serialize link to file page with colon escape
13186 [[:File:Foo.png|Bar]]
13189 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
13190 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
13195 Parsoid: Serialize a genuine category link without colon escape
13200 [[Category:Foo|Bar]]
13202 <link rel="mw:PageProp/Category" href="Category:Foo">
13203 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
13207 Normalize hrefs properly before testing for invalid link targets (bug 70894)
13211 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
13213 [[Category:Toxine bactérienne]]
13217 Parsoid: Defaultsort
13219 {{DEFAULTSORT:Foo}}
13221 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
13225 Parsoid: Defaultsort (template-generated)
13227 {{{{echo|DEFAULTSORT}}:Foo}}
13229 <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}}]}'/>
13233 ### Inter-language links
13236 Interlanguage links
13244 es:Alimento fr:Nourriture zh:食品
13246 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
13247 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
13248 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
13252 Duplicate interlanguage links (bug 24502)
13263 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
13264 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
13265 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
13266 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
13273 Basic section headings
13280 ===Smaller headline===
13283 <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>
13286 <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>
13289 <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>
13295 Section headings with TOC
13298 === Subheadline 1 ===
13299 ===== Skipping a level =====
13300 ====== Skipping a level ======
13304 ===Another headline===
13306 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13308 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
13310 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
13312 <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>
13314 <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>
13321 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
13323 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
13329 <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>
13330 <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>
13331 <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>
13332 <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>
13333 <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>
13336 <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>
13341 TOC anchors don't collide
13349 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13351 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
13352 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
13353 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
13354 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
13358 <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>
13359 <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>
13360 <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>
13361 <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>
13365 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
13367 Handling of sections up to level 6 and beyond
13370 == Level 2 Heading==
13371 === Level 3 Heading===
13372 ==== Level 4 Heading====
13373 ===== Level 5 Heading=====
13374 ====== Level 6 Heading======
13375 ======= Level 7 Heading=======
13376 ======== Level 8 Heading========
13377 ========= Level 9 Heading=========
13378 ========== Level 10 Heading==========
13380 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13382 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
13384 <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>
13386 <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>
13388 <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>
13390 <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>
13392 <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>
13393 <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>
13394 <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>
13395 <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>
13396 <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>
13410 <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>
13411 <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>
13412 <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>
13413 <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>
13414 <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>
13415 <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>
13416 <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>
13417 <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>
13418 <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>
13419 <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>
13424 TOC regression (T11764)
13428 ==== title 1.1.1 ====
13433 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13435 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13437 <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>
13439 <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>
13442 <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>
13445 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13447 <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>
13453 <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>
13454 <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>
13455 <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>
13456 <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>
13457 <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>
13458 <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>
13463 TOC with wgMaxTocLevel=3 (bug 6204)
13469 ==== title 1.1.1 ====
13474 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13476 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13478 <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>
13479 <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>
13482 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13484 <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>
13490 <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>
13491 <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>
13492 <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>
13493 <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>
13494 <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>
13495 <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>
13500 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13506 ====Section 1.1.1====
13507 ====Section 1.1.1.1====
13510 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13512 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13514 <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>
13517 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13521 <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>
13522 <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>
13523 <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>
13524 <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>
13525 <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>
13531 Resolving duplicate section names
13536 <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>
13537 <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>
13542 Resolving duplicate section names with differing case (bug 10721)
13547 <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>
13548 <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>
13560 Template with sections, __NOTOC__
13567 <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>
13568 <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>
13569 <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>
13570 <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>
13575 __NOEDITSECTION__ keyword
13581 <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>
13582 <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>
13587 Link inside a section heading
13589 ==Section with a [[Main Page|link]] in it==
13591 <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>
13596 TOC regression (T14077)
13603 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13605 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13607 <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>
13610 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13614 <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>
13615 <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>
13616 <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>
13621 BUG 1219 URL next to image (good)
13623 http://example.com [[File:Foobar.jpg]]
13625 <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>
13628 <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>
13632 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13635 The line above must have a trailing space!
13638 But just in case it doesn't...
13640 <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>
13641 <p>The line above must have a trailing space!
13643 <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>
13644 <p>But just in case it doesn't...
13649 Header with special characters (bug 25462)
13651 The tooltips shall not show entities to the user (ie. be double escaped)
13668 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13670 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13672 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13673 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13674 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13675 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13676 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13680 <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>
13683 <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>
13686 <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>
13689 <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>
13692 <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>
13698 Header with space, plus and underscore as entity
13700 Id should not contain + for spaces
13702 == Space between Text ==
13705 == Space-Entity between Text ==
13708 == Plus+between+Text ==
13711 == Plus-Entity+between+Text ==
13714 == Underscore_between_Text ==
13717 == Underscore-Entity_between_Text ==
13720 [[#Space between Text]]
13721 [[#Space-Entity between Text]]
13722 [[#Plus+between+Text]]
13723 [[#Plus-Entity+between+Text]]
13724 [[#Underscore_between_Text]]
13725 [[#Underscore-Entity_between_Text]]
13727 <p>Id should not contain + for spaces
13729 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13731 <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>
13732 <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>
13733 <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>
13734 <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>
13735 <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>
13736 <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>
13740 <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>
13743 <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>
13746 <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>
13749 <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>
13752 <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>
13755 <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>
13757 </p><p><a href="#Space_between_Text">#Space between Text</a>
13758 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13759 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13760 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13761 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13762 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13767 Headers with excess '=' characters
13768 (Are similar tests necessary beyond the 1st level?)
13772 =''italic'' heading==
13773 ==''italic'' heading=
13775 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13777 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13778 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13779 <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>
13780 <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>
13784 <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>
13785 <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>
13786 <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>
13787 <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>
13792 HTML headers vs TOC (bug 23393)
13793 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13805 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13807 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13809 <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>
13810 <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>
13813 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13815 <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>
13816 <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>
13822 <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>
13823 <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>
13824 <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>
13825 <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>
13826 <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>
13827 <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>
13832 Single-line or multiline-comments can follow headings
13834 parsoid=wt2html,wt2wt
13842 <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>
13843 <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>
13844 <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>
13849 BUG 1219 URL next to image (broken)
13851 http://example.com[[File:Foobar.jpg]]
13853 <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>
13856 <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>
13860 Bug 1186 news: in the middle of text
13862 http://en.wikinews.org/wiki/Wikinews:Workplace
13864 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13870 Namespaced link must have a title
13879 Namespaced link must have a title (bad fragment version)
13881 [[Project:#fragment]]
13883 <p>[[Project:#fragment]]
13889 ### HTML tags and HTML attributes
13893 div with no attributes
13895 <div>HTML rocks</div>
13897 <div>HTML rocks</div>
13902 div with double-quoted attribute
13904 <div id="rock">HTML rocks</div>
13906 <div id="rock">HTML rocks</div>
13911 div with single-quoted attribute
13913 <div id='rock'>HTML rocks</div>
13915 <div id="rock">HTML rocks</div>
13920 div with unquoted attribute
13922 <div id=rock>HTML rocks</div>
13924 <div id="rock">HTML rocks</div>
13929 div with illegal double attributes
13931 <div id="a" id="b">HTML rocks</div>
13933 <div id="b">HTML rocks</div>
13937 # FIXME: produce empty string instead of "class" in the PHP parser, following
13940 div with empty attribute value, space before equals
13944 <div class =>HTML rocks</div>
13946 <div class="">HTML rocks</div>
13951 div with multiple empty attribute values
13955 <div id= title=>HTML rocks</div>
13957 <div id="" title="">HTML rocks</div>
13962 table with multiple empty attribute values
13970 <table title="" id="">
13971 <tbody><tr><td> hi</td></tr>
13976 div with braces in attribute value
13978 <div title="{}">Foo</div>
13980 <div title="{}">Foo</div>
13983 <div title="{}">Foo</div>
13986 # This it very inconsistent in the PHP parser: it returns
13987 # class="class" if there is a space between the name and the equal sign (see
13988 # 'div with empty attribute value, space before equals'), but strips the
13989 # attribute completely if the space is missing. We hope that not much content
13990 # depends on this, so are implementing the behavior below in Parsoid for
13991 # consistencies' sake.
13992 # FIXME: fix this behavior in the PHP parser?
13994 div with empty attribute value, no space before equals
13996 parsoid=wt2html,html2html
13998 <div class=>HTML rocks</div>
14000 <div>HTML rocks</div>
14003 <div class="">HTML rocks</div>
14007 HTML multiple attributes correction
14009 <p class="error" class="awesome">Awesome!</p>
14011 <p class="awesome">Awesome!</p>
14016 Table multiple attributes correction
14019 !+ class="error" class="awesome"| status
14024 <th class="awesome"> status
14032 <DIV ID="x">HTML ROCKS</DIV>
14034 <div id="x">HTML ROCKS</div>
14039 Non-ASCII pseudo-tags are rendered as text
14048 Pseudo-tag with URL 'name' renders as url link
14050 <http://example.com/>
14052 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
14057 text with amp in the middle of nowhere
14061 <p>Remember AT&T?
14066 text with character entity: eacute
14068 I always thought é was a cute letter.
14070 <p>I always thought é was a cute letter.
14073 <p>I always thought é was a cute letter.</p>
14077 text with entity-escaped character entity-like string: eacute
14079 I always thought &eacute; was a cute letter.
14081 <p>I always thought &eacute; was a cute letter.
14086 text with undefined character entity: xacute
14088 I always thought &xacute; was a cute letter.
14090 <p>I always thought &xacute; was a cute letter.
14094 # TODO: generalize to PHP parser?
14100 <data value="5">five</data>
14101 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14102 <mark>This highlighted text</mark>
14104 <p><data value="5">five</data>
14105 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14106 <mark>This highlighted text</mark></p>
14110 HTML tag with leading space is parsed as text
14114 <p>< div>foo< /div>
14119 ### Nesting tests (see bug 41545, 50604, 51081)
14122 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
14123 # Note that html2wt is considerably more difficult if we use <b> in
14124 # the test case, instead of <big>
14126 Ensure that HTML adoption agency algorithm is properly implemented.
14128 <big>X<big>Y</big>Z</big>
14130 <p><big>X<big>Y</big>Z</big>
14134 # This was bug 41545 in the PHP parser.
14135 # Note that tidy doesn't handle this correctly.
14139 <kbd>X<kbd>Y</kbd>Z</kbd>
14141 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14145 # The following cases were bug 51081 in the PHP parser.
14146 # Note that there are some other nestable tags (b, i, etc) which are
14147 # not covered; see bug 51081 for discussion.
14149 # Note that tidy doesn't handle this correctly.
14153 <em>X<em>Y</em>Z</em>
14155 <p><em>X<em>Y</em>Z</em>
14159 # Note that tidy doesn't handle this correctly.
14161 Nesting of <strong>
14163 <strong>X<strong>Y</strong>Z</strong>
14165 <p><strong>X<strong>Y</strong>Z</strong>
14174 <p><q>X<q>Y</q>Z</q></p>
14177 # Note that tidy doesn't handle this correctly.
14181 <ruby>X<ruby>Y</ruby>Z</ruby>
14183 <p><ruby>X<ruby>Y</ruby>Z</ruby>
14187 # Note that tidy doesn't handle this correctly.
14191 <bdo>X<bdo>Y</bdo>Z</bdo>
14193 <p><bdo>X<bdo>Y</bdo>Z</bdo>
14205 [[Media:Foobar.jpg]]
14207 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
14212 Media link with text
14214 [[Media:Foobar.jpg|A neat file to look at]]
14216 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
14220 # FIXME: this is still bad HTML tag nesting
14221 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
14223 Media link with nasty text
14225 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
14227 <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>
14230 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
14231 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
14235 Media link to nonexistent file (bug 1702)
14237 [[Media:No such.jpg]]
14239 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
14244 Image link to nonexistent file (bug 1850 - good)
14246 [[File:No_such.jpg]]
14248 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
14251 <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>
14255 :Image link to nonexistent file (bug 1850 - bad)
14257 [[:Image:No such.jpg]]
14259 <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>
14262 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
14268 Character reference normalization in link text (bug 1938)
14270 [[Main Page|this&that]]
14272 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
14279 Test for unicode normalization
14281 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
14285 (bug 19451) Links should refer to the normalized form.
14293 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14294 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14295 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14296 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14297 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14302 Empty attribute crash test (bug 2067)
14304 <font color="">foo</font>
14306 <p><font color="">foo</font>
14311 Empty attribute crash test single-quotes (bug 2067)
14313 <font color=''>foo</font>
14315 <p><font color="">foo</font>
14320 Attribute test: equals, then nothing
14322 <font color=>foo</font>
14324 <p><font>foo</font>
14329 Attribute test: unquoted value
14331 <font color=x>foo</font>
14333 <p><font color="x">foo</font>
14338 Attribute test: unquoted but illegal value (hash)
14340 <font color=#x>foo</font>
14342 <p><font color="#x">foo</font>
14347 Attribute test: no value
14349 <font color>foo</font>
14351 <p><font color="color">foo</font>
14356 Bug 2095: link with three closing brackets
14360 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
14363 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
14367 Bug 2095: link with pipe and three closing brackets
14369 [[Main Page|link]]]
14371 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
14374 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
14378 Bug 2095: link with pipe and three closing brackets, version 2
14380 [[Main Page|[http://example.com/]]]
14382 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
14385 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
14394 Template:Dangerous attribute
14396 " onmouseover="alert(document.cookie)
14400 Template:Dangerous style attribute
14402 border-size: expression(alert(document.cookie))
14408 <div style="float: right; {{{1}}}">Magic div</div>
14412 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
14414 <div title="{{test}}"></div>
14416 <div title="This is a test template"></div>
14420 # Parsoid has enough context to handle this case
14422 Bug 2304: HTML attribute safety (dangerous template; 2309)
14424 <div title="{{dangerous attribute}}"></div>
14426 <div title=""></div>
14429 <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>
14433 Bug 2304: HTML attribute safety (dangerous style template; 2309)
14435 <div style="{{dangerous style attribute}}"></div>
14437 <div style="/* insecure input */"></div>
14442 Bug 2304: HTML attribute safety (safe parameter; 2309)
14444 {{div style|width: 200px}}
14446 <div style="float: right; width: 200px">Magic div</div>
14451 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
14453 {{div style|width: expression(alert(document.cookie))}}
14455 <div style="/* insecure input */">Magic div</div>
14460 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14462 {{div style|"><script>alert(document.cookie)</script>}}
14464 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14469 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14471 {{div style|" ><script>alert(document.cookie)</script>}}
14473 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14478 Bug 2304: HTML attribute safety (link)
14480 <div title="[[Main Page]]"></div>
14482 <div title="[[Main Page]]"></div>
14487 Bug 2304: HTML attribute safety (italics)
14489 <div title="''foobar''"></div>
14491 <div title="''foobar''"></div>
14496 Bug 2304: HTML attribute safety (bold)
14498 <div title="'''foobar'''"></div>
14500 <div title="'''foobar'''"></div>
14506 Bug 2304: HTML attribute safety (ISBN)
14508 <div title="ISBN 1234567890"></div>
14510 <div title="ISBN 1234567890"></div>
14515 Bug 2304: HTML attribute safety (RFC)
14517 <div title="RFC 1234"></div>
14519 <div title="RFC 1234"></div>
14524 Bug 2304: HTML attribute safety (PMID)
14526 <div title="PMID 1234567890"></div>
14528 <div title="PMID 1234567890"></div>
14533 Bug 2304: HTML attribute safety (web link)
14535 <div title="http://example.com/"></div>
14537 <div title="http://example.com/"></div>
14542 Bug 2304: HTML attribute safety (named web link)
14544 <div title="[http://example.com/ link]"></div>
14546 <div title="[http://example.com/ link]"></div>
14551 Bug 3244: HTML attribute safety (extension; safe)
14553 <div style="<nowiki>background:blue</nowiki>"></div>
14555 <div style="background:blue"></div>
14560 Bug 3244: HTML attribute safety (extension; unsafe)
14562 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14564 <div style="/* insecure input */"></div>
14568 # More MSIE fun discovered by Tom Gilder
14571 MSIE CSS safety test: spurious slash
14573 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14575 <div style="/* insecure input */">evil</div>
14580 MSIE CSS safety test: hex code
14582 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14584 <div style="/* insecure input */">evil</div>
14589 MSIE CSS safety test: comment in url
14591 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14593 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14598 MSIE CSS safety test: comment in expression
14600 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14602 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14607 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14609 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14611 <p style="/* invalid control char */">A</p>
14616 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14618 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14619 <div style="top:EXPRESSION(alert())">B</div>
14621 <p style="/* insecure input */">A</p>
14622 <div style="/* insecure input */">B</div>
14627 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14629 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14630 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14632 <div style="/* insecure input */">A</div>
14633 <p style="/* insecure input */">B</p>
14638 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14640 <div style="background-image:url⁽javascript:alert())">A</div>
14641 <div style="background-image:url₍javascript:alert())">B</div>
14642 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14644 <div style="/* insecure input */">A</div>
14645 <div style="/* insecure input */">B</div>
14646 <p style="/* insecure input */">C</p>
14654 title="data:text/html,<img src=1 onerror=alert(1)>"
14655 style="-o-link:attr(title);-o-link-source:current">X</div>
14657 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14662 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14664 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14665 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14666 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14667 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14668 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14669 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14670 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14672 <p style="/* insecure input */">A</p>
14673 <p style="/* insecure input */">B</p>
14674 <p style="/* insecure input */">C</p>
14675 <p style="/* insecure input */">D</p>
14676 <p style="/* insecure input */">E</p>
14677 <p style="/* insecure input */">F</p>
14678 <p style="/* insecure input */">G</p>
14683 Table attribute legitimate extension
14686 !+ style="<nowiki>color:blue</nowiki>"| status
14691 <th style="color:blue"> status
14697 Table attribute safety
14700 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14705 <th style="/* insecure input */"> status
14711 CSS line continuation 1
14713 <div style="background-image: u\ rl(test.jpg);"></div>
14715 <div style="/* insecure input */"></div>
14720 CSS line continuation 2
14722 <div style="background-image: u\ rl(test.jpg); "></div>
14724 <div style="/* insecure input */"></div>
14735 Expansion of multi-line templates in attribute values (bug 6255)
14737 <div style="background: {{identity|#00FF00}}">-</div>
14739 <div style="background: #00FF00">-</div>
14745 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14747 <div style="background:
14750 <div style="background: #00FF00">-</div>
14753 <div style="background:
14758 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14760 <div style="background: #00FF00">-</div>
14762 <div style="background: #00FF00">-</div>
14767 evil <math>-wiki-tags without Extension:Math enabled
14769 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14771 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14775 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14778 Parser hook: empty input
14791 Parser hook: empty input using terminated empty elements
14804 Parser hook: empty input using terminated empty elements (space before)
14817 Parser hook: basic input
14831 Parser hook: case insensitive
14845 Parser hook: case insensitive, redux
14858 Parser hook: nested tags
14862 <tag><tag></tag></tag>
14873 Parser hook: basic arguments
14875 <tag width=200 height = "100" depth = '50' square></tag>
14883 'square' => 'square',
14890 Parser hook: argument containing a forward slash (bug 5344)
14892 <tag filename='/tmp/bla'></tag>
14897 'filename' => '/tmp/bla',
14904 Parser hook: empty input using terminated empty elements (bug 2374)
14917 # </tag> should be output literally since there is no matching tag that begins it
14919 Parser hook: basic arguments using terminated empty elements (bug 2374)
14921 <tag width=200 height = "100" depth = '50' square/>
14931 'square' => 'square',
14940 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14944 Parser hook: static parser hook not inside a comment
14946 <statictag>hello, world</statictag>
14947 <statictag action=flush/>
14955 Parser hook: static parser hook inside a comment
14957 <!-- <statictag>hello, world</statictag> -->
14958 <statictag action=flush/>
14964 # Nested template calls; this case was broken by Parser.php rev 1.506,
14968 Template:One-parameter
14970 (My parameter is: {{{1}}})
14974 Template:Map-one-parameter
14976 {{{{{1}}}|{{{2}}}}}
14980 Nested template calls
14982 {{Map-one-parameter|One-parameter|param}}
14984 <p>(My parameter is: param)
14993 # HTML+Tidy effectively strips out the empty tags completely
14994 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14995 # which Tidy would have done for the PHP parser had there been content inside it.
14997 Sanitizer: Closing of open tags
14999 <s></s><table></table>
15001 <s></s><table></table>
15004 <p><s></s></p><table></table>
15008 Sanitizer: Closing of open but not closed tags
15017 Sanitizer: Closing of closed but not open tags
15026 Sanitizer: Closing of closed but not open table tags
15028 Table not started</td></tr></table>
15030 <p>Table not started</td></tr></table>
15035 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
15037 <span id="æ: v">byte</span>[[#æ: v|backlink]]
15039 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
15043 # In HTML5, the restrictions are that id must contain at least one character,
15044 # and must not contain any space characters.
15046 Sanitizer: Validating the contents of the id attribute (bug 4515)
15050 <br id="" /><br id="a space" />
15055 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
15057 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
15061 <br id="foo" /><br id="foo" />
15063 Something need to be done. foo-2 ?
15067 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
15070 <meta itemprop="hello" content="world">
15071 <meta http-equiv="refresh" content="5">
15072 <meta itemprop="hello" http-equiv="refresh" content="5">
15073 <link itemprop="hello" href="{{SERVER}}">
15074 <link rel="stylesheet" href="{{SERVER}}">
15075 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
15078 <div itemscope="itemscope">
15079 <p> <meta itemprop="hello" content="world" />
15080 <meta http-equiv="refresh" content="5">
15081 <meta itemprop="hello" content="5" />
15083 <link itemprop="hello" href="http://example.org" />
15084 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
15085 <link itemprop="hello" href="http://example.org" />
15091 Language converter: output gets cut off unexpectedly (bug 5757)
15095 this bit is safe: }-
15097 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
15099 then we get cut off here: }-
15101 all additional text is vanished
15103 <p>this bit is safe: }-
15104 </p><p>but if we add a conversion instance: xxx
15105 </p><p>then we get cut off here: }-
15106 </p><p>all additional text is vanished
15111 Self closed html pairs (bug 5487)
15114 <center><font id="bug" />Centered text</center>
15115 <div><font id="bug2" />In div text</div>
15117 <center><font id="bug" />Centered text</center>
15118 <div><font id="bug2" />In div text</div>
15127 Punctuation: nbsp before exclamation
15131 <p>C'est grave !
15136 Punctuation: CSS !important (bug 11874)
15138 <div style="width:50% !important">important</div>
15140 <div style="width:50% !important">important</div>
15145 Punctuation: CSS ! important (bug 11874; with space after)
15147 <div style="width:50% ! important">important</div>
15149 <div style="width:50% ! important">important</div>
15154 HTML bullet list, closed tags (bug 5497)
15167 <ul data-parsoid='{"stx":"html"}'>
15168 <li data-parsoid='{"stx":"html"}'>One</li>
15169 <li data-parsoid='{"stx":"html"}'>Two</li>
15175 HTML bullet list, unclosed tags (bug 5497)
15187 <ul data-parsoid='{"stx":"html"}'>
15188 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15189 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15195 HTML ordered list, closed tags (bug 5497)
15208 <ol data-parsoid='{"stx":"html"}'>
15209 <li data-parsoid='{"stx":"html"}'>One</li>
15210 <li data-parsoid='{"stx":"html"}'>Two</li>
15216 HTML ordered list, unclosed tags (bug 5497)
15229 <ol data-parsoid='{"stx":"html"}'>
15230 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15231 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15237 HTML nested bullet list, closed tags (bug 5497)
15262 HTML nested bullet list, open tags (bug 5497)
15299 HTML nested ordered list, closed tags (bug 5497)
15324 HTML nested ordered list, open tags (bug 5497)
15361 HTML ordered list item with parameters oddity
15363 <ol><li id="fragment">One</li>
15366 <ol><li id="fragment">One</li>
15371 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
15373 bug 5918: autonumbering
15375 [http://first/] [http://second] [ftp://ftp]
15379 [mailto:enclosed@mail.tld With target]
15381 [mailto:enclosed@mail.tld]
15383 mailto:inline@mail.tld
15385 <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>
15386 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
15387 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
15388 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
15389 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
15392 <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>
15393 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
15394 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
15395 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
15396 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
15401 # Security and HTML correctness
15402 # From Nick Jenkins' fuzz testing
15406 Fuzz testing: Parser13
15421 Fuzz testing: Parser14
15426 <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>
15427 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15429 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15435 <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>
15437 <div id="toc" class="toc">
15438 <div id="toctitle">
15442 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15449 Fuzz testing: Parser14-table
15454 <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>
15455 <table style="__TOC__">
15460 <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>
15461 <table style="__TOC__">
15468 # Known to produce bogus xml (extra </td>)
15470 Fuzz testing: Parser16
15499 Fuzz testing: Parser21
15502 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15507 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15517 Fuzz testing: Parser22
15519 http://===r:::https://b
15523 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15531 # Known to produce bad XML for now
15533 Fuzz testing: Parser24
15540 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15541 <br style="onmouseover='alert(document.cookie);' " />
15543 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15548 <u class="|">}}}} >
15549 <br style="onmouseover='alert(document.cookie);'" />
15551 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15560 # Note: the current result listed for this is not what the original one was,
15561 # but the original bug was JavaScript injection, which is fixed in any case.
15562 # It's not clear that the original result listed was any more correct than the
15563 # current one. Original result:
15566 # <li class="||">
15567 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15569 Fuzz testing: Parser25 (bug 6055)
15575 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15577 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15582 Fuzz testing: URL adjacent extension (with space, clean)
15584 http://example.com <nowiki>junk</nowiki>
15586 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15589 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
15593 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15595 http://example.com<nowiki>junk</nowiki>
15597 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15600 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
15604 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15606 http://example.com<pre>junk</pre>
15608 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15611 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15616 <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>
15620 Fuzz testing: image with bogus manual thumbnail
15622 [[Image:foobar.jpg|thumbnail= ]]
15624 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15627 <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>
15631 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15633 <pre dir=" "></pre>
15635 <pre dir=" "></pre>
15640 Parsing optional HTML elements (Bug 6171)
15645 <td> Some tabular data</td>
15646 <td> More tabular data ...
15647 <td> And yet som tabular data</td>
15653 <td> Some tabular data</td>
15654 <td> More tabular data ...
15655 </td><td> And yet som tabular data</td>
15662 Correct handling of <td>, <tr> (Bug 6171)
15667 <td> Some tabular data</td>
15668 <td> More tabular data ...</td>
15669 <td> And yet som tabular data</td>
15675 <td> Some tabular data</td>
15676 <td> More tabular data ...</td>
15677 <td> And yet som tabular data</td>
15685 Parsing crashing regression (fr:JavaScript)
15689 <p></body></x>
15694 Inline wiki vs wiki block nesting
15700 <p><b>Bold paragraph</b>
15701 </p><p>New wiki paragraph
15705 # FIXME: The current php output is documented
15706 # and desired output is the parsoid target.
15708 Inline HTML vs wiki block nesting
15714 <p><b>Bold paragraph
15715 </p><p>New wiki paragraph</b>
15718 <p><b>Bold paragraph</b>
15719 </p><p>New wiki paragraph
15723 # Original result was this:
15724 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15726 # While that might be marginally more intuitive, maybe, the six-apostrophe
15727 # construct is clearly pathological and the result stated here (which is what
15728 # the parser actually does) is about as reasonable as anything.
15730 Mixing markup for italics and bold
15733 '''bold''''''bold''bolditalics'''''
15735 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15743 Article for special page transclusion test
15747 Special page transclusion
15750 {{Special:Prefixindex/Xyzzyx}}
15752 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15757 Special page transclusion twice (bug 5021)
15760 {{Special:Prefixindex/Xyzzyx}}
15761 {{Special:Prefixindex/Xyzzyx}}
15763 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15764 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15769 Transclusion of default MediaWiki message
15771 {{MediaWiki:Mainpage}}
15778 Transclusion of nonexistent MediaWiki message
15780 {{MediaWiki:Mainpagexxx}}
15782 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15787 Transclusion of MediaWiki message with underscore
15789 {{MediaWiki:history_short}}
15796 Transclusion of MediaWiki message with space
15798 {{MediaWiki:history short}}
15805 Invalid header with following text
15815 Section extraction test (section 0)
15835 Section extraction test (section 1)
15857 Section extraction test (section 2)
15878 Section extraction test (section 3)
15898 Section extraction test (section 4)
15922 Section extraction test (section 5)
15942 Section extraction test (section 6)
15963 Section extraction test (section 7)
15983 Section extraction test (section 8)
16003 Section extraction test (section 9)
16024 Section extraction test (section 10)
16044 Section extraction test (nonexistent section 11)
16063 Section extraction test with bogus heading (section 1)
16068 ==bogus== not a legal section
16072 ==bogus== not a legal section
16076 Section extraction test with bogus heading (section 2)
16081 ==bogus== not a legal section
16088 Section extraction test with comment after heading (section 1)
16100 Section extraction test with comment after heading (section 2)
16112 Section extraction test with bogus <nowiki> heading (section 1)
16117 ==bogus== <nowiki>not a legal section</nowiki>
16121 ==bogus== <nowiki>not a legal section</nowiki>
16125 Section extraction test with bogus <nowiki> heading (section 2)
16130 ==bogus== <nowiki>not a legal section</nowiki>
16137 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16138 # instead of respecting commented sections
16140 Section extraction prefixed by comment (section 1)
16151 Section extraction prefixed by comment (section 2)
16162 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
16163 # instead of respecting HTML-style headings
16165 Section extraction, mixed wiki and html (section 1)
16181 Section extraction, mixed wiki and html (section 2)
16197 # Formerly testing for bug 3342
16199 Section extraction, heading surrounded by <noinclude>
16203 <noinclude>==unmarked==</noinclude>
16209 # Test behavior of bug 19910
16211 Sectiion with all-equals
16216 The line above must have a trailing space
16219 But just in case it doesn't...
16223 But just in case it doesn't...
16227 Section replacement test (section 0)
16258 Section replacement test (section 1)
16287 Section replacement test (section 2)
16317 Section replacement test (section 3)
16348 Section replacement test (section 4)
16375 Section replacement test (section 5)
16406 Section replacement test (section 6)
16436 Section replacement test (section 7)
16467 Section replacement test (section 8)
16498 Section replacement test (section 9)
16527 Section replacement test (section 10)
16557 Section replacement test with initial whitespace (bug 13728)
16561 Preformatted initial line
16565 Preformatted initial line
16572 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16584 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16597 Section extraction, <pre> around bogus header (bug 10309)
16614 Section replacement, <pre> around bogus header (bug 10309)
16616 noxml replace=2,"xxx"
16637 Handling of 
 in URLs
16641 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16644 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16646 a</a></li></ul></li></ul>
16650 Handling of %0A in URLs
16654 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16657 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16661 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16663 5 quotes, code coverage +1 line
16670 <p><b><i></i></b></p>
16673 # same html as previous, but wikitext adjusted to match parsoid html2wt
16674 # note that wt2html and html2html will put the <i> before the <b>
16676 5 quotes, code coverage +1 line w/ nowiki (1)
16678 parsoid=wt2wt,html2wt
16680 '''''<nowiki/>'''''
16685 <p><b><i></i></b></p>
16688 # same as previous, just swapping the <i> and <b>
16690 5 quotes, code coverage +1 line w/ nowiki (2)
16692 '''''<nowiki/>'''''
16697 <p><i><b></b></i></p>
16701 Special:Search page linking.
16705 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16710 {{!}} is a magic word
16712 {{!}} is a magic word there and {{!}} is still a magic word here
16714 <p>| is a magic word there and | is still a magic word here
16717 <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>
16723 title=[[Parser test]]
16728 * {{FULLPAGENAMEE}}
16730 * {{BASEPAGENAMEE}}
16734 * {{ROOTPAGENAMEE}}
16736 * {{TALKPAGENAMEE}}
16737 * {{SUBJECTPAGENAME}}
16738 * {{SUBJECTPAGENAMEE}}
16741 * {{NAMESPACENUMBER}}
16745 * {{SUBJECTSPACEE}}
16746 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16748 <ul><li> Parser test</li>
16749 <li> Parser_test</li>
16750 <li> Parser test</li>
16751 <li> Parser_test</li>
16752 <li> Parser test</li>
16753 <li> Parser_test</li>
16754 <li> Parser test</li>
16755 <li> Parser_test</li>
16756 <li> Parser test</li>
16757 <li> Parser_test</li>
16758 <li> Talk:Parser test</li>
16759 <li> Talk:Parser_test</li>
16760 <li> Parser test</li>
16761 <li> Parser_test</li>
16769 <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>
16772 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16782 image4 |300px| centre
16783 image5.svg| http://///////
16788 <ul class="gallery mw-gallery-traditional">
16789 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16790 <div class="thumb" style="height: 150px;">Image1.png</div>
16791 <div class="gallerytext">
16794 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16795 <div class="thumb" style="height: 150px;">Image2.gif</div>
16796 <div class="gallerytext">
16801 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16802 <div class="thumb" style="height: 150px;">Image3</div>
16803 <div class="gallerytext">
16806 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16807 <div class="thumb" style="height: 150px;">Image4</div>
16808 <div class="gallerytext">
16813 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16814 <div class="thumb" style="height: 150px;">Image5.svg</div>
16815 <div class="gallerytext">
16816 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16820 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16821 <div class="thumb" style="height: 150px;">* image6</div>
16822 <div class="gallerytext">
16830 Gallery (with options)
16832 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16833 File:Nonexistent.jpg|caption
16834 File:Nonexistent.jpg
16835 image:foobar.jpg|some '''caption''' [[Main Page]]
16837 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16840 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16841 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16842 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16843 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16844 <div class="gallerytext">
16849 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16850 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16851 <div class="gallerytext">
16854 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16855 <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>
16856 <div class="gallerytext">
16857 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16861 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16862 <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>
16863 <div class="gallerytext">
16866 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16867 <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>
16868 <div class="gallerytext">
16878 Gallery with link that has fragment
16881 image:foobar.jpg|link=Main_Page
16882 image:foobar.jpg|link=Main_Page#section
16883 image:foobar.jpg|link=Main Page#section|caption
16886 <ul class="gallery mw-gallery-traditional">
16887 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16888 <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>
16889 <div class="gallerytext">
16892 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16893 <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>
16894 <div class="gallerytext">
16897 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16898 <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>
16899 <div class="gallerytext">
16909 Gallery with wikitext inside caption
16912 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16913 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16916 <ul class="gallery mw-gallery-traditional">
16917 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16918 <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>
16919 <div class="gallerytext">
16920 <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>
16924 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16925 <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>
16926 <div class="gallerytext">
16927 <p>This is a test template
16936 gallery (with showfilename option)
16938 <gallery showfilename>
16939 File:Nonexistent.jpg|caption
16940 File:Nonexistent.jpg
16941 image:foobar.jpg|some '''caption''' [[Main Page]]
16945 <ul class="gallery mw-gallery-traditional">
16946 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16947 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16948 <div class="gallerytext">
16949 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16954 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16955 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16956 <div class="gallerytext">
16957 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16961 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16962 <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>
16963 <div class="gallerytext">
16964 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16965 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16969 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16970 <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>
16971 <div class="gallerytext">
16972 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16981 Gallery (with namespace-less filenames)
16984 File:Nonexistent.jpg
16990 <ul class="gallery mw-gallery-traditional">
16991 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16992 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16993 <div class="gallerytext">
16996 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16997 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16998 <div class="gallerytext">
17001 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17002 <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>
17003 <div class="gallerytext">
17006 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17007 <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>
17008 <div class="gallerytext">
17016 HTML Hex character encoding (spells the word "JavaScript")
17018 parsoid=wt2html,wt2wt,html2html
17020 JavaScript
17022 <p>JavaScript
17027 <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>
17031 HTML Hex character encoding bogus encoding (bug 26437 regression check)
17035 <p>&#xsee;&#XSEE;
17038 <p>&#xsee;&#XSEE;</p>
17042 HTML Hex character encoding mixed case
17044 parsoid=wt2html,wt2wt,html2html
17053 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
17057 __FORCETOC__ override
17069 ISBN 978-0-1234-56 789
17071 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
17074 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
17076 <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>
17080 ISBN followed by 5 spaces
17091 ISBN ISBN 1234567890
17093 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17096 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
17106 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
17107 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
17108 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
17111 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
17112 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
17113 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
17117 ISBN with empty prefix (parsoid test)
17121 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17124 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17128 Bug 22905: <abbr> followed by ISBN followed by </a>
17130 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17132 <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>
17135 <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>
17143 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
17148 Double RFC with a wiki link
17152 <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>
17161 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
17164 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
17168 Centre-aligned image
17170 [[Image:foobar.jpg|centre]]
17172 <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>
17179 [[Image:foobar.jpg|none]]
17181 <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>
17186 Width + Height sized image (using px) (height is ignored)
17188 [[Image:foobar.jpg|640x480px]]
17190 <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>
17195 Width-sized image (using px, no following whitespace)
17197 [[Image:foobar.jpg|640px]]
17199 <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>
17204 Width-sized image (using px, with following whitespace - test regression from r39467)
17206 [[Image:foobar.jpg|640px ]]
17208 <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>
17213 Width-sized image (using px, with preceding whitespace - test regression from r39467)
17215 [[Image:foobar.jpg| 640px]]
17217 <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>
17222 Image with page parameter
17226 [[File:LoremIpsum.djvu|page=2]]
17228 <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>
17231 <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>
17235 Another italics / bold test
17243 # FIXME: The php output seems broken. It's interleaving some open/close tags.
17249 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
17252 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
17257 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
17259 Images with the "|" character in the comment
17261 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
17263 <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>
17266 <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>
17270 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
17272 <html><script>alert(1);</script></html>
17274 <p><html><script>alert(1);</script></html>
17279 HTML with raw HTML ($wgRawHtml==true)
17283 <html><script>alert(1);</script></html>
17285 <p><script>alert(1);</script>
17290 Parents of subpages, one level up
17292 subpage title=[[Subpage test/L1/L2/L3]]
17296 <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>
17302 Parents of subpages, one level up, not named
17304 subpage title=[[Subpage test/L1/L2/L3]]
17308 <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>
17315 Parents of subpages, two levels up
17317 subpage title=[[Subpage test/L1/L2/L3]]
17323 <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
17324 </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>
17329 Parents of subpages, two levels up, without trailing slash or name.
17331 subpage title=[[Subpage test/L1/L2/L3]]
17340 Parents of subpages, two levels up, with lots of extra trailing slashes.
17342 subpage title=[[Subpage test/L1/L2/L3]]
17346 <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>
17351 Subpage test/L1/L2/L3Sibling
17357 Transclusion of a sibling page (one level up)
17359 subpage title=[[Subpage test/L1/L2/L3]]
17368 Transclusion of a child page
17370 subpage title=[[Subpage test/L1/L2]]
17379 Non-transclusion because of too many up levels
17381 subpage title=[[Subpage test/L1/L2/L3]]
17383 {{../../../../More than parent}}
17385 <p>{{../../../../More than parent}}
17390 Definition list code coverage
17396 <dl><dt> title  </dt>
17398 <dt> title </dt>
17404 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17405 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17406 <dt>title</dt><dd> def</dd></dl>
17410 Don't fall for the self-closing div
17412 <div>hello world</div/>
17414 <div>hello world</div>
17423 <p>[[:Template:Msg]]
17432 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
17436 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
17438 Always escape literal '>' in output, not just after '<'
17452 <p>This is a test template
17453 This is a test template
17465 Inclusion of !userCanEdit() content
17469 <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>
17475 Out-of-order TOC heading levels
17484 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17486 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17488 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17489 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17492 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17494 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17495 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17501 <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>
17502 <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>
17503 <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>
17504 <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>
17505 <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>
17506 <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>
17512 ISBN with a dummy number
17522 ISBN with space-delimited number
17526 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17532 ISBN with multiple spaces, no number
17551 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17552 </p><p>ISBN 12345678901
17558 ISBN with trailing year (bug 8110)
17560 ISBN 1-234-56789-0 - 2006
17562 ISBN 1 234 56789 0 - 2006
17564 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17565 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17573 {{anchorencode:foo bar©#%n}}
17575 <p>foo_bar.C2.A9.23.25n
17580 anchorencode trims spaces
17582 {{anchorencode: __pretty__please__}}
17589 anchorencode deals with links
17591 {{anchorencode: [[hello|world]] [[hi]]}}
17598 anchorencode deals with templates
17600 {{anchorencode: {{Foo}} }}
17607 anchorencode encodes like the TOC generator: (bug 18431)
17609 === _ +:.3A%3A&&]] ===
17610 {{anchorencode: _ +:.3A%3A&&]] }}
17613 <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>
17614 <p>.2B:.3A.253A.26.26.5D.5D
17619 Bug 6200: blockquotes and paragraph formatting
17640 Bug 8293: Use of center tag ruins paragraph formatting
17661 Parsing of overlapping (improperly nested) inline html tags
17663 <span><s>x</span></s>
17665 <p><span><s>x</span></s></span>
17668 <p><span><s>x</s></span>
17673 ### Language variants related tests
17676 Self-link in language variants
17678 title=[[Dunav]] language=sr
17680 Both [[Dunav]] and [[Дунав]] are names for this river.
17682 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17693 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17695 title=[[Duna]] language=sr
17697 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17699 <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.
17704 Link to a section of a variant of this title shouldn't be parsed as self-link
17706 title=[[Duna]] language=sr
17708 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17710 <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.
17715 Link to pages in language variants
17719 Main Page can be written as [[Маин Паге]]
17721 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17727 Multiple links to pages in language variants
17731 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17733 <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>.
17739 Simple template in language variants
17745 <p>This is a test template
17751 Template with explicit namespace in language variants
17757 <p>This is a test template
17763 Basic test for template parameter in language variants
17767 {{парамтест|param=foo}}
17769 <p>This is a test template with parameter foo
17775 Simple category in language variants
17779 [[Category:МедиаWики Усер'с Гуиде]]
17781 <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>
17798 Don't convert blue categorylinks to another variant (bug 33210)
17802 [[A]][[Category:分类]]
17804 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17809 Stripping -{}- tags (language variants)
17813 Latin proverb: -{Ne nuntium necare}-
17815 <p>Latin proverb: Ne nuntium necare
17821 Prevent conversion with -{}- tags (language variants)
17823 language=sr variant=sr-ec
17825 Latinski: -{Ne nuntium necare}-
17827 <p>Латински: Ne nuntium necare
17833 Prevent conversion of text with -{}- tags (language variants)
17835 language=sr variant=sr-ec
17837 Latinski: -{Ne nuntium necare}-
17839 <p>Латински: Ne nuntium necare
17845 Prevent conversion of links with -{}- tags (language variants)
17847 language=sr variant=sr-ec
17851 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17857 -{}- tags within headlines (within html for parserConvert())
17859 language=sr variant=sr-ec
17863 <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>
17869 Explicit definition of language variant alternatives
17871 language=zh variant=zh-tw
17873 -{zh:China;zh-tw:Taiwan}-, not China
17875 <p>Taiwan, not China
17881 Conversion around HTML tags
17883 language=sr variant=sr-ec
17885 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17886 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17889 <span title="ЛаCтин">ски</span>
17895 Explicit session-wise language variant mapping (A flag and - flag)
17897 language=zh variant=zh-tw
17899 Taiwan is not China.
17900 But -{A|zh:China;zh-tw:Taiwan}- is China,
17901 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17902 and -{China}- is China.
17904 <p>Taiwan is not China.
17905 But Taiwan is Taiwan,
17906 (This should be stripped!)
17907 and China is China.
17912 Explicit session-wise language variant mapping (H flag for hide)
17914 language=zh variant=zh-tw
17916 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17919 <p>(This should be stripped!)
17925 Adding explicit conversion rule for title (T flag)
17927 language=zh variant=zh-tw showtitle
17929 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17932 <p>Should be stripped!
17937 Testing that changing the language variant here in the tests actually works
17939 language=zh variant=zh showtitle
17941 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17944 <p>Should be stripped!
17949 Recursive conversion of alt and title attrs shouldn't clear converter state
17951 language=zh variant=zh-cn showtitle
17953 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17954 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17958 Should be stripped<span title="Exclamation">!</span>
17963 Bug 24072: more test on conversion rule for title
17965 language=zh variant=zh-tw showtitle
17967 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17968 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17971 <p>This should be stripped!
17972 This won't take interferes with the title rule.
17977 Partly disable title conversion if variant == main language code
17979 language=zh variant=zh title=[[ZH]] showtitle
17981 -{T|zh-cn:CN;zh-tw:TW}-
17989 Partly disable title conversion if variant == main language code, more
17991 language=zh variant=zh title=[[ZH]] showtitle
18001 Raw output of variant escape tags (R flag)
18003 language=zh variant=zh-tw
18005 Raw: -{R|zh:China;zh-tw:Taiwan}-
18007 <p>Raw: zh:China;zh-tw:Taiwan
18012 Nested using of manual convert syntax
18014 language=zh variant=zh-hk
18016 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
18018 <p>Nested: Hello Hong Kong!
18023 Proper conversion of text in external links
18025 language=sr variant=sr-ec
18027 http://www.google.com
18028 gopher://www.google.com
18029 [http://www.google.com http://www.google.com]
18030 [gopher://www.google.com gopher://www.google.com]
18031 [https://www.google.com irc://www.google.com]
18032 [ftp://www.google.com www.google.com/ftp://dir]
18033 [//www.google.com www.google.com]
18035 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18036 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18037 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18038 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18039 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
18040 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
18041 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
18046 Do not convert roman numbers to language variants
18048 language=sr variant=sr-ec
18052 <p>Фридрих IV је цар.
18057 Unclosed language converter markup "-{"
18068 Don't convert raw rule "-{R|=>}-" to "=>"
18079 Don't break link parsing if language converter markup is in the caption.
18081 language=sr variant=sr-ec
18083 [[Main Page|-{R|main page}-]]
18085 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
18089 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18091 Don't break image parsing if language converter markup is in the caption.
18095 [[File:Foobar.jpg|-{R|caption}-]]
18097 <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>
18101 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18103 Don't break list handling if language converter markup is in the item.
18105 language=zh variant=zh-cn
18107 ;-{zh-cn:AAA;zh-tw:BBB}-
18109 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
18116 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18118 Don't break table handling if language converter markup is in the cell.
18120 language=sr variant=sr-ec
18143 Bug 529: Uncovered bullet
18152 # Plain MediaWiki does not remove empty lists, but tidy actually does.
18153 # Templates in Wikipedia rely on this behavior, as tidy has always been
18154 # enabled there. These tests are normally run *without* tidy, so specify the
18155 # full output here.
18156 # To test realistic parsing behavior, apply a tidy-like transformation to both
18157 # the expected output and your parser's output.
18159 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
18161 ******* Foo {{bullet}}
18163 <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>
18169 Bug 529: Uncovered table already at line-start
18192 Bug 529: Uncovered bullet in parser function result
18194 * Foo {{lc:{{bullet}} }}
18202 Bug 5678: Double-parsed template argument
18204 {{lc:{{{1}}}|hello}}
18211 Bug 5678: Double-parsed template invocation
18213 {{lc:{{paramtest {{!}} param = hello }} }}
18215 <p>{{paramtest | param = hello }}
18220 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
18223 title=[[Main Page]]
18225 {{PRVNÍVELKÉ:ěščř}}
18226 {{prvnívelké:ěščř}}
18246 Morwen/13: Unclosed link followed by heading
18253 <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>
18258 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
18265 <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>
18270 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
18277 <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>
18292 Paragraphs inside divs (no extra line breaks)
18304 Paragraphs inside divs (extra line break on open)
18319 Paragraphs inside divs (extra line break on close)
18334 Paragraphs inside divs (extra line break on open and close)
18351 Nesting tags, paragraphs on lines which begin with <div>
18353 <div></div><strong>A
18356 <p><strong>A</strong></p>
18357 <p><strong>B</strong></p>
18365 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
18367 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
18369 <blockquote>Line one
18371 Line two</blockquote>
18373 <blockquote>Line one
18374 Line two</blockquote>
18378 <p>Line one Line two</p>
18383 Bug 6200: paragraphs inside blockquotes (extra line break on open)
18388 Line two</blockquote>
18393 Line two</blockquote>
18398 Line two</blockquote>
18402 Bug 6200: paragraphs inside blockquotes (extra line break on close)
18404 <blockquote>Line one
18409 <blockquote>Line one
18422 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
18444 Paragraphs inside blockquotes/divs (no extra line breaks)
18446 <blockquote><div>Line one
18448 Line two</div></blockquote>
18450 <blockquote><div>Line one
18451 Line two</div></blockquote>
18456 Paragraphs inside blockquotes/divs (extra line break on open)
18461 Line two</div></blockquote>
18466 Line two</div></blockquote>
18471 Paragraphs inside blockquotes/divs (extra line break on close)
18473 <blockquote><div>Line one
18476 </div></blockquote>
18478 <blockquote><div>Line one
18481 </div></blockquote>
18486 Paragraphs inside blockquotes/divs (extra line break on open and close)
18492 </div></blockquote>
18498 </div></blockquote>
18503 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18505 wgLinkHolderBatchSize=0
18511 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18512 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18513 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18518 Free external link invading image caption
18520 [[Image:Foobar.jpg|thumb|http://x|hello]]
18522 <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>
18527 Bug 15196: localised external link numbers
18531 [http://en.wikipedia.org/]
18533 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18536 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18540 Multibyte character in padleft
18542 {{padleft:-Hello|7|Æ}}
18549 Multibyte character in padright
18551 {{padright:Hello-|7|Æ}}
18558 formatdate parser function
18560 {{#formatdate:2009-03-24}}
18562 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18567 formatdate parser function, with default format
18569 {{#formatdate:2009-03-24|mdy}}
18571 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18576 Spacing of numbers in formatted dates
18578 {{#formatdate:January 15}}
18580 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18585 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
18587 language=nl title=[[MediaWiki:Common.css]]
18589 {{#formatdate:2009-03-24|dmy}}
18591 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18604 Edit comment with link
18608 I like the [[Main Page]] a lot
18610 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18614 Edit comment with link and link text
18618 I like the [[Main Page|best pages]] a lot
18620 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18624 Edit comment with link and link text with suffix
18628 I like the [[Main Page|best page]]s a lot
18630 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18634 Edit comment with section link (non-local, eg in history list)
18636 comment title=[[Main Page]]
18638 /* External links */ removed bogus entries
18640 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18644 Edit comment with section link and text before it (non-local, eg in history list)
18646 comment title=[[Main Page]]
18648 pre-comment text /* External links */ removed bogus entries
18650 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>
18654 Edit comment with section link (local, eg in diff view)
18656 comment local title=[[Main Page]]
18658 /* External links */ removed bogus entries
18660 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18664 Edit comment with subpage link (bug 14080)
18668 title=[[Subpage test]]
18670 Poked at a [[/subpage]] here...
18672 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18676 Edit comment with subpage link and link text (bug 14080)
18680 title=[[Subpage test]]
18682 Poked at a [[/subpage|neat little page]] here...
18684 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18688 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18691 title=[[Subpage test]]
18693 Poked at a [[/subpage]] here...
18695 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18699 Edit comment with bare anchor link (local, as on diff)
18703 title=[[Main Page]]
18707 <a href="#section">#section</a>
18711 Edit comment with bare anchor link (non-local, as on history)
18714 title=[[Main Page]]
18718 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18722 Anchor starting with underscore
18726 <p><a href="#_ref">One</a>
18731 Id starting with underscore
18733 <div id="_ref"></div>
18735 <div id="_ref"></div>
18740 Space normalisation on autocomment (bug 22784)
18743 title=[[Main Page]]
18745 /* __hello__world__ */
18747 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18751 percent-encoding and + signs in comments (Bug 26410)
18755 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18757 <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>
18760 # Parsoid doesn't support this yet: see bug 73581
18761 # but it *should* omit the 'src' attribute if the image is bad.
18762 # PHP side of tests was disabled in
18763 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
18764 # because of issues in the PHP parserTests infrastructure
18765 # (but the output below is indeed what the PHP side emits)
18767 Bad images - basic functionality
18770 !! DISABLED/html/php
18772 <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>
18776 Bad images - bug 16039: text after bad image disappears
18781 !! DISABLED/html/php
18787 <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>
18792 Verify that displaytitle works (bug #22501) no displaytitle
18796 wgAllowDisplayTitle=true
18797 wgRestrictDisplayTitle=false
18799 this is not the the title
18802 <p>this is not the the title
18807 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18812 wgAllowDisplayTitle=true
18813 wgRestrictDisplayTitle=false
18815 this is not the the title
18816 {{DISPLAYTITLE:whatever}}
18819 <p>this is not the the title
18824 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18829 wgAllowDisplayTitle=true
18830 wgRestrictDisplayTitle=true
18832 this is not the the title
18833 {{DISPLAYTITLE:whatever}}
18836 <p>this is not the the title
18841 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18846 wgAllowDisplayTitle=true
18847 wgRestrictDisplayTitle=true
18849 this is not the the title
18850 {{DISPLAYTITLE:screen}}
18853 <p>this is not the the title
18858 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18863 wgAllowDisplayTitle=false
18865 this is not the the title
18866 {{DISPLAYTITLE:screen}}
18869 <p>this is not the the title
18870 <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>
18875 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18880 wgAllowDisplayTitle=false
18882 this is not the the title
18885 <p>this is not the the title
18890 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18895 wgAllowDisplayTitle=true
18896 wgRestrictDisplayTitle=true
18898 this is not the the title
18899 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18901 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18902 <p>this is not the the title
18907 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18912 wgAllowDisplayTitle=true
18913 wgRestrictDisplayTitle=true
18915 this is not the the title
18916 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18918 <span style="color: red;">s</span>creen
18919 <p>this is not the the title
18924 preload: check <noinclude> and <includeonly>
18928 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18934 preload: check <onlyinclude>
18938 Goodbye <onlyinclude>Hello world</onlyinclude>
18944 preload: can pass tags through if we want to
18948 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18950 <includeonly>Hello world</includeonly>
18954 preload: check that it doesn't try to do tricks
18958 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18960 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18964 Play a bit with r67090 and bug 3158
18966 <div style="width:50% !important"> </div>
18967 <div style="width:50% !important"> </div>
18968 <div style="width:50% !important"> </div>
18969 <div style="border : solid;"> </div>
18971 <div style="width:50% !important"> </div>
18972 <div style="width:50% !important"> </div>
18973 <div style="width:50% !important"> </div>
18974 <div style="border : solid;"> </div>
18977 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18978 <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>
18979 <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>
18980 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18985 HTML5 data attributes
18987 <span data-foo="bar">Baz</span>
18988 <p data-abc-def_hij="">Quuz</p>
18990 <p><span data-foo="bar">Baz</span>
18992 <p data-abc-def_hij="">Quuz</p>
18997 percent-encoding and + signs in internal links (Bug 26410)
18999 [[User:+%]] [[Page+title%]]
19000 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
19001 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
19002 [[%33%45]] [[%33%45+]]
19004 <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>
19005 <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>
19006 <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>
19007 <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>
19010 <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>
19014 Special characters in embedded file links (bug 27679)
19016 [[File:Contains & ampersand.jpg]]
19017 [[File:Does not exist.jpg|Title with & ampersand]]
19019 <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>
19020 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
19023 <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>
19024 <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>
19028 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
19030 Text's been normalized?
19032 <p>Text's been normalized?
19037 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
19039 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
19041 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
19046 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
19048 [http://www.example.org/ ideograms]
19050 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
19055 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
19057 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
19059 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
19083 Bug 31098 Template which includes system messages which includes the template
19087 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
19088 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
19093 Bug31490 Turkish: ucfirst 'blah'
19104 Bug31490 Turkish: ucfirst 'ix'
19115 Bug31490 Turkish: lcfirst 'BLAH'
19126 Bug31490 Turkish: ucfırst (with a dotless i)
19132 <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>
19137 Bug31490 ucfırst (with a dotless i) with English language
19143 <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>
19148 Bug 26375: TOC with italics
19150 title=[[Main Page]]
19153 == ''Lost'' episodes ==
19155 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19157 <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>
19161 <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>
19166 Bug 26375: TOC with bold
19168 title=[[Main Page]]
19171 == '''should be bold''' then normal text ==
19173 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19175 <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>
19179 <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>
19184 Bug 33845: Headings become cursive in TOC when they contain an image
19186 title=[[Main Page]]
19189 == Image [[Image:foobar.jpg]] ==
19191 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19193 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
19197 <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>
19202 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
19204 title=[[Main Page]]
19207 == <blockquote>Quote</blockquote> ==
19209 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19211 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19215 <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>
19219 <div id="toc" class="toc">
19220 <div id="toctitle">
19224 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19228 <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>
19230 <p><span class="mw-headline" id="Quote">Quote</span></p>
19232 <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>
19236 Unclosed tags in TOC
19238 title=[[Main Page]]
19242 <small>Hanc marginis exiguitas non caperet.</small>
19245 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19247 <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>
19251 <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>
19252 <p><small>Hanc marginis exiguitas non caperet.</small>
19258 Multiple tags in TOC
19261 == <i>Foo</i> <b>Bar</b> ==
19263 == <i>Foo</i> <blockquote>Bar</blockquote> ==
19265 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19267 <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>
19268 <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>
19272 <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>
19273 <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>
19277 <div id="toc" class="toc">
19278 <div id="toctitle">
19282 <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>
19283 <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>
19287 <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>
19288 <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>
19290 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
19292 <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>
19296 Tags with parameters in TOC
19299 == <sup class="in-h2">Hello</sup> ==
19301 == <sup class="a > b">Evilbye</sup> ==
19303 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19305 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
19306 <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>
19310 <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>
19311 <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>
19316 span tags with directionality in TOC
19319 == <span dir="ltr">C++</span> ==
19321 == <span dir="rtl">זבנג!</span> ==
19323 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
19325 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
19327 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
19329 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19331 <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>
19332 <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>
19333 <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>
19334 <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>
19335 <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>
19339 <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>
19340 <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>
19341 <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>
19342 <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>
19343 <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>
19348 Bug 72884: bdi element in ToC
19351 == <bdi>test</bdi> ==
19353 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19355 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
19359 <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>
19363 # Note that the html output does not have the <p></p>, but the
19364 # html+tidy output *does*. This is because the empty <p></p> is
19365 # removed by the sanitizer, but only when tidy is *not* enabled (!).
19367 Empty <p> tag in TOC, removed by Sanitizer (T92892)
19372 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19374 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
19378 <h2><a href="#x" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="x">x</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: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19382 <div id="toc" class="toc">
19383 <div id="toctitle">
19387 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
19391 <h2><a href="#x" class="mw-headline-anchor" aria-hidden="true" title="Link to this section">§</a><span class="mw-headline" id="x">x</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: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19397 == {{int:headline_sample}} ==
19401 Bug 32057: Title needed when expanding <h> nodes.
19403 title=[[Main Page]]
19407 <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>
19412 Strip marker in urlencode
19414 {{urlencode:x<nowiki/>y}}
19415 {{urlencode:x<nowiki/>y|wiki}}
19416 {{urlencode:x<nowiki/>y|path}}
19443 Strip marker in formatNum
19445 {{formatnum:1<nowiki/>2}}
19446 {{formatnum:1<nowiki/>2|R}}
19454 Check noCommafy in formatNum
19458 {{formatnum:123456.78}}
19459 {{formatnum:123456.78|NOSEP}}
19467 Wrong option for formatNum (bug 56199)
19469 {{formatnum:1,234.56|Random}}
19470 {{formatnum:1,234.56|EVERYTHING}}
19471 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
19480 Strip marker in grammar
19484 {{grammar:elative|foo<nowiki/>bar}}
19491 Strip marker in padleft
19493 {{padleft:|2|x<nowiki/>y}}
19500 Strip marker in padright
19502 {{padright:|2|x<nowiki/>y}}
19509 Strip marker in anchorencode
19511 {{anchorencode:x<nowiki/>y}}
19518 nowiki inside link inside heading (bug 18295)
19520 ==[[foo|x<nowiki>y</nowiki>z]]==
19522 <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>
19527 new support for bdi element (bug 31817)
19529 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19531 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19536 Ignore pipe between table row attributes
19540 |- id=foo | style='color: red'
19548 <tr id="foo" style="color: red">
19555 Gallery override link with WikiLink (bug 34852)
19558 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19561 <ul class="gallery mw-gallery-traditional">
19562 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19563 <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>
19564 <div class="gallerytext">
19574 Gallery override link with absolute external link (bug 34852)
19577 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19580 <ul class="gallery mw-gallery-traditional">
19581 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19582 <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>
19583 <div class="gallerytext">
19593 Gallery override link with malicious javascript (bug 34852)
19596 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19599 <ul class="gallery mw-gallery-traditional">
19600 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19601 <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>
19602 <div class="gallerytext">
19612 Gallery with invalid title as link (bug 43964)
19615 File:foobar.jpg|link=<
19618 <ul class="gallery mw-gallery-traditional">
19619 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19620 <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>
19621 <div class="gallerytext">
19629 Language parser function
19638 Padleft and padright as substr
19640 {{padleft:|3|abcde}}
19641 {{padright:|3|abcde}}
19649 Special parser function
19651 {{#special:RandomPage}}
19652 {{#special:BaDtItLe}}
19653 {{#special:Foobar}}
19662 Bug 34939 - Case insensitive link parsing ([HttP://])
19664 [HttP://MediaWiki.Org/]
19666 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19669 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19673 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19675 [HttP://MediaWiki.Org/ MediaWiki]
19677 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19682 Bug 34939 - Case insensitive link parsing (HttP://)
19684 HttP://MediaWiki.Org/
19686 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19689 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19707 <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>
19708 <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>
19709 <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>
19710 <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>
19711 <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>
19717 ### Parsoid-specific tests
19718 ### Parsoid-PHP parser incompatibilities
19721 1. SOL-sensitive wikitext tokens as template-args
19723 parsoid=wt2html,wt2wt
19729 <span about="#mwt1" typeof="mw:Transclusion">
19730 </span><ul about="#mwt1"><li>a</li>
19732 <span about="#mwt2" typeof="mw:Transclusion">
19733 </span><ol about="#mwt2"><li>a</li>
19735 <span about="#mwt3" typeof="mw:Transclusion">
19736 </span><dl about="#mwt3"><dd>a</dd>
19740 #### -----------------------------------------------------------------
19741 #### Parsoid-specific functionality tests
19742 #### -----------------------------------------------------------------
19744 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19745 # We know wt2wt will fail, but we expect selser to pass.
19746 # Due to the nature of our testing, wt2wt and selser tests will enter the
19747 # blacklist and we'll catch selser regressions based on changes to the
19748 # blacklist entries for selser tests.
19750 1. Bad treebuilder fixup of formatting elt is cleaned up
19752 parsoid=wt2html,wt2wt
19757 [[Image:Foobar.jpg|right|Test]]
19764 <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>
19771 2. Bad treebuilder fixup of formatting elt is cleaned up
19773 parsoid=wt2html,wt2wt
19775 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19777 <small>[[Image:Foobar.jpg|right|300px]]</small>
19780 <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>
19782 <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>
19785 #### ----------------------------------------------------------------
19786 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19787 #### tags. Parsoid's output for these tags differs from that of the
19789 #### ----------------------------------------------------------------
19792 Ref: 1. ref-location should be replaced with an index span
19797 B <ref name="x">foo</ref>
19801 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
19802 B <span about="#mwt4" class="reference" id="cite_ref-x_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-2"},"attrs":{"name":"x"}}'><a href="#cite_note-x-2">[2]</a></span>
19803 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>
19804 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
19805 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
19806 <li about="#cite_note-x-2" id="cite_note-x-2"><span rel="mw:referencedBy"><a href="#cite_ref-x_2-0">↑</a></span> <span id="mw-reference-text-cite_note-x-2" class="mw-reference-text">foo</span></li>
19807 <li about="#cite_note-y-3" id="cite_note-y-3"><span rel="mw:referencedBy"><a href="#cite_ref-y_3-0">↑</a></span> <span id="mw-reference-text-cite_note-y-3" class="mw-reference-text"></span></li>
19812 Ref: 2. ref-tags with identical names should all get the same index
19816 A <ref name="x">foo</ref>
19820 <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":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19821 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>
19822 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
19823 <li about="#cite_note-x-1" 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> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
19828 Ref: 3. spaces in ref-names should be ignored
19832 A <ref name="x">foo</ref>
19833 B <ref name=" x " />
19837 <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":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19838 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>
19839 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>
19840 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
19841 <li about="#cite_note-x-1" 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> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
19845 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19847 Ref: 4. 'constructor' should be accepted as a valid ref-name
19851 A <ref name="constructor">foo</ref>
19854 <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":{"id":"mw-reference-text-cite_note-constructor-1"},"attrs":{"name":"constructor"}}'><a href="#cite_note-constructor-1">[1]</a></span></p>
19855 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19856 <li about="#cite_note-constructor-1" id="cite_note-constructor-1"><span rel="mw:referencedBy"><a href="#cite_ref-constructor_1-0">↑</a></span> <span id="mw-reference-text-cite_note-constructor-1" class="mw-reference-text">foo</span></li>
19861 Ref: 5. body should accept generic wikitext
19866 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19871 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19873 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19874 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">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>
19880 Ref: 6. indent-pres should not be output in ref-body
19892 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19894 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19895 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
19903 Ref: 7. No p-wrapping in ref-body
19922 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19924 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19925 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
19940 Ref: 8. transclusion wikitext has lower precedence
19944 A <ref> foo {{echo|</ref> B C}}
19948 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C<span typeof="mw:Nowiki">}}</span></p>
19949 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19950 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <span typeof="mw:Nowiki" data-parsoid='{"src":"{{","dsr":[12,14,0,0]}'>{{</span>echo|</span></li>
19955 Ref: 9. unclosed comments should not leak out of ref-body
19959 A <ref> foo <!--</ref> B C
19962 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C</p>
19963 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19964 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <!----></span></li>
19969 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19973 A <ref> <b> foo </ref> B C
19977 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C</p>
19980 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19981 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></span></li>
19986 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19994 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B
19995 C <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2">[2]</a></span> D</p>
19996 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
19997 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
19998 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
20003 Ref: 12. ref-tags act as trailing newline migration barrier
20007 <!--the newline at the end of this line moves out of the p-tag-->a
20009 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
20015 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
20018 <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>
20019 <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>
20022 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20023 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"></span></li>
20024 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"></span></li></ol>
20028 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
20037 <p><span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> A
20038 <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2">[2]</a></span> B</p>
20039 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20040 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
20041 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar
20047 Ref: 14. A nested ref-tag should be emitted as plain text
20051 <ref>foo <ref>bar</ref> baz</ref>
20055 <p><span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
20057 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20058 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <ref>bar</ref> baz</span></li>
20063 Ref: 15. ref-tags with identical names should get identical indexes
20067 A1 <ref name="a">foo</ref> A2 <ref name="a" />
20068 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
20072 <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":{"id":"mw-reference-text-cite_note-a-1"},"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>
20073 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":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span></p>
20075 <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> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></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> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
20079 ## We don't bother wt2wt-ing non-standard whitespace
20081 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
20089 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20090 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20091 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
20095 Ref: 17. Generate valid HTML5 id/about attributes
20099 <ref name="a b">foo</ref>
20103 <p><span class="reference" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_b-1"},"attrs":{"name":"a b"}}'><a href="#cite_note-a_b-1">[1]</a></span>
20106 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20107 <li about="#cite_note-a_b-1" id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b_1-0">↑</a></span> <span id="mw-reference-text-cite_note-a_b-1" class="mw-reference-text">foo</span></li>
20112 Ref: 18. T58916: Extension attributes should be parsed as plain text
20116 <ref name="{{echo|a}}">foo</ref>
20120 <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":{"id":"mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1"},"attrs":{"name":"{{echo|a}}"}}'><a href="#cite_note-.7B.7Becho.7Ca.7D.7D-1">[1]</a></span>
20123 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20124 <li about="#cite_note-.7B.7Becho.7Ca.7D.7D-1" 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> <span id="mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1" class="mw-reference-text">foo</span></li>
20129 Ref: 19. ref-tags with identical name encodings should get identical indexes
20133 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
20137 <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":{"id":"mw-reference-text-cite_note-a_.26_b-1"},"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>
20139 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20140 <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> <span id="mw-reference-text-cite_note-a_.26_b-1" class="mw-reference-text">foo</span></li>
20145 Ref: 20. ref-tags with identical names but different content should keep it
20149 A <ref name="foo">Foo one</ref>
20150 B <ref name="foo">Foo two</ref>
20151 C <ref name="foo" />
20155 <p>A <span about="#mwt2" class="reference" id="cite_ref-foo_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-foo-1"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1">[1]</a></span>
20156 B <span about="#mwt4" class="reference" id="cite_ref-foo_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo two"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1">[1]</a></span>
20157 C <span about="#mwt6" class="reference" id="cite_ref-foo_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"foo"}}'><a href="#cite_note-foo-1">[1]</a></span></p>
20159 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-foo-1" id="cite_note-foo-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-foo_1-0">1.0</a> <a href="#cite_ref-foo_1-1">1.1</a> <a href="#cite_ref-foo_1-2">1.2</a></span> <span id="mw-reference-text-cite_note-foo-1" class="mw-reference-text">Foo one</span></li>
20164 References: 1. references tag without any refs should be handled properly
20170 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
20174 References: 2. references tag with group only outputs references from that group
20178 A <ref group="a">foo</ref>
20179 B <ref group="b">bar</ref>
20182 <references group="a" />
20184 <references group="b" />
20186 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{"group":"a"}}'><a href="#cite_note-1">[a 1]</a></span>
20187 B <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"b"}}'><a href="#cite_note-2">[b 1]</a></span>
20188 C <span class="reference" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="#cite_note-3">[1]</a></span></p>
20190 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{"group":"a"}}'>
20191 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
20193 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
20194 <li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3">↑</a></span> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">baz</span></li>
20196 <ol class="references" typeof="mw:Extension/references" about="#mwt12" data-mw='{"name":"references","attrs":{"group":"b"}}'>
20197 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
20202 References: 3. ref list should be cleared after processing references
20214 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20216 <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> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
20219 <p>B <span about="#mwt6" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
20221 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20222 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
20227 References: 4. only referenced group should be cleared after processing references
20231 A <ref group="a">afoo</ref>
20234 <references group="a" />
20240 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{"group":"a"}}'><a href="#cite_note-1">[a 1]</a></span>
20241 B <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
20243 <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> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">afoo</span></li>
20246 <p>C <span about="#mwt8" class="reference" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="#cite_note-3">[2]</a></span></p>
20248 <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> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bfoo</span></li><li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3">↑</a></span> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">cfoo</span></li>
20253 References: 5. ref tags in references should be processed while ignoring all other content
20258 B <ref name="b">bar</ref>
20261 <ref name="a">foo</ref>
20262 This should just get lost.
20265 <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>
20266 B <span about="#mwt4" class="reference" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span></p>
20269 <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\":{\"id\":\"mw-reference-text-cite_note-a-1\"},\"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> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></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> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
20274 References: 6. <references /> from a transclusion
20278 <ref>Foo</ref> {{echo|<references />}}
20280 <p><span about="#mwt3" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"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> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">Foo</span></li>
20285 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
20289 A <ref>foo bar for a</ref>
20290 B <ref group="X" name="b" />
20294 <references group="X">
20295 <ref name="b">foo</ref>
20298 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
20299 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>
20302 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20303 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo bar for a</span></li>
20306 <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\":{\"id\":\"mw-reference-text-cite_note-b-2\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"#cite_note-b-2\">[X 1]</a></span>\n"},"attrs":{"group":"X"}}'>
20307 <li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b_2-0">↑</a></span> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">foo</span></li>
20312 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
20316 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
20319 <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>
20320 <ol class="references" typeof="mw:Extension/references" about="#mwt7" 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> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <b data-parsoid='{"stx":"html"}'>bar</b> and baz boo</span></li>
20324 # This test only works in wt2html now as the <references /> are always generated
20325 # unless selser is active. Once T72722 is fixed, we should add a changes test
20326 # here to ensure that unrelated changes don't add the new <references /> in
20329 References: 9. Generate missing references list at the end
20334 B <ref group="inexistent">bar</ref>
20336 <p>A <span class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B <span class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"inexistent"}}'><a href="#cite_note-2">[inexistent 1]</a></span></p>
20337 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20338 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
20340 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
20341 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
20346 Entities in ref name
20350 <ref name="test & me">hi</ref>
20353 <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":{"id":"mw-reference-text-cite_note-test_.26_me-1"},"attrs":{"name":"test &amp; me"}}'><a href="#cite_note-test_.26_me-1">[1]</a></span></p>
20354 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20355 <li about="#cite_note-test_.26_me-1" id="cite_note-test_.26_me-1"><span rel="mw:referencedBy"><a href="#cite_ref-test_.26_me_1-0">↑</a></span> <span id="mw-reference-text-cite_note-test_.26_me-1" class="mw-reference-text">hi</span></li>
20359 # This test is wt2html only because we're permitting the serializer to produce
20360 # dirty diffs, normalizing the unclosed references to the self-closed version.
20362 Generate references for unclosed references tag
20370 <p>a<span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20371 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20372 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
20376 New reference serializes on its own line
20378 parsoid=wt2wt,html2wt
20383 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
20386 #--------- Test stripping of empty nodes in template content ----------
20388 Empty LI and TR nodes should be stripped from template content
20393 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
20397 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
20410 Empty LI and TR nodes should not be stripped from top-level content
20437 Empty TR nodes should not be stripped if they have any attributes set
20439 {{EmptyTRWithHTMLAttrTest}}
20441 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
20442 <tr align="center"></tr>
20443 <tr><td>foo</td></tr>
20444 <tr align="center"></tr>
20445 <tr><td>bar</td></tr>
20449 #### ----------------------------------------------------------------
20450 #### The following section of tests are primarily to test
20451 #### wikitext escaping capabilities of Parsoid. Given that
20452 #### escaping can be done any number of ways, the wikitext (input)
20453 #### is always adjusted to reflect how Parsoid adds nowiki
20456 #### We are marking several tests as parsoid-only since the
20457 #### HTML in the result section is different from what the
20458 #### PHP parser generates for it.
20459 #### ----------------------------------------------------------------
20462 #### --------------- Headings ---------------
20464 #### 1. Nested inside html <h1>=foo=</h1>
20465 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
20466 #### 3. Nested inside html with wikitext split by html tags
20467 #### 4. No escape needed
20468 #### 5. Empty headings <h1></h1>
20469 #### 6. Heading chars in SOL context
20470 #### ----------------------------------------
20472 Headings: 0. Unnested
20476 <nowiki>=foo=</nowiki>
20478 <nowiki> =foo= </nowiki>
20480 <nowiki>=foo=</nowiki>
20482 =foo''a''<nowiki>=</nowiki>
20484 <p><span typeof="mw:Nowiki">=foo=</span></p>
20486 <p><span typeof="mw:Nowiki"> =foo= </span>
20488 <span typeof="mw:Nowiki">=foo=</span></p>
20490 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
20493 # New headings and existing headings are handled differently
20495 Headings: 1. Nested inside html
20503 <h1 data-parsoid=''>=foo=</h1>
20504 <h2 data-parsoid=''>=foo=</h2>
20505 <h3 data-parsoid=''>=foo=</h3>
20506 <h4 data-parsoid=''>=foo=</h4>
20507 <h5 data-parsoid=''>=foo=</h5>
20508 <h6 data-parsoid=''>=foo=</h6>
20516 =<nowiki>=foo=</nowiki>=
20517 ==<nowiki>=foo=</nowiki>==
20518 ===<nowiki>=foo=</nowiki>===
20519 ====<nowiki>=foo=</nowiki>====
20520 =====<nowiki>=foo=</nowiki>=====
20521 ======<nowiki>=foo=</nowiki>======
20526 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
20535 <nowiki>*</nowiki>bar
20541 <nowiki>=bar=</nowiki>
20545 Headings: 3. Nested inside html with wikitext split by html tags
20547 parsoid=html2wt,wt2wt
20549 = ='''bold'''<nowiki>foo=</nowiki> =
20551 <h1>=<b>bold</b>foo=</h1>
20555 Headings: 4a. No escaping needed (testing just h1 and h2)
20580 <h1><i>=</i>foo=</h1>
20584 Headings: 4b. No escaping needed (inside p-tags)
20599 Headings: 5. Empty headings
20611 =====<nowiki/>=====
20613 ======<nowiki/>======
20624 Headings: 6a. Heading chars in SOL context (with trailing spaces)
20628 <nowiki>=a=</nowiki>
20630 <nowiki>=a=</nowiki>
20632 <nowiki>=a=</nowiki>
20634 <nowiki>=a=</nowiki>
20643 Headings: 6b. Heading chars in SOL context (with trailing newlines)
20671 Headings: 6c. Heading chars in SOL context (leading newline break)
20676 <nowiki>=b=</nowiki>
20683 Headings: 6d. Heading chars in SOL context (with interspersed comments)
20687 <!--c0--><nowiki>=a=</nowiki>
20689 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
20691 <p><!--c0-->=a=</p>
20692 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
20696 Headings: 6d. Heading chars in SOL context (No escaping needed)
20706 Headings: 7. Insert a newline between new content and headings
20712 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
20713 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
20723 #### --------------- Lists ---------------
20724 #### 0. Outside nests (*foo, etc.)
20725 #### 1. Nested inside html <ul><li>*foo</li></ul>
20726 #### 2. Inside definition lists
20727 #### 3. Only bullets at start should be escaped
20728 #### 4. No escapes needed
20729 #### 5. No unnecessary escapes
20730 #### 6. Escape bullets in SOL position
20731 #### 7. Escape bullets in a multi-line context
20732 #### ----------------------------------------
20735 Lists: 0. Outside nests
20737 <nowiki>*</nowiki>foo
20739 <nowiki>#</nowiki>foo
20741 <nowiki>;Foo:</nowiki>bar
20750 Lists: 1. Nested inside html
20752 *<nowiki>*foo</nowiki>
20754 *<nowiki>#foo</nowiki>
20756 *<nowiki>:foo</nowiki>
20758 *<nowiki>;foo</nowiki>
20760 #<nowiki>*foo</nowiki>
20762 #<nowiki>#foo</nowiki>
20764 #<nowiki>:foo</nowiki>
20766 #<nowiki>;foo</nowiki>
20768 <ul><li>*foo</li></ul>
20769 <ul><li>#foo</li></ul>
20770 <ul><li>:foo</li></ul>
20771 <ul><li>;foo</li></ul>
20772 <ol><li>*foo</li></ol>
20773 <ol><li>#foo</li></ol>
20774 <ol><li>:foo</li></ol>
20775 <ol><li>;foo</li></ol>
20780 Lists: 2. Inside definition lists
20782 ;<nowiki>;foo</nowiki>
20784 ;<nowiki>:foo</nowiki>
20786 ;<nowiki>:foo</nowiki>
20789 :<nowiki>:foo</nowiki>
20791 <dl><dt>;foo</dt></dl>
20792 <dl><dt>:foo</dt></dl>
20795 <dl><dd>:foo</dd></dl>
20800 Lists: 3. Only bullets at start of text should be escaped
20802 *<nowiki>*foo*bar</nowiki>
20804 *<nowiki>*foo</nowiki>''it''*bar
20806 <ul><li>*foo*bar</li></ul>
20807 <ul><li>*foo<i>it</i>*bar</li></ul>
20812 Lists: 4. No escapes needed
20833 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20837 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20843 Lists: 5. No unnecessary escapes
20845 * bar <span><nowiki>[[foo]]</nowiki></span>
20847 * =bar <span><nowiki>[[foo]]</nowiki></span>
20849 * [[bar <span><nowiki>[[foo]]</nowiki></span>
20851 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
20853 * =bar <span>foo]]</span>=
20859 <ul><li> bar <span>[[foo]]</span></li></ul>
20860 <ul><li> =bar <span>[[foo]]</span></li></ul>
20861 <ul><li> [[bar <span>[[foo]]</span></li></ul>
20862 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
20863 <ul><li> =bar <span>foo]]</span>=</li></ul>
20864 <ul><li> <s></s>: a</li></ul>
20865 <ul><li> <i>* foo</i></li></ul>
20870 Lists: 6. Escape bullets in SOL position
20874 <p><!--cmt-->*foo</p>
20876 <!--cmt--><nowiki>*</nowiki>foo
20880 Lists: 7. Escape bullets in a multi-line context
20883 <nowiki>*</nowiki>b
20891 Lists: 8. Escape colons only if not present in tags
20895 <dl><dt>a:b<i>c:d</i></dt></dl>
20897 ; <nowiki>a:b</nowiki>''c:d''
20900 #### --------------- HRs ---------------
20901 #### 1. Single line
20902 #### -----------------------------------
20905 HRs: 1. Single line
20907 ----<nowiki>----</nowiki>
20919 #### --------------- Tables ---------------
20920 #### 1a. Simple example
20921 #### 1b. No escaping needed (!foo)
20922 #### 1c. No escaping needed (|foo)
20923 #### 1d. No escaping needed (|}foo)
20925 #### 2a. Nested in td (<td>foo|bar</td>)
20926 #### 2b. Nested in td (<td>foo||bar</td>)
20927 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20929 #### 3a. Nested in th (<th>foo!bar</th>)
20930 #### 3b. Nested in th (<th>foo!!bar</th>)
20931 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20935 #### 4c. No escaping needed
20936 #### --------------------------------------
20939 Tables: 1a. Simple example
20950 Tables: 1b. No escaping needed
20959 Tables: 1c. No escaping needed
20968 Tables: 1d. No escaping needed
20977 Tables: 2a. Nested in td
20982 <td>foo|bar</td></tr>
20983 <tr><td>x<div>a|b</div></td>
20987 |<nowiki>foo|bar</nowiki>
20989 |x<div><nowiki>a|b</nowiki></div>
21005 Tables: 2b. Nested in td
21011 <td>a<i>b||c</i></td>
21012 <td>a<i><div>b||c</div></i></td>
21013 </tr></tbody></table>
21016 |<nowiki>foo||bar</nowiki>
21017 |a''<nowiki>b||c</nowiki>''
21018 |a''<div><nowiki>b||c</nowiki></div>''
21027 <td>a<i><div>b||c</div></i>
21033 Tables: 2c. Nested in td -- no escaping needed
21049 Tables: 3a. Nested in th
21065 Tables: 3b. Nested in th
21070 <tr><th>foo!!bar</th>
21071 <th><i>foo|bar</i></th>
21072 <th><i>foo!!bar</i></th>
21073 <th><i><span>foo!!bar</span></i></th>
21074 </tr></tbody></table>
21077 !<nowiki>foo!!bar</nowiki>
21078 !''<nowiki>foo|bar</nowiki>''
21079 !''<nowiki>foo!!bar</nowiki>''
21080 !''<span><nowiki>foo!!bar</nowiki></span>''
21089 <th><i>foo!!bar</i>
21091 <th><i><span>foo!!bar</span></i>
21097 Tables: 3c. Nested in th
21102 <tr><th>foo||bar</th>
21103 <th><span typeof="mw:Nowiki">foo||bar</span></th>
21104 </tr></tbody></table>
21107 !<nowiki>foo||bar</nowiki>
21108 !<nowiki>foo||bar</nowiki>
21121 Tables: 4a. Escape -
21140 |<nowiki>-bar</nowiki>
21145 Tables: 4b. Escape +
21164 |<nowiki>+bar</nowiki>
21169 Tables: 4c. No escaping needed
21212 <tr><td>foo-bar</td><td>foo+bar</td></tr>
21213 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
21219 <div>a|b</div></td>
21224 Tables: 4d. No escaping needed
21234 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
21243 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
21244 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
21245 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
21250 Tables: Digest broken attributes on table and tr tag
21266 #### --------------- Links ----------------
21267 #### 1. Quote marks in link text
21268 #### 2. Wikilinks: Escapes needed
21269 #### 3. Wikilinks: No escapes needed
21270 #### 4. Extlinks: Escapes needed
21271 #### 5. Extlinks: No escapes needed
21272 #### --------------------------------------
21274 Links 1. WikiLinks: No escapes needed
21278 [[Foo|x [Foobar] x]]
21280 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
21281 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
21282 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
21285 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
21286 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
21287 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
21291 Links 2. WikiLinks: Escapes needed
21295 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
21296 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
21297 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
21298 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
21299 <a href="Foo" rel="mw:WikiLink">|Bar</a>
21300 <a href="Foo" rel="mw:WikiLink">]]bar</a>
21301 <a href="Foo" rel="mw:WikiLink">[[bar</a>
21302 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
21303 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
21304 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
21306 [[Foo|<nowiki>Foobar]</nowiki>]]
21307 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
21308 [[Foo|<nowiki>[[Bar]]</nowiki>]]
21309 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
21310 [[Foo|<nowiki>|Bar</nowiki>]]
21311 [[Foo|<nowiki>]]bar</nowiki>]]
21312 [[Foo|<nowiki>[[bar</nowiki>]]
21313 [[Foo|<nowiki>x [[ y</nowiki>]]
21314 [[Foo|<nowiki>x ]] y</nowiki>]]
21315 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
21317 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
21318 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
21319 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
21320 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
21321 <a href="/wiki/Foo" title="Foo">|Bar</a>
21322 <a href="/wiki/Foo" title="Foo">]]bar</a>
21323 <a href="/wiki/Foo" title="Foo">[[bar</a>
21324 <a href="/wiki/Foo" title="Foo">x [[ y</a>
21325 <a href="/wiki/Foo" title="Foo">x ]] y</a>
21326 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
21331 Links 3. WikiLinks: No escapes needed
21336 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
21337 <a href="/wiki/Foo" title="Foo">foo|bar</a>
21340 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
21341 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
21345 Links 4. ExtLinks: Escapes needed
21349 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
21350 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
21351 <p>[http://google.com]</p>
21352 <p>[http://google.com google]</p>
21354 [http://google.com <nowiki>[google]</nowiki>]
21355 [http://google.com <nowiki>google]</nowiki>]
21357 <nowiki>[http://google.com]</nowiki>
21359 <nowiki>[http://google.com google]</nowiki>
21362 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
21363 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
21364 </p><p>[http://google.com]
21365 </p><p>[http://google.com google]
21370 Links 5. ExtLinks: No escapes needed
21372 [http://google.com [google]
21374 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
21377 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
21381 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
21383 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
21384 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
21385 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
21386 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
21387 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
21388 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
21389 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21390 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
21391 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21392 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
21393 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
21394 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
21395 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
21398 x<nowiki/>http://example.com<nowiki/>y
21399 http://example.com<nowiki/>?x
21400 http://example.com<nowiki/>&x
21401 http://example.com<nowiki/>'x
21402 http://example.com<nowiki/>,x
21403 http://example.com<nowiki/>.x
21404 http://example.com<nowiki/>;x
21405 http://example.com<nowiki/>:x
21406 http://example.com<nowiki/>;x
21407 http://example.com<nowiki/>!x
21408 http://example.com<nowiki/>=x
21409 http://example.com<nowiki/>(x)
21410 http://example.com(x<nowiki/>)
21414 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21417 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
21419 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
21420 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
21421 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
21422 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
21423 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
21429 "http://example.com"
21430 (http://example.com)
21431 (http://example.com) foo
21432 http://example.com,
21433 http://example.com, foo
21436 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
21438 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
21439 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
21440 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
21441 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
21442 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
21447 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21449 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
21450 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
21452 http://example.com.,;:!?\
21453 -http://example.com:
21455 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
21456 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
21461 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
21463 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
21464 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
21465 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
21469 X<nowiki/>RFC 123<nowiki/>y
21473 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
21475 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
21476 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
21477 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
21484 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
21485 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
21486 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
21491 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
21493 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
21494 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21495 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21499 X<nowiki/>PMID 123<nowiki/>y
21503 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
21505 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
21506 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
21507 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
21514 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
21515 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
21516 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
21521 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
21523 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
21524 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
21525 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
21528 ISBN 1234567890<nowiki/>1
21529 ISBN 1234567890<nowiki/>x
21530 a<nowiki/>ISBN 1234567890<nowiki/>b
21534 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
21536 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
21540 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
21545 Links 14. Protect link-like plain text. (Parsoid bug T78425)
21549 <p>this is not a link: http://example.com
21552 this is not a link: <nowiki>http://example.com</nowiki>
21556 Links 15. Link trails can't become link prefixes.
21560 [[Söfnuður]]-[[00]]
21562 <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>
21565 <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>
21568 #### --------------- Quotes ---------------
21569 #### 1. Quotes inside <b> and <i>
21570 #### 2. Link fragments separated by <i> and <b> tags
21571 #### 3. Link fragments inside <i> and <b>
21572 #### 4. No escaping needed
21573 #### --------------------------------------
21575 1a. Quotes inside <b> and <i>
21577 parsoid=html2wt,wt2wt
21580 ''<nowiki>''foo''</nowiki>''
21581 ''<nowiki>'''foo'''</nowiki>''
21583 '''<nowiki/>'foo''''
21584 '''<nowiki>''foo''</nowiki>'''
21585 '''<nowiki>'''foo'''</nowiki>'''
21586 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
21587 '''foo'''<nowiki/>'s
21593 '''foo'''<nowiki/>'
21594 ''''foo'''<nowiki/>'
21595 ''fools'<span> errand</span>''
21596 ''<span>fool</span>'s errand''
21597 '<nowiki/>''foo'' bar '''baz''
21598 a|!*#-:;+-~[]{}b'''x''
21607 <b>foo'<i>bar'</i>baz</b>
21616 <i>fools'<span> errand</span></i>
21617 <i><span>fool</span>'s errand</i>
21618 '<i>foo</i> bar '<i>baz</i>
21619 a|!*#-:;+-~[]{}b'<i>x</i>
21624 1b. Quotes inside <b> and <i> with other tags on same line
21626 parsoid=html2wt,wt2wt
21628 '''a'' foo ''[[bar]]''
21629 ''a''' foo ''[[bar]]''
21630 ''a''' foo '''{{echo|[[bar]]}}'''
21631 [[foo]] x'''[[bar]]''
21632 '''foo'' <ref>test</ref>
21633 '''foo'' <div title="name">test</div>
21634 '''foo'' and <br> bar
21637 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21638 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21639 <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>
21640 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
21641 '<i>foo</i> <span class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
21642 '<i>foo</i> <div title="name">test</div>
21643 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
21644 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21645 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">test</span></li>
21650 2. Link fragments separated by <i> and <b> tags
21652 [[''foo''<nowiki>hello]]</nowiki>
21654 [['''foo'''<nowiki>hello]]</nowiki>
21656 <p>[[<i>foo</i>hello]]
21657 </p><p>[[<b>foo</b>hello]]
21661 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
21662 # this is one of the shortcomings of this format
21664 3. Link fragments inside <i> and <b>
21666 ''[[foo''<nowiki>]]</nowiki>
21668 '''[[foo'''<nowiki>]]</nowiki>
21671 </p><p><b>[[foo</b>]]
21676 4. No escaping needed
21678 '<span>''bar''</span>'
21679 '<span>'''bar'''</span>'
21682 <p>'<span><i>bar</i></span>'
21683 '<span><b>bar</b></span>'
21688 #### ----------- Paragraphs ---------------
21689 #### 1. No unnecessary escapes
21690 #### --------------------------------------
21693 1. No unnecessary escapes
21695 bar <span><nowiki>[[foo]]</nowiki></span>
21697 =bar <span><nowiki>[[foo]]</nowiki></span>
21699 [[bar <span><nowiki>[[foo]]</nowiki></span>
21701 ]]bar <span><nowiki>[[foo]]</nowiki></span>
21703 =bar <span>foo]]</span><nowiki>=</nowiki>
21705 <p>bar <span>[[foo]]</span>
21706 </p><p>=bar <span>[[foo]]</span>
21707 </p><p>[[bar <span>[[foo]]</span>
21708 </p><p>]]bar <span>[[foo]]</span>
21709 </p><p>=bar <span>foo]]</span>=
21713 #### ----------------------- PRE --------------------------
21714 #### 1. Leading whitespace in SOL context should be escaped
21715 #### ------------------------------------------------------
21717 1. Leading whitespace in SOL context should be escaped
21721 <nowiki> </nowiki>a
21723 <nowiki> </nowiki> a
21725 <nowiki> </nowiki>a(tab)
21727 <nowiki> </nowiki> a
21729 <nowiki> </nowiki> a
21732 <nowiki> </nowiki>b
21735 <nowiki> </nowiki>b
21738 <nowiki> </nowiki> b
21744 <p><!--cmt--> a</p>
21754 2. Leading whitespace in non-indent-pre contexts should not be escaped
21762 <p>foo <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
21763 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21764 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><i data-parsoid='{"dsr":[9,14,2,2]}'>a</i>
21770 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
21789 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
21793 [[File:Foobar.jpg|thumb|caption]]
21796 <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>
21800 5. Nowiki escaping should account for indent-pres
21809 #### --------------- Behavior Switches --------------------
21811 1. Valid behavior switches should be escaped
21818 <nowiki>__TOC__</nowiki>
21819 ''<nowiki>__TOC__</nowiki>''
21823 2. Invalid behavior switches should not be escaped
21834 #### --------------- HTML tags ---------------
21837 #### 3. multi-line html tag
21838 #### 4. extension tags
21839 #### -----------------------------------------
21845 <a href="http://google.com">google</a>
21847 <a href="http://google.com">google</a>
21853 * <nowiki><div>foo</div></nowiki>
21854 * <nowiki><div style="color:red">foo</div></nowiki>
21855 * <nowiki><td></nowiki>
21857 <ul><li> <div>foo</div></li>
21858 <li> <div style="color:red">foo</div></li>
21859 <li> <td></li></ul>
21864 3. multi-line html tag
21879 <nowiki><ref>foo</ref></nowiki>
21881 <nowiki><ref>bar</nowiki>
21883 baz<nowiki></ref></nowiki>
21885 <p><ref>foo</ref>
21886 </p><p><ref>bar
21887 </p><p>baz</ref>
21891 #### --------------- Others ---------------
21895 <nowiki>foo</nowiki>
21897 <p><nowiki>foo</nowiki>
21901 ## The quote-char in the input is necessary for triggering the bug
21903 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
21905 parsoid=wt2wt,html2wt
21914 Tag-like HTML structures are passed through as text
21936 </p><p>1<d e>f
21941 HTML tag with necessary entities in attributes
21943 <span title="&amp;">foo</span>
21945 <p><span title="&amp;">foo</span>
21950 HTML tag with 'unnecessary' entity encoding in attributes
21952 <span title="&">foo</span>
21954 <p><span title="&">foo</span>
21959 HTML tag with broken attribute value quoting
21961 <span title="Hello world>Foo</span>
21963 <p><span>Foo</span>
21966 <p><span title="Hello world">Foo</span>
21971 Parsoid-only: HTML tag with broken attribute value quoting
21975 <span title="Hello world>Foo</span>
21977 <p><span title="Hello world">Foo</span>
21982 Table with broken attribute value quoting
21985 | title="Hello world|Foo
21996 <td title="Hello world">Foo
22002 Table with broken attribute value quoting on consecutive lines
22005 | title="Hello world|Foo
22006 | style="color:red|Bar
22019 <td title="Hello world">Foo
22020 </td><td style="color: red">Bar
22021 </td></tr></tbody></table>
22026 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
22036 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
22046 Accept empty td cell attribute
22049 | align="center" | foo || |
22054 <td align="center"> foo </td>
22061 Non-empty attributes in th-cells
22064 ! Foo !! style="color: red" | Bar
22070 <th style="color: red"> Bar
22076 Accept empty attributes in th-cells
22091 Empty table rows go away
22112 ### Parsoid-centric tests for testing RTing of inter-element separators
22113 ### Edge cases not tested by existing parser tests and specific to
22114 ### Parsoid-specific serialization strategies.
22118 RT-ed inter-element separators should be valid separators
22130 # Parsoid-only since PHP parser relies on Tidy for correct output
22132 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
22146 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
22147 <p>bar</p></small></td></tr>
22151 <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>
22156 Empty TD followed by TD with tpl-generated attribute
22161 |{{echo|style='color:red'}}|foo
22175 Indented table with an empty td
22193 ## We have some newline diffs RT-ing this edge case
22194 ## and it is not important enough -- we seem to be emitting
22195 ## at most 2 newlines after a </tr> and this is unrelated to
22196 ## the issue from T85627 that this is testing.
22198 Indented table with blank lines in between (T85627)
22217 Indented block & table
22231 <div data-parsoid='{"stx":"html"}'>foo</div>
22233 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
22238 Indent and comment before table row
22253 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
22254 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
22258 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
22260 Empty TR followed by a template-generated TR
22266 {{echo|<tr><td>foo</td></tr>}}
22272 <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}}]}'>
22277 ## PHP and parsoid output differ for this, and since this is primarily
22278 ## for testing Parsoid's serializer, marking this Parsoid only
22280 Empty TR followed by mixed-ws-comment line should RT correctly
22296 <!--c--> </tr><!--d-->
22302 Multi-line image caption generated by templates with/without trailing newlines
22304 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
22305 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
22307 <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>
22308 <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>
22312 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
22316 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
22318 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
22320 <includeonly>foo</includeonly>
22328 ## PHP emits broken html for this, and since this is primarily
22329 ## a Parsoid serializer test, marking this Parsoid only
22331 Improperly nested inline or quotes tags with whitespace in between
22335 <span> <s>x</span> </s>
22338 <p><span> <s>x</s></span><s> </s>
22339 <b> <i>x</i></b><i> </i>
22344 Encapsulate protected attributes from wt
22348 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
22350 <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>
22354 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
22355 ## Having nested or stray pre tags results in the attempt to add duplicates,
22356 ## causing an assertion fail. This test tries to prevent that situation.
22358 Ensure ParagraphWrapper can deal with stray closing pre tags
22368 1. Ensure fostered text content is wrapped in element nodes
22372 <table>hi</table><table>ho</table>
22381 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
22383 parsoid=wt2html,wt2wt
22392 <tbody><tr><td> a</td></tr>
22397 Encapsulation properly handles null DSR information from foster box
22399 parsoid=wt2html,wt2wt
22401 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
22403 <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>
22407 1. Encapsulate foster-parented transclusion content
22409 parsoid=wt2wt,wt2html
22411 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
22413 <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>
22423 2. Encapsulate foster-parented transclusion content
22425 parsoid=wt2wt,wt2html
22427 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
22429 <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>
22440 3. Encapsulate foster-parented transclusion content
22442 parsoid=wt2wt,wt2html
22444 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22446 <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>"]}">
22459 4. Encapsulate foster-parented transclusion content
22461 parsoid=wt2wt,wt2html
22463 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22465 <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>"]}">
22478 5. Encapsulate foster-parented transclusion content
22480 parsoid=wt2wt,wt2html
22482 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
22484 <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>
22499 6. Encapsulate foster-parented transclusion content
22501 parsoid=wt2wt,wt2html
22503 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
22505 <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>
22521 7. Encapsulate foster-parented transclusion content
22523 parsoid=wt2wt,wt2html
22525 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
22527 <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>
22538 8. Encapsulate foster-parented transclusion content
22540 parsoid=wt2wt,wt2html
22543 }}{|{{echo|style='color:red'}}
22548 <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>
22558 9. Encapsulate foster-parented transclusion content
22560 parsoid=wt2wt,wt2html
22562 <table>{{echo|hi</table>hello}}
22564 <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>
22568 Table in fosterable position
22570 parsoid=wt2html,wt2wt
22579 <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">
22581 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
22587 # Parsoid only for bug 64747
22589 Properly encapsulate empty-content transclusions in fosterable positions
22597 <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":["","","",""]}]]}'>
22603 Support <object> element with .data attribute
22607 <object data="test.swf"></object>
22609 <object data="test.swf"></object>
22613 Don't block XML namespace declaration
22615 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
22617 <p><span>MediaWiki</span>
22620 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
22623 # -----------------------------------------------------------------
22624 # The following section of tests are primarily to spec requirements
22625 # around serialization of new/edited content.
22627 # All these tests are marked Parsoid html2wt and html2html only
22628 # ----------------------------------------------------------------
22630 # 'mi' is a localinterwiki prefix as well as a language
22632 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
22636 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
22642 New wiki links (href variations)
22646 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22647 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
22648 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
22649 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
22654 [[Toxine bactérienne]]
22658 New wiki links (content string variations)
22662 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22663 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
22664 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
22668 [[Foo_bar|./Foo_bar]]
22672 New category links (href variations)
22676 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
22677 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
22678 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
22680 [[Category:Toxine bactérienne]]
22681 [[Category:Toxine bactérienne]]
22682 [[Category:Toxine bactérienne]]
22686 New sol transparent links don't need indent-pre nowiki protection
22691 <link rel="mw:PageProp/redirect" href="./Main_Page">
22692 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
22693 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
22695 #WEITERLEITUNG [[Main Page]]
22696 <!-- this is good --> [[Category:Good]]
22697 <!-- this is great --> [[Kategorie:Great]]
22701 New interlanguage links (href variations)
22705 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
22706 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
22707 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
22709 [[es:Toxine bactérienne]]
22710 [[es:Toxine_bactérienne]]
22711 [[es:Toxine_bactérienne]]
22715 Image: Modifying size of an image (1)
22718 "modes": ["wt2wt"],
22720 ["img[height]", "attr", "height", "22"],
22721 ["img[width]", "attr", "width", "200"]
22725 [[Image:Foobar.jpg|230x230px]]
22727 [[Image:Foobar.jpg|200x200px]]
22731 Image: Modifying size of an image (2)
22734 "modes": ["wt2wt"],
22736 ["img[height]", "attr", "height", "100"],
22737 ["img[width]", "attr", "width", "500"]
22741 [[Image:Foobar.jpg|230x230px]]
22743 [[Image:Foobar.jpg|500x500px]]
22746 # Change in size is ignored so long as class='mw-default-size'
22748 Image: Modifying size of an image (3)
22751 "modes": ["wt2wt"],
22753 ["figure[class]", "removeClass", "mw-default-size"],
22754 ["figure img", "attr", "height", "19"],
22755 ["figure img", "attr", "width", "170"]
22759 [[Image:Foobar.jpg|thumb]]
22761 [[Image:Foobar.jpg|thumb|170x170px]]
22765 Image: Modifying alignment of an image (bug 48665)
22768 "modes": ["wt2wt"],
22770 ["figure[class]", "removeClass", "mw-halign-right"],
22771 ["figure[class]", "addClass", "mw-halign-left"]
22775 [[Image:Foobar.jpg|thumb|caption|right]]
22777 [[Image:Foobar.jpg|thumb|caption|left]]
22781 Image: Modifying mw-default-size of an frameless image (bug 62805)
22784 "modes": ["wt2wt"],
22786 ["figure.mw-default-size", "removeClass", "mw-default-size"]
22790 [[Image:Foobar.jpg|frameless|right]]
22792 [[Image:Foobar.jpg|frameless|right|220x220px]]
22796 Image: Modifying valign of an image (bug 49221)
22799 "modes": ["wt2wt"],
22801 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
22802 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
22806 [[File:Foobar.jpg|20px|middle]]
22808 [[File:Foobar.jpg|20px|text-top]]
22812 Image: Modifying alt attribute of an image (bug 56400)
22815 "modes": ["wt2wt"],
22817 ["img[alt]", "attr", "alt", "some alternate edited text"]
22821 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
22823 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
22827 Image: Modifying caption of an image
22830 "modes": ["wt2wt"],
22832 ["figcaption", "text", "new caption"]
22836 [[Image:Foobar.jpg|thumb|original caption]]
22838 [[Image:Foobar.jpg|thumb|new caption]]
22842 Image: empty alt attribute (bug 48924)
22846 [[File:Foobar.jpg|thumb|alt=|bar]]
22848 <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>
22852 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
22857 #<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>
22859 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
22863 Image: Block level image should have \n before and after
22866 [[File:Foobar.jpg|right|thumb|150x150px]]
22870 <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>
22875 Image: New block level image should have \n before and after (existing content)
22878 [[File:Foobar.jpg|right|thumb|150x150px]]
22882 <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>
22887 Image: upright option (parsoid)
22891 [[File:Foobar.jpg|thumb|upright|caption]]
22892 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
22893 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
22895 <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>
22896 <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>
22897 <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>
22901 Image: upright option is ignored on inline and frame images (parsoid)
22905 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
22907 <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>
22911 Image: from basic HTML (1)
22915 <span typeof="mw:Image">
22916 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22919 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22923 Image: from basic HTML (2)
22927 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22929 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22933 Image: from basic HTML (3)
22937 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
22939 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
22943 Image: from basic HTML (4)
22947 <img src="File:Foobar.jpg">
22949 [[File:Foobar.jpg|link=]]
22953 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
22958 <li><p>foo</p></li>
22965 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
22969 <ul> <li>foo</li></ul>
22975 Don't strip leading whitespace when handling indent-pre suppressing tags
22980 <tr><td> indented row</td></tr>
22983 <b>This is very bold of you!</b>
22986 indented cell (no pre-wrapping!)
22996 '''This is very bold of you!'''
23000 indented cell (no pre-wrapping!)
23008 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
23013 <nowiki> </nowiki><span>bar</span>
23016 <nowiki> </nowiki></span>bar2
23019 <nowiki> </nowiki><span>bar</span>
23022 <nowiki> </nowiki><span>foo</span>
23040 Lists: Add space after bullets
23047 <li><span> baz</span></li>
23052 * <span> baz</span>
23056 Lists: Dont insert newlines in a serialized list item.
23060 <ul><li>a<br>b</li><li>c</li></ul>
23067 Headings: Add space before/after == (Bug 51744)
23074 <h2><span> baz</span></h2>
23082 == <span> baz</span> ==
23086 Headings: Force metas to serialize before/after
23090 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
23091 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
23093 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
23101 <!--foo--> [[Category:A3]]
23106 Parsoid: Serialize positional parameters with = in them as named parameter
23110 <p about="#mwt1" typeof="mw:Transclusion"
23111 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
23113 <p about="#mwt1" typeof="mw:Transclusion"
23114 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
23116 <!--Orig params with data-parsoid has heuristics for handling = chars-->
23117 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
23118 <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>
23122 {{echo|1 = f=oo|2 = bar}}
23124 <!--Orig params with data-parsoid has heuristics for handling = chars-->
23125 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
23126 {{echo|<nowiki>f=oo</nowiki>|bar}}
23130 Parsoid: Serialize positional parameters with = in extlink as named parameter
23134 <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>
23136 {{echo|1 = http://stuff?is=ok}}
23140 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
23144 <div>a<p>b</p></div>
23165 Substrings resembling wikitext in hrefs should not get nowiki escapes
23169 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
23174 #-----------------------------
23175 # I/B quote minimization tests
23176 #-----------------------------
23179 1. I/B quote minimization: wikitext-only tags should be combined
23183 <p><i>A</i><i>B</i></p>
23184 <p><b>A</b><b>B</b></p>
23185 <p><i>A</i><b><i>B</i></b></p>
23186 <p><b>A</b><i><b>B</b></i></p>
23187 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
23188 <p><i><b>A</b></i><i><b>B</b></i></p>
23189 <p><i><b>A</b></i><b><i>B</i></b></p>
23190 <p><b><i>A</i></b><i><b>B</b></i></p>
23210 2. I/B quote minimization: wikitext and html tags should not be combined
23214 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
23215 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
23219 ''A''<nowiki/>'''<i>B</i>'''
23223 3. I/B quote minimization: templated content stops minimization
23227 <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>
23228 <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>
23230 ''A''{{echo|''B''}}
23232 ''A''{{echo|'''''B'''''}}
23236 4. I/B quote minimization: new content should be mimimized with adjacent old content
23240 <p><i>A</i><i>B</i></p>
23241 <p><b>A</b><b>B</b></p>
23242 <p><i>A</i><b><i>B</i></b></p>
23252 5a. Merge adjacent quote nodes if they've been edited
23255 "modes": ["wt2wt"],
23257 ["p", "contents", "remove", ":contains('b')"]
23267 5b. Merge adjacent quote nodes if they've been edited
23270 "modes": ["wt2wt"],
23276 ''a''<span id="x">b</span>''c''
23281 #------------------------------------
23282 # End of I/B quote minimization tests
23283 #------------------------------------
23286 Bug 54262: New entities
23292 <span typeof="mw:Entity"> </span>
23295 ## Note that there is no wikitext output for 'unknownproperty' ##
23296 ## Unknown magic words are silently dropped ##
23303 <meta property='mw:PageProp/toc' />
23304 <meta property='mw:PageProp/notoc' />
23305 <meta property='mw:PageProp/forcetoc' />
23306 <meta property='mw:PageProp/index' />
23307 <meta property='mw:PageProp/noindex' />
23308 <meta property='mw:PageProp/nogallery' />
23309 <meta property='mw:PageProp/noeditsection' />
23310 <meta property='mw:PageProp/notitleconvert' />
23311 <meta property='mw:PageProp/nocontentconvert' />
23312 <meta property='mw:PageProp/unknownproperty' />
23322 __NOCONTENTCONVERT__
23326 Consecutive <pre>s should not get merged
23328 parsoid=html2wt,html2html
23330 <pre>a</pre><pre>b</pre>
23358 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
23362 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
23364 [[Special:BookSources/1234567890|ISBN 1234567895]]
23368 Edited RFC links not serializable as RFC links should serialize as extlinks
23372 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
23374 [//tools.ietf.org/html/rfc123 New RFC]
23378 Edited PMID links not serializable as PMID links should serialize as extlinks
23382 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
23384 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
23388 WTS of autolinks with trailing/surrounding context
23392 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
23393 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
23394 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
23395 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
23396 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
23397 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
23399 http://cscott.net<nowiki/>'''foo'''
23401 http://cscott.net<b>foo</b>
23403 '''http://cscott.net<nowiki/>'''
23405 '''http://cscott.net '''
23407 '''http://cscott.net<nowiki/>x'''
23409 http://cscott.net<nowiki/>x
23413 WTS of autolinks with nowikis (round-trip)
23415 x<nowiki/>http://cscott.net<nowiki/>x
23417 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
23420 # this is the "easy" test because it leaves in place all the
23421 # data-parsoid information indicating this is an autolink
23423 WTS of autolinks with escapes (editing)
23426 "modes": ["wt2wt"],
23428 [ "meta", "remove" ]
23432 x<nowiki/>http://cscott.net<nowiki/>x
23434 x<nowiki/>http://cscott.net<nowiki/>x
23438 Edited Redirect link should emit a non-piped wikitext link
23442 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
23448 T75121: Infer extension name from typeOf if data-mw is not present
23452 <div typeOf="mw:Extension/foo"></div>
23457 # -----------------------------------------------------------------
23458 # End of section for Parsoid-only html2wt tests for serialization
23460 # -----------------------------------------------------------------
23467 Try for 100% code coverage